cclaw-cli 0.49.0 → 0.51.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.
Files changed (183) hide show
  1. package/README.md +57 -84
  2. package/dist/artifact-linter.d.ts +4 -0
  3. package/dist/artifact-linter.js +24 -3
  4. package/dist/cli.d.ts +1 -19
  5. package/dist/cli.js +49 -491
  6. package/dist/constants.d.ts +2 -13
  7. package/dist/constants.js +1 -43
  8. package/dist/content/closeout-guidance.d.ts +14 -0
  9. package/dist/content/closeout-guidance.js +42 -0
  10. package/dist/content/core-agents.js +55 -17
  11. package/dist/content/decision-protocol.d.ts +12 -0
  12. package/dist/content/decision-protocol.js +20 -0
  13. package/dist/content/diff-command.d.ts +1 -2
  14. package/dist/content/diff-command.js +8 -94
  15. package/dist/content/examples.d.ts +4 -10
  16. package/dist/content/examples.js +10 -20
  17. package/dist/content/hook-events.js +2 -2
  18. package/dist/content/hook-inline-snippets.d.ts +5 -2
  19. package/dist/content/hook-inline-snippets.js +33 -1
  20. package/dist/content/hook-manifest.d.ts +3 -4
  21. package/dist/content/hook-manifest.js +11 -12
  22. package/dist/content/hooks.js +44 -21
  23. package/dist/content/ideate-command.d.ts +2 -0
  24. package/dist/content/ideate-command.js +34 -25
  25. package/dist/content/iron-laws.d.ts +5 -5
  26. package/dist/content/iron-laws.js +5 -5
  27. package/dist/content/language-policy.d.ts +2 -0
  28. package/dist/content/language-policy.js +13 -0
  29. package/dist/content/learnings.d.ts +3 -4
  30. package/dist/content/learnings.js +26 -50
  31. package/dist/content/meta-skill.js +33 -22
  32. package/dist/content/next-command.js +41 -38
  33. package/dist/content/node-hooks.js +17 -345
  34. package/dist/content/opencode-plugin.js +5 -103
  35. package/dist/content/research-playbooks.js +14 -14
  36. package/dist/content/review-loop.d.ts +2 -0
  37. package/dist/content/review-loop.js +8 -0
  38. package/dist/content/session-hooks.js +15 -47
  39. package/dist/content/skills.d.ts +0 -5
  40. package/dist/content/skills.js +55 -128
  41. package/dist/content/stage-common-guidance.d.ts +0 -1
  42. package/dist/content/stage-common-guidance.js +17 -14
  43. package/dist/content/stage-schema.d.ts +26 -1
  44. package/dist/content/stage-schema.js +121 -40
  45. package/dist/content/stages/_lint-metadata/index.js +9 -15
  46. package/dist/content/stages/brainstorm.js +22 -43
  47. package/dist/content/stages/design.js +37 -57
  48. package/dist/content/stages/plan.js +22 -13
  49. package/dist/content/stages/review.js +24 -27
  50. package/dist/content/stages/scope.js +34 -46
  51. package/dist/content/stages/ship.js +7 -4
  52. package/dist/content/stages/spec.js +20 -9
  53. package/dist/content/stages/tdd.js +64 -44
  54. package/dist/content/start-command.js +13 -12
  55. package/dist/content/status-command.d.ts +2 -7
  56. package/dist/content/status-command.js +19 -146
  57. package/dist/content/subagents.d.ts +0 -5
  58. package/dist/content/subagents.js +51 -28
  59. package/dist/content/templates.d.ts +1 -1
  60. package/dist/content/templates.js +126 -135
  61. package/dist/content/track-render-context.d.ts +17 -0
  62. package/dist/content/track-render-context.js +44 -0
  63. package/dist/content/tree-command.d.ts +1 -2
  64. package/dist/content/tree-command.js +4 -87
  65. package/dist/content/utility-skills.d.ts +2 -29
  66. package/dist/content/utility-skills.js +2 -1534
  67. package/dist/content/view-command.js +31 -11
  68. package/dist/delegation.d.ts +1 -1
  69. package/dist/delegation.js +5 -15
  70. package/dist/doctor-registry.js +20 -21
  71. package/dist/doctor.js +88 -344
  72. package/dist/flow-state.d.ts +3 -0
  73. package/dist/flow-state.js +2 -0
  74. package/dist/harness-adapters.d.ts +1 -1
  75. package/dist/harness-adapters.js +51 -58
  76. package/dist/install.js +128 -358
  77. package/dist/internal/advance-stage.js +3 -9
  78. package/dist/internal/compound-readiness.d.ts +1 -1
  79. package/dist/internal/compound-readiness.js +1 -1
  80. package/dist/internal/tdd-loop-status.d.ts +1 -1
  81. package/dist/internal/tdd-loop-status.js +1 -1
  82. package/dist/knowledge-store.d.ts +16 -10
  83. package/dist/knowledge-store.js +51 -15
  84. package/dist/policy.js +16 -105
  85. package/dist/run-archive.d.ts +4 -6
  86. package/dist/run-archive.js +15 -20
  87. package/dist/run-persistence.d.ts +2 -2
  88. package/dist/run-persistence.js +3 -9
  89. package/package.json +1 -2
  90. package/dist/content/archive-command.d.ts +0 -2
  91. package/dist/content/archive-command.js +0 -124
  92. package/dist/content/compound-command.d.ts +0 -5
  93. package/dist/content/compound-command.js +0 -193
  94. package/dist/content/contexts.d.ts +0 -18
  95. package/dist/content/contexts.js +0 -24
  96. package/dist/content/contracts.d.ts +0 -2
  97. package/dist/content/contracts.js +0 -51
  98. package/dist/content/doctor-references.d.ts +0 -2
  99. package/dist/content/doctor-references.js +0 -150
  100. package/dist/content/eval-scaffold.d.ts +0 -15
  101. package/dist/content/eval-scaffold.js +0 -370
  102. package/dist/content/feature-command.d.ts +0 -2
  103. package/dist/content/feature-command.js +0 -123
  104. package/dist/content/flow-map.d.ts +0 -23
  105. package/dist/content/flow-map.js +0 -134
  106. package/dist/content/harness-doc.d.ts +0 -2
  107. package/dist/content/harness-doc.js +0 -202
  108. package/dist/content/harness-playbooks.d.ts +0 -24
  109. package/dist/content/harness-playbooks.js +0 -393
  110. package/dist/content/harness-tool-refs.d.ts +0 -20
  111. package/dist/content/harness-tool-refs.js +0 -268
  112. package/dist/content/ops-command.d.ts +0 -2
  113. package/dist/content/ops-command.js +0 -71
  114. package/dist/content/protocols.d.ts +0 -7
  115. package/dist/content/protocols.js +0 -215
  116. package/dist/content/retro-command.d.ts +0 -2
  117. package/dist/content/retro-command.js +0 -165
  118. package/dist/content/rewind-command.d.ts +0 -2
  119. package/dist/content/rewind-command.js +0 -106
  120. package/dist/content/tdd-log-command.d.ts +0 -2
  121. package/dist/content/tdd-log-command.js +0 -85
  122. package/dist/eval/agents/single-shot.d.ts +0 -27
  123. package/dist/eval/agents/single-shot.js +0 -79
  124. package/dist/eval/agents/with-tools.d.ts +0 -44
  125. package/dist/eval/agents/with-tools.js +0 -261
  126. package/dist/eval/agents/workflow.d.ts +0 -31
  127. package/dist/eval/agents/workflow.js +0 -155
  128. package/dist/eval/baseline.d.ts +0 -38
  129. package/dist/eval/baseline.js +0 -282
  130. package/dist/eval/config-loader.d.ts +0 -14
  131. package/dist/eval/config-loader.js +0 -395
  132. package/dist/eval/corpus.d.ts +0 -30
  133. package/dist/eval/corpus.js +0 -330
  134. package/dist/eval/cost-guard.d.ts +0 -102
  135. package/dist/eval/cost-guard.js +0 -190
  136. package/dist/eval/diff.d.ts +0 -64
  137. package/dist/eval/diff.js +0 -323
  138. package/dist/eval/llm-client.d.ts +0 -176
  139. package/dist/eval/llm-client.js +0 -267
  140. package/dist/eval/mode.d.ts +0 -28
  141. package/dist/eval/mode.js +0 -61
  142. package/dist/eval/progress.d.ts +0 -83
  143. package/dist/eval/progress.js +0 -59
  144. package/dist/eval/report.d.ts +0 -11
  145. package/dist/eval/report.js +0 -181
  146. package/dist/eval/rubric-loader.d.ts +0 -20
  147. package/dist/eval/rubric-loader.js +0 -143
  148. package/dist/eval/runner.d.ts +0 -81
  149. package/dist/eval/runner.js +0 -746
  150. package/dist/eval/runs.d.ts +0 -41
  151. package/dist/eval/runs.js +0 -114
  152. package/dist/eval/sandbox.d.ts +0 -38
  153. package/dist/eval/sandbox.js +0 -137
  154. package/dist/eval/tools/glob.d.ts +0 -2
  155. package/dist/eval/tools/glob.js +0 -163
  156. package/dist/eval/tools/grep.d.ts +0 -2
  157. package/dist/eval/tools/grep.js +0 -152
  158. package/dist/eval/tools/index.d.ts +0 -7
  159. package/dist/eval/tools/index.js +0 -35
  160. package/dist/eval/tools/read.d.ts +0 -2
  161. package/dist/eval/tools/read.js +0 -122
  162. package/dist/eval/tools/types.d.ts +0 -49
  163. package/dist/eval/tools/types.js +0 -41
  164. package/dist/eval/tools/write.d.ts +0 -2
  165. package/dist/eval/tools/write.js +0 -92
  166. package/dist/eval/types.d.ts +0 -561
  167. package/dist/eval/types.js +0 -47
  168. package/dist/eval/verifiers/judge.d.ts +0 -40
  169. package/dist/eval/verifiers/judge.js +0 -256
  170. package/dist/eval/verifiers/rules.d.ts +0 -24
  171. package/dist/eval/verifiers/rules.js +0 -218
  172. package/dist/eval/verifiers/structural.d.ts +0 -14
  173. package/dist/eval/verifiers/structural.js +0 -171
  174. package/dist/eval/verifiers/traceability.d.ts +0 -23
  175. package/dist/eval/verifiers/traceability.js +0 -84
  176. package/dist/eval/verifiers/workflow-consistency.d.ts +0 -21
  177. package/dist/eval/verifiers/workflow-consistency.js +0 -225
  178. package/dist/eval/workflow-corpus.d.ts +0 -7
  179. package/dist/eval/workflow-corpus.js +0 -207
  180. package/dist/feature-system.d.ts +0 -42
  181. package/dist/feature-system.js +0 -432
  182. package/dist/internal/knowledge-digest.d.ts +0 -7
  183. package/dist/internal/knowledge-digest.js +0 -93
