@seanmars/tospec 0.8.0 → 0.10.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 (192) hide show
  1. package/README.md +19 -0
  2. package/assets/dashboard/app.js +11 -0
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +18 -31
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/commands/config.d.ts +1 -2
  7. package/dist/commands/config.d.ts.map +1 -1
  8. package/dist/commands/config.js +5 -14
  9. package/dist/commands/config.js.map +1 -1
  10. package/dist/commands/dashboard.d.ts +3 -0
  11. package/dist/commands/dashboard.d.ts.map +1 -1
  12. package/dist/commands/dashboard.js +32 -2
  13. package/dist/commands/dashboard.js.map +1 -1
  14. package/dist/commands/decision.d.ts.map +1 -1
  15. package/dist/commands/decision.js +8 -9
  16. package/dist/commands/decision.js.map +1 -1
  17. package/dist/commands/shared-output.d.ts +18 -4
  18. package/dist/commands/shared-output.d.ts.map +1 -1
  19. package/dist/commands/shared-output.js +16 -3
  20. package/dist/commands/shared-output.js.map +1 -1
  21. package/dist/commands/show.d.ts.map +1 -1
  22. package/dist/commands/show.js +9 -13
  23. package/dist/commands/show.js.map +1 -1
  24. package/dist/commands/validate.d.ts +10 -0
  25. package/dist/commands/validate.d.ts.map +1 -1
  26. package/dist/commands/validate.js +48 -32
  27. package/dist/commands/validate.js.map +1 -1
  28. package/dist/commands/workflow/instructions.d.ts.map +1 -1
  29. package/dist/commands/workflow/instructions.js +20 -6
  30. package/dist/commands/workflow/instructions.js.map +1 -1
  31. package/dist/commands/workflow/new-change.d.ts +2 -0
  32. package/dist/commands/workflow/new-change.d.ts.map +1 -1
  33. package/dist/commands/workflow/new-change.js +15 -7
  34. package/dist/commands/workflow/new-change.js.map +1 -1
  35. package/dist/commands/workflow/schemas.d.ts.map +1 -1
  36. package/dist/commands/workflow/schemas.js +12 -3
  37. package/dist/commands/workflow/schemas.js.map +1 -1
  38. package/dist/commands/workflow/shared.d.ts +1 -3
  39. package/dist/commands/workflow/shared.d.ts.map +1 -1
  40. package/dist/commands/workflow/shared.js +2 -14
  41. package/dist/commands/workflow/shared.js.map +1 -1
  42. package/dist/commands/workflow/status.d.ts.map +1 -1
  43. package/dist/commands/workflow/status.js +6 -2
  44. package/dist/commands/workflow/status.js.map +1 -1
  45. package/dist/commands/workflow/templates.d.ts.map +1 -1
  46. package/dist/commands/workflow/templates.js +13 -2
  47. package/dist/commands/workflow/templates.js.map +1 -1
  48. package/dist/core/archive.d.ts +9 -0
  49. package/dist/core/archive.d.ts.map +1 -1
  50. package/dist/core/archive.js +63 -114
  51. package/dist/core/archive.js.map +1 -1
  52. package/dist/core/artifact-graph/instruction-loader.d.ts +4 -2
  53. package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
  54. package/dist/core/artifact-graph/instruction-loader.js +54 -0
  55. package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
  56. package/dist/core/change-metadata/schema.d.ts +1 -0
  57. package/dist/core/change-metadata/schema.d.ts.map +1 -1
  58. package/dist/core/change-metadata/schema.js +4 -0
  59. package/dist/core/change-metadata/schema.js.map +1 -1
  60. package/dist/core/change-presenter.d.ts.map +1 -1
  61. package/dist/core/change-presenter.js +2 -8
  62. package/dist/core/change-presenter.js.map +1 -1
  63. package/dist/core/change-status-policy.d.ts +1 -1
  64. package/dist/core/change-status-policy.d.ts.map +1 -1
  65. package/dist/core/command-generation/adapters/index.d.ts +1 -2
  66. package/dist/core/command-generation/adapters/index.d.ts.map +1 -1
  67. package/dist/core/command-generation/adapters/index.js +1 -2
  68. package/dist/core/command-generation/adapters/index.js.map +1 -1
  69. package/dist/core/command-generation/index.d.ts +4 -15
  70. package/dist/core/command-generation/index.d.ts.map +1 -1
  71. package/dist/core/command-generation/index.js +5 -17
  72. package/dist/core/command-generation/index.js.map +1 -1
  73. package/dist/core/config-schema.d.ts +0 -14
  74. package/dist/core/config-schema.d.ts.map +1 -1
  75. package/dist/core/config-schema.js +0 -57
  76. package/dist/core/config-schema.js.map +1 -1
  77. package/dist/core/config.d.ts +0 -1
  78. package/dist/core/config.d.ts.map +1 -1
  79. package/dist/core/config.js +0 -4
  80. package/dist/core/config.js.map +1 -1
  81. package/dist/core/dashboard-data.d.ts +2 -1
  82. package/dist/core/dashboard-data.d.ts.map +1 -1
  83. package/dist/core/dashboard-data.js +1 -1
  84. package/dist/core/dashboard-data.js.map +1 -1
  85. package/dist/core/global-config.d.ts +0 -5
  86. package/dist/core/global-config.d.ts.map +1 -1
  87. package/dist/core/global-config.js +3 -20
  88. package/dist/core/global-config.js.map +1 -1
  89. package/dist/core/init.d.ts +0 -1
  90. package/dist/core/init.d.ts.map +1 -1
  91. package/dist/core/init.js +18 -63
  92. package/dist/core/init.js.map +1 -1
  93. package/dist/core/list.d.ts.map +1 -1
  94. package/dist/core/list.js +6 -5
  95. package/dist/core/list.js.map +1 -1
  96. package/dist/core/migrate.d.ts +20 -3
  97. package/dist/core/migrate.d.ts.map +1 -1
  98. package/dist/core/migrate.js +140 -40
  99. package/dist/core/migrate.js.map +1 -1
  100. package/dist/core/parsers/change-parser.d.ts +0 -2
  101. package/dist/core/parsers/change-parser.d.ts.map +1 -1
  102. package/dist/core/parsers/change-parser.js +7 -72
  103. package/dist/core/parsers/change-parser.js.map +1 -1
  104. package/dist/core/parsers/markdown-parser.d.ts +1 -1
  105. package/dist/core/parsers/markdown-parser.d.ts.map +1 -1
  106. package/dist/core/parsers/markdown-parser.js +13 -4
  107. package/dist/core/parsers/markdown-parser.js.map +1 -1
  108. package/dist/core/parsers/requirement-blocks.d.ts +19 -0
  109. package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
  110. package/dist/core/parsers/requirement-blocks.js +56 -26
  111. package/dist/core/parsers/requirement-blocks.js.map +1 -1
  112. package/dist/core/parsers/requirement-text.d.ts +33 -0
  113. package/dist/core/parsers/requirement-text.d.ts.map +1 -1
  114. package/dist/core/parsers/requirement-text.js +55 -13
  115. package/dist/core/parsers/requirement-text.js.map +1 -1
  116. package/dist/core/profiles.d.ts +2 -10
  117. package/dist/core/profiles.d.ts.map +1 -1
  118. package/dist/core/profiles.js +5 -9
  119. package/dist/core/profiles.js.map +1 -1
  120. package/dist/core/project-config.d.ts +0 -22
  121. package/dist/core/project-config.d.ts.map +1 -1
  122. package/dist/core/project-config.js +5 -75
  123. package/dist/core/project-config.js.map +1 -1
  124. package/dist/core/root-selection.d.ts.map +1 -1
  125. package/dist/core/root-selection.js +2 -2
  126. package/dist/core/root-selection.js.map +1 -1
  127. package/dist/core/shared/index.d.ts +1 -1
  128. package/dist/core/shared/index.d.ts.map +1 -1
  129. package/dist/core/shared/index.js +1 -1
  130. package/dist/core/shared/index.js.map +1 -1
  131. package/dist/core/shared/skill-generation.d.ts +47 -1
  132. package/dist/core/shared/skill-generation.d.ts.map +1 -1
  133. package/dist/core/shared/skill-generation.js +36 -34
  134. package/dist/core/shared/skill-generation.js.map +1 -1
  135. package/dist/core/shared/tool-detection.d.ts +4 -10
  136. package/dist/core/shared/tool-detection.d.ts.map +1 -1
  137. package/dist/core/shared/tool-detection.js +5 -29
  138. package/dist/core/shared/tool-detection.js.map +1 -1
  139. package/dist/core/spec-presenter.d.ts.map +1 -1
  140. package/dist/core/spec-presenter.js +3 -4
  141. package/dist/core/spec-presenter.js.map +1 -1
  142. package/dist/core/specs-apply.d.ts.map +1 -1
  143. package/dist/core/specs-apply.js +1 -0
  144. package/dist/core/specs-apply.js.map +1 -1
  145. package/dist/core/templates/workflows/apply.d.ts +1 -1
  146. package/dist/core/templates/workflows/apply.d.ts.map +1 -1
  147. package/dist/core/templates/workflows/apply.js +86 -73
  148. package/dist/core/templates/workflows/apply.js.map +1 -1
  149. package/dist/core/templates/workflows/archive.d.ts.map +1 -1
  150. package/dist/core/templates/workflows/archive.js +5 -3
  151. package/dist/core/templates/workflows/archive.js.map +1 -1
  152. package/dist/core/templates/workflows/decision.d.ts.map +1 -1
  153. package/dist/core/templates/workflows/decision.js +3 -1
  154. package/dist/core/templates/workflows/decision.js.map +1 -1
  155. package/dist/core/templates/workflows/explore.d.ts.map +1 -1
  156. package/dist/core/templates/workflows/explore.js +10 -8
  157. package/dist/core/templates/workflows/explore.js.map +1 -1
  158. package/dist/core/templates/workflows/grill.d.ts.map +1 -1
  159. package/dist/core/templates/workflows/grill.js +29 -6
  160. package/dist/core/templates/workflows/grill.js.map +1 -1
  161. package/dist/core/templates/workflows/propose.d.ts.map +1 -1
  162. package/dist/core/templates/workflows/propose.js +3 -1
  163. package/dist/core/templates/workflows/propose.js.map +1 -1
  164. package/dist/core/templates/workflows/update.js +2 -2
  165. package/dist/core/templates/workflows/update.js.map +1 -1
  166. package/dist/core/update.d.ts +0 -9
  167. package/dist/core/update.d.ts.map +1 -1
  168. package/dist/core/update.js +9 -55
  169. package/dist/core/update.js.map +1 -1
  170. package/dist/core/validation/validator.d.ts +7 -1
  171. package/dist/core/validation/validator.d.ts.map +1 -1
  172. package/dist/core/validation/validator.js +98 -17
  173. package/dist/core/validation/validator.js.map +1 -1
  174. package/dist/ui/welcome-screen.d.ts.map +1 -1
  175. package/dist/ui/welcome-screen.js +6 -3
  176. package/dist/ui/welcome-screen.js.map +1 -1
  177. package/dist/utils/change-utils.d.ts +1 -1
  178. package/dist/utils/change-utils.d.ts.map +1 -1
  179. package/dist/utils/link.d.ts +2 -18
  180. package/dist/utils/link.d.ts.map +1 -1
  181. package/dist/utils/link.js +2 -65
  182. package/dist/utils/link.js.map +1 -1
  183. package/package.json +1 -1
  184. package/schemas/decision/templates/decision.md +3 -0
  185. package/dist/core/command-generation/adapters/cursor.d.ts +0 -14
  186. package/dist/core/command-generation/adapters/cursor.d.ts.map +0 -1
  187. package/dist/core/command-generation/adapters/cursor.js +0 -31
  188. package/dist/core/command-generation/adapters/cursor.js.map +0 -1
  189. package/dist/core/command-generation/registry.d.ts +0 -24
  190. package/dist/core/command-generation/registry.d.ts.map +0 -1
  191. package/dist/core/command-generation/registry.js +0 -38
  192. package/dist/core/command-generation/registry.js.map +0 -1
