@printpractical/cruze 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +167 -0
  3. package/bin/cruze.mjs +17 -0
  4. package/dist/adapters/inbound/cli/cli_context.js +75 -0
  5. package/dist/adapters/inbound/cli/commands/code.js +30 -0
  6. package/dist/adapters/inbound/cli/commands/documents.js +52 -0
  7. package/dist/adapters/inbound/cli/commands/init.js +23 -0
  8. package/dist/adapters/inbound/cli/commands/install.js +15 -0
  9. package/dist/adapters/inbound/cli/commands/journal.js +31 -0
  10. package/dist/adapters/inbound/cli/commands/progress.js +51 -0
  11. package/dist/adapters/inbound/cli/commands/review.js +18 -0
  12. package/dist/adapters/inbound/cli/commands/status.js +45 -0
  13. package/dist/adapters/inbound/cli/commands.js +36 -0
  14. package/dist/adapters/inbound/cli/parse_command.js +90 -0
  15. package/dist/adapters/inbound/cli/run_cli.js +50 -0
  16. package/dist/adapters/outbound/git_repository.js +57 -0
  17. package/dist/adapters/outbound/node_project_files.js +101 -0
  18. package/dist/adapters/outbound/package_bundle.js +56 -0
  19. package/dist/adapters/outbound/process_agent_runner.js +26 -0
  20. package/dist/adapters/outbound/system_clock.js +14 -0
  21. package/dist/adapters/outbound/terminal_prompter.js +22 -0
  22. package/dist/app/ports/agent_runner.js +11 -0
  23. package/dist/app/ports/bundle.js +22 -0
  24. package/dist/app/ports/clock.js +6 -0
  25. package/dist/app/ports/project_files.js +20 -0
  26. package/dist/app/ports/prompter.js +5 -0
  27. package/dist/app/ports/repository.js +13 -0
  28. package/dist/app/project_context.js +45 -0
  29. package/dist/app/use_cases/abandon_work.js +42 -0
  30. package/dist/app/use_cases/approve_artifact.js +146 -0
  31. package/dist/app/use_cases/check_code.js +90 -0
  32. package/dist/app/use_cases/init_project.js +59 -0
  33. package/dist/app/use_cases/install_skills.js +93 -0
  34. package/dist/app/use_cases/journal_events.js +48 -0
  35. package/dist/app/use_cases/land_change.js +113 -0
  36. package/dist/app/use_cases/new_project_doc.js +40 -0
  37. package/dist/app/use_cases/new_work_item.js +75 -0
  38. package/dist/app/use_cases/project_status.js +73 -0
  39. package/dist/app/use_cases/record_progress.js +101 -0
  40. package/dist/app/use_cases/run_review.js +71 -0
  41. package/dist/app/use_cases/validate_project.js +22 -0
  42. package/dist/domain/agent_skill_homes.js +25 -0
  43. package/dist/domain/approvals/evaluate.js +36 -0
  44. package/dist/domain/approvals/fingerprint.js +52 -0
  45. package/dist/domain/approvals/records.js +50 -0
  46. package/dist/domain/architecture_sections.js +23 -0
  47. package/dist/domain/check/check_source.js +64 -0
  48. package/dist/domain/check/imports.js +81 -0
  49. package/dist/domain/check/rust_imports.js +84 -0
  50. package/dist/domain/check/type_count.js +17 -0
  51. package/dist/domain/config.js +128 -0
  52. package/dist/domain/cruze_error.js +10 -0
  53. package/dist/domain/edits/agents_file.js +44 -0
  54. package/dist/domain/edits/managed_tables.js +60 -0
  55. package/dist/domain/edits/progress_block.js +33 -0
  56. package/dist/domain/edits/status_lines.js +52 -0
  57. package/dist/domain/elements.js +126 -0
  58. package/dist/domain/glob.js +46 -0
  59. package/dist/domain/hashing.js +52 -0
  60. package/dist/domain/ids.js +37 -0
  61. package/dist/domain/journal.js +62 -0
  62. package/dist/domain/land/bookkeeping.js +54 -0
  63. package/dist/domain/land/merge_plan.js +132 -0
  64. package/dist/domain/land/text_ops.js +66 -0
  65. package/dist/domain/markdown.js +79 -0
  66. package/dist/domain/markdown_tables.js +34 -0
  67. package/dist/domain/project/artifact_ref.js +42 -0
  68. package/dist/domain/project/deltas.js +49 -0
  69. package/dist/domain/project/layout.js +40 -0
  70. package/dist/domain/project/living_model.js +54 -0
  71. package/dist/domain/project/new_items.js +48 -0
  72. package/dist/domain/project/plan_parts.js +111 -0
  73. package/dist/domain/project/progress.js +43 -0
  74. package/dist/domain/project/project_view.js +72 -0
  75. package/dist/domain/project/roadmap.js +43 -0
  76. package/dist/domain/project/work_items.js +68 -0
  77. package/dist/domain/project_name.js +20 -0
  78. package/dist/domain/scaffold.js +29 -0
  79. package/dist/domain/skill.js +106 -0
  80. package/dist/domain/skill_links.js +103 -0
  81. package/dist/domain/status/next_step.js +119 -0
  82. package/dist/domain/status/verification.js +16 -0
  83. package/dist/domain/status/work_status.js +101 -0
  84. package/dist/domain/trace.js +44 -0
  85. package/dist/domain/validation/delta_rules.js +79 -0
  86. package/dist/domain/validation/element_rules.js +99 -0
  87. package/dist/domain/validation/living_rules.js +97 -0
  88. package/dist/domain/validation/plan_rules.js +105 -0
  89. package/dist/domain/validation/problem.js +21 -0
  90. package/dist/domain/validation/project_rules.js +99 -0
  91. package/dist/domain/validation/validate_project.js +31 -0
  92. package/dist/domain/validation/work_item_rules.js +144 -0
  93. package/dist/main.js +32 -0
  94. package/package.json +40 -0
  95. package/scripts/build.mjs +37 -0
  96. package/skills/about/SKILL.md +21 -0
  97. package/skills/architect/SKILL.md +43 -0
  98. package/skills/architect/feature.md +29 -0
  99. package/skills/architect/project.md +58 -0
  100. package/skills/architect/tweak.md +22 -0
  101. package/skills/architect/walkthrough.md +29 -0
  102. package/skills/behavioural-testing/SKILL.md +63 -0
  103. package/skills/behavioural-testing/examples.md +102 -0
  104. package/skills/behavioural-testing/fakes.md +30 -0
  105. package/skills/build/SKILL.md +62 -0
  106. package/skills/dependency-approval/SKILL.md +48 -0
  107. package/skills/domain-language/SKILL.md +37 -0
  108. package/skills/envision/SKILL.md +29 -0
  109. package/skills/envision/feature.md +22 -0
  110. package/skills/envision/project.md +20 -0
  111. package/skills/explore/SKILL.md +39 -0
  112. package/skills/formats/SKILL.md +84 -0
  113. package/skills/formats/reference/architecture.md +80 -0
  114. package/skills/formats/reference/config.md +57 -0
  115. package/skills/formats/reference/durable-docs.md +71 -0
  116. package/skills/formats/reference/specs.md +65 -0
  117. package/skills/formats/reference/work-items.md +100 -0
  118. package/skills/formats/templates/adr.md +7 -0
  119. package/skills/formats/templates/architecture.md +100 -0
  120. package/skills/formats/templates/change.md +29 -0
  121. package/skills/formats/templates/feature.md +49 -0
  122. package/skills/formats/templates/glossary.md +8 -0
  123. package/skills/formats/templates/roadmap.md +32 -0
  124. package/skills/formats/templates/spec.md +11 -0
  125. package/skills/formats/templates/standalone-change.md +46 -0
  126. package/skills/formats/templates/vision.md +37 -0
  127. package/skills/grilling/SKILL.md +66 -0
  128. package/skills/hexagonal-design/SKILL.md +119 -0
  129. package/skills/hexagonal-design/contracts.md +68 -0
  130. package/skills/hexagonal-design/fundamentals.md +50 -0
  131. package/skills/hexagonal-design/languages/cpp.md +37 -0
  132. package/skills/hexagonal-design/languages/rust.md +40 -0
  133. package/skills/hexagonal-design/runtime.md +48 -0
  134. package/skills/land/SKILL.md +43 -0
  135. package/skills/next/SKILL.md +30 -0
  136. package/skills/plan/SKILL.md +52 -0
  137. package/skills/plan/tasks.md +26 -0
  138. package/skills/plan/test-plan.md +14 -0
  139. package/skills/research/SKILL.md +41 -0
  140. package/skills/research/evaluation.md +27 -0
  141. package/skills/rethink/SKILL.md +53 -0
  142. package/skills/rethink/levels.md +45 -0
  143. package/skills/roadmap/SKILL.md +51 -0
  144. package/skills/roles/SKILL.md +57 -0
  145. package/skills/roles/code-reviewer.md +55 -0
  146. package/skills/roles/design-reviewer.md +63 -0
  147. package/skills/roles/researcher.md +33 -0
  148. package/skills/roles/verifier.md +38 -0
  149. package/skills/triage/SKILL.md +35 -0
  150. package/skills/verify/SKILL.md +39 -0
  151. package/skills/verify/manual-test.md +23 -0
  152. package/src/adapters/inbound/cli/cli_context.ts +75 -0
  153. package/src/adapters/inbound/cli/commands/code.ts +30 -0
  154. package/src/adapters/inbound/cli/commands/documents.ts +52 -0
  155. package/src/adapters/inbound/cli/commands/init.ts +23 -0
  156. package/src/adapters/inbound/cli/commands/install.ts +15 -0
  157. package/src/adapters/inbound/cli/commands/journal.ts +31 -0
  158. package/src/adapters/inbound/cli/commands/progress.ts +51 -0
  159. package/src/adapters/inbound/cli/commands/review.ts +18 -0
  160. package/src/adapters/inbound/cli/commands/status.ts +45 -0
  161. package/src/adapters/inbound/cli/commands.ts +36 -0
  162. package/src/adapters/inbound/cli/parse_command.ts +90 -0
  163. package/src/adapters/inbound/cli/run_cli.ts +50 -0
  164. package/src/adapters/outbound/git_repository.ts +57 -0
  165. package/src/adapters/outbound/node_project_files.ts +101 -0
  166. package/src/adapters/outbound/package_bundle.ts +56 -0
  167. package/src/adapters/outbound/process_agent_runner.ts +26 -0
  168. package/src/adapters/outbound/system_clock.ts +14 -0
  169. package/src/adapters/outbound/terminal_prompter.ts +22 -0
  170. package/src/app/ports/agent_runner.ts +11 -0
  171. package/src/app/ports/bundle.ts +22 -0
  172. package/src/app/ports/clock.ts +6 -0
  173. package/src/app/ports/project_files.ts +20 -0
  174. package/src/app/ports/prompter.ts +5 -0
  175. package/src/app/ports/repository.ts +13 -0
  176. package/src/app/project_context.ts +45 -0
  177. package/src/app/use_cases/abandon_work.ts +42 -0
  178. package/src/app/use_cases/approve_artifact.ts +146 -0
  179. package/src/app/use_cases/check_code.ts +90 -0
  180. package/src/app/use_cases/init_project.ts +59 -0
  181. package/src/app/use_cases/install_skills.ts +93 -0
  182. package/src/app/use_cases/journal_events.ts +48 -0
  183. package/src/app/use_cases/land_change.ts +113 -0
  184. package/src/app/use_cases/new_project_doc.ts +40 -0
  185. package/src/app/use_cases/new_work_item.ts +75 -0
  186. package/src/app/use_cases/project_status.ts +73 -0
  187. package/src/app/use_cases/record_progress.ts +101 -0
  188. package/src/app/use_cases/run_review.ts +71 -0
  189. package/src/app/use_cases/validate_project.ts +22 -0
  190. package/src/domain/agent_skill_homes.ts +25 -0
  191. package/src/domain/approvals/evaluate.ts +36 -0
  192. package/src/domain/approvals/fingerprint.ts +52 -0
  193. package/src/domain/approvals/records.ts +50 -0
  194. package/src/domain/architecture_sections.ts +23 -0
  195. package/src/domain/check/check_source.ts +64 -0
  196. package/src/domain/check/imports.ts +81 -0
  197. package/src/domain/check/rust_imports.ts +84 -0
  198. package/src/domain/check/type_count.ts +17 -0
  199. package/src/domain/config.ts +128 -0
  200. package/src/domain/cruze_error.ts +10 -0
  201. package/src/domain/edits/agents_file.ts +44 -0
  202. package/src/domain/edits/managed_tables.ts +60 -0
  203. package/src/domain/edits/progress_block.ts +33 -0
  204. package/src/domain/edits/status_lines.ts +52 -0
  205. package/src/domain/elements.ts +126 -0
  206. package/src/domain/glob.ts +46 -0
  207. package/src/domain/hashing.ts +52 -0
  208. package/src/domain/ids.ts +37 -0
  209. package/src/domain/journal.ts +62 -0
  210. package/src/domain/land/bookkeeping.ts +54 -0
  211. package/src/domain/land/merge_plan.ts +132 -0
  212. package/src/domain/land/text_ops.ts +66 -0
  213. package/src/domain/markdown.ts +79 -0
  214. package/src/domain/markdown_tables.ts +34 -0
  215. package/src/domain/project/artifact_ref.ts +42 -0
  216. package/src/domain/project/deltas.ts +49 -0
  217. package/src/domain/project/layout.ts +40 -0
  218. package/src/domain/project/living_model.ts +54 -0
  219. package/src/domain/project/new_items.ts +48 -0
  220. package/src/domain/project/plan_parts.ts +111 -0
  221. package/src/domain/project/progress.ts +43 -0
  222. package/src/domain/project/project_view.ts +72 -0
  223. package/src/domain/project/roadmap.ts +43 -0
  224. package/src/domain/project/work_items.ts +68 -0
  225. package/src/domain/project_name.ts +20 -0
  226. package/src/domain/scaffold.ts +29 -0
  227. package/src/domain/skill.ts +106 -0
  228. package/src/domain/skill_links.ts +103 -0
  229. package/src/domain/status/next_step.ts +119 -0
  230. package/src/domain/status/verification.ts +16 -0
  231. package/src/domain/status/work_status.ts +101 -0
  232. package/src/domain/trace.ts +44 -0
  233. package/src/domain/validation/delta_rules.ts +79 -0
  234. package/src/domain/validation/element_rules.ts +99 -0
  235. package/src/domain/validation/living_rules.ts +97 -0
  236. package/src/domain/validation/plan_rules.ts +105 -0
  237. package/src/domain/validation/problem.ts +21 -0
  238. package/src/domain/validation/project_rules.ts +99 -0
  239. package/src/domain/validation/validate_project.ts +31 -0
  240. package/src/domain/validation/work_item_rules.ts +144 -0
  241. package/src/main.ts +32 -0
  242. package/templates/init/AGENTS.md +28 -0
  243. package/templates/init/CHANGELOG.md +8 -0
  244. package/templates/init/CLAUDE.md +1 -0
  245. package/templates/init/README.md +1 -0
  246. package/templates/init/ci.yml +23 -0
  247. package/templates/init/config.yaml +33 -0
  248. package/templates/init/gitattributes +2 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: cruze-formats
