@alterset/alterspec-client 0.30.0 → 0.32.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/assets/prompts/_shared.md +17 -1
- package/assets/prompts/spec-ask.md +29 -9
- package/assets/prompts/task-context.md +5 -1
- package/assets/prompts/task-done.md +8 -0
- package/developer-guide.md +39 -7
- package/dist/cli.js +360 -51
- package/dist/cli.js.map +1 -1
- package/dist/work.d.ts +361 -6
- package/dist/work.js +60 -6
- package/dist/work.js.map +1 -1
- package/dist/work.schema.json +432 -0
- package/package.json +1 -1
|
@@ -84,12 +84,28 @@ dispatcher's pages.
|
|
|
84
84
|
answer is one of three. *From the spec*, with the IDs it rests on: work on. *Assumed* (`Q-<n>`): the spec doesn't
|
|
85
85
|
say and one reading is the cautious one; work on with it, name `Q-<n>` in the body of every commit that stands on
|
|
86
86
|
it, and expect that the product side may correct it. *Open* (`Q-<n>`): nobody may assume it; leave that checklist
|
|
87
|
-
item uncovered, work the others, and never name it in `Alterspec-Covers`.
|
|
87
|
+
item uncovered, work the others, and never name it in `Alterspec-Covers`. Both carry your reading of the spec
|
|
88
|
+
(`assumption`; `no_reading` with the reason only when there truly is none), and an open one says what it waits
|
|
89
|
+
for: a contradiction between two objects, or a business decision; anything else is assumed. Another developer's
|
|
90
|
+
open question on the same matter is joined (`joins`), your own follow-up extends it (`extends`). Before anything
|
|
91
|
+
is posted, the questions already held on the same objects are read, answered ones included even when the export
|
|
92
|
+
doesn't hold their answer yet: `ask` comes back `RELATED_FIRST` with that list until the call joins one, extends
|
|
93
|
+
one or says `new: true`, and the `related` an `ask` returns after posting are shown in one line each. The brief (`alterspec-client context`)
|
|
88
94
|
opens with the change's questions on every track and the product side's answers, and `alterspec-client questions
|
|
89
95
|
<task>` prints a task's: an answer to an open one unblocks its item; a corrected assumption is rework, done before
|
|
90
96
|
anything else. An answer that changes the spec comes back one export later as a change of its own; when the brief
|
|
91
97
|
says this track built it already ("Built already"), that task checks the code against the spec's new text and
|
|
92
98
|
rebuilds nothing.
|
|
99
|
+
- **A ruling stands before its export.** The brief's "Ruled, not in the export yet" lists the product side's
|
|
100
|
+
answers on this task's objects that the export doesn't say yet: build on them as on the spec, over the export's
|
|
101
|
+
silence or older wording, and name no question number in code or tests (write the behaviour; the spec catches up
|
|
102
|
+
when the ruling is groomed). When the brief opens with "A ruling changed since you last read this brief", the
|
|
103
|
+
product side replaced an answer you saw: what you built on the earlier one follows the new one, tests included,
|
|
104
|
+
before anything else.
|
|
105
|
+
- **Failing tests after another track shipped are your work.** When the brief says "<TRACK> has shipped this
|
|
106
|
+
change" and that tests of what it removes or changes are expected to fail, those tests are part of this task:
|
|
107
|
+
update them with the work. It is not a question of task order; never ask about it. When the brief says the
|
|
108
|
+
shipped task alters nothing your track does, a failing test is a fault like any other.
|
|
93
109
|
- **A contradiction is asked when it is found, not reported at the end.** Two objects that disagree (a rule and a
|
|
94
110
|
criterion, an entity's lifecycle and a capability, two rules) are one question naming both IDs, asked with
|
|
95
111
|
`/alterspec-spec-ask` the moment you see it; never keep it for `unclear`, where it waits for days among other
|
|
@@ -30,17 +30,22 @@ that follows is that change's task too.
|
|
|
30
30
|
|
|
31
31
|
1. Start as `_shared.md` says (`whoami`, then `export-head`, so the clone is current; keep its `send`). When the
|
|
32
32
|
dispatcher can't be reached or refuses the key, say so in one line and go on from the clone as it is.
|
|
33
|
-
2. Asked before? With a task, `alterspec-client questions <task>` (the brief's questions, on a task you hold)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
answered
|
|
37
|
-
|
|
33
|
+
2. Asked before? With a task, `alterspec-client questions <task>` (the brief's questions, on a task you hold),
|
|
34
|
+
and in every case, once the question's IDs are known (the question's own, else the "about" of the lookup at step
|
|
35
|
+
3, run first then), `alterspec-client questions --about <ID...>`: every task's questions on those objects,
|
|
36
|
+
answered ones included. An answer marked "not in the export yet" is the product side's word the export doesn't
|
|
37
|
+
hold yet. When one of them is this question and the product side answered it, say that answer with its `Q-<n>`
|
|
38
|
+
and stop: nothing is asked or recorded twice, and that answer stands over the export's silence. The same
|
|
39
|
+
question asked from another task is joined at step 7, never asked again. A failure here stops nothing. A
|
|
40
|
+
failing test after another track shipped the change is never a question (`_shared.md`).
|
|
38
41
|
**One question per matter.** When one of them is still open, cites the same object (the same rule, entity,
|
|
39
42
|
integration or moment) and this question is the next case of it (a follow-up to your own question, an edge the
|
|
40
43
|
first one didn't name), this is not a new question: it is a new numbered part of that one. Go on through steps
|
|
41
44
|
3 to 6 for the new part alone and, at step 7, record it as one question that restates the open one with its
|
|
42
45
|
parts numbered, naming the earlier `Q-<n>` first in its text ("Extends Q-124: (1) … (2) …") and passing
|
|
43
|
-
`extends: Q-<n>` when the dispatcher's `ask` takes it; the product side then answers the matter once.
|
|
46
|
+
`extends: Q-<n>` when the dispatcher's `ask` takes it; the product side then answers the matter once. When the
|
|
47
|
+
open one is another developer's question on the same matter, don't restate it: pass `joins: Q-<n>` at step 7,
|
|
48
|
+
and your task waits on that question's answer like theirs (`extends` is for your own follow-up only). And a
|
|
44
49
|
limit: once three of your questions about one cited object are open on the task, ask nothing more about that
|
|
45
50
|
object. Write the cases still undecided into one consolidated question the same way, build everything else on the
|
|
46
51
|
assumptions already recorded, and leave the items those cases hold uncovered. Fifty questions on one task about
|
|
@@ -60,9 +65,24 @@ that follows is that change's task too.
|
|
|
60
65
|
7. An answer from the spec is not sent to the dispatcher: nothing was decided, so there is nothing for the product
|
|
61
66
|
side to read. Record it with `ask` only when the outcome is `assumed` or `open`, and when the dispatcher lists
|
|
62
67
|
that tool: `question`, `outcome`, `cites` (what the question concerns, what the assumption extends),
|
|
63
|
-
`assumption
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
`assumption`, `export` (the commit from step 1) and, with a task, `task` and `item`. The words are the answerer's
|
|
69
|
+
and yours, naming IDs: no code and no copied spec text.
|
|
70
|
+
- `assumption` is always sent with `assumed`, and with `open` too: your best reading of what the product does,
|
|
71
|
+
which the product side confirms or corrects. Only when you truly have no reading of an `open` question, send
|
|
72
|
+
`no_reading` with the reason in its place.
|
|
73
|
+
- `open` also takes `waits_for`, and only two reasons make a question wait: `"contradiction"` (two objects of the
|
|
74
|
+
export say different things; cite both) or `"business"` (a product decision no reading of the spec can make).
|
|
75
|
+
Anything else is `assumed`: record the assumption and work on.
|
|
76
|
+
- `joins` (`Q-<n>`) instead of a new question when step 2 found another asker's open question on the same matter;
|
|
77
|
+
`extends: Q-<n>` for your own follow-up.
|
|
78
|
+
- The client looks once more before it posts: when the dispatcher holds questions on the same objects, `ask`
|
|
79
|
+
comes back `RELATED_FIRST` with them in one line each and nothing is posted. Read the ones that may be this
|
|
80
|
+
matter (`alterspec-client questions <id>`). If one answers it, use that answer and post nothing; else call
|
|
81
|
+
`ask` again with `joins: "Q-<n>"` (another asker's question on the same matter), `extends: "Q-<n>"` (your own),
|
|
82
|
+
or `new: true` (none is this matter). Never send `new: true` without having read the list.
|
|
83
|
+
- When the dispatcher's answer carries `related`, show them to the developer in one line each.
|
|
84
|
+
Keep the `Q-<n>` it returns. Without the tool, or when the call fails, go on and say the question was not
|
|
85
|
+
recorded.
|
|
66
86
|
8. Say the result, by outcome:
|
|
67
87
|
- `spec`: the answer in the export's business terms with the IDs it rests on. Work on.
|
|
68
88
|
- `assumed`: "Assumed, not decided (Q-<n>):" and the assumption, what it extends and what changes if the product
|
|
@@ -20,7 +20,11 @@ or whose `Alterspec-Task` trailer the last commit carries; when that doesn't set
|
|
|
20
20
|
code: read each checklist item against the code first; where the code says what the spec now says, add the test
|
|
21
21
|
that is missing and cover the item as it passes; where it doesn't, build it, whatever the mark said, and say so
|
|
22
22
|
in the commit's body (`_shared.md`, "A claim about the code is checked"). The same reading settles the answers
|
|
23
|
-
the brief marks as not built here: the code may hold them already.
|
|
23
|
+
the brief marks as not built here: the code may hold them already. When it opens with "A ruling changed since you
|
|
24
|
+
last read this brief", rework what stood on the earlier answer first. "Ruled, not in the export yet" lists the
|
|
25
|
+
product side's answers on this task's objects the export doesn't hold yet: build on them as on the spec, naming
|
|
26
|
+
no question number in code or tests. When it says another track "has shipped this change" and tests are expected
|
|
27
|
+
to fail, those tests are this task's to update; never ask about the order of tasks. Then the task's checklist: its items, what
|
|
24
28
|
each is and which the dispatcher holds covered already; that is the work, and its progress. Then why the change
|
|
25
29
|
was made, what changed, the one-time data change when the proposal declares one (what the release does once to the
|
|
26
30
|
records the product already holds; on the backend it is the `CHG-NNN#data-change` item), the delta of each of the
|
|
@@ -21,7 +21,15 @@ Without a task, ask for it; never guess it.
|
|
|
21
21
|
5. Run `alterspec-client questions <task> --open`, when the dispatcher keeps questions (a failure here doesn't
|
|
22
22
|
stop what follows). Say each open one in a line: work standing on an assumption may still be corrected, and an
|
|
23
23
|
item that waited for an answer is not built. The developer typed the command, so go on.
|
|
24
|
+
When the dispatcher's `task` lists `rework` (a `REWORK-<n>` item beside the checklist: a corrected assumption's
|
|
25
|
+
work), say each one that isn't covered. One whose fix is committed and whose tests pass is covered by naming
|
|
26
|
+
`REWORK-<n>` in an `Alterspec-Covers` trailer and running `alterspec-client progress <task>` again; it carries
|
|
27
|
+
no weight. Never cover one whose fix isn't in the code.
|
|
24
28
|
6. Call `done` with the task, that `commit` and, when `merged` printed one, that `branch` (`{ id, commit, branch }`;
|
|
25
29
|
leave `branch` out when there is none).
|
|
26
30
|
7. Say the result in one line: done, at which commit, on which branch, and that the tasks waiting for it may start
|
|
27
31
|
from that branch. `NOT_IN_BRANCH`, `NOT_YOURS`, `NOT_IN_PROGRESS`: say the dispatcher's sentence.
|
|
32
|
+
`QUESTIONS_OPEN` (an item still waits for an answer), `REWORK_OPEN` (a `REWORK-<n>` item isn't covered),
|
|
33
|
+
`COUPLED_HOLD` (the change ships with its other tracks, which aren't done) and `HELD` (the change is held out of
|
|
34
|
+
the release; done on a feature branch is allowed, on the main branch it is not): say the dispatcher's sentence
|
|
35
|
+
as it is and what it waits for; never retry `done` to get past it.
|
package/developer-guide.md
CHANGED
|
@@ -254,8 +254,24 @@ yet: fetch it and base your branch on it, not on main (`git fetch origin task/ch
|
|
|
254
254
|
When another track has finished the same change, the brief says so near its top: "**BE has shipped this change**"
|
|
255
255
|
with its commit and branch (from the dispatcher's `task`, which names the change's other tasks). The server already
|
|
256
256
|
behaves as the change says, so your tests of what the change removes or narrows fail until your task is done:
|
|
257
|
-
updating them is part of your task, not a broken dependency
|
|
258
|
-
|
|
257
|
+
updating them is part of your task, not a broken dependency and not a question of task order, so the agent asks
|
|
258
|
+
nothing about it. When the export says which tracks the shipped task alters (`alters`, `work.json` format 9) and
|
|
259
|
+
yours is not among them, the brief says it alters nothing your track does, and a failing test is an ordinary fault.
|
|
260
|
+
A track still at work is named as "building this change now". The dispatcher offers a shipped change's other tasks
|
|
261
|
+
first.
|
|
262
|
+
|
|
263
|
+
**Rulings the export doesn't hold yet.** When the product side has answered a question about one of your task's
|
|
264
|
+
objects and the answer isn't in the export yet, the brief lists it under "Ruled, not in the export yet": whole when
|
|
265
|
+
it changes an item of your task, else one line with the command that prints it. The agent builds on it as on the
|
|
266
|
+
spec and puts no question number in code or tests; the export says the same once the ruling is groomed. When the
|
|
267
|
+
product side reverses a ruling your brief showed, the next brief opens with "A ruling changed since you last read
|
|
268
|
+
this brief", and `whoami` counts such changes across your tasks.
|
|
269
|
+
|
|
270
|
+
**Asked before?** Before a question is posted, the client asks the dispatcher which questions it already holds on
|
|
271
|
+
the same objects, answered or open. If there are any, `ask` comes back `RELATED_FIRST` with them listed and nothing
|
|
272
|
+
is posted until the agent settles it: it uses an answer that already covers the question, joins another task's
|
|
273
|
+
question on the same matter (`joins`), extends its own (`extends`), or sends the question as new (`new: true`, a
|
|
274
|
+
flag of the client's that the dispatcher never sees). When that look fails, the question is posted as it came.
|
|
259
275
|
|
|
260
276
|
When the change keeps a **compatibility** (its proposal's "Compatibility" section: what the server keeps accepting
|
|
261
277
|
from the apps as they are today), the brief says that instead of "tests will fail": on the backend, which tracks
|
|
@@ -283,6 +299,9 @@ sentence a later change wrote is asked on that change's task.
|
|
|
283
299
|
nothing.
|
|
284
300
|
- An object that was signed off only after your task's change (the brief says so) is shown as the export holds it
|
|
285
301
|
now: the export never had its earlier text.
|
|
302
|
+
- When the dispatcher sends the list of what changed since your task's export (client 0.31.0), "Changed since"
|
|
303
|
+
names only the objects your task cites, plus the objects that entered the export after it; when none of yours
|
|
304
|
+
changed it says so in one line. An older dispatcher sends no list, and the section stays as above.
|
|
286
305
|
|
|
287
306
|
### One task of your choosing
|
|
288
307
|
|
|
@@ -312,7 +331,10 @@ You don't carry questions to the product owner by hand. When the spec leaves som
|
|
|
312
331
|
A product person confirms or corrects it on the dispatcher's **Questions** page. A correction shows at the top of
|
|
313
332
|
the task's brief, and Claude reworks what stood on the assumption before anything else.
|
|
314
333
|
- **Open** (`Q-13`). Nothing may be assumed. That checklist item stays uncovered and Claude works the others; when
|
|
315
|
-
the answer is there, the brief shows it and the item goes on.
|
|
334
|
+
the answer is there, the brief shows it and the item goes on. Only two things make a question wait: two parts of
|
|
335
|
+
the spec that say different things (both are named), or a business decision no reading of the spec can make.
|
|
336
|
+
Anything else is assumed. An open question still carries Claude's reading of the spec, which the product side
|
|
337
|
+
confirms or corrects; only when there is truly none does it say why.
|
|
316
338
|
|
|
317
339
|
Claude asks not only when it is stuck. Every time it is about to decide how the product behaves where the brief
|
|
318
340
|
doesn't say (which refusal wins, a default, what happens to existing records, a message's wording), it asks first:
|
|
@@ -331,7 +353,10 @@ question extends that question instead of adding a new one, so the product side
|
|
|
331
353
|
three open questions about one object on a task, Claude asks nothing more about it: it writes the cases still
|
|
332
354
|
undecided into one question and builds everything else on the assumptions already recorded. A wish about how the
|
|
333
355
|
product should behave or look, with nothing in the spec read two ways and no item waiting on it, is not a question:
|
|
334
|
-
bring it to the product side as a proposal.
|
|
356
|
+
bring it to the product side as a proposal. When another developer already asked the same open question, Claude
|
|
357
|
+
joins it instead of asking again, and your task waits on its answer like theirs. When the dispatcher answers that it
|
|
358
|
+
holds related questions on the same objects, Claude shows them to you one line each before anything is posted, and
|
|
359
|
+
posts once you settle it: join one, extend your own, or send it as new.
|
|
335
360
|
|
|
336
361
|
How an answer is found: the client first looks whether the question was asked before, then computes where the spec
|
|
337
362
|
would answer it (`lookup`: what the question names, by ID, by the glossary's words and their synonyms, by title; the
|
|
@@ -341,9 +366,16 @@ that it did. So "the spec doesn't say" means the places that would say it were r
|
|
|
341
366
|
nothing.
|
|
342
367
|
|
|
343
368
|
`npx @alterset/alterspec-client questions` prints your questions with their answers, `questions CHG-023/BE` a
|
|
344
|
-
task's; the brief shows the whole change's, so what the backend assumed
|
|
345
|
-
|
|
346
|
-
|
|
369
|
+
task's, `questions Q-12 Q-13` those questions whole; the brief shows the whole change's, so what the backend assumed
|
|
370
|
+
is in front of the web task too. When the dispatcher says which of them bear on your task (asked on your track, or
|
|
371
|
+
answered with a change to one of your items), only those are whole in the brief and the others are one line each,
|
|
372
|
+
naming the command that prints them. A corrected assumption opens a `REWORK-<n>` item beside the checklist: fix what
|
|
373
|
+
stood on it, and cover it with `Alterspec-Covers: REWORK-<n>` once its tests pass; it carries no weight.
|
|
374
|
+
`/alterspec-task-done` names the questions still open and the rework not covered. The dispatcher may refuse
|
|
375
|
+
`done` while an item waits for an answer (`QUESTIONS_OPEN`), a rework item isn't covered (`REWORK_OPEN`), the
|
|
376
|
+
change ships with its other tracks that aren't done (`COUPLED_HOLD`), or the change is held out of the release on
|
|
377
|
+
the main branch (`HELD`); Claude says the dispatcher's sentence and what it waits for, and never retries to get
|
|
378
|
+
past it. An older dispatcher refuses none of these. If the answer changes the product, the product side grooms it into the spec (several answers as one
|
|
347
379
|
change) and signs it off, and it reaches you as a task of its own in a later export. The dispatcher knows which
|
|
348
380
|
of that change's questions your track built already (your task finished after the answer), and the brief opens
|
|
349
381
|
with it under "Built already": such a task checks that the code says what the spec now says, adds the missing tests
|