@printpractical/cruze 0.0.13 → 0.0.15

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 (308) hide show
  1. package/README.md +61 -118
  2. package/dist/adapters/inbound/cli/cli_context.js +0 -27
  3. package/dist/adapters/inbound/cli/commands/code.js +5 -18
  4. package/dist/adapters/inbound/cli/commands/documents.js +11 -37
  5. package/dist/adapters/inbound/cli/commands/init.js +1 -1
  6. package/dist/adapters/inbound/cli/commands/install.js +1 -0
  7. package/dist/adapters/inbound/cli/commands/review.js +2 -9
  8. package/dist/adapters/inbound/cli/commands/status.js +16 -63
  9. package/dist/adapters/inbound/cli/commands.js +10 -37
  10. package/dist/adapters/inbound/cli/parse_command.js +0 -54
  11. package/dist/adapters/outbound/git_repository.js +2 -71
  12. package/dist/app/ports/repository.js +0 -12
  13. package/dist/app/project_context.js +15 -25
  14. package/dist/app/use_cases/approve_document.js +29 -0
  15. package/dist/app/use_cases/check_code.js +21 -56
  16. package/dist/app/use_cases/install_skills.js +7 -1
  17. package/dist/app/use_cases/new_document.js +25 -0
  18. package/dist/app/use_cases/project_status.js +43 -67
  19. package/dist/app/use_cases/run_review.js +11 -30
  20. package/dist/app/use_cases/validate_project.js +8 -5
  21. package/dist/domain/approvals.js +51 -0
  22. package/dist/domain/check/check_source.js +3 -32
  23. package/dist/domain/check/imports.js +3 -3
  24. package/dist/domain/check/rust_imports.js +25 -3
  25. package/dist/domain/config.js +8 -84
  26. package/dist/domain/hashing.js +16 -30
  27. package/dist/domain/ids.js +13 -27
  28. package/dist/domain/next_step.js +41 -0
  29. package/dist/domain/project/features.js +71 -0
  30. package/dist/domain/project/layout.js +11 -27
  31. package/dist/domain/project/project_docs.js +48 -0
  32. package/dist/domain/project/release.js +30 -0
  33. package/dist/domain/scaffold.js +0 -1
  34. package/dist/domain/skill_budget.js +4 -4
  35. package/dist/domain/trace.js +8 -25
  36. package/dist/domain/validation/document_rules.js +65 -0
  37. package/dist/domain/validation/release_rules.js +45 -0
  38. package/dist/domain/validation/review_rules.js +21 -0
  39. package/dist/domain/validation/validate_project.js +20 -27
  40. package/dist/domain/versions/cruze_version.js +3 -9
  41. package/dist/main.js +1 -1
  42. package/package.json +1 -1
  43. package/skills/asking/SKILL.md +51 -0
  44. package/skills/behavioural-testing/SKILL.md +14 -16
  45. package/skills/behavioural-testing/examples.md +1 -2
  46. package/skills/behavioural-testing/fakes.md +2 -2
  47. package/skills/build/SKILL.md +34 -38
  48. package/skills/dependency-approval/SKILL.md +34 -31
  49. package/skills/envision/SKILL.md +23 -18
  50. package/skills/envision/architecture.md +16 -0
  51. package/skills/envision/breakdown.md +14 -0
  52. package/skills/envision/possibilities.md +6 -7
  53. package/skills/fix/SKILL.md +34 -0
  54. package/skills/formats/SKILL.md +39 -87
  55. package/skills/formats/config.md +47 -0
  56. package/skills/formats/templates/architecture.md +18 -74
  57. package/skills/formats/templates/feature.md +18 -34
  58. package/skills/formats/templates/vision.md +15 -27
  59. package/skills/hexagonal-design/SKILL.md +11 -11
  60. package/skills/hexagonal-design/contracts.md +3 -3
  61. package/skills/hexagonal-design/fundamentals.md +1 -1
  62. package/skills/hexagonal-design/languages/cpp.md +1 -1
  63. package/skills/hexagonal-design/languages/rust.md +1 -1
  64. package/skills/hexagonal-design/languages/swift.md +2 -2
  65. package/skills/hexagonal-design/runtime.md +2 -2
  66. package/skills/research/SKILL.md +4 -4
  67. package/skills/research/evaluation.md +1 -1
  68. package/skills/review/SKILL.md +27 -0
  69. package/skills/roles/SKILL.md +8 -59
  70. package/skills/roles/code-reviewer.md +22 -32
  71. package/skills/roles/researcher.md +3 -3
  72. package/skills/shape/SKILL.md +37 -0
  73. package/skills/shape/self-check.md +12 -0
  74. package/src/adapters/inbound/cli/cli_context.ts +0 -27
  75. package/src/adapters/inbound/cli/commands/code.ts +5 -18
  76. package/src/adapters/inbound/cli/commands/documents.ts +11 -37
  77. package/src/adapters/inbound/cli/commands/init.ts +1 -1
  78. package/src/adapters/inbound/cli/commands/install.ts +1 -0
  79. package/src/adapters/inbound/cli/commands/review.ts +2 -9
  80. package/src/adapters/inbound/cli/commands/status.ts +16 -63
  81. package/src/adapters/inbound/cli/commands.ts +10 -37
  82. package/src/adapters/inbound/cli/parse_command.ts +0 -54
  83. package/src/adapters/outbound/git_repository.ts +2 -71
  84. package/src/app/ports/repository.ts +0 -12
  85. package/src/app/project_context.ts +15 -25
  86. package/src/app/use_cases/approve_document.ts +29 -0
  87. package/src/app/use_cases/check_code.ts +21 -56
  88. package/src/app/use_cases/install_skills.ts +7 -1
  89. package/src/app/use_cases/new_document.ts +25 -0
  90. package/src/app/use_cases/project_status.ts +49 -73
  91. package/src/app/use_cases/run_review.ts +11 -30
  92. package/src/app/use_cases/validate_project.ts +8 -5
  93. package/src/domain/approvals.ts +51 -0
  94. package/src/domain/check/check_source.ts +3 -32
  95. package/src/domain/check/imports.ts +3 -3
  96. package/src/domain/check/rust_imports.ts +25 -3
  97. package/src/domain/config.ts +9 -85
  98. package/src/domain/hashing.ts +16 -30
  99. package/src/domain/ids.ts +13 -27
  100. package/src/domain/next_step.ts +41 -0
  101. package/src/domain/project/features.ts +71 -0
  102. package/src/domain/project/layout.ts +11 -27
  103. package/src/domain/project/project_docs.ts +48 -0
  104. package/src/domain/project/release.ts +30 -0
  105. package/src/domain/scaffold.ts +0 -1
  106. package/src/domain/skill_budget.ts +4 -4
  107. package/src/domain/trace.ts +8 -25
  108. package/src/domain/validation/document_rules.ts +65 -0
  109. package/src/domain/validation/release_rules.ts +45 -0
  110. package/src/domain/validation/review_rules.ts +21 -0
  111. package/src/domain/validation/validate_project.ts +21 -28
  112. package/src/domain/versions/cruze_version.ts +3 -9
  113. package/src/main.ts +1 -1
  114. package/templates/init/AGENTS.md +4 -12
  115. package/templates/init/ci.yml +3 -3
  116. package/templates/init/config.yaml +8 -17
  117. package/templates/init/review/claude.yaml +2 -2
  118. package/dist/adapters/inbound/cli/argument_files.js +0 -29
  119. package/dist/adapters/inbound/cli/commands/diff.js +0 -23
  120. package/dist/adapters/inbound/cli/commands/journal.js +0 -32
  121. package/dist/adapters/inbound/cli/commands/progress.js +0 -55
  122. package/dist/adapters/inbound/cli/commands/realign.js +0 -28
  123. package/dist/adapters/inbound/cli/commands/show.js +0 -96
  124. package/dist/app/use_cases/abandon_work.js +0 -42
  125. package/dist/app/use_cases/approve_artifact.js +0 -197
  126. package/dist/app/use_cases/journal_events.js +0 -64
  127. package/dist/app/use_cases/land_change.js +0 -134
  128. package/dist/app/use_cases/new_project_doc.js +0 -48
  129. package/dist/app/use_cases/new_work_item.js +0 -75
  130. package/dist/app/use_cases/realign_done.js +0 -45
  131. package/dist/app/use_cases/realign_status.js +0 -106
  132. package/dist/app/use_cases/record_progress.js +0 -118
  133. package/dist/app/use_cases/show_elements.js +0 -18
  134. package/dist/app/use_cases/show_notes.js +0 -11
  135. package/dist/app/use_cases/show_scope.js +0 -51
  136. package/dist/app/use_cases/upstream_diff.js +0 -55
  137. package/dist/domain/approvals/agent_approval.js +0 -68
  138. package/dist/domain/approvals/evaluate.js +0 -36
  139. package/dist/domain/approvals/fingerprint.js +0 -52
  140. package/dist/domain/approvals/rebase.js +0 -39
  141. package/dist/domain/approvals/records.js +0 -50
  142. package/dist/domain/approvals/upstream_text.js +0 -36
  143. package/dist/domain/architecture_sections.js +0 -23
  144. package/dist/domain/check/decision_comments.js +0 -38
  145. package/dist/domain/decision_citations.js +0 -62
  146. package/dist/domain/edits/agents_file.js +0 -58
  147. package/dist/domain/edits/managed_tables.js +0 -60
  148. package/dist/domain/edits/progress_block.js +0 -33
  149. package/dist/domain/edits/status_lines.js +0 -52
  150. package/dist/domain/elements.js +0 -126
  151. package/dist/domain/journal.js +0 -109
  152. package/dist/domain/land/bookkeeping.js +0 -54
  153. package/dist/domain/land/merge_plan.js +0 -137
  154. package/dist/domain/land/text_ops.js +0 -66
  155. package/dist/domain/line_diff.js +0 -56
  156. package/dist/domain/project/artifact_ref.js +0 -42
  157. package/dist/domain/project/deltas.js +0 -49
  158. package/dist/domain/project/element_lookup.js +0 -124
  159. package/dist/domain/project/living_model.js +0 -55
  160. package/dist/domain/project/new_items.js +0 -48
  161. package/dist/domain/project/notes.js +0 -74
  162. package/dist/domain/project/plan_parts.js +0 -111
  163. package/dist/domain/project/progress.js +0 -43
  164. package/dist/domain/project/project_view.js +0 -72
  165. package/dist/domain/project/roadmap.js +0 -43
  166. package/dist/domain/project/scope_view.js +0 -134
  167. package/dist/domain/project/work_items.js +0 -68
  168. package/dist/domain/status/next_step.js +0 -181
  169. package/dist/domain/status/pending_rethink.js +0 -22
  170. package/dist/domain/status/verification.js +0 -29
  171. package/dist/domain/status/work_status.js +0 -125
  172. package/dist/domain/validation/decision_rules.js +0 -76
  173. package/dist/domain/validation/delta_rules.js +0 -81
  174. package/dist/domain/validation/element_rules.js +0 -104
  175. package/dist/domain/validation/future_rules.js +0 -40
  176. package/dist/domain/validation/living_rules.js +0 -99
  177. package/dist/domain/validation/plan_rules.js +0 -124
  178. package/dist/domain/validation/project_rules.js +0 -115
  179. package/dist/domain/validation/size_rules.js +0 -45
  180. package/dist/domain/validation/vision_rules.js +0 -41
  181. package/dist/domain/validation/work_item_rules.js +0 -175
  182. package/dist/domain/versions/realign_notes.js +0 -72
  183. package/dist/domain/versions/rule_versions.js +0 -29
  184. package/dist/domain/versions/scheduled_exceptions.js +0 -41
  185. package/skills/about/SKILL.md +0 -21
  186. package/skills/architect/SKILL.md +0 -49
  187. package/skills/architect/feature.md +0 -40
  188. package/skills/architect/project.md +0 -71
  189. package/skills/architect/tweak.md +0 -22
  190. package/skills/architect/walkthrough.md +0 -35
  191. package/skills/domain-language/SKILL.md +0 -37
  192. package/skills/envision/feature.md +0 -25
  193. package/skills/envision/intake.md +0 -28
  194. package/skills/envision/project.md +0 -24
  195. package/skills/explore/SKILL.md +0 -39
  196. package/skills/formats/reference/architecture.md +0 -84
  197. package/skills/formats/reference/config.md +0 -80
  198. package/skills/formats/reference/durable-docs.md +0 -74
  199. package/skills/formats/reference/specs.md +0 -65
  200. package/skills/formats/reference/work-items.md +0 -100
  201. package/skills/formats/templates/adr.md +0 -7
  202. package/skills/formats/templates/change.md +0 -29
  203. package/skills/formats/templates/glossary.md +0 -8
  204. package/skills/formats/templates/roadmap.md +0 -32
  205. package/skills/formats/templates/spec.md +0 -11
  206. package/skills/formats/templates/standalone-change.md +0 -46
  207. package/skills/grilling/SKILL.md +0 -90
  208. package/skills/grilling/illustrating.md +0 -38
  209. package/skills/improve/SKILL.md +0 -51
  210. package/skills/land/SKILL.md +0 -48
  211. package/skills/next/SKILL.md +0 -31
  212. package/skills/plan/SKILL.md +0 -62
  213. package/skills/plan/tasks.md +0 -35
  214. package/skills/plan/test-plan.md +0 -14
  215. package/skills/realign/SKILL.md +0 -37
  216. package/skills/realign/notes/0.0.10.md +0 -131
  217. package/skills/realign/notes/0.0.11.md +0 -15
  218. package/skills/realign/notes/0.0.12.md +0 -31
  219. package/skills/realign/notes/0.0.13.md +0 -11
  220. package/skills/realign/notes/0.0.2.md +0 -69
  221. package/skills/realign/notes/0.0.3.md +0 -11
  222. package/skills/realign/notes/0.0.4.md +0 -27
  223. package/skills/realign/notes/0.0.5.md +0 -38
  224. package/skills/realign/notes/0.0.6.md +0 -44
  225. package/skills/realign/notes/0.0.7.md +0 -11
  226. package/skills/realign/notes/0.0.8.md +0 -97
  227. package/skills/realign/notes/0.0.9.md +0 -59
  228. package/skills/realign/notes.md +0 -40
  229. package/skills/rethink/SKILL.md +0 -62
  230. package/skills/rethink/levels.md +0 -54
  231. package/skills/roadmap/SKILL.md +0 -54
  232. package/skills/roles/auditor.md +0 -35
  233. package/skills/roles/design-reviewer.md +0 -43
  234. package/skills/roles/design-rubric.md +0 -41
  235. package/skills/roles/plan-rubric.md +0 -11
  236. package/skills/roles/surveyor.md +0 -41
  237. package/skills/roles/verifier.md +0 -42
  238. package/skills/triage/SKILL.md +0 -37
  239. package/skills/verify/SKILL.md +0 -45
  240. package/skills/verify/manual-test.md +0 -23
  241. package/src/adapters/inbound/cli/argument_files.ts +0 -29
  242. package/src/adapters/inbound/cli/commands/diff.ts +0 -23
  243. package/src/adapters/inbound/cli/commands/journal.ts +0 -32
  244. package/src/adapters/inbound/cli/commands/progress.ts +0 -55
  245. package/src/adapters/inbound/cli/commands/realign.ts +0 -28
  246. package/src/adapters/inbound/cli/commands/show.ts +0 -96
  247. package/src/app/use_cases/abandon_work.ts +0 -42
  248. package/src/app/use_cases/approve_artifact.ts +0 -197
  249. package/src/app/use_cases/journal_events.ts +0 -64
  250. package/src/app/use_cases/land_change.ts +0 -134
  251. package/src/app/use_cases/new_project_doc.ts +0 -48
  252. package/src/app/use_cases/new_work_item.ts +0 -75
  253. package/src/app/use_cases/realign_done.ts +0 -45
  254. package/src/app/use_cases/realign_status.ts +0 -106
  255. package/src/app/use_cases/record_progress.ts +0 -118
  256. package/src/app/use_cases/show_elements.ts +0 -18
  257. package/src/app/use_cases/show_notes.ts +0 -11
  258. package/src/app/use_cases/show_scope.ts +0 -51
  259. package/src/app/use_cases/upstream_diff.ts +0 -55
  260. package/src/domain/approvals/agent_approval.ts +0 -68
  261. package/src/domain/approvals/evaluate.ts +0 -36
  262. package/src/domain/approvals/fingerprint.ts +0 -52
  263. package/src/domain/approvals/rebase.ts +0 -39
  264. package/src/domain/approvals/records.ts +0 -50
  265. package/src/domain/approvals/upstream_text.ts +0 -36
  266. package/src/domain/architecture_sections.ts +0 -23
  267. package/src/domain/check/decision_comments.ts +0 -38
  268. package/src/domain/decision_citations.ts +0 -62
  269. package/src/domain/edits/agents_file.ts +0 -58
  270. package/src/domain/edits/managed_tables.ts +0 -60
  271. package/src/domain/edits/progress_block.ts +0 -33
  272. package/src/domain/edits/status_lines.ts +0 -52
  273. package/src/domain/elements.ts +0 -126
  274. package/src/domain/journal.ts +0 -109
  275. package/src/domain/land/bookkeeping.ts +0 -54
  276. package/src/domain/land/merge_plan.ts +0 -137
  277. package/src/domain/land/text_ops.ts +0 -66
  278. package/src/domain/line_diff.ts +0 -56
  279. package/src/domain/project/artifact_ref.ts +0 -42
  280. package/src/domain/project/deltas.ts +0 -49
  281. package/src/domain/project/element_lookup.ts +0 -124
  282. package/src/domain/project/living_model.ts +0 -55
  283. package/src/domain/project/new_items.ts +0 -48
  284. package/src/domain/project/notes.ts +0 -74
  285. package/src/domain/project/plan_parts.ts +0 -111
  286. package/src/domain/project/progress.ts +0 -43
  287. package/src/domain/project/project_view.ts +0 -72
  288. package/src/domain/project/roadmap.ts +0 -43
  289. package/src/domain/project/scope_view.ts +0 -134
  290. package/src/domain/project/work_items.ts +0 -68
  291. package/src/domain/status/next_step.ts +0 -181
  292. package/src/domain/status/pending_rethink.ts +0 -22
  293. package/src/domain/status/verification.ts +0 -29
  294. package/src/domain/status/work_status.ts +0 -125
  295. package/src/domain/validation/decision_rules.ts +0 -76
  296. package/src/domain/validation/delta_rules.ts +0 -81
  297. package/src/domain/validation/element_rules.ts +0 -104
  298. package/src/domain/validation/future_rules.ts +0 -40
  299. package/src/domain/validation/living_rules.ts +0 -99
  300. package/src/domain/validation/plan_rules.ts +0 -124
  301. package/src/domain/validation/project_rules.ts +0 -115
  302. package/src/domain/validation/size_rules.ts +0 -45
  303. package/src/domain/validation/vision_rules.ts +0 -41
  304. package/src/domain/validation/work_item_rules.ts +0 -175
  305. package/src/domain/versions/realign_notes.ts +0 -72
  306. package/src/domain/versions/rule_versions.ts +0 -29
  307. package/src/domain/versions/scheduled_exceptions.ts +0 -41
  308. package/templates/init/gitattributes +0 -2
