@alterset/alterspec-client 0.3.0 → 0.4.1

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.
@@ -2,20 +2,31 @@
2
2
 
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
- the MCP server `dispatcher` that `.mcp.json` starts: `whoami`, `next_task`, `list_tasks`, `task`, `touch`, `done`,
6
- `release`. Never call `force_release` or `mark_done`: they are an administrator's, in the dispatcher's pages.
5
+ the MCP server `dispatcher` that `.mcp.json` starts: `whoami`, `next_task`, `list_tasks`, `list_changes`, `task`,
6
+ `touch`, `set_eta`, `done`, `release`. Progress reaches the dispatcher through `alterspec-client progress`, never by
7
+ calling its tool yourself. Never call `force_release` or `mark_done`: they are an administrator's, in the
8
+ dispatcher's pages.
7
9
 
8
10
  ## What you work with
9
11
 
10
- - **A task** is one signed-off change on one track, written `CHG-012/BE` (the change, a slash, the track). `BE` is
11
- the backend, API channels included; every other track is a channel with an experience of its own. Never make up a
12
- task: take it from the developer's words or the dispatcher's answers, exactly as written.
12
+ - **A track** is a stream of build work, not a channel. A channel is a way the product is reached (a web app, a mobile
13
+ app, an API) and belongs to the spec; a track belongs to the teams. `BE` is the backend: every object, rule,
14
+ capability and event, and every API channel. Every other track is one design, named by the code of the channel
15
+ that owns it (`BO`, `MOB`); a channel that shares another's design (a sales desk that looks like the backoffice)
16
+ is built in that one's track and has none of its own. This repository builds the tracks its
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.
13
20
  - **The export** is the product spec, signed off, in its own git repository; `.alterspec-client.json` names the
14
21
  developer's clone of it. It says what the product does in business terms and names everything by ID; it never
15
22
  says how to build it, which is this repository's business. Cite IDs when you refer to it. The clone is read-only:
16
23
  never edit, commit or switch branches in it; `alterspec-client` pulls it.
17
- - **The CLI does the deterministic work**: which commit to send, the task's brief, its branch and worktree, the
18
- commit that brought it in. Never work these out yourself, never pick a branch name.
24
+ - **The CLI does the deterministic work**: which commit to send, the task's brief and checklist, its branch and
25
+ worktree, the items its commits cover, the commit that brought it in. Never work these out yourself, never pick a
26
+ branch name.
27
+ - **Progress and ETA are the dispatcher's arithmetic.** Never compute a percentage or a date yourself, and never
28
+ guess one: say what the dispatcher answered. The developer's own date is theirs to set, with
29
+ `/alterspec-task-eta`.
19
30
 
20
31
  ## How every skill starts
21
32
 
@@ -43,5 +54,18 @@ the MCP server `dispatcher` that `.mcp.json` starts: `whoami`, `next_task`, `lis
43
54
  ## Commits of a task
44
55
 
45
56
  Work on the task's branch, which `alterspec-client worktree <task>` makes (`--here` in this checkout). Every commit
46
- of the task ends with the trailer line `Alterspec-Task: <task>`, the task exactly as the dispatcher wrote it, after
47
- a blank line. The task is done when that work is in the track's main branch.
57
+ of the task ends with a trailer block, after a blank line:
58
+
59
+ ```
60
+ Alterspec-Task: CHG-012/BE
61
+ Alterspec-Covers: CAP-CAT-001-AC-03, CAP-CAT-002
62
+ ```
63
+
64
+ - `Alterspec-Task` always, the task exactly as the dispatcher wrote it.
65
+ - `Alterspec-Covers` only on the commit with which an item's tests pass, naming those items exactly as the task's
66
+ checklist writes them (`alterspec-client context <task>` lists them). Never an item whose tests don't pass yet,
67
+ never one the checklist lacks, never "all". An item named once stays covered; don't name it again. A commit that
68
+ covers nothing has no `Alterspec-Covers` line.
69
+
70
+ A hook reports the covered items to the dispatcher after each commit, by itself; when it asks, the developer runs
71
+ `alterspec-client progress`. The task is done when its work is in the track's main branch.
@@ -7,10 +7,11 @@ there are several, the one whose branch this checkout is on (`git branch --show-
7
7
  when that doesn't settle it, ask which.
8
8
 
9
9
  1. Start as `_shared.md` says (`whoami`, `export-head`).
10
- 2. Run `alterspec-client context <task>` and read the brief: why the change was made, what changed, the delta of each
11
- of the task's objects (before and after) and where each is in the export now; for the backend the acceptance
12
- criteria, rules, events and operations the capabilities name; for a UI track the screens, their experience
13
- contracts, the mockup pages and the channel's design system.
10
+ 2. Run `alterspec-client context <task>` and read the brief. It opens with the task's checklist: its items, what
11
+ each is and which the dispatcher holds covered already; that is the work, and its progress. Then why the change
12
+ was made, what changed, the delta of each of the task's objects (before and after) and where each is in the export
13
+ now; for the backend the acceptance criteria, rules, events and operations the capabilities name; for a UI track
14
+ the screens, their experience contracts, the mockup pages and the channel's design system.
14
15
  3. Call `touch` with the task, then `task` with it. `followed_by` lists the later tasks on this track whose objects
15
16
  overlap this one's; say them in one line, e.g. "CHG-015/BE, after yours, changes some of the same objects; it will
16
17
  be its own task." Build what this change says, not what later ones do.
@@ -21,5 +22,7 @@ when that doesn't settle it, ask which.
21
22
  the developer's. A mockup page is the agreed look and behaviour of a screen, a working example to follow, not code
22
23
  to copy. When the spec and the code disagree, or the spec is silent, ask the developer; never fill a gap with an