@@ -1,32 +1,50 @@
1
1
  import { VERIFY_METHODOLOGY } from './verify.js';
2
- // -----------------------------------------------------------------------------
3
- // Default apply — implement first, cover with tests after (no strict TDD loop)
4
- // -----------------------------------------------------------------------------
5
- const APPLY_BODY = `**Steps**
2
+ // ponytail: one parameterized template literal, not a template engine.
3
+ function buildApplyBody(v) {
4
+ return `**Task tracking is file-based only.** The tracks file's checkboxes (\`- [ ]\` / \`- [x]\`) are the single source of truth for progress. Never use a built-in todo or task-tracking tool — editing the checkbox in the file is the only way progress gets recorded.
5
+
6
+ **Steps**
7
+
8
+ 1. **Select the change**
6
9
 
7
- 1. **Confirm planning is done**
10
+ If the user named one, use it. Otherwise infer it from the conversation. If it is still ambiguous, run \`tospec list --json\` and let the user pick with \`AskUserQuestion\` — never guess.
11
+
12
+ Announce \`Using change: <name>\` and how to override.
13
+
14
+ 2. **Get apply instructions**
8
15
  \`\`\`bash
9
- tospec status --change "<name>" --json
16
+ tospec instructions apply --change "<name>" --json
10
17
  \`\`\`
11
- Every artifact in \`applyRequires\` must be \`done\` before you write any code. If one isn't, stop and send the user back to \`tospec-propose\` or \`tospec-issue\`. Note \`schemaName\` — it decides which branch below applies.
18
+ One call gives you the gate and the briefing: \`schemaName\` (decides which branch below applies), \`contextFiles\` (artifact id -> concrete paths), \`progress\`, \`tasks\`, and a dynamic \`instruction\`.
12
19
 
13
- 2. **Work the tracks file one item at a time**
20
+ Act on \`state\`:
21
+ - \`blocked\` — required artifacts or the tracks file are missing; show \`instruction\` and STOP, sending the user back to \`tospec-propose\`/\`tospec-issue\`.
22
+ - \`all_done\` — everything is checked off already; skip to the verify step below.
23
+ - \`ready\` — proceed.
14
24
 
15
- The tracks file is \`tasks.md\` (sdd) or \`task.md\` (issue). Take the next unchecked item, implement it, confirm it works against its specs, check it off (\`- [ ]\` → \`- [x]\`), then move to the next. Never batch multiple items into one pass.
25
+ 3. **Read the context files**
16
26
 
17
- ### sdd branchimplement per slice
27
+ Read every path listed under \`contextFiles\` before writing any code. Take the ids and paths from the CLI output never assume filenames.
18
28
 
19
- For each tracer-bullet slice in \`tasks.md\`:
20
- 1. Implement the minimum that satisfies the behavior the slice's specs describe. Don't anticipate future slices or add speculative flexibility.
21
- 2. Cover the new behavior with a test **at the seam \`design.md\` named** written after the code works (test-after; no red-first requirement). Don't test internals or add implementation-coupled assertions (mocking internal collaborators, reaching into private state, checking the database instead of the interface).
22
- 3. Verify the result matches the behavior the slice's specs describe and its test is green.
23
- 4. Check off the slice, then move to the next one one slice per cycle. Refactoring is not part of this loop; it belongs to the verify step at the end of this workflow.
29
+ 4. **Show current progress**
30
+
31
+ Schema in use, \`N/M tasks complete\`, the remaining items, and the CLI's \`instruction\`.
32
+
33
+ 5. **Work the tracks file one item at a time**
34
+
35
+ The tracks file is \`tasks.md\` (sdd) or \`task.md\` (issue). ${v.step2Intro} Never batch multiple items into one pass.
36
+
37
+ Before starting an item, re-read the parts of design/specs that cover its scope — don't rely on memory from earlier in the conversation, context may have been compressed since.
38
+
39
+ Before checking an item off, re-read its description and confirm every part of it is covered by your changes and the behavior it describes actually works. An item checked off half-finished is the most expensive mistake in this loop.
24
40
 
25
- ### issue branchfix root cause
41
+ **Pause if** the item is unclear, implementation reveals a design issue (suggest \`tospec-update\`), or you hit an error or blocker report it and wait for guidance. Don't guess.
26
42
 
27
- Read \`task.md\`'s feedback loop, then fix the root cause, not the symptom — if the same defect is reachable through multiple callers of a shared function, the fix belongs in the shared function, not patched into just the caller the ticket named (grep every caller of the function you're touching). Cover the bug with the regression test from \`task.md\`'s feedback loop so it can't come back — extend the existing test if there's one at the right seam, otherwise add a new one.
43
+ ${v.sddBranch}
28
44
 
29
- 3. **Re-validate artifacts**
45
+ ${v.issueBranch}
46
+
47
+ 6. **Re-validate artifacts**
30
48
  \`\`\`bash
31
49
  tospec validate "<name>" --json
32
50
  \`\`\`
@@ -43,35 +61,61 @@ ${VERIFY_METHODOLOGY}
43
61
  Report which tasks/checkboxes completed this pass, current progress (\`tospec status --change "<name>"\`), and whether all required artifacts are checked off. When everything is done, the verify review above has already run — if it came back clean, tell the user the change is ready for \`tospec-archive\`; if it surfaced blocking findings, keep working here to resolve them.
44
62
 
45
63
  **Guardrails**
46
- - One slice/task at a time — no batching
47
- - Every change ships with a test that covers its behavior (test-after is fine hereno red-before-green requirement)
48
- - Test only at the pre-agreed seam (design.md for sdd; the existing/new seam identified for issue)never against internals
64
+ ${v.guardrailsHead}
65
+ - Keep going through items until done or blocked; pause on errors, blockers, or unclear requirements don't guess
66
+ - Read the context files before starting, and use the paths from \`tospec instructions apply\`don't assume filenames
67
+ - Check the box in the tracks file immediately after finishing each item; no external task tracker
68
+ - Keep code changes minimal and scoped to the item at hand
69
+ - Any test you do write goes at the pre-agreed seam (design.md for sdd; the existing/new seam identified for issue) — never against internals
49
70
  - Fix root cause: check every caller of a shared function before declaring a fix complete
50
71
  - Don't hand off to archive until the automatic verify step is clean and the full test suite is green`;
