@alterset/alterspec-client 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,8 +26,10 @@ reference.
26
26
  - **Track**: a stream of build work. It is not a channel. `BE` is the backend (every API channel included). Every
27
27
  other track is one design, named by the code of the channel that owns it (`BO`, `MOB`). A channel that shares
28
28
  another's design is built in that channel's track.
29
- - **Checklist**: a task's items, such as acceptance criteria (`CAP-CAT-001-AC-03`), screen actions (`SCR-PRC-01.A02`)
30
- and experience states (`UX-SCR-PRC-01-WEB#error`). Progress counts the items your commits cover.
29
+ - **Checklist**: a task's items, such as acceptance criteria (`CAP-CAT-001-AC-03`), screen actions (`SCR-PRC-01.A02`),
30
+ experience states (`UX-SCR-PRC-01-WEB#error`) and, of an object changed as a whole, the parts of its text that
31
+ changed (`ENT-USER#lifecycle`, `NFR-019#sign-in-succeeded`, `RULE-056#front-matter`). Progress counts the items
32
+ your commits cover.
31
33
  - **Then and Shown**: a criterion's `Then` is what the system guarantees (the backend's), its `Shown` what the screen
32
34
  shows (a UI track's). A task's checklist holds a criterion for its own part only; one without `Shown` is all the
33
35
  backend's.
@@ -37,6 +39,10 @@ reference.
37
39
  from the spec (citing IDs the export holds), an assumption to work on until the product side confirms or corrects
38
40
  it, or open (that item waits). The dispatcher keeps the assumptions and the open ones (an answer from the spec is
39
41
  not sent); a product person answers there and marks each reconciled with the spec once the spec says it.
42
+ - **Bug**: the product does something other than what the spec says. Anyone raises one with `/alterspec-bug`,
43
+ which grooms the report against the export first; the dispatcher keeps it (`BUG-3`), never the spec, with the
44
+ items it violates as cites, and makes a task per track those items are on (`BUG-3/BE`), after the tasks that
45
+ built them. A bug task is taken and worked like any other; its checklist is the cites.
40
46
 
41
47
  ## Set up a repository
42
48
 
@@ -102,10 +108,14 @@ You talk to Claude Code; the skills call the dispatcher and the CLI for you.
102
108
  2. **Build from the brief.** `/alterspec-task-context [task]` reads the task's brief from the export:
103
109
  - the checklist, with the items the dispatcher already holds covered and what changed in each;
104
110
  - why the change was made;
105
- - the before and after of each object;
106
- - for `BE`: the changed acceptance criteria on the checklist and the operations, whole; the rules and events the
107
- checklist's criteria or the change's text name, whole; the others the capabilities name, as paths;
108
- - for `BE`: the entities the capabilities work with, as paths;
111
+ - the before and after of each object, and what moved since the sign-off: the later changes that touched it and
112
+ whether the export's current text is still this delta's after (when not, build to the current file);
113
+ - for `BE`: the changed acceptance criteria on the checklist and the operations, whole; the rules, events,
114
+ quality requirements and integrations the checklist's criteria or the change's text name, whole; the others
115
+ the capabilities name, as paths;
116
+ - for `BE`: the entities the capabilities work with, as paths, each with its lifecycle in one line;
117
+ - the reach of the rules it carries whole and the roles it touches: which capabilities enforce or hold them,
118
+ which criteria cover them, which screens they are on;
109
119
  - the decisions and glossary terms the change's text names, whole; the other decisions its objects name, as
110
120
  paths;
111
121
  - for a UI track: the screens, their experience contracts, the mockup pages and the design system.
@@ -138,6 +148,7 @@ Other skills:
138
148
  | `/alterspec-task-eta <task> <YYYY-MM-DD\|clear> <reason>` | Set your own date for a task, or `clear` it so the dispatcher's computed ETA applies again. |
139
149
  | `/alterspec-task-release <task> [reason]` | Give a task back. Your code and branches stay as they are. |
140
150
  | `/alterspec-spec-ask <question>` | Answer a question about the product from the export, citing IDs. Read-only. |
151
+ | `/alterspec-bug <what is wrong>` | Groom a report against the export and, when the product deviates from what the spec says, raise a bug with the dispatcher citing the items it violates. A silent or ambiguous spec becomes a question instead; a wrong spec is a change in the spec project. `dismiss BUG-3 <reason>`, typed, dismisses one you raised. |
141
152
 
142
153
  You only ever type `task-done`, `task-eta` and `task-release` yourself, because each is your word. Claude starts
143
154
  the others from plain language as well.
@@ -153,11 +164,12 @@ switch or commit (`merged` fetches `origin/<main>` and the task branch, to read
153
164
  | `init [options]` | Set the repository up (see above). |
154
165
  | `key` | Print the public key and fingerprint you sign with. |
155
166
  | `open dispatcher` | Sign in and open the dispatcher's pages in the browser. The link works once, for a minute. |
156
- | `context <task> [--json] [--stats]` | Print the task's brief from the export, starting with its questions and its checklist. |
167
+ | `context <task> [--json] [--stats]` | Print the task's brief from the export, starting with its questions and its checklist; for a bug's task (`BUG-3/BE`), the bug's words, its cites as the checklist and the objects as they are now. |
157
168
  | `progress [task] [--json]` | Report the items your commits cover. Default: the task of the branch `task/<chg>-<track>`, else of the last commit's `Alterspec-Task` trailer. |
158
169
  | `lookup [ref...] [--question <text>] [--task <task>] [--item <item>]` | Where in the export a question is answered: what to read first, what to open before calling the export silent, the neighbours. `--unread <path...>` says what of that was not opened. |
159
170
  | `cites <ref...>` | Check that every ID or path is in the export; what an answer "from the spec" must pass. |
160
171
  | `questions [task] [--about <ID...>] [--open] [--json]` | Print a task's questions with the product side's answers, the ones naming some IDs, or without either your own. |
172
+ | `bugs [--about <ID...>] [--status open\|done\|dismissed] [--track <code>] [--json]` | Print the bugs naming some IDs (to find one raised before), or without `--about` your own, each with its tasks' statuses and branches. |
161
173
  | `merged <task> [--json]` | Print the commit and branch to report `done` with: the pushed task branch's head, or the commit on `origin/<main>` that brought the task in. |
162
174
  | `export-head [--latest <sha>]` | Pull the export clone and print the commit to send to the dispatcher. |
163
175
  | `mcp` | The MCP server Claude Code starts from `.mcp.json`. It forwards to the dispatcher. |
@@ -29,6 +29,8 @@ work from it, read its `README.md` (at least "How to read the spec" and "For cod
29
29
  and go on only with what its answer allows: an answer from the spec, a recorded assumption, or nothing for that
30
30
  item while the question is open. If the spec contradicts the code, stop and ask me. Never fill a gap with an
31
31
  invented business rule.
32
+ - If the product does something other than what the spec says, that is a bug for the dispatcher, never a note in
33
+ the spec: raise it with `/alterspec-bug`, which checks the spec first.
32
34
  - Work on a task goes through the alterspec skills (`/alterspec-task-context`); every commit of a task carries the
33
35
  trailers they describe.
34
36
  ```
@@ -3,7 +3,7 @@
3
3
  The CLI is `npx @alterset/alterspec-client`. Below it is written as `alterspec-client`; always run it as
4
4
  `npx @alterset/alterspec-client ...` from the repository (or the task's worktree). The dispatcher's tools come from
5
5
  the MCP server `dispatcher` that `.mcp.json` starts: `whoami`, `next_task`, `list_tasks`, `list_changes`, `task`,
6
- `touch`, `set_eta`, `feedback`, `ask` and `questions` (each when the dispatcher lists it), `done`, `release`. Progress reaches the dispatcher through `alterspec-client progress`, never by
6
+ `touch`, `set_eta`, `feedback`, `ask` and `questions`, `bug`, `bugs` and `dismiss_bug` (each when the dispatcher lists it), `done`, `release`. Progress reaches the dispatcher through `alterspec-client progress`, never by
7
7
  calling its tool yourself. Never call `force_release` or `mark_done`: they are an administrator's, in the
8
8
  dispatcher's pages.
9
9
 
@@ -15,8 +15,15 @@ dispatcher's pages.
15
15
  that owns it (`BO`, `MOB`); a channel that shares another's design (a sales desk that looks like the backoffice)
16
16
  is built in that one's track and has none of its own. This repository builds the tracks its
17
17
  `.alterspec-client.json` names.
18
- - **A task** is one signed-off change on one track, written `CHG-012/BE` (the change, a slash, the track). Never make
19
- up a task: take it from the developer's words or the dispatcher's answers, exactly as written.
18
+ - **A task** is one signed-off change on one track, written `CHG-012/BE` (the change, a slash, the track), or one
19
+ bug on one track, written `BUG-3/BE` (`kind: bug` in the dispatcher's lists). Never make up a task: take it from
20
+ the developer's words or the dispatcher's answers, exactly as written.
21
+ - **A bug** is the product deviating from what the spec says: raised from the client with `/alterspec-bug`, which
22
+ grooms the report against the export first, kept by the dispatcher and never by the spec. It cites the items of
23
+ the spec the product violates, and gets a task per track those items are on, placed after the tasks that built
24
+ them; a bug task is taken, built, reported and done like any other, and its checklist is the cites. Where the
25
+ spec is silent or reads two ways there is no bug yet, only a question; where the spec is wrong, a change in the
26
+ spec project.
20
27
  - **The export** is the product spec, signed off, in its own git repository; `.alterspec-client.json` names the
21
28
  developer's clone of it. It says what the product does in business terms and names everything by ID; it never
22
29
  says how to build it, which is this repository's business. Cite IDs when you refer to it. The clone is read-only:
@@ -31,7 +31,11 @@ the export silent**, the neighbours (each with why it is there) and the views. S
31
31
  - what is recorded, required or allowed in a field: the entity's attributes (kind, required, editable,
32
32
  constraints), states and transitions;
33
33
  - when, in what order, who is next: flows, events (who emits, who consumes), transitions by time;
34
- - why it is so: the decisions, and the proposal of the change that last touched it;
34
+ - why it is so: the decisions, and the proposal of the change that last touched it. An archived proposal
35
+ (`changes/archive/<CHG>/proposal.md`, or `modules/<mod>/changes/archive/<CHG>/proposal.md` for a module's change; its "What changes" rows and examples) is the record of why and what moved;
36
+ it is not the spec. It never makes an outcome `spec` on its own, and where it and an object differ, the object
37
+ (the rule, the criterion, the entity) is what the product does: answer from the object and say in one line that
38
+ the proposal reads otherwise. Two **objects** that differ are still `open`;
35
39
  - what another system may do: `_generated/operations.md`.
36
40
  - **Follow a link only when the answer depends on it**: a neighbour is there because the export links it, not
37
41
  because it must be read. Grep only for a word the reading list could not resolve, and only under `_shards/`.
@@ -61,7 +65,9 @@ Exactly one of three outcomes. Which one is decided by what you can cite, never
61
65
  the work if the product side decides otherwise.
62
66
  - **`open`**: the export doesn't say and no reading is clearly the cautious one, or the readings differ in what a
63
67
  person may see or do, what is charged, what is recorded or deleted, or who is told. Never assume those. Say what
64
- exactly is undecided, as a question a product person can answer in a sentence, with the IDs it concerns.
68
+ exactly is undecided, as a question a product person can answer in a sentence, with the IDs it concerns. When
69
+ the question has several parts, keep them numbered in the question and answer each part with its own outcome's
70
+ words, so a product person can confirm part (1) and decide part (2) in one answer.
65
71
 
66
72
  **Silence is proven, not felt.** `assumed` and `open` are allowed only after you opened every path under "open
67
73
  before calling the export silent". If you are sent back with paths you didn't open, read them and answer again.
@@ -0,0 +1,69 @@
1
+ # /alterspec-bug — the product deviates from the spec: groom it, then raise it with the dispatcher
2
+
3
+ Read `.alterspec-client/prompts/_shared.md` first and follow it.
4
+
5
+ Arguments: the report, in the reporter's words ("the price screen shows no margin", "an archived article can still
6
+ be approved"), from the developer or a product person; or, typed, `dismiss BUG-<n> <reason>` (below). A report is
7
+ groomed against the export before anything is sent: a bug is a disagreement between the spec and the product, and
8
+ only the spec says which side is wrong. The spec never records a bug (decision 17): a bug is the dispatcher's, cites
9
+ the items of the spec the product violates, and is fixed as a task like any other.
10
+
11
+ You edit nothing in the export. What the spec says comes from the export, never from this repository's code; what
12
+ the product does comes from the reporter, and from the code when you are asked to look.
13
+
14
+ 1. Start as `_shared.md` says (`whoami`, then `export-head`, so the clone is current; keep its `send`). When the
15
+ dispatcher can't be reached or refuses the key, say so in one line and stop: a bug lives in the dispatcher.
16
+ 2. Put the report as a question the export answers: "what does the spec say the product does when …", in the
17
+ export's terms where the reporter's words allow (the screen, the capability, the rule, the IDs they name), and
18
+ with what the reporter saw as a numbered part ("(1) what is shown … (2) what happens when …"). Don't guess which
19
+ side is wrong yet.
20
+ 3. Run `alterspec-client lookup --question "<that question, in full>"`, with the IDs the report names as `ref`s.
21
+ It prints what the question is about, the shards to read first, the ones that must be opened before the export
22
+ may be called silent, the neighbours and the views. When it says the question names nothing the export holds,
23
+ put the report in the export's terms (the glossary's words, the screen's or capability's ID from
24
+ `export.json`) and run it once more.
25
+ 4. Hand the `alterspec-spec-answerer` subagent the question in full, the export's path (`.alterspec-client.json`
26
+ names it), the lookup's output as it is, and the report as the reporter gave it, marked as what the product
27
+ does today, not as what the spec says. Don't answer it yourself and don't tell the answerer what you expect: it
28
+ reads the export only.
29
+ 5. When it returns `assumed` or `open`, run the same `lookup` with `--unread <everything on its Looked list>`.
30
+ What that prints was not opened: send the answerer back once with those paths, and take what it returns then.
31
+ 6. Decide the outcome from what came back, and say it in a line:
32
+ - **`spec`, and the product does otherwise**: a bug. Go on to step 7.
33
+ - **`spec`, and the product does what it says**: not a bug. Say what the spec says, with its IDs, and stop;
34
+ nothing is sent. When the reporter wants the product to do something else, that is a proposal: tell them to
35
+ bring it to the product side with `/alterspec-spec-ask` as a proposal, or do so when they ask.
36
+ - **`assumed` or `open`**: the spec is silent or reads two ways, so nothing is a bug yet. Hand the question, as
37
+ the answerer put it, to `/alterspec-spec-ask`, which records it for the product side; say that the product
38
+ side decides and the bug, if any, comes after. Stop here.
39
+ - **the spec is wrong** (the reporter says the spec's own text is not what the product should do, and the
40
+ product follows it): not a bug and not a question. Say so in a line with the IDs: it is a change, groomed and
41
+ signed off in the spec project like any change, and it arrives as tasks. Stop; nothing is sent.
42
+ 7. Name the items the product violates, as the dispatcher's tasks list them: an acceptance criterion
43
+ (`CAP-PRC-002-AC-03`), a screen action (`SCR-CAT-01.A02`), a contract state (`UX-SCR-CAT-01-BO#empty`), or an
44
+ object key that is an item of its own (`RULE-PRC-001`, `ENT-ARTICLE#lifecycle`), from the answerer's cites: the
45
+ criterion or action whose `Then` or `Shown` the product fails, not the capability as a whole when a criterion
46
+ says it. Run `alterspec-client cites <item...>` with them; drop what the export doesn't hold. A bug with no item
47
+ left is a question: go to the `assumed`/`open` line of step 6.
48
+ 8. Raised before? Run `alterspec-client bugs --about <item...>` (a failure here stops nothing). When one of them is
49
+ open and is this deviation, say it with its `BUG-<n>` and its tasks' statuses and stop: nothing is raised twice.
50
+ A done one that is back is a new bug: say which it follows in the description.
51
+ 9. Call `bug` with `title` (what is wrong, in a line; at most 200 characters), `description` (what was expected,
52
+ what happened, how to see it; at most 2000 characters; the reporter's words naming IDs, no code and no copied
53
+ spec text), `cites` (the items of step 7, at least one) and `export` (`send` from step 1). The dispatcher
54
+ answers in one line each, when it refuses:
55
+ - `UNKNOWN_ITEM`: no task of the export holds that item; cite it as the tasks list it (`alterspec-client
56
+ context <task>` lists a task's), or the object key when the item is the object whole.
57
+ - `NOT_BUILT`: nothing done or in progress holds that item yet, so the product can't deviate from it: the task
58
+ that builds it is still to come, and this is not a bug. Say so; the reporter may ask again once it is built.
59
+ - `TOO_LONG` / `INPUT_INVALID`: shorten or complete what it names and call once more.
60
+ - `EXPORT_UNKNOWN`: stop and tell the developer to tell an admin, as `_shared.md` says.
61
+ 10. Say the result: the `BUG-<n>`, then each of its tasks (`BUG-<n>/<track>`) with its status and what it waits
62
+ for ("BUG-3/BO is blocked after CHG-012/BO, in progress"; "BUG-3/BE is available"). A bug task is taken like
63
+ any other (`/alterspec-task-next`); its brief opens with the bug's words and its checklist is the cites.
64
+
65
+ **`dismiss BUG-<n> <reason>`**, typed by the developer only, never from a sentence: it is the reporter's word (or an
66
+ admin's) that the bug was raised in error or duplicates another. Start as step 1 says, then call `dismiss_bug` with
67
+ the `id`, the `reason` and, when the reason names the bug it duplicates, `duplicate_of`. Say the dispatcher's
68
+ sentence on `NOT_YOURS` (only the reporter or an admin), `IN_PROGRESS` (someone works on it: an admin dismisses it)
69
+ or `UNKNOWN_BUG`; else that its tasks are dismissed and never offered again.
@@ -6,7 +6,12 @@ Arguments: the question. It is the developer's, or your own when the spec leaves
6
6
  (silent, ambiguous, or saying two things), or when you are about to decide something about the product's behaviour
7
7
  that the brief doesn't state: then ask here instead of stopping the developer or deciding silently. For a decision
8
8
  you are about to take, say in the question which way you would go and why; the answerer weighs it against the
9
- export, and when the export is silent it is what gets recorded as the assumption.
9
+ export, and when the export is silent it is what gets recorded as the assumption. A question is about one
10
+ matter and carries every case of it you can see as numbered parts (the moment a limit counts from, what happens to
11
+ a thing in flight when it ends, what is recorded then): one question the product side answers once, not one per
12
+ case asked as each comes up. A wish of the developer's about how the product should behave or look, with no spec
13
+ text it reads two ways and no item waiting on it, is not a question: say so, and the developer brings it to the
14
+ product side as a proposal.
10
15
 
11
16
  You edit nothing in the export. The answer comes from the export, never from this repository's code.
12
17
 
@@ -25,6 +30,16 @@ the item too. Without one, a question about the product as a whole is asked with
25
30
  <ID...>`. When one of them is this question and the product side
26
31
  answered it, say that answer with its `Q-<n>` and stop: nothing is asked or recorded twice, and a product
27
32
  person's answer the export doesn't hold yet stands over the export's silence. A failure here stops nothing.
33
+ **One question per matter.** When one of them is still open, cites the same object (the same rule, entity,
34
+ integration or moment) and this question is the next case of it (a follow-up to your own question, an edge the
35
+ first one didn't name), this is not a new question: it is a new numbered part of that one. Go on through steps
36
+ 3 to 6 for the new part alone and, at step 7, record it as one question that restates the open one with its
37
+ parts numbered, naming the earlier `Q-<n>` first in its text ("Extends Q-124: (1) … (2) …") and passing
38
+ `extends: Q-<n>` when the dispatcher's `ask` takes it; the product side then answers the matter once. And a
39
+ limit: once three of your questions about one cited object are open on the task, ask nothing more about that
40
+ object. Write the cases still undecided into one consolidated question the same way, build everything else on the
41
+ assumptions already recorded, and leave the items those cases hold uncovered. Fifty questions on one task about
42
+ one e-mail's five moments were answered by nobody; one question with five parts would have been.
28
43
  3. Run `alterspec-client lookup --question "<the question, in full>"`, with `--task <task>` and `--item <item>`
29
44
  whenever the question concerns one. It prints what the question is about, the shards to read first, the ones
30
45
  that must be opened before the export may be called silent, the neighbours and the views. When it says the
@@ -2,7 +2,7 @@
2
2
 
3
3
  Read `.alterspec-client/prompts/_shared.md` first and follow it.
4
4
 
5
- Arguments: `[CHG-NNN/TRACK]`. Without one, take the developer's task in progress from `whoami`'s `in_progress`; when
5
+ Arguments: `[CHG-NNN/TRACK]` (or `BUG-<n>/TRACK`, a bug's task). Without one, take the developer's task in progress from `whoami`'s `in_progress`; when
6
6
  there are several, the one whose branch this checkout is on (`git branch --show-current` prints `task/<chg>-<track>`)
7
7
  or whose `Alterspec-Task` trailer the last commit carries; when that doesn't settle it, ask which.
8
8
 
@@ -27,6 +27,12 @@ or whose `Alterspec-Task` trailer the last commit carries; when that doesn't set
27
27
  change's text names, whole, the other decisions by path. Each hunk of a diff names the section it falls in. For a
28
28
  UI track
29
29
  the screens, their experience contracts, the mockup pages and the channel's design system.
30
+ **A bug's task** (`BUG-<n>/<track>`) has a shorter brief: it opens with the bug's words (what was expected, what
31
+ happened, how to see it) and the items it cites, which are its checklist; then the objects those items belong to,
32
+ where each is in the export now, and the changes the bug originates in. There is no delta: the product deviates
33
+ from the spec's current text, so read each cited item in the export (its shard), find where the code departs
34
+ from it, and make it do what the item says, nothing else. The tasks that built those items stay as they are; this
35
+ task is the fix, and an item is covered again when its tests pass with the fix.
30
36
  3. Call `touch` with the task, then `task` with it. `followed_by` lists the later tasks on this track whose objects
31
37
  overlap this one's; say them in one line, e.g. "CHG-015/BE, after yours, changes some of the same objects; it will
32
38
  be its own task." Build what this change says, not what later ones do.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Read `.alterspec-client/prompts/_shared.md` first and follow it.
4
4
 
5
- Arguments: `<CHG-NNN/TRACK>`, required. The developer typed this command: that is their word that the task is done.
5
+ Arguments: `<CHG-NNN/TRACK>` (or `BUG-<n>/TRACK`), required. The developer typed this command: that is their word that the task is done.
6
6
  Without a task, ask for it; never guess it.
7
7
 
8
8
  1. Start as `_shared.md` says (`whoami`, `export-head`).
@@ -9,7 +9,8 @@ the developer wants in progress at once (default 1).
9
9
  2. Tracks: the one the developer named; else `tracks` in `.alterspec-client.json` when it lists any; else none, and
10
10
  the dispatcher offers every track the developer may take.
11
11
  3. Call `next_task` with `export` = `send` from `export-head`, `tracks` and `parallel`.
12
- 4. Say each `reasons` entry in one line (none available, blocked by what, at the limit, more after pulling).
12
+ 4. Say each `reasons` entry in one line (none available, blocked by what, at the limit, more after pulling). A task
13
+ with `kind: bug` (`BUG-3/BE`) is a bug's: say so, with the bug's title; it is worked like any other.
13
14
  5. Each assigned task's `after` lists the done tasks it waited for, each with its `commit` and `branch`. When an
14
15
  entry of the same track names a `branch` (not null), that predecessor's work is pushed there and not in the main
15
16
  branch yet: say in one line which branch to start from, e.g. "CHG-013/BE starts from `task/chg-012-be`, where
@@ -11,13 +11,15 @@ Arguments: `[track]`, optional.
11
11
  (`after` with their statuses).
12
12
  4. Call `list_changes` with `status: "open"` for the progress and ETA of the open changes and of each level.
13
13
  5. When `whoami`'s `answered_questions` is above 0, run `alterspec-client questions` and say each answered one in
14
- a line with its task, a corrected assumption first.
14
+ a line with its task, a corrected assumption first. When its `fixed_bugs` is above 0, run `alterspec-client bugs
15
+ --status done` and say each of the developer's bugs done since in a line, with its tasks' branches.
15
16
  6. Answer in four short parts:
16
17
  - **yours**: task, title, progress (`covered` of `of` items, the dispatcher's `percent`), ETA, since when, stale or
17
18
  not. An ETA the developer set is theirs: show it as theirs, with the computed one beside it. An unknown ETA is
18
19
  "unknown", never a guess. A task without items shows only its status.
19
20
  - **available**: task, title, level, and how long it lasts once taken when the dispatcher says.
20
21
  - **blocked**: task, waiting for which tasks.
22
+ A bug's task (`BUG-3/BE`, `kind: bug`) is listed like any other, named as a bug.
21
23
  - **changes**: per level, the open changes with their progress and ETA ("at least" when the dispatcher says so).
22
24
  A stale task of the developer's: say it in one line and suggest `/alterspec-task-release` if they won't finish it.
23
25
  Their own date for a task: `/alterspec-task-eta`.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: alterspec-bug
3
+ description: "Use when the developer or a product person says the product does something other than what the spec says (\"the price screen shows no margin\", \"approval is allowed for an archived article\"). Grooms the report against the export first: a deviation from what the spec says becomes a bug in the dispatcher, citing the items it violates; a spec that is silent or reads two ways becomes a question; a spec that is wrong is said, to change in the spec project. Never sends spec text. Also, typed, `dismiss BUG-<n> <reason>`."
4
+ argument-hint: "<what is wrong> | dismiss BUG-<n> <reason>"
5
+ allowed-tools: Read Glob Grep Agent Bash(npx @alterset/alterspec-client *) mcp__dispatcher__whoami mcp__dispatcher__bug mcp__dispatcher__bugs mcp__dispatcher__dismiss_bug
6
+ ---
7
+
8
+ Read `.alterspec-client/prompts/bug.md` and follow those instructions exactly.
9
+
10
+ Arguments: $ARGUMENTS
@@ -175,9 +175,10 @@ server. Then talk to it in plain words; the skills do the rest.
175
175
  | You say or type | What happens |
176
176
  | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
177
177
  | "give me work" / `/alterspec-task-next` | takes the next available task on your track and shows the brief; it creates no branch or worktree, you work wherever you like |
178
- | "let's work on my task" / `/alterspec-task-context` | the task's brief from the spec: why, the checklist, the one-time data change if any, the objects it changes (before and after) and where the export uses them, the changed acceptance criteria, the rules, events, decisions and glossary terms they and the change name (the rest, and the entities, as paths); for a UI track also the screens, their contracts, mockups and design system |
178
+ | "let's work on my task" / `/alterspec-task-context` | the task's brief from the spec: why, the checklist (each part of an object named by its section or line), the one-time data change if any, the objects it changes (before and after), what moved since the sign-off and where the export uses them, the reach of its rules and roles, the changed acceptance criteria, the rules, events, quality requirements, integrations, decisions and glossary terms they and the change name (the rest, and the entities with their lifecycles, as paths); for a UI track also the screens, their contracts, mockups and design system |
179
179
  | "what am I on?" / `/alterspec-task-status` | your tasks with progress and ETA, what's available on your tracks, what is blocked and by what |
180
180
  | "what does RULE-… say?" / `/alterspec-spec-ask` | answers about the product from the spec, citing IDs; what the spec doesn't say is recorded as an assumption or an open question for the product side; Claude uses it by itself when a task's spec is undecided |
181
+ | "the price screen shows no margin" / `/alterspec-bug` | grooms the report against the spec first: where the product deviates from what the spec says, raises a bug with the dispatcher citing the items it violates, placed after the tasks that built them and offered like any task; where the spec is silent or reads two ways, asks instead; where the spec is wrong, says so |
181
182
  | `/alterspec-task-done CHG-023/BE` | after your branch is pushed: reports the task done with its head commit and the branch (or, once merged, the commit on the main branch); refused while nothing is pushed |
182
183
  | `/alterspec-task-release CHG-023/BE <reason>` | gives the task back so someone else can take it; your code and branches stay as they are |
183
184
  | `/alterspec-task-eta CHG-023/BE <YYYY-MM-DD> <reason>` | sets your own date when the computed ETA is wrong; `clear` instead of the date removes it |
@@ -242,6 +243,14 @@ task is yours yet: ask about `CHG-028/BE` while it waits behind another task and
242
243
  its next holder's brief, not among the questions about no task. Name the task, or Claude takes the one the work is
243
244
  about.
244
245
 
246
+ One question per matter. A question carries every case of its matter as numbered parts (the moment a limit counts
247
+ from, what happens to a thing in flight when it ends, what is recorded then), and a follow-up to Claude's own open
248
+ question extends that question instead of adding a new one, so the product side answers the matter once. After
249
+ three open questions about one object on a task, Claude asks nothing more about it: it writes the cases still
250
+ undecided into one question and builds everything else on the assumptions already recorded. A wish about how the
251
+ product should behave or look, with nothing in the spec read two ways and no item waiting on it, is not a question:
252
+ bring it to the product side as a proposal.
253
+
245
254
  How an answer is found: the client first looks whether the question was asked before, then computes where the spec
246
255
  would answer it (`lookup`: what the question names, by ID, by the glossary's words and their synonyms, by title; the
247
256
  sections to read first; the rules, decisions and "out of scope" lines about it) and gives that reading list to the
@@ -261,12 +270,41 @@ and covers the items; it builds only what wasn't built here. Nothing is marked d
261
270
  While the dispatcher has no questions yet (an older one), the answer is still given, and Claude says it was not
262
271
  recorded: then an open question is yours to carry, as before.
263
272
 
273
+ ### Bugs
274
+
275
+ A bug is the product doing something other than what the spec says; the spec never records one. Say what is
276
+ wrong ("the price screen shows no margin") or type `/alterspec-bug <what is wrong>`, you or a product person.
277
+ Claude grooms it against the spec before anything is sent, the way it answers a question: the reading list, the
278
+ answerer reading the export only. Then one of three:
279
+
280
+ - **The spec says it and the product does otherwise.** A bug. Claude names the items the product violates
281
+ (acceptance criteria, screen actions, contract states, or an object that is an item of its own), checks each
282
+ exists in the export, looks whether one was raised about them before, and raises it with the dispatcher: a title,
283
+ what was expected, what happened and how to see it, in the reporter's words naming IDs, never spec text. The
284
+ dispatcher gives it a number (`BUG-3`) and a task per track the items are on (`BUG-3/BE`, `BUG-3/BO`), each after
285
+ the tasks that built those items: available at once when they are done, blocked while one is in progress. A bug
286
+ task is taken, worked and reported done like any other; its brief opens with the bug's words and its checklist is
287
+ the cites, covered again as each one's tests pass with the fix.
288
+ - **The spec is silent or reads two ways.** Nothing is a bug yet: Claude hands it to `/alterspec-spec-ask`, the
289
+ product side decides, and the bug, if any, comes after.
290
+ - **The spec is wrong.** Neither a bug nor a question: a change, groomed and signed off in the spec project, which
291
+ arrives as tasks.
292
+
293
+ The dispatcher refuses an item no task of the export holds (cite it as the tasks list it) and one nothing built
294
+ holds yet (the task that builds it is still to come, so the product can't deviate from it). A bug raised in error,
295
+ or twice, is dismissed by whoever raised it while nobody works on it, or by an admin: type
296
+ `/alterspec-bug dismiss BUG-3 <reason>`; its tasks are never offered again. `npx @alterset/alterspec-client bugs`
297
+ prints your bugs with their tasks, `bugs --about <ID...>` everyone's about some items; `/alterspec-task-status` says
298
+ when one of yours was fixed since you last looked.
299
+
264
300
  ### Good to know
265
301
 
266
302
  - **The trailer names the task.** Progress is read from the `Alterspec-Task` trailer of your commits, on any branch;
267
303
  the hook takes the task from the last commit's trailer (or from a `task/<chg>-<track>` branch).
268
304
  - **A UI task waits for its `BE` task.** "Nothing available" on a UI track usually means the backend part isn't done
269
- yet; `/alterspec-task-status` says what blocks what.
305
+ yet; `/alterspec-task-status` says what blocks what. On a track, a task waits only for the earlier tasks that
306
+ changed an item of its checklist, wrote what it changes again, or added an object it names; the rest of the
307
+ lineage runs beside it.
270
308
  - **The scope is the spec's.** If something in the spec is undecided or looks wrong, it is a question (above); don't
271
309
  widen or narrow the task yourself.
272
310
  - **Only you move your task on.** Going away for a while? Release it. An admin can force a release only when you are