@alterset/alterspec-client 0.32.0 → 0.33.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 +35 -5
- package/agent-instructions.md +3 -0
- package/assets/prompts/_shared.md +27 -11
- package/assets/prompts/agents/spec-answerer.md +6 -0
- package/assets/prompts/task-context.md +6 -3
- package/developer-guide.md +6 -3
- package/dist/cli.js +629 -142
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,12 +115,36 @@ both roles: an owner who also develops has their tracks and the product flag on
|
|
|
115
115
|
dispatcher for the role its folder means (`product` here, `developer` in a code repository; dispatcher decision 33).
|
|
116
116
|
|
|
117
117
|
In the next Claude Code session in the spec project the dispatcher's product tools appear, and only those:
|
|
118
|
-
`whoami`, `questions`, `answer
|
|
119
|
-
|
|
118
|
+
`whoami`, `questions`, `answer` (with `touches`, the IDs an answer changes, kept out of its text, and `continues` /
|
|
119
|
+
`reverses`, forwarded as they are), `reconcile`, `feedback` (the teams' feedback lines, read), `bug_reports` (the
|
|
120
|
+
words of the bugs they raised), `lift`, `release_notes` and `build_report`. alterspec's own skills use them: `/alterspec-answer post` posts the answers of an
|
|
120
121
|
answers file and marks the ones the spec already gives reconciled; `/alterspec-reconcile`, after a sign-off and an
|
|
121
|
-
export, marks the questions a change answered reconciled
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
export, marks the questions a change answered reconciled; `lift` (read only) gives the open business lines of the
|
|
123
|
+
feedback with the IDs they name; `release_notes` and `build_report` give the release note of each ingest and the
|
|
124
|
+
build's waits, chains, oversized briefs and holds, as task IDs and counts. A product session sees no task, progress or assignment: the proxy
|
|
125
|
+
lists only these tools and refuses any other call itself (`NOT_DEVELOPER`), whatever the dispatcher lists, and the
|
|
126
|
+
dispatcher refuses the same way.
|
|
127
|
+
|
|
128
|
+
The owner's actions on the feedback are CLI commands, run on the owner's typed word, each with counts and task IDs
|
|
129
|
+
only, never who works on what:
|
|
130
|
+
|
|
131
|
+
- `feedback [--kind business|technical|untagged] [--outcome …] [--list unclear|decided|weight] [--level <n>]
|
|
132
|
+
[--has-outcome yes|no]` prints the counts (open, without an outcome, business not lifted) and the lines, each
|
|
133
|
+
addressed as `<feedback>:<list>:<line>`, fifty at a time (`--offset`; the dispatcher returns them all at once, so
|
|
134
|
+
narrow with `--change` or `--since`).
|
|
135
|
+
- `feedback-outcome <lifted|declined|technical|nothing|open> <line...> [--ref CHG-…] [--reason …]` previews what it
|
|
136
|
+
would set and sends it only with `--confirm` (at most fifty lines, all or nothing). A line that already has another
|
|
137
|
+
outcome is refused unless `--replace` is given (the dispatcher would replace it); a line already carrying the
|
|
138
|
+
outcome is left as it is. The dispatcher's refusals come back with their code (`OPENED_HAS_NO_OUTCOME`, …).
|
|
139
|
+
- `lift [line...]` prints the open business lines to take to the spec (reads only).
|
|
140
|
+
- `hold <task> --reason <text>` keeps one server task off the main branch (it may still be done on a feature branch)
|
|
141
|
+
and `unhold <task>` lets it go; both preview and send only with `--confirm`.
|
|
142
|
+
- `release-notes [--since <date>] [--limit 1–100]` and `build-report [--ingest <commit>] [--kind …]` read.
|
|
143
|
+
|
|
144
|
+
`feedback_outcome`, `hold` and `unhold` are never listed to a Claude Code session (the proxy answers `CLI_ONLY`), so
|
|
145
|
+
no sentence can set an outcome or hold a task.
|
|
146
|
+
|
|
147
|
+
The developer commands (`context`, `progress`, `lookup`, …) stop on a
|
|
124
148
|
product configuration with one sentence: it has no export.
|
|
125
149
|
|
|
126
150
|
## Working day
|
|
@@ -198,6 +222,12 @@ switch or commit (`merged` fetches `origin/<main>` and the task branch, to read
|
|
|
198
222
|
| `cites <ref...>` | Check that every ID or path is in the export; what an answer "from the spec" must pass. |
|
|
199
223
|
| `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. |
|
|
200
224
|
| `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. |
|
|
225
|
+
| `feedback [filters] [--offset <n>] [--limit <n>] [--json]` | The product side: the build's feedback lines with their counts, by kind, outcome, list, level, change, track or date. |
|
|
226
|
+
| `feedback-outcome <outcome> <line...> [--ref <id...>] [--reason <text>] [--replace] [--confirm]` | The product side, on the owner's word: set the outcome of feedback lines; a preview without `--confirm`. |
|
|
227
|
+
| `lift [line...] [--json]` | The product side: the open business lines to take to the spec, with the IDs they name. |
|
|
228
|
+
| `hold <task> --reason <text> [--confirm]` / `unhold <task> [--confirm]` | The product side, on the owner's word: hold one server task off the main branch, or let it go; a preview without `--confirm`. |
|
|
229
|
+
| `release-notes [--since <date>] [--limit <n>] [--json]` | The product side: each ingest's release note with its counts. |
|
|
230
|
+
| `build-report [--ingest <commit>] [--kind <kind>] [--json]` | The product side: mutual waits, tasks behind a chain, briefs over size, holds off main; task IDs and counts. |
|
|
201
231
|
| `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. |
|
|
202
232
|
| `export-head [--latest <sha>]` | Pull the export clone and print the commit to send to the dispatcher. |
|
|
203
233
|
| `mcp` | The MCP server Claude Code starts from `.mcp.json`. It forwards to the dispatcher, listing and allowing only the tools of your key's role. |
|
package/agent-instructions.md
CHANGED
|
@@ -29,6 +29,9 @@ 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
|
+
- A decision is business or technical by one test: would a user or another track notice the difference? Yes: it is
|
|
33
|
+
what the product does, and it is asked with `/alterspec-spec-ask` before it is built. No: it is how we build it,
|
|
34
|
+
ours to decide and never asked.
|
|
32
35
|
- If the product does something other than what the spec says, that is a bug for the dispatcher, never a note in
|
|
33
36
|
the spec: raise it with `/alterspec-bug`, which checks the spec first.
|
|
34
37
|
- Work on a task goes through the alterspec skills (`/alterspec-task-context`); every commit of a task carries the
|
|
@@ -35,8 +35,8 @@ dispatcher's pages.
|
|
|
35
35
|
removed or reworded a line of your task's own hunks, the brief says so under "Checked", from the deltas: you
|
|
36
36
|
compare nothing.
|
|
37
37
|
- **A claim about the code is checked, never trusted.** Three things in a brief say what the code already does: an
|
|
38
|
-
item marked `w 0, nothing to build on this track`, a task summary that opens with "Nothing to build" (
|
|
39
|
-
|
|
38
|
+
item marked `w 0, nothing to build on this track`, a task summary that opens with "Nothing to build" (the
|
|
39
|
+
spec's estimate of the work, not a reading of the code), and the "Built already" section. None of them was read from the code: the first two are the
|
|
40
40
|
sign-off's judgement, the third is computed from dates (the asking task was done after the answer). On one
|
|
41
41
|
product they were wrong, in both directions, on fifteen tasks of sixty-four. So before you skip or cover such an
|
|
42
42
|
item, read the code against the item's text and write or run its test. When the code has the behaviour, the
|
|
@@ -54,31 +54,45 @@ dispatcher's pages.
|
|
|
54
54
|
at a boundary is rework before the next item.
|
|
55
55
|
- **The CLI does the deterministic work**: which commit to send, the task's brief and checklist, the items its commits cover, the commit that brought it in. Never work these out yourself.
|
|
56
56
|
- **Feedback is how the spec gets better, and it never restates a question.** Once per task, when its checklist
|
|
57
|
-
is covered, call `feedback` with
|
|
57
|
+
is covered, call `feedback` with its lists. What you asked is on the task already, with its answer: the
|
|
58
58
|
product side reads the questions beside the feedback, so a question said again is a line someone must close by
|
|
59
|
-
hand.
|
|
59
|
+
hand. Every line you send ends with an outcome on the product side (lifted into the spec, declined with a reason,
|
|
60
|
+
technical, or nothing to do), so send only what someone can act on.
|
|
60
61
|
- `unclear`: what in the spec cost you work and was **not** a question, each line naming the spec IDs it is
|
|
61
62
|
about (a sentence that took three readings, a term used for two things, a fact that sat far from where it was
|
|
62
63
|
needed, a brief that called built what the code didn't hold). Never a question that was asked:
|
|
63
64
|
no `Q-<n>` on these lines and no question said again. A task whose every difficulty was asked sends an empty
|
|
64
65
|
`unclear`.
|
|
65
|
-
- `decided`: one
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
- `decided`: one entry per decision you built on, each `{ "text", "kind" }` with its kind, `business` or
|
|
67
|
+
`technical`. Tell them apart by one test: **would a user or another track notice the difference** if you had
|
|
68
|
+
decided the other way? Yes: it is `business`, what the product does (a refusal, a default, an order, a limit,
|
|
69
|
+
a message, what an input does at its edge), and it was asked before it was built, so its `text` is its
|
|
70
|
+
`Q-<n>` and nothing more: no object ID and no retelling, so the line closes with its question. A business
|
|
71
|
+
decision without a `Q-<n>` was taken silently; ask it now, before the feedback, and send the number you get.
|
|
72
|
+
No: it is `technical`, how this repository builds it (structure, names, storage, the shape of a request), never
|
|
73
|
+
asked; send one only when someone reading the spec could have expected it otherwise, as one line naming the
|
|
74
|
+
spec IDs it is about and no code.
|
|
75
|
+
- `weight`: when the spec's estimate of the work (the task's weight or an item's `w`) was clearly wrong, say so
|
|
76
|
+
here in one step: `{ "text", "item"? }`, one line per estimate, `item` naming the checklist item when it is
|
|
77
|
+
one, the line saying which way and why in the spec's terms ("three rules and a new state, not wording"). Never
|
|
78
|
+
a question, never an `unclear` line, never a number you set: the estimate stays the sign-off's.
|
|
68
79
|
- `opened`: what you had to read beyond the brief, and why, naming the IDs. It is read by whoever builds the
|
|
69
80
|
brief, as a count of how often each ID was opened, not by the product side: name the object, not a complaint.
|
|
70
81
|
Never a finding (what you found goes to `unclear`), never a file the brief itself gave you.
|
|
71
82
|
|
|
72
|
-
|
|
83
|
+
Lines as they should read:
|
|
73
84
|
|
|
74
85
|
```
|
|
75
86
|
unclear: RULE-NTF-007, CAP-NTF-001-AC-04, CAP-NTF-001-AC-17: the 60th day falls on a different side in each.
|
|
76
87
|
opened: _generated/rule-matrix.md, the row of RULE-058: which capabilities trigger it; the brief gave the rule, not its reach.
|
|
77
|
-
decided: Q-198
|
|
88
|
+
decided: { "text": "Q-198", "kind": "business" }
|
|
89
|
+
decided: { "text": "ENT-ORDER: the order's lines are saved with the order in one step, not one by one", "kind": "technical" }
|
|
90
|
+
weight: { "text": "a new state, two rules and their messages, not one wording", "item": "CAP-ORD-004-AC-03" }
|
|
78
91
|
```
|
|
79
92
|
|
|
80
93
|
No code and no copied spec text; empty lists are fine, an invented complaint is not. Skip it when the dispatcher
|
|
81
|
-
has no `feedback` tool.
|
|
94
|
+
has no `feedback` tool. An older dispatcher that refuses an object in `decided` or the `weight` list takes the
|
|
95
|
+
bare strings: send `decided` as the `Q-<n>` alone and leave `weight` out.
|
|
82
96
|
- **A question is asked, never guessed.** When the spec is silent, ambiguous or says two things about what you are
|
|
83
97
|
building, use `/alterspec-spec-ask` with the question; don't stop the developer for it and don't decide it. Its
|
|
84
98
|
answer is one of three. *From the spec*, with the IDs it rests on: work on. *Assumed* (`Q-<n>`): the spec doesn't
|
|
@@ -122,7 +136,9 @@ dispatcher's pages.
|
|
|
122
136
|
once as an assumption (`Q-<n>`) the product side sees
|
|
123
137
|
the same hour and can correct while it is cheap. Never keep such a decision for the feedback, and never take one
|
|
124
138
|
silently. How you build something (structure, names, libraries, storage, the shape of a request) is this
|
|
125
|
-
repository's own business and is never asked.
|
|
139
|
+
repository's own business and is never asked. The test between the two is always the same: would a user or
|
|
140
|
+
another track notice the difference? Yes: it is a business decision, asked. No: it is technical, never asked, and
|
|
141
|
+
at most one `technical` line of the feedback.
|
|
126
142
|
- **Progress and ETA are the dispatcher's arithmetic.** Never compute a percentage or a date yourself, and never
|
|
127
143
|
guess one: say what the dispatcher answered. The developer's own date is theirs to set, with
|
|
128
144
|
`/alterspec-task-eta`.
|
|
@@ -71,6 +71,12 @@ Exactly one of three outcomes. Which one is decided by what you can cite, never
|
|
|
71
71
|
the question has several parts, keep them numbered in the question and answer each part with its own outcome's
|
|
72
72
|
words, so a product person can confirm part (1) and decide part (2) in one answer.
|
|
73
73
|
|
|
74
|
+
**Business or technical.** Before an outcome, apply one test: would a user or another track notice the difference
|
|
75
|
+
between the possible answers? Yes: it is a business question, what the product does, and gets one of the three
|
|
76
|
+
outcomes. No: it is technical, how the repository builds it (structure, names, storage, the shape of a request).
|
|
77
|
+
The spec never decides that, so it is no `assumed` and no `open`: return `spec` only if the export does constrain
|
|
78
|
+
it, else say in the answer that it is the repository's own decision and cite nothing, and the question is not sent.
|
|
79
|
+
|
|
74
80
|
**Silence is proven, not felt.** `assumed` and `open` are allowed only after you opened every path under "open
|
|
75
81
|
before calling the export silent". If you are sent back with paths you didn't open, read them and answer again.
|
|
76
82
|
|
|
@@ -81,8 +81,9 @@ or whose `Alterspec-Task` trailer the last commit carries; when that doesn't set
|
|
|
81
81
|
product's behaviour that the brief didn't state. Each one has a `Q-<n>` from `/alterspec-spec-ask` (most from the
|
|
82
82
|
pass of step 4), or you ask it now, before the commit, as `_shared.md` says; the commit's body names the `Q-<n>`
|
|
83
83
|
it stands on.
|
|
84
|
-
8. Work through the checklist, the heavy items first (their weight `w`, when the brief shows one, is
|
|
85
|
-
behaviour each is; it is the sign-off's, never yours to set
|
|
84
|
+
8. Work through the checklist, the heavy items first (their weight `w`, when the brief shows one, is the spec's
|
|
85
|
+
estimate of the work, how much behaviour each is; it is the sign-off's, never yours to set: when it is clearly
|
|
86
|
+
wrong, say so in the feedback's `weight` list). An item marked `w 0, nothing to build on this track` is
|
|
86
87
|
one of two things, and the brief doesn't say which: another track's behaviour that your track only reads (its
|
|
87
88
|
text names only another channel: read it, build nothing), or behaviour the sign-off holds this track to have
|
|
88
89
|
already (as built). Read the code against the item either way, as `_shared.md` says: when it has the behaviour,
|
|
@@ -96,4 +97,6 @@ or whose `Alterspec-Task` trailer the last commit carries; when that doesn't set
|
|
|
96
97
|
with the items whose tests pass on that commit. The hook reports them. When the work is merged into the main
|
|
97
98
|
branch, the developer types `/alterspec-task-done <task>`; never report it done yourself.
|
|
98
99
|
9. When every checklist item is covered, send your `feedback` once, as `_shared.md` says, while you still remember
|
|
99
|
-
what the work cost (nothing you asked is said again: `decided` is the bare `Q-<n>` of
|
|
100
|
+
what the work cost (nothing you asked is said again: a `business` entry of `decided` is the bare `Q-<n>` of
|
|
101
|
+
each assumption, a `technical` one a line only when the spec's reader could have expected otherwise; an
|
|
102
|
+
estimate that was clearly wrong goes to `weight`); then tell the developer the task is ready for `/alterspec-task-done <task>` once it is merged.
|
package/developer-guide.md
CHANGED
|
@@ -41,8 +41,10 @@ You connect to it with the **alterspec client** (`@alterset/alterspec-client`, p
|
|
|
41
41
|
holds the criterion only for its own part; the brief shows you yours and says when the other part is another
|
|
42
42
|
task's. A criterion without Shown is all the backend's.
|
|
43
43
|
- When the checklist is covered, Claude sends the dispatcher short **feedback** on the task: what in the spec was
|
|
44
|
-
unclear and was not asked, what it had to read beyond the brief, and
|
|
45
|
-
|
|
44
|
+
unclear and was not asked, what it had to read beyond the brief, and each decision it built on, tagged
|
|
45
|
+
*business* (what the product does: its `Q-<n>`) or *technical* (how it is built), by one test: would a user or
|
|
46
|
+
another track notice the difference? A task or item weight that was clearly wrong (the spec's estimate of the
|
|
47
|
+
work) is said in the same feedback, in one step, as a `weight` line. It never says a question again: the product side reads the task's questions beside it. Two objects of the spec
|
|
46
48
|
that disagree are asked the moment Claude sees them, not kept for the feedback. It is never a grade of your work.
|
|
47
49
|
- When the spec doesn't decide something, Claude **asks** instead of stopping you or deciding itself. An answerer
|
|
48
50
|
that reads only the spec replies: *from the spec*, with the IDs it rests on; *assumed*, when the spec is silent and
|
|
@@ -340,7 +342,8 @@ Claude asks not only when it is stuck. Every time it is about to decide how the
|
|
|
340
342
|
doesn't say (which refusal wins, a default, what happens to existing records, a message's wording), it asks first:
|
|
341
343
|
either the spec already says, or the choice is recorded at once as an assumption the product side sees the same
|
|
342
344
|
hour. Nothing about the product is decided silently and found out at the end of the task. How the code is built is
|
|
343
|
-
yours and is never asked.
|
|
345
|
+
yours and is never asked. The line between the two is one test: would a user or another track notice the
|
|
346
|
+
difference?
|
|
344
347
|
|
|
345
348
|
A question is recorded with the task it concerns, and the checklist item when it concerns one, whether or not the
|
|
346
349
|
task is yours yet: ask about `CHG-028/BE` while it waits behind another task and it lands on that task's page and in
|