72
+ }
73
+ // -----------------------------------------------------------------------------
74
+ // Default apply — implement per slice; tests are optional, not mandated
75
+ // -----------------------------------------------------------------------------
76
+ const APPLY_BODY = buildApplyBody({
77
+ step2Intro: 'Take the next unchecked item, implement it, confirm it works against its specs, check it off (\`- [ ]\` → \`- [x]\`), then move to the next.',
78
+ sddBranch: `### sdd branch — implement per slice
79
+
80
+ For each tracer-bullet slice in \`tasks.md\`:
81
+ 1. Implement the minimum that satisfies the behavior the slice's specs describe. Don't anticipate future slices or add speculative flexibility.
82
+ 2. Verify the result matches the behavior the slice's specs describe, and that the existing test suite still passes.
83
+ 3. Check off the slice, then move to the next one — one slice per cycle. Refactoring is not part of this loop; it belongs to the verify step at the end of this workflow.
84
+
85
+ Writing a new test is **not required** in this loop — add one when it earns its keep. If you do, put it at the seam \`design.md\` named and don't test internals or add implementation-coupled assertions (mocking internal collaborators, reaching into private state, checking the database instead of the interface). Use \`tospec-apply-with-tdd\` when every slice must start from a failing test.`,
86
+ issueBranch: `### issue branch — fix root cause
87
+
88
+ Read \`task.md\`'s feedback loop, then fix the root cause, not the symptom — if the same defect is reachable through multiple callers of a shared function, the fix belongs in the shared function, not patched into just the caller the ticket named (grep every caller of the function you're touching). Confirm the fix with \`task.md\`'s feedback loop and keep the existing suite green.
89
+
90
+ A regression test is **not required** here — add one when the bug is likely to recur, extending the existing test if there's one at the right seam. Use \`tospec-apply-with-tdd\` when the fix must start from a red regression test.`,
91
+ guardrailsHead: `- One slice/task at a time — no batching
92
+ - Tests are optional in this loop — write one when it earns its keep, and never let a missing test block progress; \`tospec-apply-with-tdd\` is the variant that mandates them
93
+ - Never delete, skip, or weaken an existing test to get to green — fix the code instead`,
94
+ });
51
95
  export function getTospecApplySkillTemplate() {
52
96
  return {
53
97
  name: 'tospec-apply',
54
- description: 'Implement a change one task at a time, branching by schema, covering each change with a test as you go (test-after — no strict TDD loop), checking off tasks.md/task.md, then automatically run the two-axis verify review. Use when planning artifacts are complete (sdd: ticket/specs/design/tasks; issue: ticket/task) and the user wants to implement without a red-first (TDD) cycle.',
55
- instructions: `Implement a change's tasks one slice at a time, branching by schema, covering each change with a test as you go, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
98
+ description: 'Implement tasks from a tospec change. Use when the user wants to start implementing, continue implementation, or work through tasks.',
99
+ instructions: `Implement a change's tasks one slice at a time, branching by schema, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
56
100
 
57
- **Input**: The user's request should name the change to implement (or continue implementing).
101
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
58
102
 
59
103
  ${APPLY_BODY}`,
60
104
  license: 'MIT',
61
105
  compatibility: 'Requires tospec CLI.',
62
106
  metadata: { author: 'tospec', version: '1.0' },
63
- allowedTools: ['Bash(tospec:*)', 'Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Agent'],
107
+ allowedTools: ['Bash(tospec:*)', 'Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Agent', 'AskUserQuestion'],
64
108
  };
65
109
  }
66
110
  export function getTospecApplyCommandTemplate() {
67
111
  return {
68
112
  name: 'TOSPEC: Apply',
69
- description: 'Implement a change one slice at a time (test-after), then auto-run the two-axis verify review',
113
+ description: 'Implement tasks from a change, one slice at a time',
70
114
  category: 'Workflow',
71
115
  tags: ['workflow', 'implementation'],
72
- content: `Implement a change's tasks one slice at a time, branching by schema, covering each change with a test as you go, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
116
+ content: `Implement a change's tasks one slice at a time, branching by schema, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
73
117
 
74
- **Input**: The argument after \`tospec-apply\` is the change name to implement (or continue implementing).
118
+ **Input**: Optionally specify a change name after \`tospec-apply\` (e.g., \`tospec-apply add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
75
119
 
76
120
  ${APPLY_BODY}`,
77
121
  };
@@ -79,81 +123,50 @@ ${APPLY_BODY}`,
79
123
  // -----------------------------------------------------------------------------
80
124
  // TDD apply — strict red → green per slice
81
125
  // -----------------------------------------------------------------------------
82
- const APPLY_TDD_BODY = `**Steps**
83
-
84
- 1. **Confirm planning is done**
85
- \`\`\`bash
86
- tospec status --change "<name>" --json
87
- \`\`\`
88
- Every artifact in \`applyRequires\` must be \`done\` before you write any code. If one isn't, stop and send the user back to \`tospec-propose\` or \`tospec-issue\`. Note \`schemaName\` — it decides which branch below applies.
89
-
90
- 2. **Work the tracks file one item at a time**
91
-
92
- The tracks file is \`tasks.md\` (sdd) or \`task.md\` (issue). Take the next unchecked item, implement it, check it off (\`- [ ]\` → \`- [x]\`) only once its test is green, then move to the next. Never batch multiple items into one pass.
93
-
94
- ### sdd branch — TDD per slice
126
+ const APPLY_TDD_BODY = buildApplyBody({
127
+ step2Intro: 'Take the next unchecked item, implement it, check it off (\`- [ ]\` → \`- [x]\`) only once its test is green, then move to the next.',
128
+ sddBranch: `### sdd branch — TDD per slice
95
129
 
96
130
  For each tracer-bullet slice in \`tasks.md\`:
97
131
  1. Write the failing test first (red) — **only at the seam \`design.md\` named**. Don't test internals, don't add implementation-coupled assertions (mocking internal collaborators, reaching into private state, checking the database instead of the interface).
98
132
  2. Implement the minimum to pass (green). Don't anticipate future slices or add speculative flexibility.
99
133
  3. Verify the result matches the behavior the slice's specs describe.
100
- 4. Check off the slice, then move to the next one — one slice per cycle. Refactoring is not part of this loop; it belongs to the verify step at the end of this workflow.
101
-
102
- ### issue branch — three-way test split
134
+ 4. Check off the slice, then move to the next one — one slice per cycle. Refactoring is not part of this loop; it belongs to the verify step at the end of this workflow.`,
135
+ issueBranch: `### issue branch — three-way test split
103
136
 
104
137
  Read \`task.md\`'s feedback loop. Then:
105
138
  - **Existing test, failing** → the regression test from diagnosis already goes red. Find out why it fails and fix root cause (grep every caller of the function you're touching — the bug may hit more than the one path the ticket names).
106
139
  - **Existing test, passing** → the bug is an edge case the existing test doesn't cover. Add a new failing test for that edge case first, then fix.
107
140
  - **No existing test** → write the red regression test from \`task.md\`'s feedback loop first, then fix.
108
141
 
109
- Fix root cause, not symptom — if the same defect is reachable through multiple callers of a shared function, the fix belongs in the shared function, not patched into just the caller the ticket named.
110
-
111
- 3. **Re-validate artifacts**
112
- \`\`\`bash
113
- tospec validate "<name>" --json
114
- \`\`\`
115
- Implementation sometimes touches tasks.md/specs directly (adding a discovered edge case, correcting an estimate) — confirm the change's artifacts are still structurally valid before handing off. Fix and re-run until it passes.
116
-
117
- ## Verify (automatic — apply's final step)
118
-
119
- Once every task is checked off and \`tospec validate\` passes, run the two-axis review **automatically**. This is not a separate command the user has to invoke — verify is folded into apply and runs here as its last step, before the change is handed to \`tospec-archive\`.
120
-
121
- ${VERIFY_METHODOLOGY}
122
-
123
- **Output**
124
-
125
- Report which tasks/checkboxes completed this pass, current progress (\`tospec status --change "<name>"\`), and whether all required artifacts are checked off. When everything is done, the verify review above has already run — if it came back clean, tell the user the change is ready for \`tospec-archive\`; if it surfaced blocking findings, keep working here to resolve them.
126
-
127
- **Guardrails**
128
- - Red before green, always — never write the implementation before its failing test
129
- - One slice/task at a time — no batching
130
- - Test only at the pre-agreed seam (design.md for sdd; the existing/new seam identified for issue) — never against internals
131
- - Fix root cause: check every caller of a shared function before declaring a fix complete
132
- - Don't hand off to archive until the automatic verify step is clean and the full test suite is green`;
142
+ Fix root cause, not symptom — if the same defect is reachable through multiple callers of a shared function, the fix belongs in the shared function, not patched into just the caller the ticket named.`,
143
+ guardrailsHead: `- Red before green, always — never write the implementation before its failing test
144
+ - One slice/task at a time — no batching`,
145
+ });
133
146
  export function getTospecApplyWithTDDSkillTemplate() {
134
147
  return {
135
148
  name: 'tospec-apply-with-tdd',
136
- description: 'Implement a change test-first (red → green), one tracer-bullet slice or task at a time, checking off tasks.md/task.md as you go, then automatically run the two-axis verify review. Use when planning artifacts are complete (sdd: ticket/specs/design/tasks; issue: ticket/task) and the user wants a strict test-first (TDD) implementation loop.',
149
+ description: 'Implement tasks from a tospec change test-first (red → green). Use when the user wants to start or continue implementation with a strict TDD loop.',
137
150
  instructions: `Implement a change's tasks test-first (red → green), one slice at a time, branching by schema, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
138
151
 
139
- **Input**: The user's request should name the change to implement (or continue implementing).
152
+ **Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
140
153
 
141
154
  ${APPLY_TDD_BODY}`,
142
155
  license: 'MIT',
143
156
  compatibility: 'Requires tospec CLI.',
144
157
  metadata: { author: 'tospec', version: '1.0' },
145
- allowedTools: ['Bash(tospec:*)', 'Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Agent'],
158
+ allowedTools: ['Bash(tospec:*)', 'Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Agent', 'AskUserQuestion'],
146
159
  };
147
160
  }
148
161
  export function getTospecApplyWithTDDCommandTemplate() {
149
162
  return {
150
163
  name: 'TOSPEC: Apply (TDD)',
151
- description: 'Implement a change test-first, one slice at a time, then auto-run the two-axis verify review',
164
+ description: 'Implement tasks from a change test-first (red green)',
152
165
  category: 'Workflow',
153
166
  tags: ['workflow', 'tdd', 'implementation'],
154
167
  content: `Implement a change's tasks test-first (red → green), one slice at a time, branching by schema, then automatically run the two-axis verify review — ready for \`tospec-archive\` when done.
155
168
 
156
- **Input**: The argument after \`tospec-apply-with-tdd\` is the change name to implement (or continue implementing).
169
+ **Input**: Optionally specify a change name after \`tospec-apply-with-tdd\` (e.g., \`tospec-apply-with-tdd add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
157
170
 
158
171
  ${APPLY_TDD_BODY}`,
159
172
  };
