@printpractical/cruze 0.0.13 → 0.0.14

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 (298) 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/review.js +2 -9
  7. package/dist/adapters/inbound/cli/commands/status.js +16 -63
  8. package/dist/adapters/inbound/cli/commands.js +10 -37
  9. package/dist/adapters/inbound/cli/parse_command.js +0 -54
  10. package/dist/adapters/outbound/git_repository.js +2 -71
  11. package/dist/app/ports/repository.js +0 -12
  12. package/dist/app/project_context.js +15 -25
  13. package/dist/app/use_cases/approve_document.js +29 -0
  14. package/dist/app/use_cases/check_code.js +21 -56
  15. package/dist/app/use_cases/new_document.js +25 -0
  16. package/dist/app/use_cases/project_status.js +43 -67
  17. package/dist/app/use_cases/run_review.js +11 -30
  18. package/dist/app/use_cases/validate_project.js +4 -4
  19. package/dist/domain/approvals.js +51 -0
  20. package/dist/domain/check/check_source.js +2 -31
  21. package/dist/domain/config.js +8 -84
  22. package/dist/domain/hashing.js +16 -30
  23. package/dist/domain/ids.js +13 -27
  24. package/dist/domain/next_step.js +41 -0
  25. package/dist/domain/project/features.js +71 -0
  26. package/dist/domain/project/layout.js +11 -27
  27. package/dist/domain/project/project_docs.js +48 -0
  28. package/dist/domain/project/release.js +30 -0
  29. package/dist/domain/scaffold.js +0 -1
  30. package/dist/domain/skill_budget.js +4 -4
  31. package/dist/domain/trace.js +8 -25
  32. package/dist/domain/validation/document_rules.js +70 -0
  33. package/dist/domain/validation/release_rules.js +45 -0
  34. package/dist/domain/validation/validate_project.js +20 -27
  35. package/dist/domain/versions/cruze_version.js +3 -9
  36. package/dist/main.js +1 -1
  37. package/package.json +1 -1
  38. package/skills/asking/SKILL.md +51 -0
  39. package/skills/behavioural-testing/SKILL.md +14 -16
  40. package/skills/behavioural-testing/examples.md +1 -2
  41. package/skills/behavioural-testing/fakes.md +2 -2
  42. package/skills/build/SKILL.md +34 -38
  43. package/skills/dependency-approval/SKILL.md +34 -31
  44. package/skills/envision/SKILL.md +23 -18
  45. package/skills/envision/architecture.md +16 -0
  46. package/skills/envision/breakdown.md +14 -0
  47. package/skills/envision/possibilities.md +6 -7
  48. package/skills/fix/SKILL.md +34 -0
  49. package/skills/formats/SKILL.md +39 -87
  50. package/skills/formats/config.md +47 -0
  51. package/skills/formats/templates/architecture.md +18 -74
  52. package/skills/formats/templates/feature.md +18 -34
  53. package/skills/formats/templates/vision.md +15 -27
  54. package/skills/hexagonal-design/SKILL.md +11 -11
  55. package/skills/hexagonal-design/contracts.md +3 -3
  56. package/skills/hexagonal-design/fundamentals.md +1 -1
  57. package/skills/hexagonal-design/languages/cpp.md +1 -1
  58. package/skills/hexagonal-design/languages/rust.md +1 -1
  59. package/skills/hexagonal-design/languages/swift.md +2 -2
  60. package/skills/hexagonal-design/runtime.md +2 -2
  61. package/skills/research/SKILL.md +4 -4
  62. package/skills/research/evaluation.md +1 -1
  63. package/skills/review/SKILL.md +27 -0
  64. package/skills/roles/SKILL.md +8 -59
  65. package/skills/roles/code-reviewer.md +21 -32
  66. package/skills/roles/researcher.md +3 -3
  67. package/skills/shape/SKILL.md +37 -0
  68. package/skills/shape/self-check.md +12 -0
  69. package/src/adapters/inbound/cli/cli_context.ts +0 -27
  70. package/src/adapters/inbound/cli/commands/code.ts +5 -18
  71. package/src/adapters/inbound/cli/commands/documents.ts +11 -37
  72. package/src/adapters/inbound/cli/commands/init.ts +1 -1
  73. package/src/adapters/inbound/cli/commands/review.ts +2 -9
  74. package/src/adapters/inbound/cli/commands/status.ts +16 -63
  75. package/src/adapters/inbound/cli/commands.ts +10 -37
  76. package/src/adapters/inbound/cli/parse_command.ts +0 -54
  77. package/src/adapters/outbound/git_repository.ts +2 -71
  78. package/src/app/ports/repository.ts +0 -12
  79. package/src/app/project_context.ts +15 -25
  80. package/src/app/use_cases/approve_document.ts +29 -0
  81. package/src/app/use_cases/check_code.ts +21 -56
  82. package/src/app/use_cases/new_document.ts +25 -0
  83. package/src/app/use_cases/project_status.ts +49 -73
  84. package/src/app/use_cases/run_review.ts +11 -30
  85. package/src/app/use_cases/validate_project.ts +4 -4
  86. package/src/domain/approvals.ts +51 -0
  87. package/src/domain/check/check_source.ts +2 -31
  88. package/src/domain/config.ts +9 -85
  89. package/src/domain/hashing.ts +16 -30
  90. package/src/domain/ids.ts +13 -27
  91. package/src/domain/next_step.ts +41 -0
  92. package/src/domain/project/features.ts +71 -0
  93. package/src/domain/project/layout.ts +11 -27
  94. package/src/domain/project/project_docs.ts +48 -0
  95. package/src/domain/project/release.ts +30 -0
  96. package/src/domain/scaffold.ts +0 -1
  97. package/src/domain/skill_budget.ts +4 -4
  98. package/src/domain/trace.ts +8 -25
  99. package/src/domain/validation/document_rules.ts +70 -0
  100. package/src/domain/validation/release_rules.ts +45 -0
  101. package/src/domain/validation/validate_project.ts +21 -28
  102. package/src/domain/versions/cruze_version.ts +3 -9
  103. package/src/main.ts +1 -1
  104. package/templates/init/AGENTS.md +4 -12
  105. package/templates/init/ci.yml +3 -3
  106. package/templates/init/config.yaml +8 -17
  107. package/templates/init/review/claude.yaml +2 -2
  108. package/dist/adapters/inbound/cli/argument_files.js +0 -29
  109. package/dist/adapters/inbound/cli/commands/diff.js +0 -23
  110. package/dist/adapters/inbound/cli/commands/journal.js +0 -32
  111. package/dist/adapters/inbound/cli/commands/progress.js +0 -55
  112. package/dist/adapters/inbound/cli/commands/realign.js +0 -28
  113. package/dist/adapters/inbound/cli/commands/show.js +0 -96
  114. package/dist/app/use_cases/abandon_work.js +0 -42
  115. package/dist/app/use_cases/approve_artifact.js +0 -197
  116. package/dist/app/use_cases/journal_events.js +0 -64
  117. package/dist/app/use_cases/land_change.js +0 -134
  118. package/dist/app/use_cases/new_project_doc.js +0 -48
  119. package/dist/app/use_cases/new_work_item.js +0 -75
  120. package/dist/app/use_cases/realign_done.js +0 -45
  121. package/dist/app/use_cases/realign_status.js +0 -106
  122. package/dist/app/use_cases/record_progress.js +0 -118
  123. package/dist/app/use_cases/show_elements.js +0 -18
  124. package/dist/app/use_cases/show_notes.js +0 -11
  125. package/dist/app/use_cases/show_scope.js +0 -51
  126. package/dist/app/use_cases/upstream_diff.js +0 -55
  127. package/dist/domain/approvals/agent_approval.js +0 -68
  128. package/dist/domain/approvals/evaluate.js +0 -36
  129. package/dist/domain/approvals/fingerprint.js +0 -52
  130. package/dist/domain/approvals/rebase.js +0 -39
  131. package/dist/domain/approvals/records.js +0 -50
  132. package/dist/domain/approvals/upstream_text.js +0 -36
  133. package/dist/domain/architecture_sections.js +0 -23
  134. package/dist/domain/check/decision_comments.js +0 -38
  135. package/dist/domain/decision_citations.js +0 -62
  136. package/dist/domain/edits/agents_file.js +0 -58
  137. package/dist/domain/edits/managed_tables.js +0 -60
  138. package/dist/domain/edits/progress_block.js +0 -33
  139. package/dist/domain/edits/status_lines.js +0 -52
  140. package/dist/domain/elements.js +0 -126
  141. package/dist/domain/journal.js +0 -109
  142. package/dist/domain/land/bookkeeping.js +0 -54
  143. package/dist/domain/land/merge_plan.js +0 -137
  144. package/dist/domain/land/text_ops.js +0 -66
  145. package/dist/domain/line_diff.js +0 -56
  146. package/dist/domain/project/artifact_ref.js +0 -42
  147. package/dist/domain/project/deltas.js +0 -49
  148. package/dist/domain/project/element_lookup.js +0 -124
  149. package/dist/domain/project/living_model.js +0 -55
  150. package/dist/domain/project/new_items.js +0 -48
  151. package/dist/domain/project/notes.js +0 -74
  152. package/dist/domain/project/plan_parts.js +0 -111
  153. package/dist/domain/project/progress.js +0 -43
  154. package/dist/domain/project/project_view.js +0 -72
  155. package/dist/domain/project/roadmap.js +0 -43
  156. package/dist/domain/project/scope_view.js +0 -134
  157. package/dist/domain/project/work_items.js +0 -68
  158. package/dist/domain/status/next_step.js +0 -181
  159. package/dist/domain/status/pending_rethink.js +0 -22
  160. package/dist/domain/status/verification.js +0 -29
  161. package/dist/domain/status/work_status.js +0 -125
  162. package/dist/domain/validation/decision_rules.js +0 -76
  163. package/dist/domain/validation/delta_rules.js +0 -81
  164. package/dist/domain/validation/element_rules.js +0 -104
  165. package/dist/domain/validation/future_rules.js +0 -40
  166. package/dist/domain/validation/living_rules.js +0 -99
  167. package/dist/domain/validation/plan_rules.js +0 -124
  168. package/dist/domain/validation/project_rules.js +0 -115
  169. package/dist/domain/validation/size_rules.js +0 -45
  170. package/dist/domain/validation/vision_rules.js +0 -41
  171. package/dist/domain/validation/work_item_rules.js +0 -175
  172. package/dist/domain/versions/realign_notes.js +0 -72
  173. package/dist/domain/versions/rule_versions.js +0 -29
  174. package/dist/domain/versions/scheduled_exceptions.js +0 -41
  175. package/skills/about/SKILL.md +0 -21
  176. package/skills/architect/SKILL.md +0 -49
  177. package/skills/architect/feature.md +0 -40
  178. package/skills/architect/project.md +0 -71
  179. package/skills/architect/tweak.md +0 -22
  180. package/skills/architect/walkthrough.md +0 -35
  181. package/skills/domain-language/SKILL.md +0 -37
  182. package/skills/envision/feature.md +0 -25
  183. package/skills/envision/intake.md +0 -28
  184. package/skills/envision/project.md +0 -24
  185. package/skills/explore/SKILL.md +0 -39
  186. package/skills/formats/reference/architecture.md +0 -84
  187. package/skills/formats/reference/config.md +0 -80
  188. package/skills/formats/reference/durable-docs.md +0 -74
  189. package/skills/formats/reference/specs.md +0 -65
  190. package/skills/formats/reference/work-items.md +0 -100
  191. package/skills/formats/templates/adr.md +0 -7
  192. package/skills/formats/templates/change.md +0 -29
  193. package/skills/formats/templates/glossary.md +0 -8
  194. package/skills/formats/templates/roadmap.md +0 -32
  195. package/skills/formats/templates/spec.md +0 -11
  196. package/skills/formats/templates/standalone-change.md +0 -46
  197. package/skills/grilling/SKILL.md +0 -90
  198. package/skills/grilling/illustrating.md +0 -38
  199. package/skills/improve/SKILL.md +0 -51
  200. package/skills/land/SKILL.md +0 -48
  201. package/skills/next/SKILL.md +0 -31
  202. package/skills/plan/SKILL.md +0 -62
  203. package/skills/plan/tasks.md +0 -35
  204. package/skills/plan/test-plan.md +0 -14
  205. package/skills/realign/SKILL.md +0 -37
  206. package/skills/realign/notes/0.0.10.md +0 -131
  207. package/skills/realign/notes/0.0.11.md +0 -15
  208. package/skills/realign/notes/0.0.12.md +0 -31
  209. package/skills/realign/notes/0.0.13.md +0 -11
  210. package/skills/realign/notes/0.0.2.md +0 -69
  211. package/skills/realign/notes/0.0.3.md +0 -11
  212. package/skills/realign/notes/0.0.4.md +0 -27
  213. package/skills/realign/notes/0.0.5.md +0 -38
  214. package/skills/realign/notes/0.0.6.md +0 -44
  215. package/skills/realign/notes/0.0.7.md +0 -11
  216. package/skills/realign/notes/0.0.8.md +0 -97
  217. package/skills/realign/notes/0.0.9.md +0 -59
  218. package/skills/realign/notes.md +0 -40
  219. package/skills/rethink/SKILL.md +0 -62
  220. package/skills/rethink/levels.md +0 -54
  221. package/skills/roadmap/SKILL.md +0 -54
  222. package/skills/roles/auditor.md +0 -35
  223. package/skills/roles/design-reviewer.md +0 -43
  224. package/skills/roles/design-rubric.md +0 -41
  225. package/skills/roles/plan-rubric.md +0 -11
  226. package/skills/roles/surveyor.md +0 -41
  227. package/skills/roles/verifier.md +0 -42
  228. package/skills/triage/SKILL.md +0 -37
  229. package/skills/verify/SKILL.md +0 -45
  230. package/skills/verify/manual-test.md +0 -23
  231. package/src/adapters/inbound/cli/argument_files.ts +0 -29
  232. package/src/adapters/inbound/cli/commands/diff.ts +0 -23
  233. package/src/adapters/inbound/cli/commands/journal.ts +0 -32
  234. package/src/adapters/inbound/cli/commands/progress.ts +0 -55
  235. package/src/adapters/inbound/cli/commands/realign.ts +0 -28
  236. package/src/adapters/inbound/cli/commands/show.ts +0 -96
  237. package/src/app/use_cases/abandon_work.ts +0 -42
  238. package/src/app/use_cases/approve_artifact.ts +0 -197
  239. package/src/app/use_cases/journal_events.ts +0 -64
  240. package/src/app/use_cases/land_change.ts +0 -134
  241. package/src/app/use_cases/new_project_doc.ts +0 -48
  242. package/src/app/use_cases/new_work_item.ts +0 -75
  243. package/src/app/use_cases/realign_done.ts +0 -45
  244. package/src/app/use_cases/realign_status.ts +0 -106
  245. package/src/app/use_cases/record_progress.ts +0 -118
  246. package/src/app/use_cases/show_elements.ts +0 -18
  247. package/src/app/use_cases/show_notes.ts +0 -11
  248. package/src/app/use_cases/show_scope.ts +0 -51
  249. package/src/app/use_cases/upstream_diff.ts +0 -55
  250. package/src/domain/approvals/agent_approval.ts +0 -68
  251. package/src/domain/approvals/evaluate.ts +0 -36
  252. package/src/domain/approvals/fingerprint.ts +0 -52
  253. package/src/domain/approvals/rebase.ts +0 -39
  254. package/src/domain/approvals/records.ts +0 -50
  255. package/src/domain/approvals/upstream_text.ts +0 -36
  256. package/src/domain/architecture_sections.ts +0 -23
  257. package/src/domain/check/decision_comments.ts +0 -38
  258. package/src/domain/decision_citations.ts +0 -62
  259. package/src/domain/edits/agents_file.ts +0 -58
  260. package/src/domain/edits/managed_tables.ts +0 -60
  261. package/src/domain/edits/progress_block.ts +0 -33
  262. package/src/domain/edits/status_lines.ts +0 -52
  263. package/src/domain/elements.ts +0 -126
  264. package/src/domain/journal.ts +0 -109
  265. package/src/domain/land/bookkeeping.ts +0 -54
  266. package/src/domain/land/merge_plan.ts +0 -137
  267. package/src/domain/land/text_ops.ts +0 -66
  268. package/src/domain/line_diff.ts +0 -56
  269. package/src/domain/project/artifact_ref.ts +0 -42
  270. package/src/domain/project/deltas.ts +0 -49
  271. package/src/domain/project/element_lookup.ts +0 -124
  272. package/src/domain/project/living_model.ts +0 -55
  273. package/src/domain/project/new_items.ts +0 -48
  274. package/src/domain/project/notes.ts +0 -74
  275. package/src/domain/project/plan_parts.ts +0 -111
  276. package/src/domain/project/progress.ts +0 -43
  277. package/src/domain/project/project_view.ts +0 -72
  278. package/src/domain/project/roadmap.ts +0 -43
  279. package/src/domain/project/scope_view.ts +0 -134
  280. package/src/domain/project/work_items.ts +0 -68
  281. package/src/domain/status/next_step.ts +0 -181
  282. package/src/domain/status/pending_rethink.ts +0 -22
  283. package/src/domain/status/verification.ts +0 -29
  284. package/src/domain/status/work_status.ts +0 -125
  285. package/src/domain/validation/decision_rules.ts +0 -76
  286. package/src/domain/validation/delta_rules.ts +0 -81
  287. package/src/domain/validation/element_rules.ts +0 -104
  288. package/src/domain/validation/future_rules.ts +0 -40
  289. package/src/domain/validation/living_rules.ts +0 -99
  290. package/src/domain/validation/plan_rules.ts +0 -124
  291. package/src/domain/validation/project_rules.ts +0 -115
  292. package/src/domain/validation/size_rules.ts +0 -45
  293. package/src/domain/validation/vision_rules.ts +0 -41
  294. package/src/domain/validation/work_item_rules.ts +0 -175
  295. package/src/domain/versions/realign_notes.ts +0 -72
  296. package/src/domain/versions/rule_versions.ts +0 -29
  297. package/src/domain/versions/scheduled_exceptions.ts +0 -41
  298. package/templates/init/gitattributes +0 -2
