Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions openspec/changes/feedback-channels/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

## 3. Recipes and the agent index

- [ ] 3.1 `git mv packages/cli/src/agent/feedback.md packages/cli/src/agent/rule-feedback.md`, update its header/topic name and its payload instructions to include `kind: "rule"`, and repoint `feedback-invite.md` at `agent rule-feedback`; verify `pnpm cli agent rule-feedback` (after `pnpm build`) opens with `# Topic: rule-feedback` and embeds the rule schema
- [ ] 3.2 Write the new `packages/cli/src/agent/feedback.md` (general channel: user's words as `verbatim`, agent-drafted `context`, redaction, show-payload-and-wait-for-yes, telemetry-off relay with the issues URL); verify `pnpm cli agent feedback` embeds only the `general` schema
- [ ] 3.3 Write `packages/cli/src/agent/bug-report.md` (agent drafts from the session, asks only for gaps, redaction, show-payload-and-wait-for-yes, no version-information ask, telemetry-off relay); verify `pnpm cli agent bug-report` embeds only the `bug` schema and contains no version key
- [ ] 3.4 Wire `TOPIC_INPUT_SCHEMAS` in `prompts/recipes.ts` (`rule-feedback` → rule branch, `feedback` → general, `bug-report` → bug) and add `rule-feedback` and `bug-report` to `INTERNAL_TOPICS` in `prompts/index.ts`; verify `prompts.test.ts` and `feedback-recipes.test.ts` pass after updating them for the new topic names
- [ ] 3.5 Add a `FEEDBACK_TOPICS` section to the `taskless agent` index in `commands/agent.ts` listing `feedback` and `bug-report`, keep the `feedback` command in `UNLISTED_COMMANDS` with its comment rewritten per design.md; verify a test that the index lists both and does not list `rule-feedback`
- [ ] 3.6 Update the `feedback` command's `meta.description` and the comment above `feedbackCommand` to describe three channels; verify `pnpm cli feedback --help` reads correctly
- [ ] 3.7 Run Vale over the three recipes and fix findings; verify `pnpm lint` reports no recipe prose errors
- [x] 3.1 `git mv packages/cli/src/agent/feedback.md packages/cli/src/agent/rule-feedback.md`, update its header/topic name and its payload instructions to include `kind: "rule"`, and repoint `feedback-invite.md` at `agent rule-feedback`; verify `pnpm cli agent rule-feedback` (after `pnpm build`) opens with `# Topic: rule-feedback` and embeds the rule schema
- [x] 3.2 Write the new `packages/cli/src/agent/feedback.md` (general channel: user's words as `verbatim`, agent-drafted `context`, redaction, show-payload-and-wait-for-yes, telemetry-off relay with the issues URL); verify `pnpm cli agent feedback` embeds only the `general` schema
- [x] 3.3 Write `packages/cli/src/agent/bug-report.md` (agent drafts from the session, asks only for gaps, redaction, show-payload-and-wait-for-yes, no version-information ask, telemetry-off relay); verify `pnpm cli agent bug-report` embeds only the `bug` schema and contains no version key
- [x] 3.4 Wire `TOPIC_INPUT_SCHEMAS` in `prompts/recipes.ts` (`rule-feedback` → rule branch, `feedback` → general, `bug-report` → bug) and add `rule-feedback` and `bug-report` to `INTERNAL_TOPICS` in `prompts/index.ts`; verify `prompts.test.ts` and `feedback-recipes.test.ts` pass after updating them for the new topic names
- [x] 3.5 Add a `FEEDBACK_TOPICS` section to the `taskless agent` index in `commands/agent.ts` listing `feedback` and `bug-report`, keep the `feedback` command in `UNLISTED_COMMANDS` with its comment rewritten per design.md; verify a test that the index lists both and does not list `rule-feedback`
- [x] 3.6 Update the `feedback` command's `meta.description` and the comment above `feedbackCommand` to describe three channels; verify `pnpm cli feedback --help` reads correctly
- [x] 3.7 Run Vale over the three recipes and fix findings; verify `pnpm lint` reports no recipe prose errors

## 4. Skill, spec purpose, and changeset

Expand Down
114 changes: 114 additions & 0 deletions packages/cli/src/agent/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Topic: bug-report (CLI v%(CLI_VERSION)s / topic v1)

## You are here
This is `bug-report`. It helps you report a bug in Taskless to the
Taskless team on the user's behalf, without a GitHub account: the CLI
or a recipe did something wrong, failed, or produced a result that does
not match what it promised. The user started this; no invite did.
For an opinion or a wish rather than a defect, `%(TASKLESS_CLI)s agent feedback`
is the better recipe.

## Goal
Produce one JSON payload that a maintainer could act on without asking
a follow-up question: what was being done, what should have happened,
what did happen. Show it to the user, send it only on their yes, and
delete the file.

## Preconditions
- The user asked to report a Taskless bug, in this conversation.
- The agent can write a file and run a shell command.
- No auth required.

## Steps

1. **Draft every answer from the session.** You usually saw the bug
happen, so you already hold most of the report:
- `summary`: one line naming the command or recipe and the defect.
`check exits 0 when a rule file fails to parse`, not `check is
broken`.
- `trying`: what the user was trying to do, and the exact command
you ran, if there was one.
- `expected`: what should have happened, and where that expectation
came from (a recipe, the docs, `--help`) when you know.
- `actual`: what happened instead. Quote the error message or the
output that shows it, trimmed to the lines that matter.
- `context`: anything else that would help fix it, such as the steps
to reproduce, whether it happens every time, or a workaround you
found. Omit the key when there is nothing to add.

2. **Ask the user only for what the session does not show.** If you
did not see the bug yourself, ask what they ran and what happened.
One question, covering everything missing, not one per field.

3. **Leave version information out.** The CLI adds its version, the
installed scaffold version, the platform, and the Node.js version to
the report itself. There is no key for it.

4. **Keep it shareable.** The payload leaves this machine. Leave out
secrets, tokens, credentials, absolute paths, and any source code the
user has not chosen to share. Replace a path with its project-relative
form, and a snippet of their code with a description of its shape.
An error message or CLI output is fine once it is clean of those.

5. **Write the payload** to `.taskless/.tmp-feedback.json`, matching the
input schema below, with `"kind": "bug"`. Use the keys exactly as
given; the CLI maps them to the survey's own question identifiers.

6. **Show it, and wait for a yes.** Put every key in the chat, labelled
and written out in full, exactly as it will be sent, and say that
the CLI will add version information. Ask whether to send it.
- **Yes.** Go to step 7.
- **Corrections.** Apply them, rewrite the file, show the payload in
full again, and ask again. Send only on the user's go-ahead.
- **No.** Delete the file and carry on with the user's task. Nothing
is sent.

7. **Send.** Run:
```
%(TASKLESS_CLI)s feedback send --from .taskless/.tmp-feedback.json --json
```
On success the command prints a thank-you. If it says telemetry is
disabled, nothing was sent: tell the user that, and that they can
file the bug at https://github.com/taskless/cli/issues instead, using
the payload you showed them as the issue body.

8. **Clean up.** Delete `.taskless/.tmp-feedback.json` whether the call
succeeded or failed.

9. **Return to the user's task.** Thank them in one line. If you found a
workaround, offer it, then carry on.

## Input schema

The `--from` JSON file conforms to:

```json
%(INPUT_SCHEMA)s
```

`kind` is always `bug`. `summary`, `trying`, `expected`, and `actual`
are required. `context` is optional, and an omitted key is how it is
left out, not an empty string.

## Important Notes

- Do NOT send before the user has seen the payload and said yes.
- Do NOT guess at the cause in `actual`. Say what happened; a theory of
why belongs in `context`, labelled as one.
- Do NOT run `%(TASKLESS_CLI)s feedback dismiss` here. It answers the
survey invite, which this is not.
- The event carries the same anonymous or logged-in identity as the
CLI's other telemetry. If the user asks, say so plainly.

## Errors

With `--json`, failures emit `{ ok: false, code, message }`:

| code | meaning | fix |
|-----------------|---------------------------------------------|-------------------------------------------------------|
| `INVALID_INPUT` | `--from` missing, unreadable, or failed validation | the message names the field; fix the payload and retry |

## See Also

- `%(TASKLESS_CLI)s agent feedback`: for an opinion or a wish rather than a defect
- `%(TASKLESS_CLI)s agent`: the topic index, if you arrived here by mistake
8 changes: 4 additions & 4 deletions packages/cli/src/agent/feedback-invite.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Topic: feedback-invite (CLI v%(CLI_VERSION)s / topic v3)
# Topic: feedback-invite (CLI v%(CLI_VERSION)s / topic v4)

## Before you finish: one question for the user

Expand All @@ -12,16 +12,16 @@ and only then, put this to the user exactly once, in these words:
Then act on the reply:

- **They said `review`**, alone or alongside their own words. Fetch
`%(TASKLESS_CLI)s agent feedback` and follow it in review mode: the
`%(TASKLESS_CLI)s agent rule-feedback` and follow it in review mode: the
words they wrote besides `review`, if any, are `verbatim`, and you
show them every answer in the chat, and take their corrections,
before anything is sent. Check for this first: a reply that asks for
a review and also gives feedback is a review, not plain feedback.
- **They gave feedback** without asking for a review. Fetch
`%(TASKLESS_CLI)s agent feedback` and follow it. It takes their words as
`%(TASKLESS_CLI)s agent rule-feedback` and follow it. It takes their words as
they are and asks you, not them, for the rest.
- **They said `skip`, said nothing, or replied about something else.**
Fetch `%(TASKLESS_CLI)s agent feedback` all the same and follow it with
Fetch `%(TASKLESS_CLI)s agent rule-feedback` all the same and follow it with
no `verbatim`. The rest of the survey is your account of the session,
and it is worth sending on its own. An unrelated reply is not
feedback, and it is not a reason to ask again.
Expand Down
Loading
Loading