3
+ description: The formats and templates of every Cruze project document. Use when reading, writing or reviewing any file under docs/ or .cruze/ in a Cruze project.
4
+ ---
5
+
6
+ # Cruze document formats
7
+
8
+ Every Cruze document is Markdown that people read and the `cruze` CLI parses. Write them exactly in these formats: `cruze validate` rejects documents that drift, and approvals, staleness and merges all depend on the structure.
9
+
10
+ ## Where documents live
11
+
12
+ | Path | Document | Written by |
13
+ | --- | --- | --- |
14
+ | `docs/vision.md` | Problem, users, goals, non-goals, constraints, feature map | envision (project scope) |
15
+ | `docs/glossary.md` | Domain terms and terms to avoid | any step, as terms settle |
16
+ | `docs/architecture.md` | Contexts, domain model, use cases, ports, adapters, flows, modules, rules | architect (project scope), rethink, land |
17
+ | `docs/adr/<date>-<slug>.md` | One decision that is hard to reverse, surprising and a real trade-off | architect, rethink |
18
+ | `docs/specs/<capability>.md` | Living behaviour: requirements and scenarios | land, from spec deltas |
19
+ | `docs/roadmap.md` | The current release: phases, items, coverage | architect (project scope), roadmap |
20
+ | `.cruze/features/<id>/feature.md` | One feature: intent, deltas, its ordered changes | envision and architect (feature scope) |
21
+ | `.cruze/features/<id>/changes/<NN-slug>/change.md` | One change of a feature: scope, test plan, tasks | plan |
22
+ | `.cruze/changes/<id>/change.md` | A standalone change, carrying its own deltas | architect (tweak scope) |
23
+ | `.cruze/config.yaml` | Project configuration | `cruze init`, architect |
24
+ | `.cruze/notes/<date>-<slug>.md` | A captured explore note, or research evidence behind an adopt-or-build decision, free-form | explore, research |
25
+
26
+ Only the CLI writes `approvals.json`, `journal.jsonl` and anything under `.cruze/archive/`.
27
+
28
+ ## IDs
29
+
30
+ An ID names one element for its whole life. Other documents cite it, tests carry it, and approvals hash it.
31
+
32
+ - Grammar: `<KIND>-<name>` or `<KIND>-<scope>.<name>`. `scope` and `name` are lowercase words joined by single hyphens, such as `REQ-access.open-console`.
33
+ - Elements that belong to a bounded context or a capability carry it as their scope. Elements outside every context, such as the CLI shell and the composition root, use the scope `system`.
34
+ - IDs are named, never numbered, so parallel branches never race for the next number.
35
+ - An ID is never reused, even after its element is removed. Rename the title freely; the ID stays.
36
+
37
+ | Kind | Element | Lives in | Scope |
38
+ | --- | --- | --- | --- |
39
+ | `GOAL` | A goal of the product | vision | none |
40
+ | `CTX` | Bounded context | architecture | none |
41
+ | `ENT` | Domain concept: aggregate, entity, value object, domain service, policy or domain event | architecture | context |
42
+ | `UC` | Use case (the application's driving API) | architecture | context |
43
+ | `PORT` | Port, driven or driving | architecture | context |
44
+ | `ADP` | Adapter | architecture | context |
45
+ | `FLOW` | Interaction flow, as a sequence diagram | architecture | context |
46
+ | `MOD` | Module: a directory or file with one role | architecture | context, or none for shared modules |
47
+ | `RULE` | Dependency rule | architecture | none |
48
+ | `VIEW` | Overview diagram | architecture | none |
49
+ | `XC` | Cross-cutting concern | architecture | none |
50
+ | `REQ` | Requirement | specs | capability |
51
+ | `SCN` | Scenario of a requirement | specs | capability |
52
+ | `ADR` | Decision record, named by its file stem | `docs/adr/` | none |
53
+
54
+ ## Elements
55
+
56
+ - A **heading element** is a heading whose text is exactly `<ID>: <Title>`. It extends to the next heading of the same or a higher level.
57
+ - A **row element** is a table row whose first cell is exactly an ID. Only goals use rows.
58
+ - Element facts are list items of the form `- Key: value`, directly in the element's body. Sub-items hold lists of values.
59
+ - An element cites another by writing its ID anywhere in its body. Every ID a document mentions counts as cited.
60
+ - A cited ID must exist, either in the living docs or in a delta of the same feature or change. Design at project scope cites only what it defines; the feature that adds scenarios links them to flows and use cases through `MODIFIED` operations.
61
+
62
+ ## Managed content
63
+
64
+ The CLI owns some content so that routine bookkeeping never changes a design:
65
+
66
+ - A block between `<!-- cruze:managed -->` and `<!-- /cruze:managed -->` is written only by the CLI.
67
+ - A `- Status: planned` or `- Status: built` item in an element body is written only by the CLI. Elements that have code (`ENT`, `UC`, `PORT`, `ADP`, `FLOW`, `MOD`) and scenarios (`SCN`) carry one.
68
+ - Both are excluded from every hash. Read them freely; change them only through `cruze` commands:
69
+ - `cruze approve` adds missing statuses to the architecture, sets built elements back to planned with `--replan`, and binds a change to its branch.
70
+ - `cruze task` records progress, and `cruze features` edits the feature map.
71
+ - `cruze land` merges work, marks it built and fills the Commands and Layout sections of `AGENTS.md`.
72
+ - `cruze roadmap prune` and `cruze abandon` update the roadmap's status.
73
+
74
+ ## Reference files
75
+
76
+ Read the one that matches the document in front of you:
77
+
78
+ - [reference/architecture.md](reference/architecture.md) for `docs/architecture.md` and architecture deltas.
79
+ - [reference/specs.md](reference/specs.md) for `docs/specs/`, requirements, scenarios and spec deltas.
80
+ - [reference/work-items.md](reference/work-items.md) for `feature.md`, `change.md`, test plans and task lines.
81
+ - [reference/durable-docs.md](reference/durable-docs.md) for vision, glossary, ADRs and the roadmap.
82
+ - [reference/config.md](reference/config.md) for `.cruze/config.yaml`.
83
+
84
+ Create documents with `cruze new`: `cruze new vision`, `glossary`, `architecture` or `roadmap` for the project documents, and `cruze new feature`, `change`, `adr` or `note <slug> --title <title>` for the rest. It starts each one from the matching file in `templates/` and fills the `{{placeholders}}`. Replace every `<angle-bracket>` guide.
@@ -0,0 +1,80 @@
1
+ # Architecture format
2
+
3
+ `docs/architecture.md` is the living model of how the system is built. Every step reads it, including build and review. It describes the designed system for the current and upcoming releases. Each element's managed `Status` says whether it is still `planned` or already `built`.
4
+
5
+ Template: [../templates/architecture.md](../templates/architecture.md).
6
+
7
+ ## Sections
8
+
9
+ The document has these `##` sections, in this order. Each holds elements of one kind as `###` heading elements, plus any `VIEW` diagrams that summarize them. A section with no elements yet keeps its heading and a one-line note.
10
+
11
+ | Section | Kind | Holds |
12
+ | --- | --- | --- |
13
+ | Overview | `VIEW` | One paragraph on the system, then a context diagram |
14
+ | Bounded contexts | `CTX` | Each context's purpose and what it depends on |
15
+ | Domain model | `ENT` | Entities, aggregates, value objects, domain services, policies and domain events, with invariants and relationships |
16
+ | Use cases | `UC` | The application API: what callers can ask the system to do |
17
+ | Ports | `PORT` | Capabilities the application needs (driven) or offers (driving) |
18
+ | Adapters | `ADP` | Technology behind ports, and inbound adapters that drive use cases |
19
+ | Flows | `FLOW` | How elements interact for key scenarios, as sequence diagrams |
20
+ | Modules | `MOD` | Where each element lives in the source tree |
21
+ | Dependency rules | `RULE` | What may import what |
22
+ | Cross-cutting concerns | `XC` | Errors, configuration, logging, concurrency, security |
23
+ | Decisions | none | Links to ADRs, one line each, then project-level settled decisions as `D<n>: <decision> (<reason>)`, including overrides of Cruze's advice |
24
+
25
+ ## Element facts
26
+
27
+ Facts are `- Key: value` items. Keys marked required must be present; the others appear when they apply. Multi-valued facts use sub-items.
28
+
29
+ | Kind | Required facts | Optional facts |
30
+ | --- | --- | --- |
31
+ | `VIEW` | a Mermaid block | |
32
+ | `CTX` | `Purpose` | `Depends on` (context IDs, with what is used) |
33
+ | `ENT` | `Kind` (`aggregate`, `entity`, `value`, `service`, `policy` or `event`), `Module`, `File` | `Invariants`, `Relationships`, `States` (for state machines) |
34
+ | `UC` | `Input`, `Output`, `Errors`, `Uses`, `Module`, `File` | `Serves` (REQ IDs) |
35
+ | `PORT` | `Direction` (`driven` or `driving`), `Operations`, `Module`, `File` | `Implemented by`, `Future` |
36
+ | `ADP` | `Implements` (a driven port) or `Drives` (use cases), `Technology`, `Module`, `File` | `Adopts` (library and adopt-or-build reason), `Format` (the stored or wire format it owns, or where its schema lives) |
37
+ | `FLOW` | `Elements`, a Mermaid `sequenceDiagram` | `Serves` (SCN IDs, once they exist), `Failure paths` |
38
+ | `MOD` | `Path`, `Layer` (`domain`, `application`, `adapter` or `composition`) | |
39
+ | `RULE` | one or two sentences of rule | `Enforced by` (config layer names) |
40
+ | `XC` | prose | |
41
+
42
+ Rules for facts:
43
+
44
+ - Membership is never listed twice. An element's scope names its context, and its `Module` fact names its module; contexts and modules don't list their members, so adding an element never changes them.
45
+ - `File` names the real source path, one per element, with sub-items when an element spans files. Every element with code has one: an element without a file cannot be built, checked or reviewed.
46
+ - `Operations` lists each operation as a sub-item with its signature in the project's language, then its contract: what it guarantees, its failure cases and who owns cleanup.
47
+ - `Relationships` sub-items read `<verb> <ID> (<cardinality>)`, for example `- has one ENT-inventory.console-path (1)`.
48
+ - `Future` records a seam kept open for a later release and the element it will need, so later features extend the design rather than rework it.
49
+ - Add another fact when it helps a reader, such as `Failure attribution` on an adapter. The CLI checks the listed facts and ignores the others.
50
+ - An element that grows over several features, such as the CLI adapter gaining a command per feature, gets a `MODIFIED` operation in each feature that extends it. Its status goes back to `planned` when that feature's first change lands, and to `built` when the change that builds the new text lands.
51
+ - The CLI adds `- Status: planned` to a new element and flips it to `built` when a landed change builds it. Leave it out of what you write.
52
+
53
+ ## Diagrams
54
+
55
+ - Every `FLOW` has one `sequenceDiagram`. Participants are element titles, and every participant's ID appears in the flow's `Elements`.
56
+ - The Overview `VIEW` shows contexts, the inbound adapters that drive them and the external systems adapters reach.
57
+ - A `VIEW-domain-model` class diagram in the Domain model section shows every `ENT` and its relationships.
58
+ - Keep a diagram to at most 15 nodes. Split a bigger picture into two views.
59
+
60
+ ## Architecture delta
61
+
62
+ A feature, or a standalone change, proposes architecture edits in its `## Architecture delta` section. Each operation is a `###` heading:
63
+
64
+ ```markdown
65
+ ### ADDED PORT-access.hop-connector: HopConnector
66
+ - Direction: driven
67
+ - ...the full element body, as it will read in architecture.md
68
+
69
+ ### MODIFIED UC-access.open-console: Open a console
70
+ - ...the full new body, replacing the old one
71
+
72
+ ### REMOVED ADP-access.telnet-connector: Telnet connector
73
+ - Reason: telnet support was dropped from the release scope
74
+ ```
75
+
76
+ - `ADDED` introduces an ID that doesn't exist yet. `MODIFIED` replaces an existing element's whole body. `REMOVED` retires an ID and needs a `Reason`.
77
+ - The element kind decides its section. `land` appends an added element to the end of its section.
78
+ - A delta never touches `Status`. A change's `Builds` scope decides what becomes built.
79
+ - A delta with no operations says `None.` under its heading.
80
+ - Direct edits to `docs/architecture.md` happen only at project scope and through `rethink`. Every other design change arrives as a delta.
@@ -0,0 +1,57 @@
1
+ # Configuration format
2
+
3
+ `.cruze/config.yaml` configures the CLI for one project. `cruze init` creates it. Project-scope architect fills in `source`, `tests` and `layers` from the module map.
4
+
5
+ ```yaml
6
+ version: 1
7
+ project: "Console Access"
8
+ tracker: markdown
9
+
10
+ source: ["src/**/*.rs"]
11
+ tests: ["src/**/*.rs", "tests/**/*.rs"]
12
+
13
+ check:
14
+ max_lines: 250
15
+ max_types: 5
16
+ exceptions:
17
+ - path: src/cli/args.rs
18
+ reason: the clap derive struct lists every flag in one place
19
+
20
+ commands:
21
+ format: cargo fmt --check
22
+ lint: cargo clippy -- -D warnings
23
+ test: cargo test
24
+ run: cargo run -- list
25
+
26
+ review:
27
+ command: ["claude", "-p", "--allowedTools", "Read Grep Glob Bash(git diff:*) Bash(git log:*) Bash(git show:*) Bash(cruze:*) Bash(cargo:*)"]
28
+
29
+ layers:
30
+ - name: inventory-domain
31
+ paths: ["src/inventory/domain/**"]
32
+ may_import: []
33
+ - name: inventory-app
34
+ paths: ["src/inventory/app/**"]
35
+ may_import: [inventory-domain]
36
+ ```
37
+
38
+ | Key | Meaning |
39
+ | --- | --- |
40
+ | `version` | Format version. Always `1` for now. |
41
+ | `project` | The project name, quoted. |
42
+ | `tracker` | Where work items live. `markdown` is the only value in V1. |
43
+ | `source` | Globs of the source files `cruze check` inspects. |
44
+ | `tests` | Globs of the files `cruze trace` searches for scenario IDs. |
45
+ | `check.max_lines` | Line budget per source file. |
46
+ | `check.max_types` | Budget of top-level types per source file. |
47
+ | `check.exceptions` | Files allowed past a budget, each with a `path` and a `reason`. |
48
+ | `layers` | Each layer has a `name`, the `paths` it covers, and `may_import`, the layers it may depend on. |
49
+ | `commands` | The project's commands by name, such as `test` or `run`. The walking-skeleton change fills them in, and `cruze land` copies them into the Commands section of `AGENTS.md`. |
50
+ | `review.command` | The program and arguments `cruze review` runs to start an agent in a fresh context, with the prompt on standard input. The default runs Claude Code in print mode, allowed to read the project and run `git diff`, `git log`, `git show` and `cruze`. The verifier runs the system, so add the project's build and run commands. |
51
+
52
+ Rules for layers:
53
+
54
+ - A source file belongs to the first layer whose paths match it. A file in no layer may import anything, so every source file should be in a layer.
55
+ - Imports of code outside the project, such as the standard library and dependencies, are always allowed. Adapter layers are where they belong, and review checks that.
56
+ - A layer may import itself. Every other dependency is listed in `may_import`, and together they follow the `RULE` elements in the architecture.
57
+ - Each `MOD` element's `Path` falls in exactly one layer, and the layer's `may_import` fits the module's `Layer`. A domain layer imports only domain layers, and nothing outside composition imports adapter layers.
@@ -0,0 +1,71 @@
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. At most one page, excluding the feature map.
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
+ | `## Feature map` | Managed. `### Implemented` is a table of Feature, Release and Summary. `### Future` is a table of Feature, Summary and Goals |
17
+
18
+ - Feature-map entries are named by slug, such as `jump-hosts`. A future entry gets a folder ID only when its feature starts.
19
+ - Only the CLI writes the feature map. `cruze features add` puts an entry on the future list, `cruze features drop` removes one, and `land` moves a finished feature to implemented, tagged with the release in progress.
20
+
21
+ ## docs/glossary.md
22
+
23
+ The shared language, with no implementation detail. Anyone may add a term the moment it settles. The glossary is not approval-gated.
24
+
25
+ ```markdown
26
+ ## Console access
27
+
28
+ **Hop**: One link in the chain from the user to a device console: an SSH connection or a serial line.
29
+ _Avoid_: jump, leg
30
+
31
+ **Console path**: The ordered hops that reach one device's console.
32
+ _Avoid_: route, connection string
33
+ ```
34
+
35
+ - Group terms under a `##` heading per bounded context, alphabetically within each group.
36
+ - A definition is one or two sentences, in terms a domain expert would accept.
37
+ - `_Avoid_:` lists synonyms to stop using, so code, docs and conversation converge on one word.
38
+ - 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.
39
+
40
+ ## docs/adr/<date>-<slug>.md
41
+
42
+ 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`.
43
+
44
+ ```markdown
45
+ # Console paths are ordered hop chains
46
+
47
+ - Status: accepted
48
+ - Date: 2026-09-24
49
+ - Elements: ENT-inventory.console-path, PORT-access.hop-connector
50
+
51
+ <One paragraph: the context, the decision, why it won, and the alternatives rejected.>
52
+ ```
53
+
54
+ - The ID is `ADR-<file stem>`, such as `ADR-2026-09-24-hop-chains`.
55
+ - `Status` is `accepted` or `superseded by ADR-<stem>`. A superseded ADR stays; the new ADR says what changed.
56
+ - 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…".
57
+
58
+ ## docs/roadmap.md
59
+
60
+ The current release, as an index. It changes only when a feature or standalone change starts, finishes or is reordered.
61
+
62
+ | Section | Holds |
63
+ | --- | --- |
64
+ | `## Release` | The release name and one sentence on what it delivers |
65
+ | `## Phases` | One `### Phase <n>: <name>` per phase, each a table of Item (slug), Kind (`feature` or `change`), Goals and Blocked by |
66
+ | `## Coverage` | Table of Goal and the items that serve it. Every goal in scope has at least one item |
67
+ | `## Status` | Managed: each started item's folder ID and state (`designing`, `building` or `landed`). `cruze new` adds the row and `cruze land` updates it |
68
+
69
+ - Items are named by slug. The first item of a new project is the `walking-skeleton` standalone change.
70
+ - `Blocked by` lists slugs that must land first. The blocking graph has no cycles.
71
+ - 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.
@@ -0,0 +1,65 @@
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.
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.
@@ -0,0 +1,100 @@
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.
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 a walking-skeleton 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 walking skeleton 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, the next land refuses with a conflict instead of overwriting their 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.
@@ -0,0 +1,7 @@
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.>
@@ -0,0 +1,100 @@
1
+ # Architecture: {{project_name}}
2
+
3
+ ## Overview
4
+
5
+ <One paragraph: what the system is, how it is used, and the architectural style.>
6
+
7
+ ### VIEW-context: System context
8
+
9
+ ```mermaid
10
+ flowchart LR
11
+ user([<User>]) --> cli[<Inbound adapter>]
12
+ cli --> ctx[<Bounded context>]
13
+ ctx --> ext[(<External system>)]
14
+ ```
15
+
16
+ ## Bounded contexts
17
+
18
+ ### CTX-<name>: <Context title>
19
+ - Purpose: <what this context is responsible for>
20
+ - Depends on: <CTX ID and what it uses, or "nothing">
21
+
22
+ ## Domain model
23
+
24
+ ### VIEW-domain-model: Domain model
25
+
26
+ ```mermaid
27
+ classDiagram
28
+ class <Entity>
29
+ ```
30
+
31
+ ### ENT-<context>.<name>: <Entity title>
32
+ - Kind: <aggregate | entity | value | service | policy | event>
33
+ - Invariants:
34
+ - <a rule that always holds>
35
+ - Relationships:
36
+ - <verb> <ENT ID> (<cardinality>)
37
+ - Module: <MOD ID>
38
+ - File: `<path>`
39
+
40
+ ## Use cases
41
+
42
+ ### UC-<context>.<name>: <Use case title>
43
+ - Input: <what the caller provides>
44
+ - Output: <what the caller gets>
45
+ - Errors: <each failure the caller can see>
46
+ - Uses: <PORT IDs>
47
+ - Module: <MOD ID>
48
+ - File: `<path>`
49
+
50
+ ## Ports
51
+
52
+ ### PORT-<context>.<name>: <Port title>
53
+ - Direction: <driven | driving>
54
+ - Operations:
55
+ - `<signature>`: <guarantee; failure cases; who owns cleanup>
56
+ - Implemented by: <ADP IDs>
57
+ - Module: <MOD ID>
58
+ - File: `<path>`
59
+
60
+ ## Adapters
61
+
62
+ ### ADP-<context>.<name>: <Adapter title>
63
+ - Implements: <PORT ID>
64
+ - Technology: <library, protocol or system>
65
+ - Adopts: <library, and why adopt rather than build>
66
+ - Module: <MOD ID>
67
+ - File: `<path>`
68
+
69
+ ## Flows
70
+
71
+ ### FLOW-<context>.<name>: <Flow title>
72
+ - Serves: <SCN IDs>
73
+ - Elements: <IDs of every participant>
74
+
75
+ ```mermaid
76
+ sequenceDiagram
77
+ participant A as <Element title>
78
+ ```
79
+
80
+ ## Modules
81
+
82
+ ### MOD-<context>.<name>: <Module title>
83
+ - Path: `<directory or file>`
84
+ - Layer: <domain | application | adapter | composition>
85
+
86
+ ## Dependency rules
87
+
88
+ ### RULE-<name>: <Rule title>
89
+ <One or two sentences stating what may depend on what.>
90
+ - Enforced by: <config layer names>
91
+
92
+ ## Cross-cutting concerns
93
+
94
+ ### XC-<name>: <Concern title>
95
+ <How the system handles it, and where.>
96
+
97
+ ## Decisions
98
+
99
+ - ADR-<stem>: <one-line summary>
100
+ - D1: <a project-level decision below the ADR bar> (<reason>)
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: {{id}}
3
+ title: {{title}}
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 -->
@@ -0,0 +1,49 @@
1
+ ---
2
+ id: {{id}}
3
+ title: {{title}}
4
+ roadmap: <roadmap item slug>
5
+ ---
6
+
7
+ # Feature: {{title}}
8
+
9
+ ## Intent
10
+
11
+ <The problem and outcome in the user's words. Who it is for. Constraints.>
12
+
13
+ Out of scope:
14
+
15
+ - <what this feature deliberately leaves out>
16
+
17
+ ## Settled decisions
18
+
19
+ - D1: <decision> (<reason>)
20
+
21
+ ## Adopt or build
22
+
23
+ | Component | Decision | Choice | Reason |
24
+ | --- | --- | --- | --- |
25
+
26
+ ## Spec delta
27
+
28
+ ### ADDED REQ-<capability>.<name>: <Requirement title>
29
+ <The requirement using SHALL or MUST.>
30
+
31
+ #### SCN-<capability>.<name>: <Scenario title>
32
+ - GIVEN <starting state>
33
+ - WHEN <the one action>
34
+ - THEN <observable outcome>
35
+
36
+ ## Architecture delta
37
+
38
+ ### ADDED <ID>: <Element title>
39
+ - <the element's full body, as it will read in architecture.md>
40
+
41
+ ## Changes
42
+
43
+ | Change | Delivers | Builds | Depends on |
44
+ | --- | --- | --- | --- |
45
+ | 01-<slug> | <SCN and REQ IDs> | <architecture IDs> | |
46
+
47
+ <!-- cruze:managed -->
48
+ ## Progress
49
+ <!-- /cruze:managed -->
@@ -0,0 +1,8 @@
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>