@@ -1,31 +0,0 @@
1
- ---
2
- name: cruze-next
3
- description: Says which Cruze step to run next and why, from the project's computed status and the current branch.
4
- ---
5
-
6
- # Next
7
-
8
- Next reads the project's state and says what to do now. The CLI works it out from content, so the answer is the same for every agent and every run.
9
-
10
- ## Steps
11
-
12
- 1. **Ask the CLI.** Run `cruze next` and read its JSON: the step, what it works on, the reason, and any other work that could proceed.
13
- 2. **Add the detail.** Run `cruze status` when the reason mentions approvals, and quote the documents and elements that changed.
14
- 3. **Answer** in three lines or fewer: the step to run, with its target, why it is next, and what else is in flight on other branches. Say that the step runs in a new session, so its context starts empty. Don't start the step unless the user asks you to.
15
-
16
- ## What the steps mean
17
-
18
- | Step | Run |
19
- | --- | --- |
20
- | `envision` | `envision`, at project scope, or `envision "<target>"` for a roadmap feature |
21
- | `architect` | `architect` at project scope, `architect "<feature>"`, or `architect "<target>"` as a tweak |
22
- | `roadmap` | `roadmap`: approve the ordering, or close a finished release |
23
- | `plan` | `plan` for the named change |
24
- | `build` | `build`, on this branch |
25
- | `verify` | `verify`, on this branch |
26
- | `land` | `land`, on this branch |
27
- | `rethink` | `rethink`: something approved changed, and the work citing it must be reviewed |
28
- | `realign` | `realign`: the installed Cruze expects more of existing code than it meets |
29
- | `switch-branch` | Switch to the named branch, where that change is built |
30
-
31
- When the user asks about something `cruze next` didn't name, point them to `triage` for a bug, `explore` for an idea, or `improve` for existing code whose structure they want to change.
@@ -1,62 +0,0 @@
1
- ---
2
- name: cruze-plan
3
- description: Turns the next change into a test plan and ordered tasks with file targets, reviews the plan in a fresh context, and approves it on the branch that will build it once the review closes, leaving you to object or go straight to build.
4
- ---
5
-
6
- # Plan
7
-
8
- Plan turns one designed change into work an implementer can do without guessing: which test proves each scenario, at which seam, and which file each task writes. Every change arrives from `architect`, so plan makes no design decisions. A plan that needs one sends the change back.
9
-
10
- ## Steps
11
-
12
- 1. **Find the change.** Run `cruze next`. Plan the change it names, or the one the user names. It is either a feature's next change, whose row has no folder yet and whose dependencies have landed, or a standalone change that `architect` designed. Done when you can name the change and its feature.
13
- 2. **Check what it builds on.** `cruze status` must show the architecture approved and current, along with the feature when there is one. When something isn't, stop and name the step that fixes it, as `cruze next` does.
14
- 3. **Start its branch.** From an up-to-date main that holds every change this one depends on, create a branch named for the change, such as `open-console-local-serial`, and switch to it. A branch holds one active change.
15
- 4. **Create the change.**
16
- - For a feature's change, run `cruze new change <slug> --feature <feature> --title "<title>"`. It copies the scope from the feature's Changes row.
17
- - A standalone change already exists; plan its empty test plan and tasks.
18
- 5. **Load the standards.** Read these, and follow them for the rest of this step:
19
- - `.agents/skills/cruze-behavioural-testing/SKILL.md`
20
- - `.agents/skills/cruze-hexagonal-design/SKILL.md`, and its language file when one exists for the project's language
21
- - `.agents/skills/cruze-formats/reference/work-items.md`
22
- 6. **Read the design it builds.** Run `cruze show <ref>` and read its output: the full body of every element in the scope, every scenario it delivers, the settled decisions, the ledger and the references. Read an element it lists as cited only when a task will call it, with `cruze show <ID>`. Don't read `docs/architecture.md` or `feature.md` whole: two projects read a 40k-word architecture about 150 times each.
23
- 7. **Check for overlap.** Run `cruze status --overlap --change <ref>`. For each change on another branch that touches the same elements, tell the user which elements are shared and which change should land first. Record the answer under `## Risks`.
24
- 8. **Write the test plan.** Follow [test-plan.md](test-plan.md). Done when every delivered scenario has a `behaviour` row and every port a built adapter implements has a `contract` row.
25
- 9. **Write the tasks.** Follow [tasks.md](tasks.md). Done when every scope ID is proved by a task and every task line matches the grammar.
26
- 10. **Record decisions and risks.** Put task-level choices you made under `## Settled decisions`. Under `## Risks`, name the riskiest task and how its test catches the failure. Open each check you name and confirm it reaches the failure: the test asserts the value at risk rather than one a clamp or default hides, the lint is enabled, and the command prints what you say it shows. When no check does, name a review of the diff. Remove every template guide.
27
- 11. **Validate.** Run `cruze validate`. Done when it reports no errors for the change.
28
- 12. **Review the plan.** Commit the plan, then run the review in `.agents/skills/cruze-roles/SKILL.md` with the design reviewer and its plan rubric, `.agents/skills/cruze-roles/plan-rubric.md`, `review=plan`, and `--item <ref>`.
29
- 13. **Approve.** For a feature's change, run `cruze approve <ref> --by-agent` on this branch and quote its result. The plan carries no design of its own, so once its review has closed, with no blocker open and a disposition for every finding, you approve it for the user. A standalone change, such as the foundation or a prefactor, carries its own design, so show the user the plan and ask them to approve it with `cruze approve <ref>`. The approval binds the change to the branch. When it refuses with `plan-review-open`, do what it names. When it refuses with `size-unaccepted`, the plan has more tasks than `changes.max_tasks`: split the change through `rethink` at feature level, or, when the user accepts the size, list the change under `changes.exceptions` in `.cruze/config.yaml` with their reason and approve again. A blocker still open after round 2 goes to the user, and once they decide it, they approve the plan themselves with `cruze approve <ref>`.
30
- 14. **Commit** with a message such as `docs: plan <change>`.
31
-
32
- ## When the plan needs design
33
-
34
- Stop planning when you find you need any of these:
35
-
36
- - a new element, or a new operation on a port;
37
- - a file the architecture doesn't assign to the owner;
38
- - a scenario that isn't in the spec delta;
39
- - a dependency that isn't in `## Adopt or build`.
40
-
41
- Say what is missing and why, then send the change to `rethink` at feature level. For a standalone change, that means its own deltas. Never add design to `change.md`.
42
-
43
- ## A prefactor
44
-
45
- A prefactor changes structure, not behaviour, so it delivers no scenarios and its tasks have no red step. The tests that already reach what it rebuilds are its safety net. Its plan differs in three places:
46
-
47
- - **Test plan:** no `behaviour` row. Keep the `contract` row of each port a rebuilt adapter implements, naming its existing test file.
48
- - **Risks:** list the existing test files that reach each element it rebuilds, and the command that runs them. They pass before the first task and after every task, and no task edits them. When nothing reaches an element, the first task pins its current behaviour with a test that passes from the start.
49
- - **Tasks:** each task moves one owner and leaves those tests green. Each item keeps the visibility it had, widened only as far as its new callers need: one prefactor's only review finding was visibility left wider than it had to be.
50
-
51
- The plan review checks these with the plan rubric's Prefactor item.
52
-
53
- ## The foundation
54
-
55
- The foundation change, a project's first, also makes CI and the project's tooling real. Its plan adds:
56
-
57
- - `commands:` in `.cruze/config.yaml`: the format, lint, build, test and run commands, as the language's standard tooling runs them. When some tests are much slower than the rest, such as UI or device tests, `test` runs the fast tier and `test_full` the whole suite, so build can run `test` after every task.
58
- - A task that adds the language's format, lint, build and test steps to CI (`.github/workflows/ci.yml`), before the Cruze steps `cruze init` put there. The task proves the flow its smoke test runs.
59
-
60
- ## Next step
61
-
62
- Show the user the test plan table, the tasks in order and the risks, and say the plan is approved, or, for a standalone change, ask them to approve it. They can object, and you amend the plan, run its review on the diff, and approve again. Otherwise the next step is `build`, on this branch, in a new session so its context starts empty.
@@ -1,35 +0,0 @@
1
- # Writing the tasks
2
-
3
- A task is one owner, the files it writes, and the IDs it proves. Build does them in order, one red-to-green cycle and one commit each. The grammar and the proving rules are in `.agents/skills/cruze-formats/reference/work-items.md`.
4
-
5
- 1. **List the owners.** Take every element in the scope, and the owner in code that each one names, from its `File` fact. Add the owners the test plan needs that aren't elements, such as a fake, a test support module or the CI workflow.
6
- 2. **Order from the inside out.**
7
- - Domain types first, then the ports they need.
8
- - Then the use cases, then the adapters, then the inbound adapter.
9
- - The composition root comes last.
10
- - Put fakes just before the first task whose test needs them.
11
- - Each task's test can fail first and then pass, using only what earlier tasks built.
12
- - Put each test in the task that builds the behaviour it checks. When an earlier task's code would already pass a later task's test, such as a failure path the earlier task had to handle, move the test into the earlier task.
13
- - A test that expects a default or empty result, such as no prompt, an empty list, `nil` or `0`, passes against a stub that returns it. Name in the task the break it is first seen failing against, as the wrong behaviour rather than an edit to the code, such as "fails against a model that always shows the prompt". Build may use any break that compiles and turns the same assertion red.
14
- - When the project's lint rejects unused code, such as `cargo clippy -- -D warnings`, put each new item, private and crate-visible ones included, in the task of its first production caller. A test doesn't count as a caller: built earlier, the item fails the lint, and built later, its caller's task can't compile. Each task then commits green on its own.
15
- - An accessor, variant or type arrives in the task whose code first handles, matches or constructs it, never in the task that only tests it. When a later task's `match` would pull in a variant, the variant belongs to that task. Two projects built 13 items in a task other than the planned one.
16
- 3. **Write one line per task:**
17
-
18
- ```markdown
19
- - T3: `ConsoleSession` in `src/access/domain/console_session.rs`, proves ENT-access.console-session
20
- - T7: `OpenConsole` in `src/access/app/open_console.rs`, proves UC-access.open-console, SCN-access.direct-serial
21
- ```
22
-
23
- - Owner and paths in backticks. Every path is a file the architecture assigns to that owner, or a test or support file. List the test support files the task extends, such as a shared harness or fixture, so its tests reuse them.
24
- - When a task adds a module, a file or a dependency, list the file that declares it, such as the crate root or `mod.rs`, the package manifest, or the Xcode project. A task that adds a dependency or a feature of one also lists the lockfile, and names the `## Adopt or build` row that approves it.
25
- - A task proves the elements it builds, and each scenario whose test goes green in it.
26
- - A task that only sets up tooling proves the flow or scenario its checks run.
27
- 4. **Find the owners.** For each rule, text, format or conversion a task's element applies, such as a message, a path format, a rounding or a name check, search the code and the other tasks for every place that applies it. Give it one owner: when an earlier task's owner already holds it, the later task's line names that file as a callee rather than building the rule again. Done when no rule is written in two places. Two projects wrote 20 rules twice and moved them at code review.
28
- 5. **Find the callers.** For each signature, default or setting a task changes, search the code for every use of it, including tests that start the real binary or read the setting. A new field breaks every literal of its type that names all the fields, so search for `<Type> {` too. Add each file that must change to the task. Done when no task will need a file it doesn't list.
29
- 6. **Size each task.** A task writes one owner, with its tests, in one sitting. When an owner would take several steps, such as a use case with many scenarios, split it into tasks that each prove a subset of the scenarios.
30
- - When a task would give an existing file a second responsibility, name the new file in the task, named for what it owns. Never plan a split by line or type count: a file that grows with its one responsibility stays whole, and when it passes a budget, build lists it under `check.exceptions` as the budget rule in `.agents/skills/cruze-hexagonal-design/SKILL.md` says.
31
- - The budgets apply to source files, not tests. Split a test file by the behaviour it covers, one use case or port per file, never to meet a budget. Tests that leave a source file go where the hexagonal-design language file you loaded says.
32
- 7. **Check coverage.**
33
- - Every `Builds` ID is proved by a task, except a module, which is proved by any task that writes inside its `Path`.
34
- - Every delivered scenario is proved by at least one task.
35
- - Done when `cruze validate` reports no `unproved-scope`, `task-format` or `outside-module-map` problems. An `outside-module-map` warning means a task writes a file no module's `Path` covers: add the file to the owning module's `Path` through `rethink`, or move it.
@@ -1,14 +0,0 @@
1
- # Writing the test plan
2
-
3
- The test plan decides, before any code, which test proves each scenario and at which seam. The row format is in `.agents/skills/cruze-formats/reference/work-items.md`, and the four kinds are defined in `.agents/skills/cruze-behavioural-testing/SKILL.md`.
4
-
5
- 1. **One `behaviour` row per delivered scenario.**
6
- - The seam is the use case that serves the scenario's requirement, with a fake named for each driven port it uses.
7
- - When the outcome is what an inbound adapter shows, such as CLI output, an exit code or an HTTP status, the seam is that adapter instead, run for real.
8
- - Two scenarios may share a test file, but each gets its own row.
9
- 2. **One `contract` row per port that a built adapter implements.** The seam names the fake and each real adapter, and what stands in for the outside world: a temporary directory, a pseudo-terminal, a local test server.
10
- 3. **A `domain` row only for real logic.** Add one for a state machine, a calculation, or an invariant with many edge cases, when reaching every case through use cases would take many tests.
11
- 4. **A `smoke` row for each flow the change completes,** when that flow is one of the system's top 1 to 3. It runs the real inbound adapter wired by the real composition root.
12
- 5. **Test file paths follow the language's conventions.** Put behaviour, contract and smoke tests where the language keeps tests that use the public API, such as `tests/` in Rust. Put domain tests where it keeps unit tests. When the language file says where tests go once they outgrow their source file, follow it. Add each test to the file for its seam in the test support module the language file names, rather than a new file per task.
13
-
14
- Done when every delivered scenario has a `behaviour` row, every port a built adapter implements has a `contract` row, and every test file path is a real path the project's test runner will find.
@@ -1,37 +0,0 @@
1
- ---
2
- name: cruze-realign
3
- description: Brings an existing codebase up to what the installed Cruze expects, by auditing it against each release's realign notes, deciding every finding with you, and scheduling the fixes as prefactor changes.
4
- ---
5
-
6
- # Realign
7
-
8
- Each Cruze release can expect more of a project's code and documents than the last, such as where tests live or how error types are shaped. `cruze install` updates the skills; realign brings the existing work up to them. The code's version is `standards:` in `.cruze/config.yaml`, and the installed one is `cruze:`. Rules newer than `standards:` report but fail no CI until realign moves it.
9
-
10
- ## Steps
11
-
12
- 1. **Find the gap.** Run `cruze realign status` and quote its first line: the version the code meets and the one installed. Add `--full` when the user asks for a full audit, or the project adopted Cruze partway and has never been realigned; it takes every release's notes. On `install-first`, the skills are older than the CLI: run `cruze install` first. Read [notes.md](notes.md) for what a note holds. Done when you can name every note in the report.
13
- 2. **See what is in flight.** Run `cruze status`. Realign doesn't wait for active features and changes; it schedules around them in step 6.
14
- 3. **Load the standards.** Read these, and each skill file a note's `Rule` names:
15
- - `.agents/skills/cruze-hexagonal-design/SKILL.md`, and its language file when one exists for the project's language
16
- - `.agents/skills/cruze-behavioural-testing/SKILL.md`
17
- - `.agents/skills/cruze-formats/reference/architecture.md`
18
- 4. **Audit.** Run the auditor role from `.agents/skills/cruze-roles/SKILL.md` on every note with an `Ask`. A note whose `Rule` is an item of `.agents/skills/cruze-roles/design-rubric.md` is about designs, not code: run the design reviewer instead, on each feature in flight, with that item only, since those designs were reviewed before the item existed. In a full audit, give it the standards instead, and run one auditor per module in the module map. Check its evidence against the files. Done when every note with an `Ask` has an answer with evidence, and every note with a `Detect` has its findings from the status report.
19
- 5. **Decide each finding** with the user, a group at a time, with your recommendation:
20
- - `fixed`: a prefactor change will fix it.
21
- - `waived`: the project keeps its own convention, with the reason. For a `check:` finding, list the file under `check.exceptions` with that reason, which keeps CI green. For the rest, the journal holds the waiver.
22
- - `deferred`: it waits for later work, recorded with `cruze features add` or on the roadmap.
23
- - `rethink`: a design reviewer's finding on a feature in flight, which a feature-level rethink of its design fixes. A prefactor can't fix a design, so never record one of these as `fixed`.
24
-
25
- Record each with `cruze journal add disposition --set review=realign --set finding="<note id>: <path or summary>" --set disposition=<fixed|waived|deferred|rethink> --set reason="<reason>"`, adding `--item <feature>` for a `rethink`. Until a rethink is recorded for that feature, `cruze next` names it, `cruze status` counts its findings, and the build gate holds its changes. One project recorded seven such findings as `fixed`, and nothing showed them. For a finding from a `Detect` rule, write the finding as exactly `<note id>: <path>`, so `cruze realign status` knows it next time. A recorded waiver is never raised again.
26
- 6. **Schedule the fixes.** Group the `fixed` findings into prefactor changes, each small enough to plan (about 12 tasks), one module or concern per change.
27
- - When a fix changes what `docs/architecture.md` says, such as an error element, a use case's `Errors` or a port's `Operations`, run `rethink` at architecture level first. It replans the built elements the prefactor rebuilds.
28
- - Create each prefactor as "A prefactor" in `.agents/skills/cruze-architect/tweak.md` describes. The behaviour tests are its safety net: wire formats, messages and exit codes stay as they are unless the user decides otherwise.
29
- - Put each on the roadmap, following `.agents/skills/cruze-roadmap/SKILL.md`, which says where a prefactor goes. Run `cruze status --overlap --change <ref>`, and ask the user the order for each item it overlaps, with your recommendation.
30
- - Run `cruze next`. When it names a feature in flight because an amendment moved an element it cites, settle it now, with `cruze diff <feature>`: re-stamp it, or rebase its delta as `.agents/skills/cruze-rethink/levels.md` describes. Leave no feature stale for the next session to find.
31
- 7. **Record it.** Run `cruze realign done`, adding `--change <ref>` for the prefactor that fixes the `Detect` findings still open. It moves `standards:` up, and lists those files under `check.exceptions` until that change lands, when `cruze land` removes them. Quote its result, and commit with a message such as `chore: realign to Cruze <version>`.
32
-
33
- Done when `cruze realign status` reports the code meeting the installed version, and every finding has a journaled disposition.
34
-
35
- ## Next step
36
-
37
- `plan` for the first prefactor change. When nothing needed fixing, `next`. Start it in a new session, so its context starts empty.
@@ -1,131 +0,0 @@
1
- # Realign notes: 0.0.10
2
-
3
- ## Existing code
4
-
5
- ### decision-citations-docs: Living docs and deltas cite a decision by number only where it is recorded
6
- - Applies to: existing code
7
- - Rule: `.agents/skills/cruze-formats/SKILL.md`, "Decisions"
8
- - Detect: validate:decision-citation
9
- - Migrate: in a prefactor, rewrite each citation the rule reports in `docs/`: write what the decision settled into the element or sentence, reading it from the archived feature's `## Settled decisions` under `.cruze/archive/`, or cite the ADR that records it. A feature in flight fixes its own delta through `rethink` before its next approval, since `cruze approve` refuses a delta that cites one.
10
-
11
- ### decision-citations-code: Code comments cite no decision by number
12
- - Applies to: existing code
13
- - Rule: `.agents/skills/cruze-formats/SKILL.md`, "Decisions"
14
- - Detect: check:decision-citation
15
- - Migrate: in a prefactor, replace each citation `cruze check` reports with what was decided, in a few words, or with the element or ADR ID that holds it. Delete one that adds nothing to what the code already says.
16
-
17
- ### pitfalls-to-cruze: Known pitfalls hold only lessons about the project
18
- - Applies to: existing code
19
- - Rule: `.agents/skills/cruze-land/SKILL.md`, "Landing a change", step 7
20
- - Ask: which lines under `## Known pitfalls` in `AGENTS.md` are about how Cruze's deltas, plans, tasks, test plans or reviews are written, or about practice that holds in any project in the language, rather than this product's domain or code?
21
- - Migrate: record each such line with `cruze journal add lesson --set summary=<text> --set instead=<text> --set step=<step>`, so `cruze feedback export` carries it to Cruze, then remove it from `AGENTS.md`.
22
-
23
- ### vision-intent: The vision holds the principles every design follows and what must stay possible
24
- - Applies to: existing code
25
- - Rule: `.agents/skills/cruze-formats/reference/durable-docs.md`, "docs/vision.md"
26
- - Ask: does `docs/vision.md` lack `## Principles` or `## Must stay possible`, while the notes in `.cruze/notes/`, the ADRs, the architecture's `## Decisions` or the settled decisions of features, archived ones included, state a rule every design follows, or a capability the user expects later, such as one introduced with "eventually"?
27
- - Migrate: run envision at project scope to rework the vision. Add the two sections from those sources, with the user, ask about what may come later as `.agents/skills/cruze-envision/possibilities.md` describes, and approve the vision again. A principle the design already departs from is settled with the user: amend the principle, or rethink the design.
28
-
29
- ### intent-review: A design follows the vision's principles and leaves room for what must stay possible
30
- - Applies to: existing code
31
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, "Design rubric", item 12
32
- - Ask: for each feature in flight, does its design depart from a `PRINCIPLE` the vision states, or close off a `LATER` capability it touches?
33
- - Migrate: settle each through `rethink` at feature level before the feature's next change is planned, or amend the vision's row when the user decides the principle or capability changes.
34
-
35
- ### future-unanchored: A Future fact names the need it keeps room for
36
- - Applies to: existing code
37
- - Rule: `.agents/skills/cruze-formats/reference/architecture.md`, "Rules for facts"
38
- - Detect: validate:future-unanchored
39
- - Migrate: for each `Future` fact `cruze validate` reports, cite the vision's `LATER` capability or the feature on the map or roadmap it serves, adding the capability to the vision with the user when it isn't there yet. A seam nobody needs goes, through `rethink` at architecture level.
40
-
41
- ### notes-say-what-they-are: Every note says its kind and what it is about
42
- - Applies to: existing code
43
- - Rule: `.agents/skills/cruze-formats/SKILL.md`, "Where documents live"
44
- - Ask: which notes in `.cruze/notes/` have no `- Kind:` and `- About:` lines under their title, and which of them hold the user's input, such as a seed, a PRD or a design write-up, whose parts no step has taken up?
45
- - Migrate: add `- Kind:` and `- About:` to each, as `cruze show --notes` lists them. For a note of the user's input, run the intake in `.agents/skills/cruze-envision/intake.md` on it, so its parts are handed to the steps that take them up.
46
-
47
- ## New work only
48
-
49
- ### plan-task-files: Items wait for a production caller, and tasks list lockfiles and every literal a new field breaks
50
- - Applies to: new work only
51
- - Rule: `.agents/skills/cruze-plan/tasks.md`, steps 2, 3 and 5
52
-
53
- ### plan-risks-reach: A check named under Risks is confirmed to reach the failure
54
- - Applies to: new work only
55
- - Rule: `.agents/skills/cruze-plan/SKILL.md`, "Steps", step 10
56
-
57
- ### design-review-ports-and-quotes: The design reviewer checks each use case against every refusal it can meet, and quoted output against the code
58
- - Applies to: new work only
59
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, "Design rubric", item 8
60
-
61
- ### architect-retired-rules: A delta rewords every statement of a rule it retires, and modifies a port it gives a new use
62
- - Applies to: new work only
63
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 4
64
-
65
- ### fakes-partial-failure: Fakes stall and fail partway, and end the way the real adapter does
66
- - Applies to: new work only
67
- - Rule: `.agents/skills/cruze-behavioural-testing/fakes.md`, "Writing a fake"
68
-
69
- ### tests-races-and-callers: Race tests are seen failing, and a test is never a reason for production code
70
- - Applies to: new work only
71
- - Rule: `.agents/skills/cruze-behavioural-testing/SKILL.md`, "Writing tests for a task" and "Expected values"
72
-
73
- ### cancel-safe-writes: Memory follows storage before the next await
74
- - Applies to: new work only
75
- - Rule: `.agents/skills/cruze-hexagonal-design/runtime.md`, "Failures, retries and cancellation"
76
-
77
- ### rust-reachable-panics: No expect on a case a caller, the clock or a race can reach
78
- - Applies to: new work only
79
- - Rule: `.agents/skills/cruze-hexagonal-design/languages/rust.md`, "Errors"
80
-
81
- ### research-own-call-shapes: New call shapes and test images are verified by running them
82
- - Applies to: new work only
83
- - Rule: `.agents/skills/cruze-research/SKILL.md`, "Adopt or build", step 7
84
-
85
- ### rethink-dispositions: A finding a later rethink fixes is recorded as rethink, and holds its work
86
- - Applies to: new work only
87
- - Rule: `.agents/skills/cruze-realign/SKILL.md`, "Steps", step 5
88
-
89
- ### prefactor-order: A prefactor goes before the items it overlaps, unless one is building
90
- - Applies to: new work only
91
- - Rule: `.agents/skills/cruze-roadmap/SKILL.md`, "Adding an item"
92
-
93
- ### prefactor-plans: A prefactor's plan names its safety net and keeps visibility as it was
94
- - Applies to: new work only
95
- - Rule: `.agents/skills/cruze-plan/SKILL.md`, "A prefactor"
96
-
97
- ### merged-deltas: An element a feature merged keeps its living text, and needs no rebase
98
- - Applies to: new work only
99
- - Rule: `.agents/skills/cruze-rethink/levels.md`, "A conflict with living text"
100
-
101
- ### envision-possibilities: Envision asks about the capabilities the product may grow into
102
- - Applies to: new work only
103
- - Rule: `.agents/skills/cruze-envision/possibilities.md`, "Exploring what may come later"
104
-
105
- ### grilling-long-term-intent: Long-term intent goes to the vision, from any step
106
- - Applies to: new work only
107
- - Rule: `.agents/skills/cruze-grilling/SKILL.md`, "Long-term intent"
108
-
109
- ### envision-confirms-agreed: A proposal the user never decided is asked, not carried as settled
110
- - Applies to: new work only
111
- - Rule: `.agents/skills/cruze-envision/project.md`, step 2
112
-
113
- ### reviewer-rubrics: A review reads only the rubric for what it reviews
114
- - Applies to: new work only
115
- - Rule: `.agents/skills/cruze-roles/design-reviewer.md`, "Rubric"
116
-
117
- ### element-lookup: Steps read a large architecture's elements through the index
118
- - Applies to: new work only
119
- - Rule: `.agents/skills/cruze-formats/reference/architecture.md`, "Reading it"
120
-
121
- ### intake-handoff: Envision takes in any input and hands each part to the step that takes it up
122
- - Applies to: new work only
123
- - Rule: `.agents/skills/cruze-envision/intake.md`, "Taking in the user's input"
124
-
125
- ### every-later-row: Every design is checked against every capability that must stay possible
126
- - Applies to: new work only
127
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, "Design rubric", item 12
128
-
129
- ### vision-intent-length: A principle or capability keeps every need it names
130
- - Applies to: new work only
131
- - Rule: `.agents/skills/cruze-formats/reference/durable-docs.md`, "docs/vision.md"
@@ -1,15 +0,0 @@
1
- # Realign notes: 0.0.11
2
-
3
- ## New work only
4
-
5
- ### review-severity: A blocker is a failure ordinary use reaches, not every gap in the design
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-roles/code-reviewer.md`, "Findings"
8
-
9
- ### reverify-scope: A verify after a send-back reviews only the code changed since the last verify
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-verify/SKILL.md`, "Steps", steps 1 and 10
12
-
13
- ### detail-amendments: A missing limit, timeout, message or error case is settled as a detail inside build or verify
14
- - Applies to: new work only
15
- - Rule: `.agents/skills/cruze-rethink/levels.md`, "Detail"
@@ -1,31 +0,0 @@
1
- # Realign notes: 0.0.12
2
-
3
- ## New work only
4
-
5
- ### walkthrough-types: The walkthrough shows the types each caller passes, and the decisions the user didn't make
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-architect/walkthrough.md`, "The overview", items 3 and 5
8
-
9
- ### design-needed-fields: A field serves a need only when something reads it
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, item 3
12
-
13
- ### design-typed-inside: Values passed inside the system are typed
14
- - Applies to: new work only
15
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, item 13
16
-
17
- ### grilling-shrink: Doubt gets an option that shrinks the design, and a growing answer gets a simpler alternative
18
- - Applies to: new work only
19
- - Rule: `.agents/skills/cruze-grilling/SKILL.md`, "A round"
20
-
21
- ### plain-questions: Questions name things in plain words, with an ID only beside them, and illustrate pick-one options too
22
- - Applies to: new work only
23
- - Rule: `.agents/skills/cruze-grilling/illustrating.md`, "Reading cold" and "Choosing the illustration"
24
-
25
- ### grilling-context: Questions explain the part of the design they ask about before asking
26
- - Applies to: new work only
27
- - Rule: `.agents/skills/cruze-grilling/illustrating.md`, "Reading cold"
28
-
29
- ### rethink-forward: A feature or architecture rethink designs for the features ahead, as architect does
30
- - Applies to: new work only
31
- - Rule: `.agents/skills/cruze-rethink/SKILL.md`, "Steps", steps 3 and 4
@@ -1,11 +0,0 @@
1
- # Realign notes: 0.0.13
2
-
3
- ## New work only
4
-
5
- ### foundation-choice: The first change is a foundation the user chooses: a product shell, a core component or a walking skeleton
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-architect/project.md`, "Choosing the foundation"
8
-
9
- ### design-depth: Project-scope architect designs the foundation in full, and the rest of the release at its boundaries
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-architect/project.md`, "Design the architecture", step 3
@@ -1,69 +0,0 @@
1
- # Realign notes: 0.0.2
2
-
3
- ## Existing code
4
-
5
- ### test-placement: Rust tests that outgrow their file live in tests/
6
- - Applies to: existing code
7
- - Rule: `.agents/skills/cruze-hexagonal-design/languages/rust.md`, "Dependencies and tooling"
8
- - Detect: check:test-placement
9
- - Migrate: move `src/<module>/tests.rs` and `src/<module>/tests/*.rs` to the crate's `tests/<module>.rs`, or `tests/<module>/main.rs` with one file per topic, driving the public API. A test whose private seam is the contract, such as a filesystem trait a crash test injects, stays, listed under `check.exceptions` with that reason.
10
-
11
- ### readme-overview: The README says what the project is
12
- - Applies to: existing code
13
- - Rule: `.agents/skills/cruze-envision/project.md`, step 9
14
- - Detect: validate:readme-overview
15
- - Migrate: write one paragraph under the README's title from the vision's Problem, Users and Goals, ending with a link to `docs/vision.md`.
16
-
17
- ### feature-size: A feature has at most 6 changes
18
- - Applies to: existing code
19
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 12
20
- - Detect: validate:feature-size
21
- - Migrate: only for features still in progress. Keep the changes that have landed or started, and move the rest into a new feature with `cruze features add`, through `rethink` at feature level.
22
-
23
- ### module-paths: Every file a task writes is inside a module's Path
24
- - Applies to: existing code
25
- - Rule: `.agents/skills/cruze-plan/tasks.md`, step 6
26
- - Detect: validate:outside-module-map
27
- - Migrate: only for changes still being planned or built. Add the file to its owner's `Path` through `rethink` at architecture level, or move the file.
28
-
29
- ### error-types: Error types exist only where callers handle their cases differently
30
- - Applies to: existing code
31
- - Rule: `.agents/skills/cruze-hexagonal-design/SKILL.md`, "Representations and errors"
32
- - Ask: Does any error type copy another's variants, differ from another only in its name, or carry a case that every caller rules out, such as with `unreachable!` or `expect`? Does a use case define its own error when it only passes a domain error through?
33
- - Migrate: return or wrap the domain error in one case, merge similar failures into one type with the difference as a field, and narrow return types. Keep wire codes, messages and exit statuses unchanged. When `docs/architecture.md` names the error types, rethink at architecture level before the prefactor.
34
-
35
- ### shared-test-support: Tests share fixtures and harnesses
36
- - Applies to: existing code
37
- - Rule: `.agents/skills/cruze-behavioural-testing/SKILL.md`, "Test support"
38
- - Ask: Do test files define helpers, fixtures or harnesses that another test file or the test support module already has, or share code across crates with `#[path]` includes?
39
- - Migrate: move each shared helper into the test support module, and in a Rust workspace into one dev-only test-support crate. Replace the copies with uses of it.
40
-
41
- ## New work only
42
-
43
- ### design-review-rubric: Contradictions are blockers, and slices build whole elements
44
- - Applies to: new work only
45
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, "Design rubric"
46
-
47
- ### verified-claims: Research runs every claim the design relies on
48
- - Applies to: new work only
49
- - Rule: `.agents/skills/cruze-research/SKILL.md`, "Adopt or build", step 7
50
-
51
- ### design-change-findings: A finding that needs a design change goes to rethink
52
- - Applies to: new work only
53
- - Rule: `.agents/skills/cruze-roles/SKILL.md`, "Round 1", step 3
54
-
55
- ### scope-now: Code for a later change waits for that change
56
- - Applies to: new work only
57
- - Rule: `.agents/skills/cruze-roles/code-reviewer.md`, rubric item 3
58
-
59
- ### plan-foresight: Plans find callers, respect budgets and lints, and split tests by behaviour
60
- - Applies to: new work only
61
- - Rule: `.agents/skills/cruze-plan/tasks.md`
62
-
63
- ### rethink-attribution: Rethinks name the step that found and missed them
64
- - Applies to: new work only
65
- - Rule: `.agents/skills/cruze-rethink/SKILL.md`, step 7
66
-
67
- ### recorded-version: Install records the Cruze version and keeps CI on it
68
- - Applies to: new work only
69
- - Rule: `cruze install`, which writes `cruze:` in `.cruze/config.yaml` and moves the CI pin
@@ -1,11 +0,0 @@
1
- # Realign notes: 0.0.3
2
-
3
- ## New work only
4
-
5
- ### review-helper-fallback: A review runs in a helper when no review agent is configured or installed
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-roles/SKILL.md`, "Running a role", step 3
8
-
9
- ### optional-review-command: review.command is optional, and set only for Claude Code
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-formats/reference/config.md`, "Configuration format"
@@ -1,27 +0,0 @@
1
- # Realign notes: 0.0.4
2
-
3
- ## New work only
4
-
5
- ### argument-files-anywhere: Files named on the command line may be outside the project
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-roles/SKILL.md`, "Running a role"
8
-
9
- ### cli-output-format: The CLI prints one format on stdout, JSON for agents and text with --text
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-about/SKILL.md`
12
-
13
- ### overlap-scope: Overlap counts only in-flight changes, and only the elements their scope and delta name
14
- - Applies to: new work only
15
- - Rule: `.agents/skills/cruze-plan/SKILL.md`, "Steps", step 7
16
-
17
- ### refused-options: The CLI refuses an option its command doesn't take
18
- - Applies to: new work only
19
- - Rule: `.agents/skills/cruze-about/SKILL.md`
20
-
21
- ### feature-map-summary: A feature's summary on the feature map follows its decisions
22
- - Applies to: new work only
23
- - Rule: `.agents/skills/cruze-land/SKILL.md`, "Landing a change", step 4
24
-
25
- ### journal-list-item: Journal list narrows to one feature or change with --item
26
- - Applies to: new work only
27
- - Rule: `.agents/skills/cruze-about/SKILL.md`
@@ -1,38 +0,0 @@
1
- # Realign notes: 0.0.5
2
-
3
- ## New work only
4
-
5
- ### review-exceptions: The user decides only the review findings that are theirs
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-roles/SKILL.md`, "Running a review", round 1, steps 3 to 5
8
-
9
- ### plan-approved-by-agent: A plan is approved once its review closes, without stopping for the user
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-plan/SKILL.md`, "Steps", step 13
12
-
13
- ### rethink-restamps: A rethink re-stamps the work it didn't change
14
- - Applies to: new work only
15
- - Rule: `.agents/skills/cruze-rethink/SKILL.md`, "Steps", step 6
16
-
17
- ### change-too-small: A feature's change builds at least 3 elements
18
- - Applies to: new work only
19
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 12
20
- - Detect: validate:change-too-small
21
-
22
- ### change-too-large: A change delivers at most 30 scenarios
23
- - Applies to: new work only
24
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 12
25
- - Detect: validate:change-too-large
26
-
27
- ### plan-too-large: A plan has at most 25 tasks
28
- - Applies to: new work only
29
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 12
30
- - Detect: validate:plan-too-large
31
-
32
- ### concerns-per-size: Reviewers list concerns in proportion to the work
33
- - Applies to: new work only
34
- - Rule: `.agents/skills/cruze-roles/code-reviewer.md`, "Findings"
35
-
36
- ### reverify-changed-plan: A plan changed after verify needs verifying again, whoever approved it
37
- - Applies to: new work only
38
- - Rule: `.agents/skills/cruze-verify/SKILL.md`
@@ -1,44 +0,0 @@
1
- # Realign notes: 0.0.6
2
-
3
- ## New work only
4
-
5
- ### suite-once-per-commit: The full test suite runs once per commit, and verify quotes build's result
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-verify/SKILL.md`, "Steps", step 2
8
-
9
- ### test-tiers: A project with slow tests can split them into test and test_full
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-formats/reference/config.md`
12
- - Fix: when the full suite takes more than a few minutes, move it to `test_full` under `commands:` and make `test` the fast tier
13
-
14
- ### test-support-in-scope: Build extends the test support module without a rethink
15
- - Applies to: new work only
16
- - Rule: `.agents/skills/cruze-build/SKILL.md`, "Deviations"
17
-
18
- ### name-the-break: Plan names the break for a test that passes against a stub
19
- - Applies to: new work only
20
- - Rule: `.agents/skills/cruze-plan/tasks.md`, step 2
21
-
22
- ### round-2-by-agent: The agent checks round 2 when every blocker was fixed as proposed
23
- - Applies to: new work only
24
- - Rule: `.agents/skills/cruze-roles/SKILL.md`, "Running a review", round 2
25
-
26
- ### size-before-approval: Size warnings are cleared or accepted before a feature is approved
27
- - Applies to: new work only
28
- - Rule: `.agents/skills/cruze-architect/feature.md`, step 12
29
-
30
- ### verify-every-claim: Research checks claims about the language, platform and external systems
31
- - Applies to: new work only
32
- - Rule: `.agents/skills/cruze-research/SKILL.md`, "Adopt or build", step 7
33
-
34
- ### cross-section-consistency: The design reviewer checks cross-cutting rules, interleavings and stale prose
35
- - Applies to: new work only
36
- - Rule: `.agents/skills/cruze-roles/design-rubric.md`, "Design rubric", item 8
37
-
38
- ### one-message-walkthrough: The design walkthrough is one overview, then the documents in full
39
- - Applies to: new work only
40
- - Rule: `.agents/skills/cruze-architect/walkthrough.md`
41
-
42
- ### quoted-titles: New features and changes quote their title in the header
43
- - Applies to: new work only
44
- - Rule: `.agents/skills/cruze-formats/templates/change.md`
@@ -1,11 +0,0 @@
1
- # Realign notes: 0.0.7
2
-
3
- ## New work only
4
-
5
- ### improve-skill: Existing code can be restructured to today's standards with the improve skill
6
- - Applies to: new work only
7
- - Rule: `.agents/skills/cruze-improve/SKILL.md`
8
-
9
- ### layout-by-kind: The layout is the one normal for the kind of system and its language, with the fewest layers that keep the rules
10
- - Applies to: new work only
11
- - Rule: `.agents/skills/cruze-hexagonal-design/SKILL.md`, "Layers"