@popoverai/dotrequirements 0.24.3 → 0.26.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.
Files changed (75) hide show
  1. package/README.md +7 -8
  2. package/dist/cli.js +8 -1
  3. package/dist/codebase-to-spec/dispatch.d.ts +60 -14
  4. package/dist/codebase-to-spec/dispatch.js +381 -15
  5. package/dist/codebase-to-spec/pack.d.ts +7 -0
  6. package/dist/codebase-to-spec/pack.js +29 -8
  7. package/dist/codebase-to-spec/present.d.ts +9 -0
  8. package/dist/codebase-to-spec/present.js +23 -2
  9. package/dist/codebase-to-spec/prompts/editor.d.ts +1 -1
  10. package/dist/codebase-to-spec/prompts/editor.js +1 -1
  11. package/dist/codebase-to-spec/prompts/specifier.d.ts +1 -1
  12. package/dist/codebase-to-spec/prompts/specifier.js +3 -2
  13. package/dist/codebase-to-spec/schemas.d.ts +153 -0
  14. package/dist/codebase-to-spec/schemas.js +111 -0
  15. package/dist/codebase-to-spec/skill-install.d.ts +42 -29
  16. package/dist/codebase-to-spec/skill-install.js +122 -112
  17. package/dist/codebase-to-spec/version-check.d.ts +31 -0
  18. package/dist/codebase-to-spec/version-check.js +56 -0
  19. package/dist/commands/ai-setup.d.ts +12 -1
  20. package/dist/commands/ai-setup.js +65 -33
  21. package/dist/commands/codebase-to-spec/dispatch-context.d.ts +2 -5
  22. package/dist/commands/codebase-to-spec/dispatch-context.js +2 -5
  23. package/dist/commands/codebase-to-spec/dispatch-editor.d.ts +0 -1
  24. package/dist/commands/codebase-to-spec/dispatch-editor.js +0 -1
  25. package/dist/commands/codebase-to-spec/dispatch-planner.d.ts +0 -1
  26. package/dist/commands/codebase-to-spec/dispatch-planner.js +0 -1
  27. package/dist/commands/codebase-to-spec/dispatch-spec.d.ts +3 -6
  28. package/dist/commands/codebase-to-spec/dispatch-spec.js +3 -6
  29. package/dist/commands/codebase-to-spec/index.js +3 -2
  30. package/dist/commands/codebase-to-spec/pack.d.ts +9 -0
  31. package/dist/commands/codebase-to-spec/pack.js +23 -3
  32. package/dist/commands/codebase-to-spec/skill-install.js +2 -9
  33. package/dist/commands/init.js +6 -1
  34. package/dist/commands/link-resolution.d.ts +79 -0
  35. package/dist/commands/link-resolution.js +141 -0
  36. package/dist/commands/link.d.ts +14 -4
  37. package/dist/commands/link.js +369 -16
  38. package/dist/commands/pull.js +19 -2
  39. package/dist/commands/push.js +36 -2
  40. package/dist/convex.d.ts +5 -3
  41. package/dist/convex.js +5 -3
  42. package/dist/harness/cache.d.ts +0 -14
  43. package/dist/harness/cache.js +1 -41
  44. package/dist/harness/finalize.js +2 -2
  45. package/dist/harness/prepare.js +1 -3
  46. package/dist/harness/requirementsLoader.d.ts +3 -3
  47. package/dist/harness/requirementsLoader.js +13 -8
  48. package/dist/mcp/handlers/authoring.d.ts +5 -5
  49. package/dist/mcp/handlers/authoring.js +9 -9
  50. package/dist/mcp/handlers/push.d.ts +2 -2
  51. package/dist/mcp/handlers/push.js +36 -3
  52. package/dist/mcp/handlers/review.d.ts +4 -4
  53. package/dist/mcp/handlers/review.js +4 -4
  54. package/dist/mcp/handlers/search.d.ts +1 -1
  55. package/dist/mcp/handlers/search.js +1 -1
  56. package/dist/mcp/index.js +29 -0
  57. package/dist/push/core.d.ts +18 -0
  58. package/dist/push/core.js +70 -3
  59. package/dist/push/index.d.ts +1 -1
  60. package/dist/push/index.js +1 -1
  61. package/dist/schema/parser-core.js +5 -1
  62. package/dist/schema/parser.js +5 -1
  63. package/dist/schema/run-marker.d.ts +38 -0
  64. package/dist/schema/run-marker.js +138 -0
  65. package/dist/schema/schemas.d.ts +12 -0
  66. package/dist/schema/schemas.js +1 -0
  67. package/dist/templates/agents/cts-worker.md +3 -3
  68. package/dist/templates/skills/codebase-to-spec/SKILL.md +56 -158
  69. package/dist/templates/workflows/specify-codebase.js +374 -0
  70. package/dist/utils/own-package.d.ts +10 -0
  71. package/dist/utils/own-package.js +13 -0
  72. package/dist/utils/project-selector.d.ts +5 -0
  73. package/dist/utils/project-selector.js +4 -0
  74. package/package.json +3 -3
  75. package/dist/templates/hooks/cts-worker-persona.sh +0 -76