23
24
  invented business rule.
24
- 6. Commit with the trailer `Alterspec-Task: <task>` (see `_shared.md`). When the work is merged into the main
25
- branch, the developer types `/alterspec-task-done <task>`; never report it done yourself.
25
+ 6. Work through the checklist. For each item, make its tests pass, then commit with the trailers of `_shared.md`:
26
+ `Alterspec-Task: <task>` always, `Alterspec-Covers` with the items whose tests pass on that commit. The hook
27
+ reports them. When the work is merged into the main branch, the developer types `/alterspec-task-done <task>`;
28
+ never report it done yourself.
@@ -6,8 +6,10 @@ Arguments: `<CHG-NNN/TRACK>`, required. The developer typed this command: that i
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
- 2. Run `alterspec-client merged <task>`. It prints the commit on the track's main branch that brought the task in,
9
+ 2. Run `alterspec-client progress <task>`, so the dispatcher has the last covered items. Say its lines as they are
10
+ (an item the task lacks is one of them); a failure here doesn't stop what follows.
11
+ 3. Run `alterspec-client merged <task>`. It prints the commit on the track's main branch that brought the task in,
10
12
  or fails when the work isn't there yet: then say so (merge the task's branch, or push the commits carrying the
11
13
  trailer, first) and stop. Never report a task done whose work isn't on the main branch.
12
- 3. Call `done` with the task and that commit.
13
- 4. Say the result in one line. `NOT_IN_BRANCH`, `NOT_YOURS`, `NOT_IN_PROGRESS`: say the dispatcher's sentence.
14
+ 4. Call `done` with the task and that commit.
15
+ 5. Say the result in one line. `NOT_IN_BRANCH`, `NOT_YOURS`, `NOT_IN_PROGRESS`: say the dispatcher's sentence.
@@ -0,0 +1,14 @@
1
+ # /alterspec-task-eta — set your own date for a task
2
+
3
+ Read `.alterspec-client/prompts/_shared.md` first and follow it.
4
+
5
+ Arguments: `<CHG-NNN/TRACK> <YYYY-MM-DD|clear> <reason>`. The developer typed this command: the date is their word,
6
+ as `done` and `release` are. Without a task or a date, ask for them; never guess either.
7
+
8
+ 1. Start with `whoami` as `_shared.md` says. `export-head` is not needed.
9
+ 2. The date is a day, `YYYY-MM-DD`, or `clear` to drop the developer's date so the dispatcher's computed ETA holds
10
+ again. Anything else: ask for a day in that form. Never turn words like "next Friday" into a date yourself; ask.
11
+ 3. The reason is the developer's words after the date; it is logged with the date. Without one, ask once (one line).
12
+ 4. Call `set_eta` with the task, the date (`null` for `clear`) and the reason.
13
+ 5. Say the result in one line: the task's ETA now, the developer's date as theirs and the computed one beside it, or
14
+ the computed one alone after `clear`. `NOT_YOURS`, `NOT_IN_PROGRESS`: say the dispatcher's sentence.
@@ -9,6 +9,13 @@ Arguments: `[track]`, optional.
9
9
  track when the developer named one; without one, keep the tracks `whoami` says the developer may take.
10
10
  3. For the blocked tasks on those tracks, call `task` for at most the ten lowest levels to see what each waits for
11
11
  (`after` with their statuses).
12
- 4. Answer in three short parts: **yours** (task, title, since when, stale or not), **available** (task, title,
13
- level), **blocked** (task, waiting for which tasks). A stale task of the developer's: say it in one line and
14
- suggest `/alterspec-task-release` if they won't finish it.
12
+ 4. Call `list_changes` with `status: "open"` for the progress and ETA of the open changes and of each level.
13
+ 5. Answer in four short parts:
14
+ - **yours**: task, title, progress (`covered` of `of` items, the dispatcher's `percent`), ETA, since when, stale or
15
+ not. An ETA the developer set is theirs: show it as theirs, with the computed one beside it. An unknown ETA is
16
+ "unknown", never a guess. A task without items shows only its status.
17
+ - **available**: task, title, level, and how long it lasts once taken when the dispatcher says.
18
+ - **blocked**: task, waiting for which tasks.
19
+ - **changes**: per level, the open changes with their progress and ETA ("at least" when the dispatcher says so).
20
+ A stale task of the developer's: say it in one line and suggest `/alterspec-task-release` if they won't finish it.
21
+ Their own date for a task: `/alterspec-task-eta`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: alterspec-task-eta
3
+ description: "Set your own date for a task in progress, or clear it. Only when the developer types it with the task, the date and the reason."
4
+ argument-hint: "<CHG-NNN/TRACK> <YYYY-MM-DD|clear> <reason>"
5
+ disable-model-invocation: true
6
+ allowed-tools: Read Bash(npx @alterset/alterspec-client *) mcp__dispatcher__*
7
+ ---
8
+
9
+ Read `.alterspec-client/prompts/task-eta.md` and follow those instructions exactly.
10
+
11
+ Arguments: $ARGUMENTS
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: alterspec-task-status
3
- description: "Use when the developer asks where the work stands: \"what am I on?\", \"what's available?\", \"what is blocked?\". Their tasks, the available ones on their tracks, and what the blocked ones wait for."
3
+ description: "Use when the developer asks where the work stands: \"what am I on?\", \"how far along are we?\", \"when will CHG-012 be done?\". Their tasks with progress and ETA, the available ones on their tracks, what the blocked ones wait for, and each open change's progress."
4
4
  argument-hint: "[track]"
5
5
  allowed-tools: Read Glob Grep Bash(npx @alterset/alterspec-client *) mcp__dispatcher__*
6
6
  ---