@@ -1,3 +1,5 @@
1
+ import { stageDelegationSummary } from "./stage-schema.js";
2
+ import { conversationLanguagePolicyMarkdown } from "./language-policy.js";
1
3
  /**
2
4
  * Markdown content generators for Cclaw’s subagent orchestration skills and enhanced
3
5
  * specialist payloads. Cclaw materializes static instructions — this module does not
@@ -10,6 +12,22 @@ const SUBAGENT_AGENT_NAMES = [
10
12
  "test-author",
11
13
  "doc-updater"
12
14
  ];
15
+ function formatAgentList(agents) {
16
+ return agents.length > 0 ? agents.join(", ") : "none";
17
+ }
18
+ function automaticStageDelegationTable() {
19
+ const summary = stageDelegationSummary("standard");
20
+ const rows = summary.map((row) => {
21
+ return `| ${row.stage} | ${formatAgentList(row.mandatoryAgents)} | ${formatAgentList(row.proactiveAgents)} |`;
22
+ }).join("\n");
23
+ return `| Stage | Mandatory agents | Proactive agents |
24
+ |---|---|---|
25
+ ${rows}`;
26
+ }
27
+ function stageSummary(stage) {
28
+ return stageDelegationSummary("standard").find((row) => row.stage === stage)
29
+ ?? { stage, mandatoryAgents: [], proactiveAgents: [], primaryAgents: [], stackAwareRoutes: [] };
30
+ }
13
31
  export function subagentDrivenDevSkill() {
14
32
  return `---
15
33
  name: subagent-driven-development
@@ -30,56 +48,48 @@ This pattern is intentionally **Superpowers-style**: cheap parallelism where it
30
48
 
31
49
  ## Automatic Stage Delegation in Cclaw
32
50
 
33
- For cclaw flow stages, machine-only specialist work should auto-dispatch without waiting for a manual user request:
51
+ For cclaw flow stages, machine-only specialist work should auto-dispatch without waiting for a manual user request. The table below is generated from the canonical stage dispatch registry:
34
52
 
35
- - **design/plan:** planner
36
- - **tdd:** test-author
37
- - **review:** reviewer + security-reviewer (security-reviewer is always mandatory; produce an explicit no-change attestation when no trust boundaries moved)
38
- - **ship:** doc-updater
53
+ ${automaticStageDelegationTable()}
39
54
 
40
55
  Human input remains mandatory only at explicit approval gates (plan approval, user challenge resolution, release finalization mode).
41
56
 
42
- ### Review parallel fan-out protocol
57
+ ### Review dispatch protocol
43
58
 
44
- In review stage, prefer a fixed six-pass fan-out before reconciliation:
59
+ In review stage, run mandatory specialists \`${formatAgentList(stageSummary("review").mandatoryAgents)}\` by default:
45
60
 
46
- 1. \`review-spec\` (Layer 1)
47
- 2. \`review-correctness\` (Layer 2a)
48
- 3. \`review-security\` (Layer 2b)
49
- 4. \`review-performance\` (Layer 2c)
50
- 5. \`review-architecture\` (Layer 2d)
51
- 6. \`review-external-safety\` (Layer 2e)
61
+ 1. \`reviewer\` owns Layer 1 spec compliance plus integrated Layer 2 tags (correctness, performance, architecture, external-safety).
62
+ 2. \`security-reviewer\` owns the mandatory security sweep or no-change attestation.
63
+ 3. Add \`adversarial-review\` only when trust boundaries changed, Critical/Important ambiguity remains, or the diff is both large and high-risk.
52
64
 
53
- Dispatch these in parallel where the harness supports isolated workers, then run
54
- one reconciliation pass that merges findings into \`.cclaw/artifacts/07-review-army.json\`
55
- with explicit source tags per finding.
65
+ Reconcile findings into \`.cclaw/artifacts/07-review-army.json\` with explicit source tags per finding.
56
66
 
57
- ### TDD phase fan-out protocol
67
+ ### TDD evidence protocol
58
68
 
59
- Treat RED, GREEN, and REFACTOR as separate delegated intents:
69
+ Treat RED, GREEN, and REFACTOR as phase intents inside one mandatory \`test-author\` delegation by default:
60
70
 
61
71
  - \`tdd-red\`: tests only, no production writes
62
72
  - \`tdd-green\`: minimal production implementation, no new RED tests
63
73
  - \`tdd-refactor\`: cleanup only after GREEN is proven
64
74
 
65
75
  Set \`CCLAW_ACTIVE_AGENT\` to the active phase name when possible so workflow-guard
66
- can enforce phase-appropriate write boundaries.
76
+ can enforce phase-appropriate write boundaries. Use separate workers only when the harness and slice boundary make the split genuinely useful; the mandatory gate is the evidence-backed \`test-author\` row, not three default subagents.
67
77
 
68
78
  ## Model & Harness Routing Notes
69
79
 
70
80
  ### Harness routing
71
81
 
72
- | Harness | Fallback | Delegation tool | Structured ask | Parity playbook |
82
+ | Harness | Fallback | Delegation tool | Structured ask | Capability source |
73
83
  |---|---|---|---|---|
74
- | Claude | \`native\` | Task (named subagent_type) | AskUserQuestion | \`.cclaw/references/harnesses/claude-playbook.md\` |
75
- | Cursor | \`generic-dispatch\` | Task (generic subagent_type: explore/generalPurpose/…) | AskQuestion | \`.cclaw/references/harnesses/cursor-playbook.md\` |
76
- | OpenCode | \`role-switch\` | plugin dispatch _or_ in-session role-switch | \`question\` (permission-gated; \`permission.question: "allow"\`) | \`.cclaw/references/harnesses/opencode-playbook.md\` |
77
- | Codex | \`role-switch\` | in-session role-switch (mandatory evidenceRefs) | \`request_user_input\` (experimental; Plan / Collaboration mode) | \`.cclaw/references/harnesses/codex-playbook.md\` |
84
+ | Claude | \`native\` | Task (named subagent_type) | AskUserQuestion | \`npx cclaw-cli doctor\` |
85
+ | Cursor | \`generic-dispatch\` | Task (generic subagent_type: explore/generalPurpose/…) | AskQuestion | \`npx cclaw-cli doctor\` |
86
+ | OpenCode | \`role-switch\` | plugin dispatch _or_ in-session role-switch | \`question\` (permission-gated; \`permission.question: "allow"\`) | \`npx cclaw-cli doctor\` |
87
+ | Codex | \`role-switch\` | in-session role-switch (mandatory evidenceRefs) | \`request_user_input\` (experimental; Plan / Collaboration mode) | \`npx cclaw-cli doctor\` |
78
88
 
79
89
  **Dispatch rules driven by \`subagentFallback\`:**
80
90
 
81
91
  - \`native\` — use the harness's own named subagent primitive; delegation entry uses \`fulfillmentMode: "isolated"\`.
82
- - \`generic-dispatch\` — map each cclaw agent onto the generic dispatcher via the harness playbook; delegation entry uses \`fulfillmentMode: "generic-dispatch"\`.
92
+ - \`generic-dispatch\` — map each cclaw agent onto the generic dispatcher with a role prompt; delegation entry uses \`fulfillmentMode: "generic-dispatch"\`.
83
93
  - \`role-switch\` — announce the role in-session, perform the work, append a delegation row with \`fulfillmentMode: "role-switch"\` and ≥1 \`evidenceRef\`. Without evidenceRefs the \`delegation:mandatory:current_stage\` check reports \`missingEvidence\` and blocks stage completion.
84
94
 
85
95
  The only time a \`harness_limitation\` waiver fires automatically is when every installed harness declares \`subagentFallback: "waiver"\`. cclaw 0.33 no longer maps Codex onto auto-waiver — the agent must role-switch with evidence.
@@ -115,9 +125,9 @@ Concrete per-stage rules so the controller does not have to guess which tier fit
115
125
  | design | planner (always) | security-reviewer (if trust boundary touched) | run \`research/framework-docs-lookup.md\` + \`research/best-practices-lookup.md\` in-thread | escalate one specialist to \`deep\` only if a failure mode is Critical-severity |
116
126
  | spec | — | reviewer (if spec > 200 lines or multiple ACs) | — | escalate to \`deep\` only for spec ↔ design contradictions |
117
127
  | plan | planner (solo, always) | — | — | never fan out at plan stage; one owner for dependency graph |
118
- | tdd | — | test-author (each slice) · reviewer (slice-local) | doc-updater (API surface changes) | escalate to \`deep\` only when a RED test cannot be expressed (design leak) |
119
- | review | — | reviewer · security-reviewer (both mandatory) | doc-updater for release-note drift checks | escalate a \`balanced\` reviewer to \`deep\` only when two reviewers disagree on severity |
120
- | ship | — | security-reviewer (if blast radius is high) | doc-updater (changelog/migration notes) | escalate to \`balanced\` reviewer only if preflight finds a regression |
128
+ | tdd | — | ${formatAgentList(stageSummary("tdd").primaryAgents)} (per slice, carrying RED/GREEN/REFACTOR evidence) · reviewer (slice-local only when sliceReview triggers) | doc-updater (API surface changes) | escalate to \`deep\` only when a RED test cannot be expressed (design leak) |
129
+ | review | — | ${formatAgentList(stageSummary("review").mandatoryAgents)} (both mandatory) | doc-updater for release-note drift checks | escalate a \`balanced\` reviewer to \`deep\` only when two reviewers disagree on severity |
130
+ | ship | — | ${formatAgentList(stageSummary("ship").proactiveAgents)} (if blast radius is high) | doc-updater (changelog/migration notes) | escalate to \`balanced\` reviewer only if preflight finds a regression |
121
131
 
122
132
  **De-escalation rules (avoid over-spending):**
123
133
  - If a \`deep\` planner run returns low-uncertainty output (single unambiguous plan), do **not** add a second \`deep\` pass in the same stage.
@@ -127,10 +137,21 @@ Concrete per-stage rules so the controller does not have to guess which tier fit
127
137
 
128
138
  ## HARD-GATE
129
139
 
140
+ ${conversationLanguagePolicyMarkdown()}
130
141
  **Never dispatch a subagent without a concrete, self-contained task description pasted into the prompt. Do not pass file references the subagent must read to understand its task.**
131
142
 
132
143
  If you catch yourself writing “read PLAN.md Task 3” or “implement the next unchecked item,” stop: expand the work into explicit text in the Task body before dispatching.
133
144
 
145
+ ## Anti-Drift Team Defaults
146
+
147
+ Borrow the good part of Team/Ruflo-style orchestration without adding a swarm runtime:
148
+
149
+ - **One controller owns alignment.** The parent keeps the task list, gate state, and final synthesis.
150
+ - **Small fan-out by default.** Run at most 3-5 parallel agents, and only for independent read-only research or non-overlapping files.
151
+ - **No parallel writes to adjacent surfaces.** If tasks may touch the same module, serialize them.
152
+ - **Checkpoint before synthesis.** Each agent returns status, files inspected/changed, evidence, and blockers before the parent acts.
153
+ - **Consensus is for hard calls only.** Use two reviewers when severity or architecture is disputed; otherwise one evidence-backed reviewer is enough.
154
+
134
155
  ## When to Use
135
156
 
136
157
  - Mid/large plans with multiple discrete tasks, dependencies, or risky overlap.
@@ -175,6 +196,7 @@ CONTEXT: {paste relevant file paths, types, patterns}
175
196
  CONSTRAINTS: {paste from spec — what NOT to do}
176
197
 
177
198
  After implementation:
199
+ 0. Write user-facing narrative in the parent/user language; keep status tokens unchanged.
178
200
  1. Run the full test suite
179
201
  2. Report your status: DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED
180
202
  3. If DONE_WITH_CONCERNS, list each concern
@@ -316,6 +338,7 @@ This document bridges **Superpowers-style task isolation** with the **gstack “
316
338
 
317
339
  ## HARD-GATE
318
340
 
341
+ ${conversationLanguagePolicyMarkdown()}
319
342
  **Never dispatch parallel IMPLEMENTATION agents that write to the same codebase. Parallel agents are for investigation, analysis, and review ONLY.**
320
343
 
321
344
  Implementation that touches shared source trees must remain **sequential** unless you have proven disjoint filesystem ownership (rare) and an explicit merge protocol.
@@ -1,4 +1,4 @@
1
1
  export declare const ARTIFACT_TEMPLATES: Record<string, string>;
2
2
  export declare const RULEBOOK_MARKDOWN = "# Cclaw Rulebook\n\n## MUST_ALWAYS\n- Follow flow order: brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship\n- Require explicit user confirmation after plan before TDD\n- Keep evidence artifacts in `.cclaw/artifacts/`\n- Enforce RED before GREEN in TDD\n- Run two-layer review (spec_compliance and code_quality) before ship\n- Validate all inputs before processing \u2014 never trust external data without sanitization\n- Prefer immutable data patterns and pure functions where the language supports them\n- Follow existing repo conventions, patterns, and directory structure \u2014 match the codebase\n- Verify claims with fresh evidence: \"tests pass\" requires running tests in this message\n- Use conventional commits: `type(scope): description` (feat, fix, refactor, test, docs, chore)\n\n## MUST_NEVER\n- Skip RED phase and jump directly to GREEN in TDD\n- Ship with critical review findings\n- Start implementation during /brainstorm\n- Modify generated cclaw files manually when CLI can regenerate them\n- Commit `.cclaw/` or generated shim files\n- Expose secrets, tokens, API keys, or absolute system paths in agent output\n- Duplicate existing functionality without explicit justification \u2014 search before building\n- Bypass security checks, linting hooks, or type checking to \"move faster\"\n- Claim success (\"Done,\" \"All good,\" \"Tests pass\") without running verification in this message\n- Make changes outside the blast radius of the current task without user consent\n\n## DELEGATION\nWhen a task requires specialist knowledge (security audit, performance profiling, database review),\ndelegate to a specialized agent or skill if the harness supports it. The primary agent should:\n1. Identify the specialist domain\n2. Provide focused context (relevant files, the specific concern)\n3. Evaluate the specialist output before acting on it \u2014 do not blindly apply recommendations\n";
3
- export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick or medium track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- `/cc-learn` = knowledge capture and recall.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `/cc-ops archive` (agent flow) or archive runtime.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Protocols: `.cclaw/references/protocols/*.md`.\n- Preamble budget: `.cclaw/references/protocols/ethos.md`.\n";
3
+ export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick or medium track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `npx cclaw-cli archive`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Stage behavior: current stage skill plus `.cclaw/state/flow-state.json`.\n- Preamble budget: keep role/status announcements brief and avoid repeating\n them unless the stage or role changes.\n";
4
4
  export declare function buildRulesJson(): Record<string, unknown>;
@@ -2,15 +2,23 @@ import { CCLAW_VERSION, SHIP_FINALIZATION_MODES } from "../constants.js";
2
2
  import { orderedStageSchemas } from "./stage-schema.js";
3
3
  import { FLOW_STAGES } from "../types.js";
4
4
  const SHIP_FINALIZATION_ENUM_LINES = SHIP_FINALIZATION_MODES.map((mode) => ` - ${mode}`).join("\n");
5
- export const ARTIFACT_TEMPLATES = {
6
- "01-brainstorm.md": `---
7
- stage: brainstorm
5
+ const MARKDOWN_CODE_FENCE = "```";
6
+ function artifactFrontmatter(stage) {
7
+ return `---
8
+ stage: ${stage}
8
9
  schema_version: 1
9
10
  version: ${CCLAW_VERSION}
10
- feature: <feature-id>
11
+ run: <run-id>
11
12
  locked_decisions: []
12
13
  inputs_hash: sha256:pending
13
- ---
14
+ ---`;
15
+ }
16
+ const SEED_SHELF_SECTION = `## Seed Shelf Candidates (optional)
17
+ | Seed file | Trigger when | Suggested action | Status (planted/deferred/ignored) |
18
+ |---|---|---|---|
19
+ | .cclaw/seeds/SEED-YYYY-MM-DD-<slug>.md | | | |`;
20
+ export const ARTIFACT_TEMPLATES = {
21
+ "01-brainstorm.md": `${artifactFrontmatter("brainstorm")}
14
22
 
15
23
  # Brainstorm Artifact
16
24
 
@@ -53,10 +61,7 @@ inputs_hash: sha256:pending
53
61
  - **Rationale:**
54
62
  - **Approval:** pending
55
63
 
56
- ## Seed Shelf Candidates (optional)
57
- | Seed file | Trigger when | Suggested action | Status (planted/deferred/ignored) |
58
- |---|---|---|---|
59
- | .cclaw/seeds/SEED-YYYY-MM-DD-<slug>.md | | | |
64
+ ${SEED_SHELF_SECTION}
60
65
 
61
66
  ## Design
62
67
  - **Architecture:**
@@ -70,17 +75,17 @@ inputs_hash: sha256:pending
70
75
  ## Learnings
71
76
  - None this stage.
72
77
  `,
73
- "02-scope.md": `---
74
- stage: scope
75
- schema_version: 1
76
- version: ${CCLAW_VERSION}
77
- feature: <feature-id>
78
- locked_decisions: []
79
- inputs_hash: sha256:pending
80
- ---
78
+ "02-scope.md": `${artifactFrontmatter("scope")}
81
79
 
82
80
  # Scope Artifact
83
81
 
82
+ ## Upstream Handoff
83
+ - Source artifacts: \`00-idea.md\`, \`01-brainstorm-<slug>.md\`
84
+ - Decisions carried forward:
85
+ - Constraints carried forward:
86
+ - Open questions:
87
+ - Drift from upstream (or \`None\`):
88
+
84
89
  ## Pre-Scope System Audit
85
90
  | Check | Command | Findings |
86
91
  |---|---|---|
@@ -165,10 +170,7 @@ inputs_hash: sha256:pending
165
170
  |---|---|
166
171
  | | |
167
172
 
168
- ## Seed Shelf Candidates (optional)
169
- | Seed file | Trigger when | Suggested action | Status (planted/deferred/ignored) |
170
- |---|---|---|---|
171
- | .cclaw/seeds/SEED-YYYY-MM-DD-<slug>.md | | | |
173
+ ${SEED_SHELF_SECTION}
172
174
 
173
175
  ## Error & Rescue Registry
174
176
  | Capability | Failure mode | Detection | Fallback |
@@ -201,14 +203,7 @@ inputs_hash: sha256:pending
201
203
  ## Learnings
202
204
  - None this stage.
203
205
  `,
204
- "02a-research.md": `---
205
- stage: design
206
- schema_version: 1
207
- version: ${CCLAW_VERSION}
208
- feature: <feature-id>
209
- locked_decisions: []
210
- inputs_hash: sha256:pending
211
- ---
206
+ "02a-research.md": `${artifactFrontmatter("design")}
212
207
 
213
208
  # Research Report
214
209
 
@@ -242,17 +237,17 @@ inputs_hash: sha256:pending
242
237
  ## Learnings
243
238
  - None this stage.
244
239
  `,
245
- "03-design.md": `---
246
- stage: design
247
- schema_version: 1
248
- version: ${CCLAW_VERSION}
249
- feature: <feature-id>
250
- locked_decisions: []
251
- inputs_hash: sha256:pending
252
- ---
240
+ "03-design.md": `${artifactFrontmatter("design")}
253
241
 
254
242
  # Design Artifact
255
243
 
244
+ ## Upstream Handoff
245
+ - Source artifacts: \`02-scope-<slug>.md\`, \`02a-research.md\` when present
246
+ - Decisions carried forward:
247
+ - Constraints carried forward:
248
+ - Open questions:
249
+ - Drift from upstream (or \`None\`):
250
+
256
251
  ## Codebase Investigation
257
252
  | File | Current responsibility | Patterns discovered |
258
253
  |---|---|---|
@@ -282,9 +277,9 @@ inputs_hash: sha256:pending
282
277
 
283
278
  <!-- diagram: architecture -->
284
279
 
285
- \`\`\`
280
+ ${MARKDOWN_CODE_FENCE}
286
281
  (ASCII, Mermaid, or tool-generated diagram showing component boundaries and data flow direction)
287
- \`\`\`
282
+ ${MARKDOWN_CODE_FENCE}
288
283
 
289
284
  ## Data-Flow Shadow Paths
290
285
  <!-- diagram: data-flow-shadow-paths -->
@@ -296,33 +291,33 @@ inputs_hash: sha256:pending
296
291
 
297
292
  <!-- diagram: error-flow -->
298
293
 
299
- \`\`\`
294
+ ${MARKDOWN_CODE_FENCE}
300
295
  (failure detection -> rescue action -> user-visible outcome)
301
- \`\`\`
296
+ ${MARKDOWN_CODE_FENCE}
302
297
 
303
298
  ## State Machine Diagram
304
299
 
305
300
  <!-- diagram: state-machine -->
306
301
 
307
- \`\`\`
302
+ ${MARKDOWN_CODE_FENCE}
308
303
  (state transitions for the critical flow lifecycle)
309
- \`\`\`
304
+ ${MARKDOWN_CODE_FENCE}
310
305
 
311
306
  ## Rollback Flowchart
312
307
 
313
308
  <!-- diagram: rollback-flowchart -->
314
309
 
315
- \`\`\`
310
+ ${MARKDOWN_CODE_FENCE}
316
311
  (trigger -> rollback actions -> verification)
317
- \`\`\`
312
+ ${MARKDOWN_CODE_FENCE}
318
313
 
319
314
  ## Deployment Sequence Diagram
320
315
 
321
316
  <!-- diagram: deployment-sequence -->
322
317
 
323
- \`\`\`
318
+ ${MARKDOWN_CODE_FENCE}
324
319
  (rollout order, guard checks, and verification sequence)
325
- \`\`\`
320
+ ${MARKDOWN_CODE_FENCE}
326
321
 
327
322
  ## Stale Diagram Audit
328
323
  | File | Last modified | Diagram marker baseline | Status | Notes |
@@ -413,10 +408,7 @@ inputs_hash: sha256:pending
413
408
  |---|---|---|---|
414
409
  | | | | |
415
410
 
416
- ## Seed Shelf Candidates (optional)
417
- | Seed file | Trigger when | Suggested action | Status (planted/deferred/ignored) |
418
- |---|---|---|---|
419
- | .cclaw/seeds/SEED-YYYY-MM-DD-<slug>.md | | | |
411
+ ${SEED_SHELF_SECTION}
420
412
 
421
413
  ## Completion Dashboard
422
414
  | Review Section | Status | Issues |
@@ -435,17 +427,17 @@ inputs_hash: sha256:pending
435
427
  ## Learnings
436
428
  - None this stage.
437
429
  `,
438
- "04-spec.md": `---
439
- stage: spec
440
- schema_version: 1
441
- version: ${CCLAW_VERSION}
442
- feature: <feature-id>
443
- locked_decisions: []
444
- inputs_hash: sha256:pending
445
- ---
430
+ "04-spec.md": `${artifactFrontmatter("spec")}
446
431
 
447
432
  # Specification Artifact
448
433
 
434
+ ## Upstream Handoff
435
+ - Source artifacts: \`02-scope-<slug>.md\`, \`03-design-<slug>.md\`
436
+ - Decisions carried forward:
437
+ - Constraints carried forward:
438
+ - Open questions:
439
+ - Drift from upstream (or \`None\`):
440
+
449
441
  ## Acceptance Criteria
450
442
  | ID | Requirement Ref (R#) | Criterion (observable/measurable/falsifiable) | Design Decision Ref |
451
443
  |---|---|---|---|
@@ -464,6 +456,11 @@ inputs_hash: sha256:pending
464
456
  - Constraints:
465
457
  - Assumptions:
466
458
 
459
+ ## Assumptions Before Finalization
460
+ | Assumption | Source / confidence | Validation path | Disposition |
461
+ |---|---|---|---|
462
+ | | | | accepted/rejected/open |
463
+
467
464
  ## Testability Map
468
465
  | Criterion ID | Verification approach | Command/manual steps |
469
466
  |---|---|---|
@@ -491,17 +488,17 @@ inputs_hash: sha256:pending
491
488
  ## Learnings
492
489
  - None this stage.
493
490
  `,
494
- "05-plan.md": `---
495
- stage: plan
496
- schema_version: 1
497
- version: ${CCLAW_VERSION}
498
- feature: <feature-id>
499
- locked_decisions: []
500
- inputs_hash: sha256:pending
501
- ---
491
+ "05-plan.md": `${artifactFrontmatter("plan")}
502
492
 
503
493
  # Plan Artifact
504
494
 
495
+ ## Upstream Handoff
496
+ - Source artifacts: \`03-design-<slug>.md\`, \`04-spec.md\`
497
+ - Decisions carried forward:
498
+ - Constraints carried forward:
499
+ - Open questions:
500
+ - Drift from upstream (or \`None\`):
501
+
505
502
  ## Dependency Graph
506
503
  -
507
504
 
@@ -540,6 +537,12 @@ Execution rule: complete and verify each batch before starting the next batch.
540
537
  |---|---|
541
538
  | AC-1 | T-1 |
542
539
 
540
+ ## Execution Posture
541
+ - Posture: sequential | dependency-batched | parallel-safe | blocked
542
+ - Stop conditions:
543
+ - Risk triggers:
544
+ - TDD checkpoint plan: RED commit/checkpoint -> GREEN commit/checkpoint -> REFACTOR commit/checkpoint (or deferred because: )
545
+
543
546
  ## Locked Decision Coverage
544
547
  | Decision ID | Source section | Plan tasks implementing decision | Status |
545
548
  |---|---|---|---|
@@ -570,17 +573,32 @@ Execution rule: complete and verify each batch before starting the next batch.
570
573
  ## Learnings
571
574
  - None this stage.
572
575
  `,
573
- "06-tdd.md": `---
574
- stage: tdd
575
- schema_version: 1
576
- version: ${CCLAW_VERSION}
577
- feature: <feature-id>
578
- locked_decisions: []
579
- inputs_hash: sha256:pending
580
- ---
576
+ "06-tdd.md": `${artifactFrontmatter("tdd")}
581
577
 
582
578
  # TDD Artifact
583
579
 
580
+ ## Upstream Handoff
581
+ - Source artifacts: \`04-spec.md\`, \`05-plan.md\`
582
+ - Decisions carried forward:
583
+ - Constraints carried forward:
584
+ - Open questions:
585
+ - Drift from upstream (or \`None\`):
586
+
587
+ ## Test Discovery
588
+ | Slice | Existing tests / helpers / fixtures | Exact command(s) | Pattern to extend |
589
+ |---|---|---|---|
590
+ | S-1 | | | |
591
+
592
+ ## System-Wide Impact Check
593
+ | Slice | Callbacks/state/interfaces/contracts affected | Coverage decision |
594
+ |---|---|---|
595
+ | S-1 | | covered/out-of-scope because |
596
+
597
+ ## Execution Posture
598
+ - Posture: sequential | dependency-batched | blocked
599
+ - RED/GREEN/REFACTOR checkpoint plan:
600
+ - Incremental commits: yes/no/deferred because
601
+
584
602
  ## RED Evidence
585
603
  | Slice | Test name | Command | Failure output summary |
586
604
  |---|---|---|---|
@@ -637,17 +655,17 @@ inputs_hash: sha256:pending
637
655
  ## Learnings
638
656
  - None this stage.
639
657
  `,
640
- "07-review.md": `---
641
- stage: review
642
- schema_version: 1
643
- version: ${CCLAW_VERSION}
644
- feature: <feature-id>
645
- locked_decisions: []
646
- inputs_hash: sha256:pending
647
- ---
658
+ "07-review.md": `${artifactFrontmatter("review")}
648
659
 
649
660
  # Review Artifact
650
661
 
662
+ ## Upstream Handoff
663
+ - Source artifacts: \`04-spec.md\`, \`05-plan.md\`, \`06-tdd.md\`
664
+ - Decisions carried forward:
665
+ - Constraints carried forward:
666
+ - Open questions:
667
+ - Drift from upstream (or \`None\`):
668
+
651
669
  ## Layer 1 Verdict
652
670
  | Criterion | Verdict | Evidence |
653
671
  |---|---|---|
@@ -664,46 +682,25 @@ inputs_hash: sha256:pending
664
682
  |---|---|---|---|---|---|---|
665
683
  | CR-1 | reviewer / bot / ci | Critical/Important/Suggestion | path:line or n/a | | open/in-progress/resolved/accepted-risk/rejected-with-evidence | |
666
684
 
667
- ## Review Army Contract
685
+ ## Review Findings Contract
668
686
  - See \`07-review-army.json\`
669
687
  - Reconciliation summary:
670
688
 
671
- ## Review Readiness Dashboard
689
+ ## Review Readiness Snapshot
672
690
 
673
- | Pass | Status | Completed at (UTC) | Reviewer / source | Commit at review | Drift vs HEAD |
674
- |---|---|---|---|---|---|
675
- | Layer 1 spec compliance | pass / fail / pending | <ISO 8601> | reviewer | <short sha> | <files changed since> |
676
- | Layer 2 — correctness | pass / fail / pending | <ISO 8601> | reviewer | <short sha> | <files changed since> |
677
- | Layer 2 — security | pass / fail / pending | <ISO 8601> | security-reviewer | <short sha> | <files changed since> |
678
- | Layer 2 — performance | pass / fail / pending | <ISO 8601> | reviewer | <short sha> | <files changed since> |
679
- | Layer 2 — architecture | pass / fail / pending | <ISO 8601> | reviewer | <short sha> | <files changed since> |
680
- | Adversarial review | pass / fail / n/a | <ISO 8601 or —> | adversarial-review skill | <short sha or —> | <drift or —> |
681
- | Review army schema valid | pass / fail | <ISO 8601> | jsonschema | <short sha> | n/a |
682
-
683
- ### Delegation log snapshot (current run, current stage)
684
- - Path: \`.cclaw/state/delegation-log.json\`
685
- - Required: <list of mandatory specialists>
686
- - Completed: <list with timestamps>
687
- - Waived (with reason): <list or "none">
688
- - Pending: <list or "none">
689
-
690
- ### Staleness signal
691
- - Worktree commit at last review pass: \`<short sha>\`
692
- - Worktree commit now: \`<short sha>\`
693
- - Files changed since last review pass: \`<count>\` (run \`git diff --stat <sha>..HEAD\` to inspect)
694
- - If drift > 0 lines, mark Layer 1 / Layer 2 results as **STALE — re-run before ship**.
695
-
696
- ### Headline
697
- - Open critical blockers: <count>
698
- - Adversarial review pass: pass / fail / n/a
691
+ - Completed checks: Layer 1, Layer 2 tags, security sweep, schema validation
692
+ - Delegation log: \`.cclaw/state/delegation-log.json\` required/completed/waived/pending
693
+ - Staleness signal: commit at last review pass vs current commit
694
+ - Open critical blockers:
699
695
  - Ship recommendation: APPROVED | APPROVED_WITH_CONCERNS | BLOCKED
700
696
 
701
- ## Completeness Score
697
+
698
+ ## Completeness Snapshot
702
699
  - AC coverage: <N>/<M> (<percent>%)
703
700
  - Task coverage (tasks backed by ≥1 test slice): <N>/<M>
704
701
  - Slice coverage (slices linked to ≥1 AC): <N>/<M>
705
- - Adversarial review pass: true | false
706
- - Overall score: <0-100>
702
+ - Adversarial review: not triggered | pass | fail
703
+ - Overall: complete | concerns | blocked
707
704
 
708
705
  ## Trace Matrix Check
709
706
  - Command: \`cclaw internal trace-matrix\`
@@ -754,17 +751,17 @@ inputs_hash: sha256:pending
754
751
  }
755
752
  }
756
753
  `,
757
- "08-ship.md": `---
758
- stage: ship
759
- schema_version: 1
760
- version: ${CCLAW_VERSION}
761
- feature: <feature-id>
762
- locked_decisions: []
763
- inputs_hash: sha256:pending
764
- ---
754
+ "08-ship.md": `${artifactFrontmatter("ship")}
765
755
 
766
756
  # Ship Artifact
767
757
 
758
+ ## Upstream Handoff
759
+ - Source artifacts: \`06-tdd.md\`, \`07-review.md\`
760
+ - Decisions carried forward:
761
+ - Constraints carried forward:
762
+ - Open questions:
763
+ - Drift from upstream (or \`None\`):
764
+
768
765
  ## Preflight Results
769
766
  - Review verdict:
770
767
  - Build:
@@ -798,21 +795,14 @@ ${SHIP_FINALIZATION_ENUM_LINES}
798
795
  - Exceptions (if any):
799
796
 
800
797
  ## Retro Gate Handoff
801
- - Run \`/cc-ops retro\` before archive.
798
+ - Complete the retro gate before archive.
802
799
  - Retro artifact path: \`.cclaw/artifacts/09-retro.md\`
803
800
  - Archive remains blocked until retro gate is complete.
804
801
 
805
802
  ## Learnings
806
803
  - None this stage.
807
804
  `,
808
- "09-retro.md": `---
809
- stage: retro
810
- schema_version: 1
811
- version: ${CCLAW_VERSION}
812
- feature: <feature-id>
813
- locked_decisions: []
814
- inputs_hash: sha256:pending
815
- ---
805
+ "09-retro.md": `${artifactFrontmatter("retro")}
816
806
 
817
807
  # Retro Artifact
818
808
 
@@ -919,13 +909,13 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
919
909
 
920
910
  - \`/cc\` = entry and resume.
921
911
  - \`/cc-next\` = only progression path.
922
- - \`/cc-learn\` = knowledge capture and recall.
912
+ - Knowledge capture and recall use the \`learnings\` skill when requested.
923
913
 
924
914
  ## Verification Discipline
925
915
 
926
916
  - No completion claim without fresh command evidence in this turn.
927
917
  - Do not mark gates passed from memory.
928
- - Keep evidence in \`.cclaw/artifacts/\`; archive via \`/cc-ops archive\` (agent flow) or archive runtime.
918
+ - Keep evidence in \`.cclaw/artifacts/\`; archive via \`npx cclaw-cli archive\`.
929
919
 
930
920
  ## Delegation And Approvals
931
921
 
@@ -936,8 +926,9 @@ Track-specific skips are allowed only when \`flow-state.track\` + \`skippedStage
936
926
  ## Routing Source Of Truth
937
927
 
938
928
  - Primary router: \`.cclaw/skills/using-cclaw/SKILL.md\`.
939
- - Protocols: \`.cclaw/references/protocols/*.md\`.
940
- - Preamble budget: \`.cclaw/references/protocols/ethos.md\`.
929
+ - Stage behavior: current stage skill plus \`.cclaw/state/flow-state.json\`.
930
+ - Preamble budget: keep role/status announcements brief and avoid repeating
931
+ them unless the stage or role changes.
941
932
  `;
942
933
  export function buildRulesJson() {
943
934
  return {
@@ -0,0 +1,17 @@
1
+ import type { FlowTrack } from "../types.js";
2
+ export interface TrackRenderContext {
3
+ track: FlowTrack;
4
+ usesPlanTerminology: boolean;
5
+ traceabilitySourceNoun: string;
6
+ traceabilityIdNoun: string;
7
+ traceabilitySliceNoun: string;
8
+ upstreamArtifactLabel: string;
9
+ upstreamArtifactPath: string;
10
+ }
11
+ export declare function trackRenderContext(track: FlowTrack): TrackRenderContext;
12
+ /**
13
+ * Render track-aware terminology for text that defaults to standard-track plan
14
+ * wording. Keep this centralized so quick-track rewrites do not drift across
15
+ * stage content generators.
16
+ */
17
+ export declare function renderTrackTerminology(value: string, context: TrackRenderContext): string;