@@ -1,209 +1,107 @@
1
1
  ---
2
2
  name: codebase-to-spec
3
- description: Generate dotrequirements behavioral specifications from a codebase via the conversational orchestrator. The user's CC session drives the pipeline directly — dispatching workers as subagents, reviewing per-area drafts, and iterating with editor passes. Use this when the user wants to capture what an existing codebase does as a set of testable behavioral requirements (legacy systems, third-party libraries, before refactoring).
3
+ description: Generate dotrequirements behavioral specifications from a codebase. You confirm scope and review the result; a background workflow autonomously plans the area outline, drafts each area's requirements, and converges them via independent review. Use when the user wants to capture what an existing codebase does as testable behavioral requirements (legacy systems, third-party libraries, before refactoring).
4
+ allowed-tools: Bash, Read, Workflow, AskUserQuestion
4
5
  ---
5
6
 
6
- # Codebase to Spec — Conversational Orchestrator
7
+ # Codebase to Spec
7
8
 
8
- You are the conversational orchestrator for codebase-to-spec. Unlike a thin CLI wrapper, **you drive the pipeline directly** — dispatching workers as `cts-worker` subagents (via the Task tool), reading their outputs, writing per-stage reviews into `.dotrequirements-cache/outline.yaml`, and looping until each stage converges.
9
-
10
- The CLI provides dispatch-instruction commands (`cts dispatch-*`) that you call to scaffold each step; you then dispatch the worker subagent yourself. The substrate is the single evolving `outline.yaml` file — it carries both the spec content (areas, customers, source files) and the review thread for each stage.
9
+ You turn an existing codebase into a dotrequirements behavioral spec. You own two human touchpoints — **confirming scope** at the start and **reviewing the result** at the end. Everything between — planning the behavioral-area outline, drafting each area's requirements, and the independent reviews that converge them — runs autonomously inside the **`specify-codebase` dynamic workflow**. You do not draft or review requirements yourself, and you do not dispatch workers yourself; the workflow does.
11
10
 
12
11
  ## When this skill is right
13
12
 
14
- Use when the user wants behavioral requirements *from* code that already exists. Typical phrasings:
15
- - "Generate requirements from this codebase"
16
- - "Capture the behavior of this library"
17
- - "I want a behavioral spec for the auth module"
18
- - "Document what this service does"
19
-
20
- Do **not** use for new feature design (use the `dotreq-requirements` skill instead), bug investigation, or code review.
21
-
22
- ## Workflow
23
-
24
- ### Step 1 — Confirm scope
25
-
26
- If the user passed a scope argument (path), use it. Otherwise ask one concise question:
27
-
28
- > "Which part of the codebase should I spec? Give me a path (e.g. `src/auth`) or say 'the whole thing'."
29
-
30
- For larger codebases, encourage scoping to a single area. The CLI will surface a `BudgetExceeded` exit code if the compressed pack is too large.
13
+ Use when the user wants behavioral requirements *from* code that already exists:
14
+ - "Generate requirements from this codebase" / "capture what this library does" / "spec the auth module before I refactor it"
31
15
 
32
- ### Step 2 — Pack
16
+ Do **not** use for new-feature design (use the `dotreq-requirements` skill), bug investigation, or code review.
33
17
 
34
- Run `dotrequirements cts pack --scope <PATH>` via Bash. This is deterministic — no LLM work. The CLI emits `[CTS] pack/done` and `[CTS] pack/budget-ok` lines.
18
+ ## Prerequisite: dynamic workflows
35
19
 
36
- ### Step 3 — Plan: dispatch the planner, review, iterate to approval
20
+ This skill runs its pipeline as a dynamic Workflow. If the `Workflow` tool is not available in this environment, **stop** and tell the user:
37
21
 