@@ -1 +1 @@
1
- {"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/apply.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,gFAAgF;AAChF,+EAA+E;AAC/E,gFAAgF;AAEhF,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCjB,kBAAkB;;;;;;;;;;;sGAWkF,CAAC;AAEvG,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,4XAA4X;QACzY,YAAY,EAAE;;;;EAIhB,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;KAC3F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,+FAA+F;QAC5G,QAAQ,EAAE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BAAuB;QAC7B,WAAW,EAAE,oJAAoJ;QACjK,YAAY,EAAE;;;;EAIhB,cAAc,EAAE;QACd,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC;KAC9G,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oCAAoC;IAClD,OAAO;QACL,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,gBAAgB,CAAC;QAC3C,OAAO,EAAE;;;;EAIX,cAAc,EAAE;KACf,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiDlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmDlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
@@ -22,16 +22,18 @@ If a sync is warranted, **ask the user one question** (make clear both answers a
22
22
 
23
23
  Synced branch (user chose to sync and \`sync-report.md\` says \`結論: PASS\`):
24
24
  \`\`\`bash
25
- tospec archive "<name>" --require-sync
25
+ tospec archive "<name>" --json --require-sync
26
26
  \`\`\`
27
27
  \`--require-sync\` is the CLI's own machine-checkable half of the sync gate: it refuses unless \`sync-report.md\` exists with a \`結論: PASS\` line (\`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\`). If \`tospec-sync\` actually ran and passed, this succeeds for free — a CLI-enforced backstop behind the instruction-level order above. Only pass \`--require-sync\` when a sync actually ran; otherwise the CLI will (correctly) refuse.
28
28
 
29
29
  Not-synced branch (sync wasn't needed, or the user declined):
30
30
  \`\`\`bash
31
- tospec archive "<name>"
31
+ tospec archive "<name>" --json
32
32
  \`\`\`
33
33
 
34
- Either way, the CLI then: re-validates the delta specs (blocking), checks tasks/task completion (asks for confirmation if incomplete), does a two-phase atomic merge into \`tospec/specs/\` (dry-run + re-validate every target first, writes only if all pass), and moves the change directory — including \`sync-report.md\` when present — into \`tospec/changes/archive/\` under a \`yyyyMMdd_HHmmss-<name>\` timestamp the CLI generates itself.
34
+ Either way, the CLI then: re-validates the delta specs (blocking), checks tasks/task completion (with \`--json\`, incomplete tasks block unless you pass \`--yes\` after the user confirms), does a two-phase atomic merge into \`tospec/specs/\` (dry-run + re-validate every target first, writes only if all pass), and moves the change directory — including \`sync-report.md\` when present — into \`tospec/changes/archive/\` under a \`yyyyMMdd_HHmmss-<name>\` timestamp the CLI generates itself.
35
+
36
+ **Reading the result**: the \`--json\` output is \`{archive, status}\`. Success → \`archive\` holds \`{change, archivedAs, path, specsUpdated}\`. Failure → \`archive\` is \`null\` and \`status[0].code\` tells you which ending you got: \`archive_validation_failed\` (fix artifacts, re-validate), \`archive_tasks_incomplete\` / \`archive_tasks_missing\` (ask the user, then rerun with \`--yes\` to override), \`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\` (the sync gate refused). Each status entry carries \`{code, message, fix}\` — follow \`fix\`.
35
37
 
36
38
  **Guardrails — explicit and non-negotiable**
37
39
  - Judge whether a sync is warranted before archiving; only ask the user when the change has spec deltas — and honor a "no" (archive still proceeds, just without \`--require-sync\`)
@@ -1 +1 @@
1
- {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sJA6CiI,CAAC;AAEvJ,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,4UAA4U;QACzV,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,oGAAoG;QACjH,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sJA+CiI,CAAC;AAEvJ,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,4UAA4U;QACzV,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,oGAAoG;QACjH,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"decision.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4ClE,wBAAgB,8BAA8B,IAAI,aAAa,CAe9D;AAED,wBAAgB,gCAAgC,IAAI,eAAe,CAYlE"}
1
+ {"version":3,"file":"decision.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8ClE,wBAAgB,8BAA8B,IAAI,aAAa,CAe9D;AAED,wBAAgB,gCAAgC,IAAI,eAAe,CAYlE"}
@@ -32,7 +32,9 @@ const DECISION_BODY = `Capture a decision that has already been made or is ready
32
32
 
33
33
  **Output**
34
34
 
35
- Summarize the decision, its status, and the follow-up work. If it supersedes an older decision, state which one and flip that older file's 狀態 to \`superseded\`.
35
+ Summarize the decision, its status, and the follow-up work. If it supersedes an older decision, state which one and flip that older file's 狀態 to \`superseded\`. Report the created filename explicitly — when a change later implements this decision, that filename is what \`tospec new change --decisions\` records to link the change back here (the file's optional \`## 關聯變更\` section can list those changes in return).
36
+
37
+ Then point at the next step: if the decision came out of grilling or exploring an **existing** change, hand off to \`tospec-update\` to fold it into that change's artifacts; if no change exists yet, hand off to \`tospec-propose\`/\`tospec-issue\` and carry the filename into \`--decisions\`.
36
38
 
37
39
  **Guardrails**
38
40
  - The decision file, its date-prefixed filename, and the ledger row are all CLI-generated — pass \`--summary\`, and never create/rename decision files or hand-edit \`index.md\` yourself; only edit the decision file's section contents
@@ -1 +1 @@
1
- {"version":3,"file":"decision.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AASA,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8MAwCwL,CAAC;AAE/M,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,mQAAmQ;QACrQ,YAAY,EAAE;;;;EAIhB,aAAa,EAAE;QACb,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,6FAA6F;QAC1G,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC;QACrC,OAAO,EAAE;;;;EAIX,aAAa,EAAE;KACd,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"decision.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AASA,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8MA0CwL,CAAC;AAE/M,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,mQAAmQ;QACrQ,YAAY,EAAE;;;;EAIhB,aAAa,EAAE;QACb,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,6FAA6F;QAC1G,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC;QACrC,OAAO,EAAE;;;;EAIX,aAAa,EAAE;KACd,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/explore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8DlE,wBAAgB,uBAAuB,IAAI,aAAa,CAcvD;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
1
+ {"version":3,"file":"explore.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/explore.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgElE,wBAAgB,uBAAuB,IAAI,aAAa,CAcvD;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
@@ -38,19 +38,21 @@ This is a grilling interview, not a freeform chat. Interview the user relentless
38
38
 
39
39
  Deliver the converged understanding back in the conversation — the problem, the decisions made (with reasoning), and anything explicitly ruled out — so \`tospec-propose\`/\`tospec-issue\` can synthesize it straight from context (that's exactly the input they expect).
40
40
 
41
- 7. **Recommend the next step — then hand off**
41
+ 7. **Always ask for the next step — never pick it yourself**
42
42
 
43
- Explore back-and-forth almost always settles decisions; judge whether any is *material* a choice between real alternatives that will shape the change and get re-litigated if left in chat (a material decision weighed alternatives and has lasting architecture/design impact; an answered factual lookup or a trivial preference does not). That judgment sets your recommendation.
43
+ Once you've restated the understanding, you MUST put the next step to the user with \`AskUserQuestion\`. This is unconditional: explore never proceeds to the next action on its own, and never ends without asking.
44
44
 
45
- Put the next step to the user with \`AskUserQuestion\` — one question, your recommended option **first** and labelled "(Recommended)", plus the real alternatives (including "keep exploring") so they can override:
46
- - **A material decision was settled but isn't recorded** -> recommend \`tospec-decision\`; record the ADR **before** any proposal.
47
- - **A new capability is ready to build** -> recommend \`tospec-propose\`.
48
- - **Something is broken** -> recommend \`tospec-issue\`.
49
- - **Still fuzzy** -> recommend keeping the exploration going.
45
+ One question, always these options, with your recommended one **first** and labelled "(Recommended)":
46
+ - **\`tospec-decision\`** — record a material decision as an ADR. Offer this only when the interview actually settled one: a choice between real alternatives with lasting architecture/design impact that will get re-litigated if left in chat. An answered factual lookup or a trivial preference is not material — drop this option when nothing material was settled.
47
+ - **\`tospec-propose\`** (or \`tospec-issue\` when something is broken) start writing the proposal.
48
+ - **\`tospec-grill\`** keep digging with a four-quadrant deep dive on what was just explored.
50
49
 
51
- \`tospec-propose\`/\`tospec-issue\` synthesize the requirement straight from the conversation and write the change artifacts; explore persists nothing itself. If the user picks \`tospec-decision\`, record it, then ask again now recommending \`tospec-propose\`/\`tospec-issue\` because a recorded decision still needs to flow into a change.
50
+ Recommend \`tospec-decision\` when a material decision is unrecorded (the ADR comes **before** the proposal), \`tospec-propose\`/\`tospec-issue\` when the requirement is ready to build, and \`tospec-grill\` when it still feels fuzzy or under-tested.
51
+
52
+ \`tospec-propose\`/\`tospec-issue\` synthesize the requirement straight from the conversation and write the change artifacts; explore persists nothing itself. If the user picks \`tospec-decision\`, record it, then ask again — now recommending \`tospec-propose\`/\`tospec-issue\` — because a recorded decision still needs to flow into a change. Carry the recorded decision filename(s) (reported by \`tospec decision new\`) into that handoff: the propose/issue step passes them via \`tospec new change --decisions\` so the change's metadata links back to its ADRs.
52
53
 
53
54
  **Guardrails**
55
+ - **Always end with the next-step question** — never choose the follow-up action yourself, and never finish explore without asking
54
56
  - **Don't implement** — never write application code or edit source files during explore
55
57
  - **Record decisions before proposing** — if the interview settled a material decision, hand off to \`tospec-decision\` to record it before \`tospec-propose\`/\`tospec-issue\`; a real decision must not survive only in chat
56
58
  - **Batch what's independent, sequence what's dependent** — ask unrelated questions together in one turn; split to one at a time only when A's answer decides B
@@ -1 +1 @@
1
- {"version":3,"file":"explore.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/explore.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yHA0DoG,CAAC;AAE1H,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,yQAAyQ;QACtR,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,sFAAsF;QACnG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"explore.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/explore.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yHA4DoG,CAAC;AAE1H,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,yQAAyQ;QACtR,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,sFAAsF;QACnG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"grill.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmClE,wBAAgB,qBAAqB,IAAI,aAAa,CAcrD;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
1
+ {"version":3,"file":"grill.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA0DlE,wBAAgB,qBAAqB,IAAI,aAAa,CAcrD;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
@@ -1,6 +1,17 @@
1
- const GRILL_BODY = `**IMPORTANT: Grill is read-only pressure-testing, not building.** You may read files, search code, and run \`tospec\` read-only commands, but you must NEVER write code, edit sources, or create artifact files during a grill. Grill persists nothing — it hands off to nothing. Its only output is a shared, confirmed understanding delivered back in the conversation.
1
+ const GRILL_BODY = `**IMPORTANT: Grill is read-only pressure-testing, not building.** You may read files, search code, and run \`tospec\` read-only commands, but you must NEVER write code, edit sources, or create artifact files during a grill. Grill writes nothing itself when the interrogation lands something worth persisting, it hands off to the skill that owns that write.
2
2
 
3
- This is a relentless interrogation of whatever the user put on the table — a plan, a decision, an idea, a design. Stress-test it until every assumption is named and every open question is either answered or explicitly parked. Work the four quadrants below, batching questions that stand on their own and following dependent threads one question at a time.
3
+ This is a relentless interrogation of whatever is on the table — a plan, a decision, an idea, a design. Stress-test it until every assumption is named and every open question is either answered or explicitly parked. Work the four quadrants below, batching questions that stand on their own and following dependent threads one question at a time.
4
+
5
+ **Pick the target first — never assume one**
6
+
7
+ Before asking a single question, establish *what* you are grilling. Resolve in this order:
8
+
9
+ 1. **The user named it** — an explicit target in the request wins outright; use it.
10
+ 2. **The conversation has an unambiguous subject** — an explore that just converged, or a proposal actively under discussion in this session. Only take this path when there is exactly one obvious candidate; a topic mentioned in passing does not count.
11
+ 3. **Otherwise, ask.** Run \`tospec list --json\` and offer the unfinished changes (\`status\` is not \`complete\`, most recently modified first) via \`AskUserQuestion\`, each labelled with its name, status, and how recently it changed. **Never pick one yourself** — not even the top hit, and not even when only one candidate exists.
12
+ 4. **Nothing to grill** — no explore in context and no unfinished changes: stop. Tell the user there is no subject available to dig into and suggest \`tospec-explore\` to start one. Do not invent a topic.
13
+
14
+ Note which kind of target you settled on — a raw idea/explore versus an existing written proposal. That distinction decides the handoff at the end.
4
15
 
5
16
  **The four quadrants**
6
17
 
@@ -22,21 +33,33 @@ Sweep all four — the last two are where the real risk hides:
22
33
 
23
34
  You're done only when you can fully restate the shared understanding — the claims that held up, the assumptions now made explicit, the questions answered, and anything left deliberately open — and the user confirms it's right. Running out of questions is not convergence. If the user corrects your restatement, there's still a hidden branch; keep grilling.
24
35
 
36
+ **Hand off once the understanding is confirmed**
37
+
38
+ A grill that shifts the picture leaves work behind. After the user confirms the restatement:
39
+
40
+ 1. **Record a material decision, if the grill produced one.** A choice between real alternatives with lasting architecture/design impact belongs in an ADR before anything else — hand off to \`tospec-decision\`. Skip this when nothing material moved; a confirmed assumption is not a decision.
41
+ 2. **Then route by target kind:**
42
+ - **Target was an existing written proposal** -> hand off to \`tospec-update\` to fold the outcome into that change's artifacts. Name the change so update doesn't have to re-ask.
43
+ - **Target was a raw idea or an explore** -> nothing is written yet; recommend \`tospec-propose\` (or \`tospec-issue\` when something is broken), or keep grilling if it's still fuzzy.
44
+
45
+ Grill itself writes nothing — \`tospec-decision\` and \`tospec-update\` own those files.
46
+
25
47
  **Guardrails**
26
48
  - **Don't implement** — never write application code, edit sources, or create artifact files during a grill
27
- - **Don't act before consensus** — take no action until the user has confirmed the restated understanding
49
+ - **Don't pick the target yourself** — when the subject isn't explicit or unambiguous, ask; when there's no subject at all, stop
50
+ - **Don't act before consensus** — take no action, including any handoff, until the user has confirmed the restated understanding
28
51
  - **Don't ask what you can look up** — codebase facts are yours to find, not the user's to recite
29
52
  - **Don't stop at the first plausible answer** — dig for the implied premise behind it
30
53
  - **Don't force closure** — if the user wants to keep grilling after you've restated where things stand, keep going
31
54
 
32
- Grill is on-demand deep-dive for *any* artifact — not the pre-change requirement convergence that \`tospec-explore\` owns, and it lands no files of its own.`;
55
+ Grill is on-demand deep-dive for *any* artifact — not the pre-change requirement convergence that \`tospec-explore\` owns and it lands no files of its own, only handoffs.`;
33
56
  export function getGrillSkillTemplate() {
34
57
  return {
35
58
  name: 'tospec-grill',
36
59
  description: "Pressure-test any artifact — a plan, a decision, an idea, a design — through a relentless four-quadrant Known/Unknown interrogation. Trigger whenever the user says 'grill', 'grill me', 'grilling', or 'grilling me', or otherwise wants to dig deeper, surface unspoken assumptions, and hunt blind spots before committing.",
37
60
  instructions: `Grill any artifact the user hands you — a plan, decision, idea, or design — through the four-quadrant Known/Unknown frame until every assumption is named and the understanding is shared and confirmed.
38
61
 
39
- **Input**: The user's request is whatever they want stress-tested — a plan file, a recorded decision, a raw idea, or a change name to interrogate in context of. May be empty, in which case ask what to grill.
62
+ **Input**: The user's request is whatever they want stress-tested — a plan file, a recorded decision, a raw idea, or a change name to interrogate in context of. May be empty, in which case resolve the target per "Pick the target first" below — never assume one.
40
63
 
41
64
  ${GRILL_BODY}`,
42
65
  license: 'MIT',
@@ -53,7 +76,7 @@ export function getTospecGrillCommandTemplate() {
53
76
  tags: ['workflow', 'grill'],
54
77
  content: `Grill any artifact the user hands you — a plan, decision, idea, or design — through the four-quadrant Known/Unknown frame until every assumption is named and the understanding is shared and confirmed.
55
78
 
56
- **Input**: The argument after \`tospec-grill\` is whatever the user wants stress-tested — a plan file, a recorded decision, a raw idea, or a change name to interrogate in context of. May be empty, in which case ask what to grill.
79
+ **Input**: The argument after \`tospec-grill\` is whatever the user wants stress-tested — a plan file, a recorded decision, a raw idea, or a change name to interrogate in context of. May be empty, in which case resolve the target per "Pick the target first" below — never assume one.
57
80
 
58
81
  ${GRILL_BODY}`,
59
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"grill.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6JA+B0I,CAAC;AAE9J,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,gUAAgU;QAC7U,YAAY,EAAE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AAU,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmDlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
1
+ {"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqDlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
@@ -8,6 +8,8 @@ const PROPOSE_BODY = `Do NOT re-interview the user — synthesize what's already
8
8
  \`\`\`
9
9
  Derive a kebab-case name from the request if none was given. This also **auto-generates the ticket stub** in the global index at \`tospec/tickets/<yyyyMMdd_HHmmss>-<name>.md\` (yaml header + a short Summary) — the CLI owns that timestamped filename, so **never create or rename ticket files yourself**.
10
10
 
11
+ If ADRs recorded via \`tospec-decision\` drove this change (e.g. from a preceding \`tospec-explore\`), link them at creation with \`--decisions "<decision-file>[,<decision-file>...]"\` — the filenames under \`tospec/decisions/\` that \`tospec decision new\` reported. This is what lets the archived change trace back to its decisions.
12
+
11
13
  2. **Get the artifact build order**
12
14
  \`\`\`bash
13
15
  tospec status --change "<name>" --json
@@ -24,7 +26,7 @@ const PROPOSE_BODY = `Do NOT re-interview the user — synthesize what's already
24
26
 
25
27
  Artifact-specific rules on top of what \`instructions\` returns:
26
28
  - **ticket** (already created): keep it thin — just refine the one-line \`## Summary\` so it names what this change does. All the detail (why, what, scope, decisions) lives in \`proposal.md\`, not here. Don't duplicate proposal content into the ticket, and don't add a timestamp or filename yourself.
27
- - **proposal**: the main document — Why (motivation, why now), What Changes (concrete add/modify/remove), Capabilities (New/Modified, each pointing at its \`specs/<name>/spec.md\`), Impact (affected code/API/deps/systems). **Never include file paths or code snippets** in the prose — they go stale fast. Exception: a snippet from an actual prototype that encodes a decision more precisely than prose (a state machine, a schema shape) — inline it, trimmed to the decision, and note it came from a prototype.
29
+ - **proposal**: the main document — Why (motivation, why now), What Changes (concrete add/modify/remove), Capabilities (New/Modified, each pointing at its \`specs/<name>/spec.md\`), Impact (affected code/API/deps/systems). If linked ADRs exist (\`--decisions\` above), name them in Why so a reader knows which recorded decisions this proposal builds on. **Never include file paths or code snippets** in the prose — they go stale fast. Exception: a snippet from an actual prototype that encodes a decision more precisely than prose (a state machine, a schema shape) — inline it, trimmed to the decision, and note it came from a prototype.
28
30
  - **design**: pick the testing seam before writing anything else — prefer an existing seam over a new one, the highest layer that still catches the behavior, and as few seams as possible (ideally one). State the seam explicitly in "Testing Seams" so \`tospec-apply\` knows exactly where to test.
29
31
  - **tasks**: cut the work into **tracer-bullet vertical slices** — each slice cuts a complete path through every layer touched (not "all the schema changes, then all the UI"), is independently demoable, and fits a single implementation pass. Every slice's implementation step is preceded by its own "write the failing test" step (red before green). A **wide mechanical refactor** (rename a shared symbol, retype a column) is the one exception to vertical slicing — sequence it as expand -> migrate-in-batches -> contract instead of forcing it into a tracer bullet.
30
32
 
@@ -1 +1 @@
1
- {"version":3,"file":"propose.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gIA+C2G,CAAC;AAEjI,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,kRAAkR;QAC/R,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,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EAAE;KACb,CAAC;AACJ,CAAC"}
@@ -86,9 +86,9 @@ ${UPDATE_BODY}`,
86
86
  export function getTospecUpdateCommandTemplate() {
87
87
  return {
88
88
  name: 'TOSPEC: Update',
89
- description: 'Update a change - revise existing planning artifacts and keep them coherent (Experimental)',
89
+ description: 'Update a change - revise existing planning artifacts and keep them coherent',
90
90
  category: 'Workflow',
91
- tags: ['workflow', 'artifacts', 'experimental'],
91
+ tags: ['workflow', 'artifacts'],
92
92
  content: `Revise a change's existing planning artifacts and keep them coherent. Never edit code.
93
93
 
94
94
  **Input**: Optionally specify a change name after \`tospec-update\` (e.g., \`tospec-update add-auth\`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/update.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oLAqEgK,CAAC;AAErL,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,oPAAoP;QACjQ,YAAY,EAAE;;;;EAIhB,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KAClF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,4FAA4F;QACzG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,cAAc,CAAC;QAC/C,OAAO,EAAE;;;;EAIX,WAAW,EAAE;KACZ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/update.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oLAqEgK,CAAC;AAErL,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,oPAAoP;QACjQ,YAAY,EAAE;;;;EAIhB,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAC9C,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KAClF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,6EAA6E;QAC1F,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;QAC/B,OAAO,EAAE;;;;EAIX,WAAW,EAAE;KACZ,CAAC;AACJ,CAAC"}
@@ -14,10 +14,6 @@ export declare class UpdateCommand {
14
14
  private readonly force;
15
15
  constructor(options?: UpdateCommandOptions);
16
16
  execute(projectPath: string): Promise<void>;
17
- /**
18
- * Display message when all tools are up to date.
19
- */
20
- private displayUpToDateMessage;
21
17
  /**
22
18
  * Display the update plan showing which tools need updating.
23
19
  */
@@ -31,11 +27,6 @@ export declare class UpdateCommand {
31
27
  * four-workflow core set. Keep custom profiles user-owned; do not mutate them.
32
28
  */
33
29
  private displayOldCoreCustomProfileNote;
34
- /**
35
- * Removes skill directories for workflows when delivery changed to commands-only.
36
- * Returns the number of directories removed.
37
- */
38
- private removeSkillDirs;
39
30
  /**
40
31
  * Removes skill directories for workflows that are no longer selected in the
41
32
  * active profile, from a tool's `skills/` dir (dirs named `tospec-<workflow>`).
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoCH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;gBAEpB,OAAO,GAAE,oBAAyB;IAIxC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+KjD;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAQ9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsBzB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAkBvC;;;OAGG;YACW,eAAe;IAqB7B;;;;OAIG;YACW,yBAAyB;CA0BxC"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmCH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;gBAEpB,OAAO,GAAE,oBAAyB;IAIxC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqKjD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsBzB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAkBvC;;;;OAIG;YACW,yBAAyB;CA0BxC"}