@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
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # Cruze
2
+
3
+ <p align="center">
4
+ <img src="docs/assets/cruze-logo.jpg" alt="Cruze" width="720">
5
+ </p>
6
+
7
+ Cruze is a spec-driven development framework for coding agents. It keeps one living model of your system (vision, glossary, architecture and behaviour specs) and delivers work as small changes against that model. Each change is merged back into the model when it lands, so the architecture an agent reads on the tenth change is as current as it was on the first.
8
+
9
+ It works with any agent that supports the [Agent Skills](https://agentskills.io) format. It ships as one npm package: a `cruze` CLI that owns every deterministic step (IDs, approvals, checks, merges) and a set of skills that guide the agent through design and delivery.
10
+
11
+ ## Status
12
+
13
+ Version 0.0.1 is the first preview. Early development. The CLI is complete for the V1 lifecycle. The document formats ship as the `cruze-formats` skill, the standards an agent designs and codes to ship as knowledge skills, and the whole workflow, from explore to land, ships as workflow skills. Claude Code is the agent tested so far.
14
+
15
+ ## Why
16
+
17
+ Spec-driven workflows tend to fail in the same few ways:
18
+
19
+ - The architecture drifts after a few changes, because design decisions die with the change that made them.
20
+ - Stepping back to fix a design mid-implementation breaks the workflow's state.
21
+ - Code lands in a handful of oversized files, because nothing owns module structure before code is written.
22
+ - Everything is "fully specified", yet the result fails when a person actually uses it.
23
+ - Review loops keep finding new things to change and never converge.
24
+
25
+ Cruze answers each of these with a specific mechanism. A living `docs/architecture.md` is read at every step and updated by every change. Approvals are bound to document content, so stepping back is just editing. Every task names the file it touches, and `cruze check` enforces layer rules. Scenarios are traced to behavioural tests, and the system is actually run. Reviews use a closed rubric with a hard limit of two rounds.
26
+
27
+ ## Quick start
28
+
29
+ Requires Node.js 22.18 or later, and git.
30
+
31
+ ### 1. Install the CLI
32
+
33
+ The skills run `cruze` commands, so the agent needs `cruze` on its path. Install it globally, in one of three ways. `cruze --version` confirms which version you have.
34
+
35
+ From a GitHub Release, without npm. Each release attaches the packed package:
36
+
37
+ ```sh
38
+ npm install -g https://github.com/PrintPractical/cruze/releases/download/v0.0.1/printpractical-cruze-0.0.1.tgz
39
+ ```
40
+
41
+ From npm, once a version is published there:
42
+
43
+ ```sh
44
+ npm install -g @printpractical/cruze
45
+ ```
46
+
47
+ From the git repository, at a tag or `#main`. This needs git and access to the repository. npm 11 needs `--install-links` for a global git install, and the first `cruze` command builds the CLI, which takes a moment:
48
+
49
+ ```sh
50
+ npm install -g --install-links github:PrintPractical/cruze#v0.0.1
51
+ ```
52
+
53
+ ### 2. Set up a repository
54
+
55
+ In the root of the repository:
56
+
57
+ ```sh
58
+ cruze init
59
+ ```
60
+
61
+ When you didn't install from npm, tell `init` where Cruze came from, so the CI it writes runs the same source instead of the npm package:
62
+
63
+ ```sh
64
+ cruze init --package https://github.com/PrintPractical/cruze/releases/download/v0.0.1/printpractical-cruze-0.0.1.tgz
65
+ ```
66
+
67
+ `init` asks for the project name, then creates:
68
+
69
+ | Path | Purpose |
70
+ | --- | --- |
71
+ | `README.md` | Titled with the project name |
72
+ | `CHANGELOG.md` | In [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format |
73
+ | `AGENTS.md` | Agent instructions; Cruze keeps its managed sections current |
74
+ | `CLAUDE.md` | One line that imports `AGENTS.md`, for Claude Code |
75
+ | `.cruze/config.yaml` | Project configuration |
76
+ | `.github/workflows/ci.yml` | CI that runs `cruze validate`, `check` and `trace`; the walking-skeleton change adds the language's build and test steps |
77
+ | `.gitattributes` | Merges Cruze's journals line by line, so parallel branches don't conflict on them |
78
+ | `.agents/skills/cruze-*` | The Cruze skills, linked into `.claude/skills/` for Claude Code |
79
+
80
+ Existing files are never overwritten, so it is safe to run in an existing repository.
81
+
82
+ To upgrade, install the new version globally the same way, then update the skills in each repository:
83
+
84
+ ```sh
85
+ cruze install
86
+ ```
87
+
88
+ Also update the version in `.github/workflows/ci.yml`.
89
+
90
+ `install` replaces the Cruze skills (those named `cruze-*`) and leaves your own skills alone. Pass `--agent claude` to link skills for Claude Code in a repository without `CLAUDE.md` or `.claude/`.
91
+
92
+ The CLI writes JSON to stdout when it isn't attached to a terminal, and a human summary to stderr. Pass `--json` to get JSON on a terminal too.
93
+
94
+ ## Commands
95
+
96
+ Skills call these at fixed points, and CI runs `check` and `trace` on every push. Run `cruze help` for every option.
97
+
98
+ | Command | What it does |
99
+ | --- | --- |
100
+ | `cruze validate` | Checks every document against the formats: IDs, elements, deltas, scope rules, task lines, test plans, roadmap and config |
101
+ | `cruze approve <doc>` | Records an approval as a fingerprint: the document's design hash plus the hash of every upstream element it cites. `--replan` sets built elements a rethink changed back to planned; `--rebase` accepts living text a feature must now build on |
102
+ | `cruze next` | Names the step to run next on this branch, and why, from computed status |
103
+ | `cruze status` | Computes each document's state (approved, edited, upstream changed or unapproved) from content, never from stored state |
104
+ | `cruze status --gate build` | Passes only when this branch's change, its feature and the architecture are approved and current |
105
+ | `cruze status --overlap` | Lists changes on other branches that touch the same elements as this branch's change |
106
+ | `cruze new <kind>` | Creates a project document (`vision`, `glossary`, `architecture`, `roadmap`) or work (`feature`, `change`, `adr`, `note`) from its template, with a dated ID that is never reused |
107
+ | `cruze task done <T#>` | Ticks a task with its commit; `cruze task reopen` unticks one a rethink changed, and `cruze task deviation` records a small departure from the plan |
108
+ | `cruze features <add\|drop>` | Edits the future list of the feature map |
109
+ | `cruze roadmap prune` | Clears landed items from the roadmap's status when a release closes |
110
+ | `cruze trace` | Fails when a delivered scenario has no test carrying its ID; `--all` checks every built scenario |
111
+ | `cruze check` | Enforces the layer rules and the file budgets; `--ci` also fails on budget warnings |
112
+ | `cruze review <role>` | Runs a review role (design reviewer, code reviewer, verifier or researcher) in a fresh agent context, through the command in `.cruze/config.yaml` |
113
+ | `cruze land` | Merges a verified change into the living docs, re-stamps the approvals the merge would make stale, fills the Commands and Layout sections of `AGENTS.md`, and archives finished work |
114
+ | `cruze abandon <ref>` | Archives a feature or standalone change that stops for good, with its reason, and puts a feature back on the future list |
115
+ | `cruze journal add <event>` | Records a rethink, review round, disposition, verification, override or bug; `cruze feedback export` bundles the journal for improving Cruze itself |
116
+
117
+ Stepping back is editing: change an upstream document and every approval that cites a changed element shows as stale, with the element named. Re-approving is the rewind; there are no phases to reset.
118
+
119
+ ## Skills
120
+
121
+ `cruze init` and `cruze install` put these into `.agents/skills/`. Agents load them when a situation calls for them, and the workflow skills will load them by path at the step that needs them.
122
+
123
+ | Skill | What it holds |
124
+ | --- | --- |
125
+ | `cruze-explore` | Optional thinking partner before any step: options and trade-offs, captured as a note only when you ask |
126
+ | `cruze-envision` | The what: the project's vision, goals and feature map, or one feature's intent and requirements with scenarios |
127
+ | `cruze-architect` | The how: the architecture, a feature's architecture delta and its changes, or a tweak; ends with a design review and a walkthrough for your approval |
128
+ | `cruze-roadmap` | Orders the release into phases with blocking edges and goal coverage, and closes a release |
129
+ | `cruze-plan` | Turns a change into a test plan and ordered tasks with file targets, reviewed in a fresh context |
130
+ | `cruze-build` | Builds the change task by task, each test-first, checked and committed, and stops to rethink when the design is wrong |
131
+ | `cruze-verify` | Runs the checks, a fresh-context verifier that uses the real system, a two-lane code review and a manual test script, then asks you to accept |
132
+ | `cruze-land` | Merges the change into the living docs and updates the changelog, README and `AGENTS.md`; also lands bug fixes |
133
+ | `cruze-triage` | Reproduces a bug, finds its root cause against the living docs, and fixes it test-first or routes it to architect or rethink |
134
+ | `cruze-rethink` | Steps back to the level a discovery touches, keeps completed work, re-approves what went stale and records why |
135
+ | `cruze-next` | Says which step to run next and why |
136
+ | `cruze-roles` | The fresh-context design reviewer, code reviewer, verifier and researcher, and how a review runs to a disposition for every finding |
137
+ | `cruze-formats` | The format of every Cruze document, with templates |
138
+ | `cruze-hexagonal-design` | Ports and adapters with domain-driven design: who owns each rule, dependency direction, many small modules, contracts, runtime ownership, and notes for Rust and C++ |
139
+ | `cruze-behavioural-testing` | Which tests to write and at which seam, fakes instead of mocks, and protecting approved scenarios' tests |
140
+ | `cruze-grilling` | Interviewing the user in rounds until decisions settle, and challenging once before deferring |
141
+ | `cruze-domain-language` | Building the glossary and using its words in documents, IDs and code |
142
+ | `cruze-dependency-approval` | No new dependency without your explicit approval, and where approvals are recorded |
143
+ | `cruze-research` | Adopting a mature library before building, and answering questions from primary sources at the right version |
144
+
145
+ ## Reporting back
146
+
147
+ Cruze improves from what goes wrong in real projects. Every rethink, review finding, bug and override is recorded in the project's journal. To send them back:
148
+
149
+ ```sh
150
+ cruze feedback export --out cruze-feedback.json
151
+ ```
152
+
153
+ The export replaces the project name, and the name of whoever approved or recorded each entry, with placeholders. Read it before sharing: summaries can still mention your domain or people. Attach it to an issue at https://github.com/PrintPractical/cruze/issues. Maintainers turn it into changes with the `cruze-retro` skill in this repository.
154
+
155
+ ## Development
156
+
157
+ ```sh
158
+ npm ci
159
+ npm run check # typecheck, test and build
160
+ node src/main.ts help # run the CLI from source
161
+ ```
162
+
163
+ See [AGENTS.md](AGENTS.md) for the code layout and conventions, [docs/contributing/writing-skills.md](docs/contributing/writing-skills.md) for how skills are written, and [RELEASING.md](RELEASING.md) for publishing.
164
+
165
+ ## License
166
+
167
+ [Apache 2.0](LICENSE)
package/bin/cruze.mjs ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ // The `cruze` command. A git install carries the TypeScript sources but no dist/, because npm
3
+ // runs no build scripts for it; the first run builds dist/ with Node alone, then starts the CLI.
4
+ import { existsSync } from "node:fs";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const main = new URL("../dist/main.js", import.meta.url);
8
+ if (!existsSync(fileURLToPath(main))) {
9
+ process.emitWarning = () => {};
10
+ try {
11
+ await import("../scripts/build.mjs");
12
+ } catch (error) {
13
+ process.stderr.write(`cruze: could not build the CLI in ${fileURLToPath(new URL("..", import.meta.url))}: ${error.message}\n`);
14
+ process.exit(1);
15
+ }
16
+ }
17
+ await import(main.href);
@@ -0,0 +1,75 @@
1
+
2
+
3
+
4
+
5
+ /** Everything a command handler needs, assembled by the composition root. */
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+ /** What a command produces: a JSON result for agents, a summary for people, and whether it passed. */
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+ /** Parsed options, shared by every command; each handler reads the ones it accepts. */
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ export class UsageError extends Error {
62
+ constructor(message ) {
63
+ super(message);
64
+ this.name = "UsageError";
65
+ }
66
+ }
67
+
68
+ export function requireArgs(args , names ) {
69
+ if (args.length < names.length) throw new UsageError(`missing ${names.slice(args.length).map((n) => `<${n}>`).join(" ")}`);
70
+ }
71
+
72
+ export function requireOption (value , flag ) {
73
+ if (value === undefined) throw new UsageError(`${flag} is required`);
74
+ return value;
75
+ }
@@ -0,0 +1,30 @@
1
+ import { checkCode, traceTests } from "../../../../app/use_cases/check_code.js";
2
+ import { landChange } from "../../../../app/use_cases/land_change.js";
3
+
4
+
5
+ export async function runCheck(context , args , options ) {
6
+ const files = [...options.file, ...args];
7
+ const report = await checkCode(context, { ci: options.ci, ...(files.length === 0 ? {} : { files }) });
8
+ const lines = report.findings.map((f) => `${f.severity} ${f.path}${f.line === undefined ? "" : `:${f.line}`} ${f.message} [${f.rule}]`);
9
+ lines.push(`Checked ${report.checked} file(s): ${report.passed ? "passed" : "failed"}.`);
10
+ return { json: report, human: lines.join("\n"), failed: !report.passed };
11
+ }
12
+
13
+ export async function runTrace(context , _args , options ) {
14
+ const report = await traceTests(context, { all: options.all, ...(options.change === undefined ? {} : { change: options.change }) });
15
+ const lines = report.missing.map((id) => `missing test for ${id}`);
16
+ lines.push(...report.unknown.map((u) => `${u.path}:${u.line} cites ${u.id}, which no spec or delta defines`));
17
+ lines.push(`Traced ${report.scenarios.length} scenario(s) for ${report.scope}: ${report.passed ? "passed" : "failed"}.`);
18
+ return { json: report, human: lines.join("\n"), failed: !report.passed };
19
+ }
20
+
21
+ export async function runLand(context , args , options ) {
22
+ const report = await landChange(context, args[0], options.override === undefined ? {} : { override: options.override });
23
+ const lines = [`Landed ${report.change}.`];
24
+ if (report.merged.length > 0) lines.push(`Merged into the living docs: ${report.merged.join(", ")}`);
25
+ if (report.built.length > 0) lines.push(`Now built: ${report.built.join(", ")}`);
26
+ if (report.removed.length > 0) lines.push(`Removed: ${report.removed.join(", ")}`);
27
+ if (report.restamped.length > 0) lines.push(`Re-stamped approvals: ${report.restamped.join(", ")}`);
28
+ if (report.archivedTo !== undefined) lines.push(`Finished; archived to ${report.archivedTo}.`);
29
+ return { json: report, human: lines.join("\n") };
30
+ }
@@ -0,0 +1,52 @@
1
+ import { approveArtifact } from "../../../../app/use_cases/approve_artifact.js";
2
+ import { PROJECT_DOC_KINDS, createNote, createProjectDoc, } from "../../../../app/use_cases/new_project_doc.js";
3
+ import { createWorkItem, } from "../../../../app/use_cases/new_work_item.js";
4
+ import { validate } from "../../../../app/use_cases/validate_project.js";
5
+
6
+ import { UsageError, requireArgs, requireOption, } from "../cli_context.js";
7
+
8
+ export async function runValidate(context ) {
9
+ const report = await validate(context);
10
+ const summary = report.problems.length === 0 ? "No problems." : `${report.errors} error(s), ${report.warnings} warning(s).`;
11
+ return { json: report, human: [...report.problems.map(formatProblem), summary].join("\n"), failed: !report.valid };
12
+ }
13
+
14
+ export async function runApprove(context , args , options ) {
15
+ requireArgs(args, ["document"]);
16
+ const report = await approveArtifact(context, args[0] ?? "", { replan: options.replan, rebase: options.rebase });
17
+ const lines = [`Approved ${report.artifact} (${report.hash.slice(0, 19)}), pinned to ${report.upstream.length} upstream element(s).`];
18
+ if (report.stamped.length > 0) lines.push(`Marked ${report.stamped.length} element(s) planned.`);
19
+ if (report.bound !== undefined) lines.push(`Bound the change to branch ${report.bound}.`);
20
+ if (report.replanned.length > 0) lines.push(`Set back to planned: ${report.replanned.join(", ")}.`);
21
+ if (report.rebased.length > 0) lines.push(`Accepted the current living text of: ${report.rebased.join(", ")}.`);
22
+ return { json: report, human: lines.join("\n") };
23
+ }
24
+
25
+ export async function runNew(context , args , options ) {
26
+ requireArgs(args, ["kind"]);
27
+ if (PROJECT_DOC_KINDS.includes(args[0] )) {
28
+ const report = await createProjectDoc(context, args[0] );
29
+ return { json: report, human: `Created ${report.path}` };
30
+ }
31
+ requireArgs(args, ["kind", "slug"]);
32
+ if (args[0] === "note") {
33
+ const report = await createNote(context, args[1] ?? "", requireOption(options.title, "--title"));
34
+ return { json: report, human: `Created ${report.path}` };
35
+ }
36
+ const kind = args[0] ;
37
+ if (!["feature", "change", "adr"].includes(kind)) {
38
+ throw new UsageError(`cruze new takes ${PROJECT_DOC_KINDS.join(", ")}, feature, change, adr or note, not "${args[0]}"`);
39
+ }
40
+ const report = await createWorkItem(context, {
41
+ kind,
42
+ slug: args[1] ?? "",
43
+ title: requireOption(options.title, "--title"),
44
+ ...(options.feature === undefined ? {} : { feature: options.feature }),
45
+ ...(options.roadmap === undefined ? {} : { roadmap: options.roadmap }),
46
+ });
47
+ return { json: report, human: `Created ${report.kind} ${report.ref} at ${report.path}` };
48
+ }
49
+
50
+ export function formatProblem(problem ) {
51
+ return `${problem.severity === "error" ? "error" : "warning"} ${problem.path}${problem.line === undefined ? "" : `:${problem.line}`} ${problem.message} [${problem.rule}]`;
52
+ }
@@ -0,0 +1,23 @@
1
+ import { initProject } from "../../../../app/use_cases/init_project.js";
2
+
3
+ import { describeSkillInstall } from "./install.js";
4
+
5
+ export async function runInit(context , _args , options ) {
6
+ const prompter = options.yes || !context.interactive ? context.unattendedPrompter : context.interactivePrompter;
7
+ const report = await initProject(
8
+ { files: context.files, bundle: context.bundle, prompter },
9
+ {
10
+ defaultName: context.directoryName,
11
+ agents: options.agent,
12
+ ...(options.name === undefined ? {} : { name: options.name }),
13
+ ...(options.package === undefined ? {} : { package: options.package }),
14
+ },
15
+ );
16
+
17
+ const lines = [`Initialized ${report.project} with Cruze ${report.skills.version}.`];
18
+ if (report.created.length > 0) lines.push(`Created: ${report.created.join(", ")}`);
19
+ if (report.skipped.length > 0) lines.push(`Left untouched (already present): ${report.skipped.join(", ")}`);
20
+ lines.push(...describeSkillInstall(report.skills));
21
+ lines.push("Next: open your coding agent in this repository and ask it what Cruze can do.");
22
+ return { json: report, human: lines.join("\n") };
23
+ }
@@ -0,0 +1,15 @@
1
+ import { installSkills, } from "../../../../app/use_cases/install_skills.js";
2
+
3
+
4
+ export async function runInstall(context , _args , options ) {
5
+ const report = await installSkills({ files: context.files, bundle: context.bundle }, { agents: options.agent });
6
+ return { json: report, human: describeSkillInstall(report).join("\n") };
7
+ }
8
+
9
+ export function describeSkillInstall(report ) {
10
+ const count = report.installed.length;
11
+ const lines = [`Installed ${count} Cruze skill${count === 1 ? "" : "s"} into .agents/skills/: ${report.installed.join(", ")}`];
12
+ if (report.removed.length > 0) lines.push(`Removed skills no longer shipped: ${report.removed.join(", ")}`);
13
+ for (const link of report.linked) lines.push(`Linked them for ${link.agent} in ${link.dir}/`);
14
+ return lines;
15
+ }
@@ -0,0 +1,31 @@
1
+ import { exportFeedback, listEvents, recordEvent } from "../../../../app/use_cases/journal_events.js";
2
+ import { UsageError, requireArgs, } from "../cli_context.js";
3
+
4
+ export async function runJournal(context , args , options ) {
5
+ requireArgs(args, ["add|list"]);
6
+ if (args[0] === "add") {
7
+ requireArgs(args, ["add", "event"]);
8
+ const fields = Object.fromEntries(options.set.map((pair) => {
9
+ const at = pair.indexOf("=");
10
+ if (at < 1) throw new UsageError(`--set takes key=value, not "${pair}"`);
11
+ return [pair.slice(0, at), pair.slice(at + 1)];
12
+ }));
13
+ const entry = await recordEvent(context, args[1] ?? "", fields, options.item);
14
+ return { json: entry, human: `Recorded ${entry.event}.` };
15
+ }
16
+ if (args[0] === "list") {
17
+ const entries = await listEvents(context, options.event);
18
+ return { json: entries, human: entries.map((e) => `${e.at} ${e.event} ${JSON.stringify({ ...e, at: undefined, event: undefined, by: undefined })}`).join("\n") || "No entries." };
19
+ }
20
+ throw new UsageError(`cruze journal takes add or list, not "${args[0]}"`);
21
+ }
22
+
23
+ export async function runFeedback(context , args , options ) {
24
+ if (args[0] !== "export") throw new UsageError("usage: cruze feedback export [--out <file>] [--no-redact]");
25
+ const bundle = await exportFeedback(context, options.redact);
26
+ if (options.out !== undefined) {
27
+ await context.files.writeText(options.out, `${JSON.stringify(bundle, null, 2)}\n`);
28
+ return { json: { out: options.out, entries: bundle.entries.length }, human: `Wrote ${bundle.entries.length} entries to ${options.out}.` };
29
+ }
30
+ return { json: bundle, human: `${bundle.entries.length} journal entries${bundle.redacted ? ", redacted" : ""}.` };
31
+ }