38
- **3a. Initial planner dispatch.** Run `dotrequirements cts dispatch-planner` via Bash. The output is JSON like `{ "dispatch_id": "planner-initial", "output_path": "..." }`. Dispatch the worker:
22
+ > "codebase-to-spec runs as a dynamic workflow, which this Claude Code version/configuration doesn't support. For CI or headless use, run `{{DOTREQ_CLI}} cts run --scope <path>` instead."
39
23
 
40
- ```
41
- Task(subagent_type="cts-worker", prompt="dispatch-id=planner-initial")
42
- ```
43
-
44
- The PreToolUse hook composes the full planner prompt; the worker writes `outline.yaml` and signals completion.
45
-
46
- **3b. Review the outline.** Read `.dotrequirements-cache/outline.yaml`. Assess:
47
- - **Customer naming**: Each area must have ≥1 customers with concrete, area-scoped descriptions (not "a developer" — "a Python data engineer building ETL pipelines"). Same role across areas is OK if described freshly per area's context.
48
- - **Area set**: Customer-vocabulary names, not architectural labels. Coverage of substantive files; non-behavioral files (tests, build infrastructure) excluded.
49
- - **Mechanical correctness**: distinct prefixes per area; paths matching the pack; ≥1 customer per area.
50
-
51
- **3c. Write your review into outline.yaml.** Edit the outline to add a top-level `review:` section. Two shapes:
52
-
53
- ```yaml
54
- # Approved
55
- review:
56
- result: approved
57
- thread:
58
- - result: approved
59
- ```
60
-
61
- ```yaml
62
- # Needs revision (revisions list is required, ≥1 entries)
63
- review:
64
- result: needs-revision
65
- thread:
66
- - result: needs-revision
67
- revisions:
68
- - "Split the FOO area into two areas, separating the producer behavior from the reviewer behavior. Each should have its own customer and source files."
69
- - "Tighten the customer description on BAR — it currently reads as generic 'a developer'; ground it in what the customer is doing at this specific moment in the system."
70
- ```
24
+ Do not attempt a non-workflow fallback.
71
25
 