@@ -1,74 +0,0 @@
1
- # Vision, glossary, ADR and roadmap formats
2
-
3
- Templates: [../templates/vision.md](../templates/vision.md), [../templates/glossary.md](../templates/glossary.md), [../templates/adr.md](../templates/adr.md) and [../templates/roadmap.md](../templates/roadmap.md).
4
-
5
- ## docs/vision.md
6
-
7
- What the product is for, and the intent every design answers to, for the product's whole life. Problem through Constraints fit on one page. The Principles and Must stay possible tables don't count against it: each row holds as much as its intent needs, and `Leave room for` keeps every need, one clause each, so no step has to guess what was meant.
8
-
9
- | Section | Holds |
10
- | --- | --- |
11
- | `## Problem` | The problem, in the user's words, in one short paragraph |
12
- | `## Users` | Who uses it and in what situation, one bullet each |
13
- | `## Goals` | Table of ID, Goal and Measure. Each goal is a row element with a `GOAL-<name>` ID, and its measure says how you would know it's met |
14
- | `## Non-goals` | What the product deliberately doesn't do, one bullet each with the reason |
15
- | `## Constraints` | Platforms, languages, dependencies, performance, security and legal limits, one bullet each |
16
- | `## Principles` | Table of ID, Principle and Why. Each is a row element with a `PRINCIPLE-<name>` ID: a rule every design follows, such as "state is the truth; events are hints". A design that departs from one amends it here first |
17
- | `## Must stay possible` | Table of ID, Capability, Likelihood, Why and Leave room for. Each is a row element with a `LATER-<name>` ID: a capability the product may need after this release. Likelihood is `likely` or `possible`. Leave room for says what no design may close off, never how to build it. A design that keeps a seam open for one cites it in a `Future` fact |
18
- | `## Feature map` | Managed. `### Implemented` is a table of Feature, Release and Summary. `### Future` is a table of Feature, Summary and Goals |
19
-
20
- - Principles and capabilities that must stay possible live here, not in a feature's settled decisions, which are archived when the feature lands. A project with none writes `None.` under the heading.
21
- - Feature-map entries are named by slug, such as `jump-hosts`. A future entry gets a folder ID only when its feature starts.
22
- - Only the CLI writes the feature map. `cruze features add` puts an entry on the future list, `cruze features update` corrects an entry's summary on either list, `cruze features drop` removes one from the future list, and `land` moves a finished feature to implemented, tagged with the release in progress.
23
-
24
- ## docs/glossary.md
25
-
26
- The shared language, with no implementation detail. Anyone may add a term the moment it settles. The glossary is not approval-gated.
27
-
28
- ```markdown
29
- ## Console access
30
-
31
- **Hop**: One link in the chain from the user to a device console: an SSH connection or a serial line.
32
- _Avoid_: jump, leg
33
-
34
- **Console path**: The ordered hops that reach one device's console.
35
- _Avoid_: route, connection string
36
- ```
37
-
38
- - Group terms under a `##` heading per bounded context, alphabetically within each group.
39
- - A definition is one or two sentences, in terms a domain expert would accept.
40
- - `_Avoid_:` lists synonyms to stop using, so code, docs and conversation converge on one word.
41
- - A term used in docs or code but missing here is a signal. Either the term is new and belongs here, or someone is inventing language.
42
-
43
- ## docs/adr/<date>-<slug>.md
44
-
45
- Write one only when a decision is hard to reverse, would surprise a newcomer, and was a real trade-off. Everything else is a settled decision: in a feature or change, or at project scope in the architecture's `## Decisions`.
46
-
47
- ```markdown
48
- # Console paths are ordered hop chains
49
-
50
- - Status: accepted
51
- - Date: 2026-09-24
52
- - Elements: ENT-inventory.console-path, PORT-access.hop-connector
53
-
54
- <One paragraph: the context, the decision, why it won, and the alternatives rejected.>
55
- ```
56
-
57
- - The ID is `ADR-<file stem>`, such as `ADR-2026-09-24-hop-chains`.
58
- - `Status` is `accepted` or `superseded by ADR-<stem>`. A superseded ADR stays; the new ADR says what changed.
59
- - Review never re-raises a decision covered by an accepted ADR without new evidence. Proposing to contradict one must name it: "Contradicts ADR-<stem>, worth reopening because…".
60
-
61
- ## docs/roadmap.md
62
-
63
- The current release, as an index. It changes only when a feature or standalone change starts, finishes or is reordered.
64
-
65
- | Section | Holds |
66
- | --- | --- |
67
- | `## Release` | The release name and one sentence on what it delivers |
68
- | `## Phases` | One `### Phase <n>: <name>` per phase, each a table of Item (slug), Kind (`feature` or `change`), Goals and Blocked by |
69
- | `## Coverage` | Table of Goal and the items that serve it. Every goal in scope has at least one item |
70
- | `## Status` | Managed: each started item's folder ID and state (`designing`, `building` or `landed`). `cruze new` adds the row and `cruze land` updates it |
71
-
72
- - Items are named by slug. The first item of a new project is the `foundation` standalone change, of the kind the user chose at architect.
73
- - `Blocked by` lists slugs that must land first. The blocking graph has no cycles.
74
- - A new release replaces `## Release` and `## Phases`. Landed items leave the roadmap once the release closes; the feature map in the vision keeps the record.
@@ -1,65 +0,0 @@
1
- # Specs format
2
-
3
- `docs/specs/<capability>.md` holds the living behaviour of one capability, meaning what the system does as seen from outside. Requirements say what must hold. Scenarios are worked examples that become behaviour tests. Nothing in a spec names classes, files or libraries; those belong in the architecture.
4
-
5
- Template: [../templates/spec.md](../templates/spec.md).
6
-
7
- ## Spec file
8
-
9
- ```markdown
10
- # Console access
11
-
12
- Opening consoles on configured devices and running commands on them.
13
-
14
- ## REQ-access.open-console: Open a device console
15
- The CLI SHALL connect the user's terminal to the console of a configured device, through every hop of its console path, and restore the terminal when the session ends.
16
-
17
- ### SCN-access.direct-serial: Console on a local serial port
18
- - GIVEN device `lab-router` has console path `serial /dev/ttyUSB0 115200`
19
- - WHEN the user runs `consolectl open lab-router`
20
- - THEN the terminal shows the device's console output within 2 seconds
21
- - AND pressing `Ctrl-]` then `q` closes the session and restores the terminal
22
- ```
23
-
24
- - The file name is the capability, and the capability is the scope of every ID in it.
25
- - One `#` title, then a purpose paragraph of one to three sentences.
26
- - Each requirement is a `##` heading element, `REQ-<capability>.<name>: <Title>`. Its body states the requirement in one to three sentences containing `SHALL` or `MUST`. Use `SHALL NOT` or `MUST NOT` for behaviour that must never happen.
27
- - Each scenario is a `###` heading element under its requirement, `SCN-<capability>.<name>: <Title>`. A requirement has at least one.
28
-
29
- ## Scenario grammar
30
-
31
- - Bullets in order: zero or more `GIVEN`, one `WHEN`, one or more `THEN`. `AND` continues the clause above it.
32
- - Use concrete values: names, inputs, outputs, limits and times. The expected values are the test's oracle, worked out by hand. They are never copied from running the code.
33
- - One behaviour per scenario. Failure behaviour gets its own scenario, including what state is left behind.
34
- - The CLI adds a managed `- Status:` item. A scenario is `built` once a landed change delivered it with a passing test that names its ID.
35
-
36
- ## Spec delta
37
-
38
- A feature, or a standalone change, proposes behaviour changes in its `## Spec delta` section. Operation headings sit at `###` and scenarios at `####`:
39
-
40
- ```markdown
41
- ### ADDED CAPABILITY inventory: Device inventory
42
- Reading and validating the configured devices and their console paths.
43
-
44
- ### ADDED REQ-access.jump-host-chain: Connect through jump hosts
45
- The CLI SHALL reach a device's console through every SSH hop in its console path, in order.
46
-
47
- #### SCN-access.serial-behind-jump-host: Serial console on a jump host
48
- - GIVEN ...
49
-
50
- ### MODIFIED REQ-access.open-console: Open a device console
51
- The full new requirement text.
52
-
53
- #### SCN-access.direct-serial: Console on a local serial port
54
- - ...every scenario the requirement keeps, in full
55
-
56
- ### REMOVED REQ-access.telnet: Telnet consoles
57
- - Reason: telnet support was dropped
58
- - Migration: configure an SSH hop to a terminal server instead
59
- ```
60
-
61
- - `ADDED CAPABILITY` creates a new spec file, with its title and purpose paragraph. It is only needed for a capability that has no file yet.
62
- - `ADDED` introduces a new requirement with all its scenarios.
63
- - `MODIFIED` replaces a requirement's whole block, including every scenario it keeps. A scenario left out is removed, so no part of the work may cite it by ID (`cites-dropped`); describe it in words.
64
- - `REMOVED` retires a requirement and its scenarios, and needs a `Reason` and a `Migration`.
65
- - `land` shifts heading levels to fit the spec file and keeps the managed status of scenarios that were already built.
@@ -1,100 +0,0 @@
1
- # Feature and change format
2
-
3
- Work in progress lives in `.cruze/`. A **feature** carries the design: its intent, its deltas and the ordered list of its changes. A **change** is one buildable slice: its scope, its test plan and its tasks. A small tweak is a **standalone change** that carries its own deltas. When work lands it is archived, and its deltas become part of the living docs.
4
-
5
- Templates: [../templates/feature.md](../templates/feature.md), [../templates/change.md](../templates/change.md) and [../templates/standalone-change.md](../templates/standalone-change.md).
6
-
7
- ## IDs and folders
8
-
9
- - Features and standalone changes get an ID from `cruze new`: the creation date plus a slug, such as `2026-09-25-jump-hosts`. The CLI adds `-2` on a same-day clash.
10
- - A feature's changes are numbered inside the feature, as in `01-ssh-hop` and `02-serial-behind-hop`. The full reference is `<feature id>/<change>`.
11
- - Frontmatter holds `id`, `title` and, for features, `roadmap` (the roadmap item slug). A retry of an abandoned or superseded item adds `supersedes: <old id>`.
12
-
13
- ## feature.md
14
-
15
- | Section | Holds |
16
- | --- | --- |
17
- | `## Intent` | The problem and outcome in the user's words, who it is for, constraints, and what is out of scope |
18
- | `## Settled decisions` | Decisions the user confirmed, one bullet each as `D<n>: <decision> (<reason>)`, including overrides of Cruze's advice |
19
- | `## Adopt or build` | Table of components that aren't domain logic, as Component, Decision (`adopt` or `build`), Choice and Reason |
20
- | `## Spec delta` | See [specs.md](specs.md) |
21
- | `## Architecture delta` | See [architecture.md](architecture.md) |
22
- | `## Changes` | Table of the ordered changes, as Change, Delivers, Builds, Removes (optional) and Depends on |
23
- | `## Progress` | Managed: state of each change, landed commits and the deviation log |
24
-
25
- ## change.md
26
-
27
- | Section | Holds |
28
- | --- | --- |
29
- | `## Scope` | `- Delivers:` scenario and requirement IDs, `- Builds:` architecture IDs, `- Removes:` IDs retired by this change |
30
- | `## Test plan` | Table of Subject, Seam, Test file and Kind, one row per delivered scenario and per contract-tested port |
31
- | `## Tasks` | One task line per task, in build order |
32
- | `## Settled decisions` | Decisions made while planning this change, same format as the feature |
33
- | `## Risks` | What could break and the riskiest task, when there are any |
34
- | `## Progress` | Managed: ticked tasks with their commits, deviations and the bound branch |
35
-
36
- A standalone change adds `## Intent`, `## Adopt or build`, `## Spec delta` and `## Architecture delta` before its `## Scope`, in the same format as a feature's. Its scope covers every ID in its own deltas, plus any `planned` elements from the living docs that it builds.
37
-
38
- A feature is designed in two steps. Feature-scope `envision` writes the intent, settled decisions and spec delta, and leaves `## Architecture delta` as `None.` and the Changes table empty. `architect` writes the architecture delta and the changes. Until the Changes table has a row, `cruze validate` reports the feature as `not-designed` (a warning), skips the coverage rules, and `cruze approve` refuses it. A feature of more than 6 changes gets a `feature-size` warning: split it, because one design review can't hold it. A change outside the size band in `changes:` of `.cruze/config.yaml` gets `change-too-small` (it builds fewer than 3 elements, in a feature of several changes) or `change-too-large` (it delivers more than 30 scenarios), and a plan of more than 25 tasks gets `plan-too-large`. `cruze approve` refuses an item with one of these warnings standing (`size-unaccepted`) until the work is split or the user's acceptance is listed under `changes.exceptions`.
39
-
40
- `architect` writes a standalone change's design sections and its scope, and leaves the test plan table empty and the tasks section blank. Until `plan` fills them, `cruze validate` reports the change as `not-planned` (a warning), skips the task and test plan rules, and `cruze approve` refuses it.
41
-
42
- ## Scope rules
43
-
44
- These rules close the gap between a design and what gets built. `cruze validate` checks them.
45
-
46
- - Every ID in a feature's deltas appears in the scope of exactly one of its changes. For a standalone change, that is its own scope. A `MODIFIED` or `REMOVED` requirement is covered by its ID or by one of its scenarios.
47
- - A scope may also name elements already in the living docs with status `planned`, such as the foundation change that builds elements the project architecture defined. An element with no status yet counts as planned: it appears only while the architecture has never been approved, so project-scope architect can write the foundation before that first approval.
48
- - The first change of a feature to land merges the feature's whole delta, so the living docs never cite something a later change hasn't merged yet. What this change delivers or builds becomes `built`. Everything else arrives as `planned`, including a `MODIFIED` element whose new text isn't built yet. Each later change flips what it builds to `built`.
49
- - A `REMOVED` operation applies when the change whose scope lists it under `Removes` lands.
50
- - Under a `MODIFIED` requirement, a scenario must be in some change's scope when it is new or its text changed. An unchanged scenario the requirement keeps needs no change.
51
- - If someone else edits an element after this feature merged it, their edit stands: while the feature's delta entry for that element is unchanged, later lands keep the living text, and approving the feature needs no rebase. When the feature's delta changes that element again, `cruze approve` refuses with `rebase-required` and `cruze land` with a conflict, rather than overwrite the edit. Resolve it with `rethink`.
52
- - The `Changes` table and each change's `Scope` agree. `plan` copies the row into the change and refines it; a disagreement is a validation error.
53
-
54
- ## Test plan
55
-
56
- | Kind | Subject | Seam |
57
- | --- | --- | --- |
58
- | `behaviour` | a `SCN` ID | the use case it runs through, with a fake named for each driven port; or the inbound adapter, when the outcome is what that adapter shows, such as CLI output and exit codes |
59
- | `contract` | a `PORT` ID | the port, run against its fake and each real adapter |
60
- | `domain` | an `ENT` ID | the entity's own API, only for rules with real logic |
61
- | `smoke` | a `FLOW` ID | the real inbound adapter, end to end |
62
-
63
- Every delivered scenario has at least one `behaviour` row, and every port that a built adapter `Implements` has a `contract` row. The test file path is where the test will live. The subject ID appears in the test's name, or in a comment on the line directly above it when the language's names can't hold an ID. That is how `cruze trace` finds it.
64
-
65
- ## Task lines
66
-
67
- ```markdown
68
- - T1: `HopConnector` port in `src/access/app/ports/hop_connector.rs`, proves PORT-access.hop-connector
69
- - T2: `SshConnector` in `src/access/adapters/ssh_connector.rs`, proves PORT-access.hop-connector, SCN-access.ssh-through-jump-host
70
- ```
71
-
72
- - Grammar: `- T<n>: <owner> in <path>[, <path>], proves <ID>[, <ID>]`. Owner and paths are in backticks.
73
- - One owner per task, and every path names a file the architecture assigns to that owner. Test support that no element owns, such as a shared fake, names its test file instead.
74
- - Every scenario the change delivers is proved by at least one task, and so is every `Builds` element. The exception is a `MOD`, which is proved by any task with a path inside the module's `Path`.
75
- - Tasks are design, not progress. Their checkboxes live in `## Progress`.
76
-
77
- ## Progress
78
-
79
- The managed block the CLI maintains. `cruze approve` binds a change to the current branch, `cruze task done` ticks a task with its commit, `cruze task reopen` unticks one a rethink changed, `cruze task deviation` records a deviation, and `cruze land` records the date and the last commit of the change's work:
80
-
81
- ```markdown
82
- <!-- cruze:managed -->
83
- ## Progress
84
- - Branch: jump-hosts-ssh
85
- - [x] T1 (a1b2c3d)
86
- - [ ] T2
87
- - Deviation T1: moved `HopError` into `hop_connector.rs`; same owner, same module
88
- <!-- /cruze:managed -->
89
- ```
90
-
91
- A deviation line records a task-level choice the agent made on its own. Anything larger goes through `rethink`.
92
-
93
- ## Other files in a change folder
94
-
95
- - `manual-test.md`, written by `verify`: numbered steps a person runs against the real system, one section per delivered scenario, each with its expected result.
96
- - `approvals.json` and `journal.jsonl`, written only by the CLI.
97
-
98
- ## Verification
99
-
100
- A change lands only after the user accepts it at `verify`, which records `cruze journal add verification --set result=accepted --set summary=<text> --item <ref>`. A later approval of the change keeps that acceptance only when the change's own design is unchanged. `cruze land --override <reason>` lands without it, and journals the reason.
@@ -1,7 +0,0 @@
1
- # <Decision, stated as a fact>
2
-
3
- - Status: accepted
4
- - Date: {{date}}
5
- - Elements: <IDs of the architecture elements this decision shapes>
6
-
7
- <One paragraph: the context that forced a decision, the decision, why it won, and the alternatives rejected.>
@@ -1,29 +0,0 @@
1
- ---
2
- id: {{id}}
3
- title: {{title_quoted}}
4
- ---
5
-
6
- # Change: {{title}}
7
-
8
- ## Scope
9
-
10
- - Delivers: <SCN and REQ IDs>
11
- - Builds: <architecture element IDs>
12
-
13
- ## Test plan
14
-
15
- | Subject | Seam | Test file | Kind |
16
- | --- | --- | --- | --- |
17
- | <SCN ID> | <UC ID> with fake <PORT IDs> | `<path>` | behaviour |
18
-
19
- ## Tasks
20
-
21
- - T1: `<owner>` in `<path>`, proves <IDs>
22
-
23
- ## Settled decisions
24
-
25
- - D1: <decision> (<reason>)
26
-
27
- <!-- cruze:managed -->
28
- ## Progress
29
- <!-- /cruze:managed -->
@@ -1,8 +0,0 @@
1
- # Glossary
2
-
3
- The shared language of {{project_name}}. Terms are grouped by bounded context, alphabetically within each group. Add a term the moment it settles.
4
-
5
- ## <Context name>
6
-
7
- **<Term>**: <One or two sentences a domain expert would accept.>
8
- _Avoid_: <synonyms to stop using>
@@ -1,32 +0,0 @@
1
- # Roadmap
2
-
3
- ## Release
4
-
5
- <Release name>: <one sentence on what the release delivers.>
6
-
7
- ## Phases
8
-
9
- ### Phase 1: Foundation
10
-
11
- | Item | Kind | Goals | Blocked by |
12
- | --- | --- | --- | --- |
13
- | foundation | change | <GOAL IDs> | |
14
-
15
- ### Phase 2: <name>
16
-
17
- | Item | Kind | Goals | Blocked by |
18
- | --- | --- | --- | --- |
19
- | <slug> | feature | <GOAL IDs> | foundation |
20
-
21
- ## Coverage
22
-
23
- | Goal | Items |
24
- | --- | --- |
25
- | GOAL-<name> | <slugs> |
26
-
27
- <!-- cruze:managed -->
28
- ## Status
29
-
30
- | Item | ID | State |
31
- | --- | --- | --- |
32
- <!-- /cruze:managed -->
@@ -1,11 +0,0 @@
1
- # <Capability title>
2
-
3
- <What this capability does, seen from outside, in one to three sentences.>
4
-
5
- ## REQ-<capability>.<name>: <Requirement title>
6
- <The requirement in one to three sentences using SHALL or MUST.>
7
-
8
- ### SCN-<capability>.<name>: <Scenario title>
9
- - GIVEN <starting state, with concrete values>
10
- - WHEN <the one action>
11
- - THEN <observable outcome, with concrete values>
@@ -1,46 +0,0 @@
1
- ---
2
- id: {{id}}
3
- title: {{title_quoted}}
4
- roadmap: <roadmap item slug, when the change is on the roadmap>
5
- ---
6
-
7
- # Change: {{title}}
8
-
9
- ## Intent
10
-
11
- <Why this change, in the user's words, and what it deliberately leaves out.>
12
-
13
- ## Adopt or build
14
-
15
- | Component | Decision | Choice | Reason |
16
- | --- | --- | --- | --- |
17
-
18
- ## Spec delta
19
-
20
- ### MODIFIED REQ-<capability>.<name>: <Requirement title>
21
- <The full new requirement, with every scenario it keeps.>
22
-
23
- ## Architecture delta
24
-
25
- None.
26
-
27
- ## Scope
28
-
29
- - Delivers: <SCN and REQ IDs from the spec delta>
30
- - Builds: <architecture IDs from the delta, and planned elements this change builds>
31
-
32
- ## Test plan
33
-
34
- | Subject | Seam | Test file | Kind |
35
- | --- | --- | --- | --- |
36
-
37
- ## Tasks
38
-
39
-
40
- ## Settled decisions
41
-
42
- - D1: <decision> (<reason>)
43
-
44
- <!-- cruze:managed -->
45
- ## Progress
46
- <!-- /cruze:managed -->
@@ -1,90 +0,0 @@
1
- ---
2
- name: cruze-grilling
3
- description: How to interview the user until design decisions are settled. Questions go in rounds over a tree of decisions, facts are looked up rather than asked, each question carries a recommendation and shows what each option looks like, and challenges the user overrides are recorded. Use when a design step needs decisions from the user, when shaping an idea, vision, feature, architecture or plan with them, when the user steers toward something that breaks a rule, or when the user asks to be grilled or to stress-test a plan, and when showing the user review findings or a design to decide on.
4
- ---
5
-
6
- # Grilling
7
-
8
- Interview the user until you both understand the design the same way. Decisions are the user's. Facts are yours to find.
9
-
10
- ## Running the interview
11
-
12
- 1. List the open decisions this step must settle, as a tree in which each decision hangs off the ones it depends on. Take them from the sections of the document the step writes and from what the user has already said. Done when every section the step writes has its decisions listed.
13
- 2. Settle the facts yourself. Anything the repository, the living docs, a `cruze` command or a primary source can answer is a fact, so look it up rather than asking. Where the agent can run a helper in parallel, send it to look while you ask about everything that doesn't depend on the answer.
14
- 3. Find the frontier: every open decision whose prerequisites are settled. A question that depends on another open question waits for a later round.
15
- 4. Ask the frontier as one round, in the format below. Every question shows what each option looks like and carries your recommended answer and the reason for it. Read [illustrating.md](illustrating.md) before the first round.
16
- 5. Wait for the answers. Record each settled decision as described under Recording, then recompute the frontier.
17
- 6. Repeat until the frontier is empty: every branch visited, and nothing silently assumed.
18
- 7. Write the sections the step produces from the settled decisions, then summarize them, illustrated as [illustrating.md](illustrating.md) says, and ask the user to confirm that they match their understanding. Done when the user confirms. Decisions and glossary terms are recorded as they settle, and nothing is approved before the confirmation.
19
-
20
- ## A round
21
-
22
- ````markdown
23
- Where we are: architect for 2026-09-25-open-console, round 2. Settled: a console session may cross jump hosts, and credentials come from the vault.
24
-
25
- **Q4. Where the jump-host list lives**
26
- Per device in the device config, or as named hosts that devices reference. Named hosts avoid repeating a host's address and credentials across devices, but add a second lookup.
27
-
28
- ```yaml
29
- # A: per device # B: named hosts (recommended)
30
- devices: jump_hosts:
31
- core-sw-01: lab-gw: { address: 10.0.0.5 }
32
- jump: { address: 10.0.0.5 } devices:
33
- core-sw-02: core-sw-01: { jump: lab-gw }
34
- jump: { address: 10.0.0.5 } core-sw-02: { jump: lab-gw }
35
- ```
36
-
37
- Recommended: named hosts, because the lab config already shares two jump hosts across 30 devices.
38
-
39
- **Q5. What a refused second hop reports**
40
- ...
41
- ````
42
-
43
- - Number questions across the whole session, not per round, so an answer such as "Q7: yes" is never ambiguous.
44
- - Keep a round to what the user can answer in one reply, about 3 to 5 questions. When the frontier is bigger, ask first the questions that others depend on.
45
- - Ask about behaviour and trade-offs in the user's terms and the glossary's words, not about implementation mechanics. Where the trade-off is in the code's shape, show the shape.
46
- - When the user answers "you decide" or "I don't know", take your recommendation and record it with "(recommended; the user deferred)".
47
- - When an answer contradicts an earlier decision, point to that decision and ask which one stands.
48
- - When the user doubts part of the design, calling it rigid, heavy or messy, one option removes or shrinks it, with what that costs. One user called a status shape rigid, was offered more of it, and stopped a build over its unused fields a day later.
49
- - When making one answer hold needs new types, rules or error cases, and those need fixes of their own, stop before the next round. Show what the answer has grown beside the simplest alternative that meets the user's need, and let the user choose. One rethink grew four types over eleven questions before a review found five blockers in them; the alternative was 40% smaller.
50
-
51
- ## What to ask and what to decide
52
-
53
- Ask the user when a choice affects any of these:
54
-
55
- - Scope: what is in and what is out.
56
- - A public contract, including the errors a caller sees.
57
- - The architecture: contexts, ports, dependency direction and the module map.
58
- - A dependency, always, through `.agents/skills/cruze-dependency-approval/SKILL.md`.
59
- - Security, privacy or compliance.
60
- - Compatibility, stored data or migration.
61
- - A commitment that is costly or hard to reverse.
62
-
63
- Decide yourself anything local and reversible, such as private names, file-local structure, internal representation and equivalent idioms. Pick the conventional option without asking. Uncertainty alone doesn't make a choice the user's: investigate first, and ask only when the evidence leaves two materially different valid outcomes.
64
-
65
- ## Challenge, then defer
66
-
67
- When the user steers toward something that breaks a principle, an accepted ADR or a Cruze knowledge skill:
68
-
69
- 1. Name the rule, the concrete risk in this project and a recommended alternative, once. For example: "I'd push back on reading the config inside the SSH adapter. cruze-hexagonal-design keeps adapters from calling other adapters, and here the SSH adapter would silently depend on the file format. I recommend passing the resolved hop into the adapter. Your call."
70
- 2. The user decides, and their decision stands.
71
- 3. Record the override. It becomes an ADR when it passes the ADR test in `.agents/skills/cruze-formats/reference/durable-docs.md`; otherwise it becomes a settled decision that names the rule and the reason: `D4: the SSH adapter reads jump-host config directly, overriding cruze-hexagonal-design's adapter rule (the user wants one file for the prototype)`.
72
- 4. Never raise the same challenge again. Reviewers read the settled decisions and ADRs, so they won't either.
73
-
74
- Be direct and precise, peer to peer. Challenge only with a specific reason, and never agree without thinking.
75
-
76
- ## Long-term intent
77
-
78
- The vision's `## Principles` and `## Must stay possible` hold what the product answers to beyond the work in hand. A step's own decisions are archived with its work, so long-term intent recorded there is lost. One project's "eventually" answers all went into feature decisions, and were archived with them.
79
-
80
- - **The user names something the product may need later,** in an answer or an aside, with words such as "eventually", "in the future" or "one day": propose a `LATER` row for it, with its likelihood, why, and what no design may close off. Ask it in the round.
81
- - **A decision touches a capability area:** once per area, ask about what it may grow into, as `.agents/skills/cruze-envision/possibilities.md` describes, unless the vision already records it.
82
- - **A decision departs from a `PRINCIPLE`:** name the principle, and ask whether it changes for the whole project. When it does, amend its row, with the new reason, before you record the decision. When it doesn't, the decision changes. Never record a decision that contradicts a principle the vision still states.
83
- - **Record it in the vision.** Edit `docs/vision.md` as the answers settle, show the user the rows that changed, and once they confirm, they approve it with `cruze approve vision`. A design that cites a row goes stale when it changes, and its next step re-checks it.
84
-
85
- ## Recording
86
-
87
- - Record each decision as soon as it settles, not at the end.
88
- - Principles and capabilities that must stay possible go in the vision, as "Long-term intent" says, whatever step you are in.
89
- - The workflow step names the document. Features and changes keep decisions in `## Settled decisions` as `D<n>: <decision> (<reason>)`. At project scope, the vision keeps goals, non-goals and constraints in their own sections, and other project decisions go in the architecture's `## Decisions` as `D<n>` lines. A decision that passes the ADR test becomes an ADR.
90
- - Put a term in the glossary the moment it settles, following `.agents/skills/cruze-domain-language/SKILL.md`.
@@ -1,38 +0,0 @@
1
- # Illustrating a question
2
-
3
- The user decides from what they can picture. A question about a port's errors or a module's place is hard to answer from words alone, and the user is often coming back from other work. So every question, review exception and confirmation shows what each option looks like, and reads on its own without the conversation before it.
4
-
5
- ## Reading cold
6
-
7
- - The user knows what the product should do, not the design's internals. Before a question about a part of the design, say in a sentence or two what that part is, what it does today and why the question comes up, and show it. Ask about what the user will notice, and explain the mechanism only as far as the choice needs. In one day of one project, the user asked four times what a question meant, from "what's the definition of a condition?" to "give me an ELI5".
8
- - Open each round, and each message of review exceptions, with one line saying where things stand: the work item, the step, and the earlier decisions this round builds on, such as `Where we are: architect for 2026-10-08-subscriptions, round 3. Settled: one stream per session, and events carry revisions.`
9
- - The user doesn't know the design's IDs by heart. Name each requirement, scenario, element, decision or task in plain words, and add its ID after them in parentheses only when the user may want to look it up: "a second set asking for a priority already taken is refused (SCN-configuration.reject-taken-priority)". Never let an ID stand alone or be what a sentence is about, as in "D11 forbids this". In one project, 197 of the 215 IDs in 75 questions stood alone, and the user misread what was asked.
10
- - Each question says what it decides and why it matters now, without pointing back to an earlier message.
11
-
12
- ## Choosing the illustration
13
-
14
- Show each option, side by side, with the form that fits what the question decides:
15
-
16
- | The question decides | Show |
17
- | --- | --- |
18
- | What a user does or sees | The command they type and its exact output, or a plain-text sketch of the screen, using the scenario's concrete values |
19
- | A port, a use case's input and errors, or a public API | A code sketch in the project's language: the types and signatures, and the call a caller writes |
20
- | Where something lives: contexts, modules, dependency direction | A box-and-arrow diagram, or the directory tree with the files the option adds |
21
- | An order of steps, or what happens on failure | A numbered sequence or a plain-text sequence diagram, with the failure branch |
22
- | States and what moves between them | The states with their transitions, one per line |
23
- | A stored format or a config file | A sample of the file |
24
- | A dependency | The code with it and the code without it |
25
-
26
- Leave out the illustration only when the question is about a name, a number or the wording of a sentence, where it would repeat the words. A question asked through a pick-one tool carries it too: in each option's preview where the tool has one, otherwise in a message just before. One build asked through such a tool with only file and function names in its options, and the user had to ask what it meant.
27
-
28
- ## Writing it
29
-
30
- - Use the design's names and the glossary's words, and the values of a real scenario, so the user sees this project's code, not a generic example.
31
- - A code sketch shows shape: types, signatures, the error variants, and one call site. Leave bodies out, writing `...` or the language's placeholder. Keep each option to about 15 lines.
32
- - Draw diagrams in plain text, so they read in a terminal, where Mermaid shows only as source. The documents keep their Mermaid diagrams; the illustration is for the conversation.
33
- - At envision, show behaviour only: interactions and screens, never code, since envision keeps implementation out.
34
- - Mark your recommended option in the illustration itself, and show the failure case when the options differ in how they fail.
35
-
36
- ## After the answer
37
-
38
- A shape the user chose from a sketch is part of the decision. Write it into the document in that document's format: the port's `Operations`, the entity's facts, the module's `Path`, or the scenario's values. Build follows the documents, so the code comes out as the user saw it.
@@ -1,51 +0,0 @@
1
- ---
2
- name: cruze-improve
3
- description: Improves the structure of existing code to meet Cruze's current standards, by surveying it for structure that departs from them or keeps causing friction, letting you pick any or all of the candidates, designing the target through an architecture rethink, and scheduling the moves as prefactor changes.
4
- ---
5
-
6
- # Improve
7
-
8
- Improve restructures code that already works, so it meets the standards Cruze holds new work to, such as a layout that is normal for the kind of system, or so it stops causing the same friction. It is design work with one approval gate, and it never changes behaviour: the behaviour tests are the safety net, and they pass unchanged at every step.
9
-
10
- Realign is different. It applies what each release's notes expect of existing code, and moves `standards:`. Improve runs whenever the user asks, whatever the version, and can take on structure that realign leaves alone, such as a layout the notes mark as new work only.
11
-
12
- ## Steps
13
-
14
- 1. **Check what it builds on.** Run `cruze status`. `docs/architecture.md` must be approved and current; when it isn't, stop and name `rethink`. Note the features and changes in flight, which step 8 schedules around. When the user names an area, such as a context or a module, keep to it.
15
- 2. **Check the safety net.** Run `cruze trace --all`, and the full suite as `.agents/skills/cruze-formats/reference/config.md` defines it under `commands`. Done when both pass, and you have listed each module whose scenarios have no test. Moving such a module first needs tests that record what it does today.
16
- 3. **Load the standards.** Read these, and follow them for the rest of this skill:
17
- - `.agents/skills/cruze-hexagonal-design/SKILL.md`, `.agents/skills/cruze-hexagonal-design/shapes.md`, and the language file when one exists for the project's language
18
- - `.agents/skills/cruze-behavioural-testing/SKILL.md`
19
- - `.agents/skills/cruze-formats/reference/architecture.md`
20
- - `.agents/skills/cruze-grilling/SKILL.md`
21
- 4. **Survey.** Run the surveyor role from `.agents/skills/cruze-roles/SKILL.md` once for the system's layout, then once for each module in the module map, or in the user's area, giving it the module's `Path`. Run them in parallel where the agent can. Check each candidate's evidence against the files and the journal before you use it. Done when the layout and every module in scope have a report.
22
- 5. **List the candidates** in one message, numbered, merging candidates that share a cause across modules. For each, give:
23
- - the problem in one sentence, and its evidence;
24
- - the standard it departs from, or the friction it causes;
25
- - the target shape, sketched beside today's as `.agents/skills/cruze-grilling/illustrating.md` says;
26
- - its size in prefactor changes, and its risk.
27
-
28
- Recommend which to take and why, then ask the user to pick any or all of them.
29
- 6. **Record each decision:** `cruze journal add disposition --set review=improve --set finding="<module or area>: <summary>" --set disposition=<fixed|waived|deferred> --set reason="<reason>" --set decided=user`. A picked candidate is `fixed`. The rest are `waived`, with the user's reason, or `deferred`. A recorded waiver is never raised again.
30
- 7. **Design the target** for every picked candidate together, as a rethink at architecture level, following `.agents/skills/cruze-rethink/SKILL.md` with `kind=discovery` and `found_by=improve`:
31
- - Amend `docs/architecture.md`: the module map and layers, the moved elements' `Module` and `File` facts, the `layers:` in `.cruze/config.yaml`, and a `D<n>` or an ADR for each structural decision. Change no requirement, scenario or port contract unless the user decided that in step 5.
32
- - When a candidate changes an interface, such as a port or a module's public API, sketch two or three shapes as code, compare them, and recommend one before writing it.
33
- - Before the rethink's walkthrough, run the design review from the roles skill on the diff, with `review=design`.
34
- - Approve it as the rethink's architecture level says, with `--replan` for each built element that moves.
35
- 8. **Schedule the moves.** Group the replanned elements into prefactor changes, as "A prefactor" in `.agents/skills/cruze-architect/tweak.md` describes, each sized as step 12 of `.agents/skills/cruze-architect/feature.md` says.
36
- - Order them so each lands on its own and the code builds after every one: first the tests that record behaviour a module lacks, then one context or feature at a time.
37
- - Put each on the roadmap, following `.agents/skills/cruze-roadmap/SKILL.md`. Run `cruze status --overlap --change <ref>`, and block it on every in-flight item it overlaps.
38
- - Commit, with a message such as `docs: plan the <area> restructure`.
39
-
40
- Done when every candidate has a journaled disposition, the target architecture is approved, and every move is a prefactor change on the roadmap.
41
-
42
- ## Rules
43
-
44
- - **Behaviour stays.** Wire formats, stored formats, messages, exit codes, and every approved scenario and its test stay as they are, unless the user decided otherwise in step 5.
45
- - **Small files stay.** Many small modules are the standard, so a candidate never merges files only to make a module deeper. Merging is a candidate when two modules own one responsibility, or one only forwards calls to another.
46
- - **Ports and adapters stay.** A restructure moves where the core, the ports and the adapters live, never whether a technology sits behind a port.
47
- - **The existing layout wins** until the user picks a candidate that changes it. Improve never restructures code the user didn't pick.
48
-
49
- ## Next step
50
-
51
- `plan` for the first prefactor change. When the user picked nothing, `next`. Start it in a new session, so its context starts empty.
@@ -1,48 +0,0 @@
1
- ---
2
- name: cruze-land
3
- description: Lands a verified change by merging its deltas into the living docs with cruze land, updating the changelog, README and AGENTS.md, and committing or opening a pull request; also lands bug fixes from triage.
4
- ---
5
-
6
- # Land
7
-
8
- Land makes finished work part of the living model. `cruze land` merges the change's spec and architecture deltas into `docs/`, marks what it built, and archives the work when it is finished. This skill takes care of what people read around it: the changelog, the README and the pitfalls in `AGENTS.md`. Then it gets the work onto main.
9
-
10
- ## Landing a change
11
-
12
- 1. **Check it is ready.** Run `cruze next`. It must name `land` for this change. When it names `verify`, the change hasn't been accepted yet.
13
- 2. **Bring in main.** Merge or rebase the branch onto an up-to-date main, and resolve conflicts.
14
- - `journal.jsonl` files merge by keeping every line; `cruze init` sets that up in `.gitattributes`. When that file lacks the rule, keep both sides' lines.
15
- - When an `approvals.json` conflicts, take main's version of it. Then run `cruze status`, and re-approve what it shows stale, as step 3 describes.
16
- - Resolve code conflicts as usual, then run the full suite. When main came in without code conflicts, leave the full suite to CI.
17
- 3. **Run `cruze status`.** When the change or its feature shows `upstream changed`, another branch landed changes to elements it cites. Then:
18
- - Run `cruze diff <ref>` for each, show the user the diff of each changed element, and check that the change's code and tests still hold against it.
19
- - When they still hold, re-approve the stale documents: the feature first, then the change. The change's verification carries over when its own design didn't change.
20
- - When they don't hold, stop and offer `rethink`.
21
- 4. **Run `cruze land`** and quote its report: what it merged, what is now built, and whether the work finished and was archived.
22
- - A `merge-conflict` means someone changed an element this feature merged earlier. Stop and run `rethink`, which reconciles it.
23
- - When the work finished, read the feature's row under `### Implemented` in `docs/vision.md` against its settled decisions and spec delta. When the summary no longer describes what landed, correct it with `cruze features update <slug> --summary <text>`.
24
- - A `merge-invalid` means the merged docs, or the feature and changes being landed, wouldn't validate, such as a decision citing an ID the change removes. Nothing was written. Stop and run `rethink`.
25
- 5. **Update the changelog.** Under `## [Unreleased]` in `CHANGELOG.md`, add one line per user-visible behaviour the change delivers, in the user's words, under `### Added`, `### Changed` or `### Removed`. Name the behaviour, not the code, including any rule a user can now run into that no scenario covers yet.
26
- 6. **Update the README** when the change altered how someone installs, runs or uses the product. Run every command you add, to check it works.
27
- 7. **Check the pitfalls.** Run `cruze journal list --event disposition --all --text | grep -i "<rubric item>"` for each rubric item this change's findings named, and `cruze journal list --event rethink --all` and `cruze journal list --event bug --all`; `--all` includes landed work, which the default leaves out. When findings under the same rubric item with the same root cause, or two defects with the same cause, have now happened twice, sort the lesson by what it is about:
28
- - **This product:** its domain, its code's own conventions, or a tool or service only it uses, such as "an `ApiError` prints `<Code>: <message>`". Add one line under `## Known pitfalls` in `AGENTS.md` saying what to do instead.
29
- - **Cruze's workflow, or practice that holds in any project:** how a delta, plan, task, test plan or review is written, or a rule of the language or its tooling, such as "a task lists the file that declares each new file". Record it with `cruze journal add lesson --set summary="<what happened twice>" --set instead="<what to do instead>" --set step=<the step that should have prevented it>`, and leave `AGENTS.md` alone: every session reads it, and `cruze feedback export` takes the lesson to Cruze, where the step itself gets fixed.
30
-
31
- Keep `AGENTS.md` under one page. When the pitfalls outgrow it, propose to the user a `cruze check` rule or a knowledge-skill change for the oldest ones.
32
- 8. **Commit** the land with a message such as `docs: land <change>`. `cruze land` keeps the Commands and Layout sections of `AGENTS.md` current, from `commands:` in `.cruze/config.yaml` and the built modules; when `commands:` is empty, the Commands section stays as it was.
33
- 9. **Get it onto main.** Follow the project's convention in `AGENTS.md`. When it has none, ask the user whether they want pull requests or direct merges, and add their answer under `## Conventions`, such as "Changes land through pull requests." Open the pull request, or merge. CI must pass before the merge; when the project has no CI runner, run its steps locally with the project's commands.
34
-
35
- Done when the change is on main, or in an open pull request, and `cruze status` no longer lists it as in progress.
36
-
37
- ## Landing a bug fix
38
-
39
- A fix from `triage` has no change folder, so `cruze land` doesn't run.
40
-
41
- 1. Check that the fix commit has its failing-then-passing test, and that the full test suite, `cruze check` and `cruze trace --all` pass.
42
- 2. Add a line under `### Fixed` in `CHANGELOG.md`: what the user saw, and that it is fixed.
43
- 3. Check the pitfalls, as in step 7 above.
44
- 4. Commit, then open the pull request or merge, as for a change.
45
-
46
- ## Next step
47
-
48
- Once the work is on main, switch to an up-to-date main, run `cruze next` there, and name what it says. Start it in a new session, so its context starts empty. Before the merge, `cruze next` on the change's branch can name work that main doesn't hold yet. When a feature just finished and every roadmap item has landed, the next step is `roadmap`, to close the release.