72
- Revisions must be specific, actionable directives the planner can apply mechanically. Avoid "this feels off" — say what to change.
73
-
74
- **3d. If needs-revision, dispatch the planner again.** Run `dotrequirements cts dispatch-planner --revise`. Dispatch:
75
-
76
- ```
77
- Task(subagent_type="cts-worker", prompt="dispatch-id=planner-revise-<N>")
78
- ```
79
-
80
- (N comes from the CLI's payload — `planner-revise-2` for the 2nd round, `planner-revise-3` for the 3rd, etc.)
81
-
82
- The worker rewrites outline.yaml's content while preserving the existing `review` section. After it completes, return to step 3b and review the revised outline. Append another entry to the `review.thread` array based on what you find.
83
-
84
- **3e. Approval.** When you're satisfied, edit outline.yaml to set `review.result: approved` and append a `{ result: approved }` entry to the thread. Proceed to step 4.
85
-
86
- ### Step 4 — Fan out: dispatch all specifiers in parallel
87
-
88
- Run `dotrequirements cts dispatch-spec`. The output is a JSON array of N payloads, one per area:
89
-
90
- ```json
91
- [
92
- { "dispatch_id": "specifier-PLAN", "output_path": "...", "area_name": "...", "area_prefix": "PLAN" },
93
- ...
94
- ]
95
- ```
26
+ ## Workflow
96
27
 
97
- Fire all N background Task dispatches in **one message** (parallel, not sequential):
28
+ ### 1. Confirm scope
98
29
 
99
- ```
100
- Task(subagent_type="cts-worker", prompt="dispatch-id=specifier-PLAN", run_in_background=true)
101
- Task(subagent_type="cts-worker", prompt="dispatch-id=specifier-OREV", run_in_background=true)
102
- ... etc
103
- ```
30
+ If the user gave a scope (a path), use it. Otherwise ask one concise question:
104
31
 
105
- Each worker:
106
- - Reads the area's source files via Read tool (from `.dotrequirements-cache/source.txt` or directly from the worktree)
107
- - Drafts the partial at `.dotrequirements-cache/partials/<sanitized-area>.partial.md`
108
- - Runs `cts validate` + `cts style-check` on its own draft via Bash (self-style-check loop, capped at 2 runs)
109
- - Signals completion via task-notification
32
+ > "Which part of the codebase should I spec? Give me a path (e.g. `src/auth`) or say 'the whole thing'."
110
33
 
111
- ### Step 5 — Per-area review and editor loops
34
+ For large codebases, encourage scoping to a single area — the pack has a context budget.
112
35
 
113
- As each specifier's task-notification arrives, review that area's partial:
36
+ ### 2. Pack (deterministic)
114
37
 
115
- **5a. Read the partial.** Pull up the file the worker wrote.
38
+ Run `{{DOTREQ_CLI}} cts pack --scope <PATH>` via Bash. Deterministic, no LLM. It emits `[CTS] pack/done` then `pack/budget-ok`, or exits **10 (BudgetExceeded)** if the compressed pack is too large. On BudgetExceeded, surface the limit and offer a narrower scope (back to step 1).
116
39
 
117
- **5b. Review against per-area criteria.** The area's customer descriptions in outline.yaml ground your review. Look for:
118
- - **Customer-grounding**: requirements use named personas from the area's customers
119
- - **Behavioral framing**: requirements describe what the customer observes, not API contracts or implementation mechanics
120
- - **Independent testability**: no cross-references between requirements; each readable on its own
121
- - **Coverage**: behaviors visible in source files are captured; tests/recipes informed but didn't drift into the spec
122
- - **Schema cleanliness**: validate already ran (worker self-validated); just sanity-check
40
+ **Stale install gate.** If pack also emits a `pack/stale-version` line, this install of codebase-to-spec is out of date. Before launching the workflow, tell the user (naming both versions from the line) and offer to refresh:
123
41
 
124
- **5c. Write your review into outline.yaml's area section.** Same shape as the project-level review, on the area:
42
+ - **Refresh:** run `npx -y @popoverai/dotrequirements@<latest> cts skill-install` via Bash, substituting the `latest` version from the stale-version line. If it refuses because a file was hand-edited, surface that and let the user decide (`--overwrite` only on their say-so). Then re-run pack with that same refreshed invocation and continue from its output — the refreshed skill bundle and CLI now run as one matching version.
43
+ - **Decline:** continue with the installed version unchanged.
125
44
 
126
- ```yaml
127
- areas:
128
- - name: ...
129
- prefix: PLAN
130
- review:
131
- result: approved
132
- thread:
133
- - result: approved
134
- ...
135
- ```
45
+ If pack emits no stale-version line, say nothing about versions.
136
46
 
137
- Or needs-revision with a revisions list (≥1 entries).
47
+ ### 3. Run the workflow
138
48
 
139
- **5d. If needs-revision, dispatch the editor.** Run `dotrequirements cts dispatch-editor <area-prefix>`. Then:
49
+ Launch the bundled workflow:
140
50
 
141
51
  ```
142
- Task(subagent_type="cts-worker", prompt="dispatch-id=editor-<prefix>")
52
+ Workflow({ name: "specify-codebase" })
143
53
  ```
144
54
 
145
- The worker reads the current partial + the revisions list inline (in the composed prompt), applies each revision via Edit, runs validate + style-check, signals completion. Return to 5a and re-review.
146
-
147
- **5e. Convergence.** Continue per-area loops until every area's `review.result` is `approved`. Each area can converge independently; don't block on one area to start reviewing another.
55
+ You normally pass no `args` — `cli` defaults to the same CLI invocation this skill uses, and the iteration caps default to `roundsCap: 5` / `outlineRoundsCap: 4`. Override only if needed, passing `args` as a real object (not a JSON string). *(Only in the dotrequirements dev repo, pass `args: { cli: "node <repo>/packages/cli/dist/cli.js" }`.)*
148
56
 
149
- ### Step 6 — Cross-area review
57
+ The workflow plans the outline (planner + an independent reviewer, looping to convergence), enumerates the areas, fans out one specifier per area, converges each area (specify → review → edit), then composes the partials into one spec and runs a document-level cross-area review/edit pass (dedup, terminology, seam gaps). It runs in the background — watch progress in `/workflows`. Do not narrate every step; only surface the gates below.
150
58
 
151
- Once all per-area reviews are approved, run `cts compose-orchestrator` to assemble the composed spec. Then read it and check:
59
+ ### 4. Read the result
152
60
 
153
- - **Persona consistency**: same role mentioned across areas should use consistent naming
154
- - **Duplicated behaviors**: same behavior captured in two areas (one should own it)
155
- - **Cross-area gaps**: behaviors that fell between areas
156
- - **Framing drift**: areas in different voices
61
+ The workflow returns one of:
62
+ - **`status: "done"`** — with `areas` (per-area `{ area_prefix, area_name, partial_path, status, rounds }`), `converged_count`, `unconverged` (prefixes that hit the round cap), `failed` (prefixes whose specifier failed outright — no draft was produced), `total`, and the cross-area pass result `cross_area_rounds` / `cross_area_converged`. The workflow has already composed and reconciled the spec. Proceed to step 5.
63
+ - **`status: "outline-unconverged"`** — the outline reviewer didn't approve the decomposition within `outlineRoundsCap`. The latest outline is at `.dotrequirements-cache/outline.yaml`. Surface this; offer to re-run, narrow scope, or hand-edit the outline. Do **not** present.
64
+ - **`status: "enumerate-failed"`** — the approved outline's areas couldn't be enumerated (the agent died). Nothing was drafted. Surface this and offer to re-run. Do **not** present.
157
65
 
158
- If cross-area concerns surface, edit the affected areas' `review` to needs-revision with appropriate revisions, dispatch editors per 5d, then re-compose. Otherwise proceed to step 7.
66
+ ### 5. Present (deterministic)
159
67
 
160
- ### Step 7 — Present
68
+ On `status: "done"`, the workflow has already composed the spec and run the cross-area pass. Write the final file(s):
69
+ - `{{DOTREQ_CLI}} cts present-orchestrator` — writes the composed spec to file(s) under `.requirements/`.
161
70
 
162
- Run `dotrequirements cts present-orchestrator [--overwrite] [--skip-existing]` via Bash. Writes the final files under `.requirements/`. Per CTS-PRESENT-1, splits into per-area files when the outline has ≥5 areas; single file otherwise.
71
+ `present-orchestrator` errors on existing-file conflicts unless given `--overwrite` or `--skip-existing`. When a conflict is reported, ask the user which they want, then re-run with that flag.
163
72
 
164
- In non-interactive mode without `--overwrite` / `--skip-existing`, the CLI errors on conflicts. Ask the user which they want when a conflict is detected.
73
+ When `cross_area_converged` is `false`, the cross-area pass hit `crossAreaRoundsCap` without a clean approval — present the spec, but surface that in the summary so the user gives the composed spec an extra look.
165
74
 
166
- ### Step 8 — Summarize and offer follow-ups
75
+ ### 6. Orient and consult
167
76
 
168
- Present the final summary in conversational form:
169
- - How many areas, how many requirements
170
- - Any unconverged areas (latest thread entry was max-turns-hit)
171
- - File paths written
77
+ The spec is written; this step is about what the user does with it. End the run as a consultation, not a menu.
172
78
 
173
- Offer useful follow-ups:
174
- - **Push to cloud** — `dotrequirements push` syncs to dotrequirements cloud. Only suggest if the user has cloud configured (check `.dotrequirements/config.json` or ask).
175
- - **Refine an area** — re-review one area; mark needs-revision; re-dispatch editor.
176
- - **Re-run on different scope** — start over with a different `--scope` path.
79
+ **Summarize.** How many areas and requirements, the file path(s) written, and — importantly — any `unconverged` areas (they hit the round cap; surface the reviewer's outstanding findings for those areas so the user can verify them) and any `failed` areas (no draft was produced; they are absent from the spec).
177
80
 
178
- ## Pausing for user input
81
+ **Orient.** Briefly say what this spec is designed for — it's not a one-off artifact. It lives alongside the code (PR it into the repo), drives AI-first development (an assistant working from the spec via MCP), is inherently testable (the test harness binds tests to requirements), and is meant to be reviewed and refined with the team (the web platform).
179
82
 
180
- These moments naturally invite user judgment — surface them in conversation rather than auto-deciding:
181
- - **Scope confirmation** at the start
182
- - **Outline approval** before fan-out (the area decomposition is high-leverage)
183
- - **Cross-area concerns** that look like the user's call (e.g., "should X and Y be one area or two?")
184
- - **Residual concerns** at the end (anything the loop didn't fully address)
83
+ **Lead with one offer, phrased as its outcome.** Pick the one that fits this user's context — e.g. they mentioned a PM who needs to see this, or they're about to refactor and want tests, or they asked for the spec to guide an assistant. Mention the other outcomes in passing, not as a list of options. Any of the four can be taken up regardless of which one led. Mechanical steps (logging in, syncing, configuration) are never themselves the offer — they run only in service of an outcome the user accepted. Each offer must describe what accepting will do **before** the user accepts; acceptance then authorizes those described steps without re-confirming each one. Anything beyond what was described still requires confirmation.
185
84
 
186
- Routine progress narration ("dispatching planner...", "fan-out complete...") should NOT interrupt the user. Only judgment-requiring moments surface as questions.
85
+ **Team review (one yes puts the spec in front of their team).** The offer describes what accepting will do: connect this project to dotrequirements cloud (a browser login is the only action left to them), sync the spec, and land on its web location where their team reviews it. On acceptance:
187
86
 
188
- ## Failure handling
87
+ 1. If no cloud credentials exist, run `{{DOTREQ_CLI}} link --yes --json` via Bash. The user completes login in the browser; everything else is yours.
88
+ 2. If link exits with code 2, its JSON is a `decision_needed` — multiple teams, existing projects, or a plan at its project limit. Relay the options conversationally (they are the user's choice, not yours), then retry link with the chosen option's `retryFlag` appended.
89
+ 3. Once linked, run `{{DOTREQ_CLI}} push --yes`. Present each document's web URL from the output as the place the user's team reviews it.
90
+ 4. Hand over the share mechanics from link's JSON, matched to the teammate's surface: the `inviteUrl` for a teammate who will review in the web platform, and the `sharePullCommand` for a teammate working in their IDE. If link omitted one (e.g. the user isn't a team admin), hand over what's there without apology.
91
+ 5. With the spec in the cloud, offer to set up the assistant you are running as to work from the spec going forward — framed as that outcome ("I can work from this spec in future sessions"), not as configuration. On acceptance, run `{{DOTREQ_CLI}} ai-setup --assistant <id>` with the identifier for this assistant (e.g. `claude-code`).
189
92
 
190
- The CLI uses stable exit codes:
93
+ If the user declines the team-review offer, note that it stands for later and don't repeat the pitch.
191
94
 
192
- - **Exit 10 (BudgetExceeded)** — codebase too large after compression. Surface, offer narrower `--scope`.
193
- - **Exit 11 (MaxTurnsHit)** — review loop hit its cap. Latest artifact is on disk; surface residual notes and ask user whether to ship, re-iterate, or hand-edit.
194
- - **Exit 12 (OverwriteRefused)** — present found existing files. Offer `--overwrite` or `--skip-existing`.
195
- - **Exit 2 (MissingInput)** — usually means a prior step wasn't run. Surface CLI message verbatim.
196
- - **Exit 3 (StageFailed)** — a stage errored. Read stderr; offer resume (re-run same command — the cache means earlier stages are skipped), restart fresh (`--fresh`), or investigate.
95
+ **Always available:** refining a specific area (re-run on a narrower scope) and re-running on a different scope.
197
96
 
198
97
  ## What you must NOT do
199
98
 
200
- - Don't try to generate requirements yourself; always dispatch workers.
201
- - Don't paraphrase the CLI's progress lines in misleading ways. If the CLI emits "specifier failed", don't say "specifier completed."
202
- - Don't claim convergence when an area's thread ends with `needs-revision`. The loop hasn't closed.
203
- - Don't push to cloud without asking — `dotrequirements push` is a destructive sync.
204
- - Don't edit files inside `.dotrequirements-cache/` other than `outline.yaml` (which you DO edit, to write reviews). Other cache files are managed by the CLI and workers.
205
- - Don't dispatch a worker without the corresponding `cts dispatch-*` call first — the dispatch-id must match what the CLI scaffolded.
99
+ - Don't draft, review, or edit requirements yourself — the workflow's workers do that.
100
+ - Don't dispatch workers via the Task tool — the workflow owns all agent work.
101
+ - Don't claim convergence when `unconverged` or `failed` is non-empty — surface those areas honestly.
102
+ - Don't present when `status` is `outline-unconverged` or `enumerate-failed`.
103
+ - Don't run connect/sync/setup steps the user hasn't accepted an outcome for. Once they accept an offer, the steps it described are authorized — don't re-confirm each one, and don't go beyond them.
206
104
 
207
105
  ## Host portability
208
106
 
209
- This skill relies on Claude Code's Task tool, PreToolUse hook, and Bash. It does not work on hosts without subagent dispatch (Cursor, Codex) — those should use the legacy `cts run` CLI directly. The skill is bundled with `dotrequirements ai-setup` for Claude Code; the `cts-worker` agent definition and persona-injection hook are installed at the same time.
107
+ This skill requires Claude Code with dynamic-workflow support (it launches the `specify-codebase` workflow). On hosts without it, or for CI/headless use, the legacy `{{DOTREQ_CLI}} cts run` CLI runs the same pipeline non-interactively.