raptor-aios 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (719) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +21 -0
  3. package/README.md +315 -0
  4. package/bin/raptor.js +5 -0
  5. package/dist/_core/dist/agents/adapters/antigravity.d.ts +9 -0
  6. package/dist/_core/dist/agents/adapters/antigravity.d.ts.map +1 -0
  7. package/dist/_core/dist/agents/adapters/antigravity.js +72 -0
  8. package/dist/_core/dist/agents/adapters/antigravity.js.map +1 -0
  9. package/dist/_core/dist/agents/adapters/claude-code.d.ts +9 -0
  10. package/dist/_core/dist/agents/adapters/claude-code.d.ts.map +1 -0
  11. package/dist/_core/dist/agents/adapters/claude-code.js +71 -0
  12. package/dist/_core/dist/agents/adapters/claude-code.js.map +1 -0
  13. package/dist/_core/dist/agents/adapters/codex.d.ts +12 -0
  14. package/dist/_core/dist/agents/adapters/codex.d.ts.map +1 -0
  15. package/dist/_core/dist/agents/adapters/codex.js +69 -0
  16. package/dist/_core/dist/agents/adapters/codex.js.map +1 -0
  17. package/dist/_core/dist/agents/adapters/copilot.d.ts +12 -0
  18. package/dist/_core/dist/agents/adapters/copilot.d.ts.map +1 -0
  19. package/dist/_core/dist/agents/adapters/copilot.js +71 -0
  20. package/dist/_core/dist/agents/adapters/copilot.js.map +1 -0
  21. package/dist/_core/dist/agents/adapters/cursor.d.ts +9 -0
  22. package/dist/_core/dist/agents/adapters/cursor.d.ts.map +1 -0
  23. package/dist/_core/dist/agents/adapters/cursor.js +62 -0
  24. package/dist/_core/dist/agents/adapters/cursor.js.map +1 -0
  25. package/dist/_core/dist/agents/adapters/gemini.d.ts +11 -0
  26. package/dist/_core/dist/agents/adapters/gemini.d.ts.map +1 -0
  27. package/dist/_core/dist/agents/adapters/gemini.js +68 -0
  28. package/dist/_core/dist/agents/adapters/gemini.js.map +1 -0
  29. package/dist/_core/dist/agents/adapters/human.d.ts +10 -0
  30. package/dist/_core/dist/agents/adapters/human.d.ts.map +1 -0
  31. package/dist/_core/dist/agents/adapters/human.js +48 -0
  32. package/dist/_core/dist/agents/adapters/human.js.map +1 -0
  33. package/dist/_core/dist/agents/artifact-watcher.d.ts +86 -0
  34. package/dist/_core/dist/agents/artifact-watcher.d.ts.map +1 -0
  35. package/dist/_core/dist/agents/artifact-watcher.js +214 -0
  36. package/dist/_core/dist/agents/artifact-watcher.js.map +1 -0
  37. package/dist/_core/dist/agents/backup.d.ts +69 -0
  38. package/dist/_core/dist/agents/backup.d.ts.map +1 -0
  39. package/dist/_core/dist/agents/backup.js +107 -0
  40. package/dist/_core/dist/agents/backup.js.map +1 -0
  41. package/dist/_core/dist/agents/config.d.ts +36 -0
  42. package/dist/_core/dist/agents/config.d.ts.map +1 -0
  43. package/dist/_core/dist/agents/config.js +270 -0
  44. package/dist/_core/dist/agents/config.js.map +1 -0
  45. package/dist/_core/dist/agents/context-file.d.ts +35 -0
  46. package/dist/_core/dist/agents/context-file.d.ts.map +1 -0
  47. package/dist/_core/dist/agents/context-file.js +106 -0
  48. package/dist/_core/dist/agents/context-file.js.map +1 -0
  49. package/dist/_core/dist/agents/handoff.d.ts +57 -0
  50. package/dist/_core/dist/agents/handoff.d.ts.map +1 -0
  51. package/dist/_core/dist/agents/handoff.js +71 -0
  52. package/dist/_core/dist/agents/handoff.js.map +1 -0
  53. package/dist/_core/dist/agents/index.d.ts +32 -0
  54. package/dist/_core/dist/agents/index.d.ts.map +1 -0
  55. package/dist/_core/dist/agents/index.js +37 -0
  56. package/dist/_core/dist/agents/index.js.map +1 -0
  57. package/dist/_core/dist/agents/keys.d.ts +50 -0
  58. package/dist/_core/dist/agents/keys.d.ts.map +1 -0
  59. package/dist/_core/dist/agents/keys.js +91 -0
  60. package/dist/_core/dist/agents/keys.js.map +1 -0
  61. package/dist/_core/dist/agents/materialize.d.ts +37 -0
  62. package/dist/_core/dist/agents/materialize.d.ts.map +1 -0
  63. package/dist/_core/dist/agents/materialize.js +157 -0
  64. package/dist/_core/dist/agents/materialize.js.map +1 -0
  65. package/dist/_core/dist/agents/prompt-builder.d.ts +35 -0
  66. package/dist/_core/dist/agents/prompt-builder.d.ts.map +1 -0
  67. package/dist/_core/dist/agents/prompt-builder.js +261 -0
  68. package/dist/_core/dist/agents/prompt-builder.js.map +1 -0
  69. package/dist/_core/dist/agents/prompt-markers.d.ts +69 -0
  70. package/dist/_core/dist/agents/prompt-markers.d.ts.map +1 -0
  71. package/dist/_core/dist/agents/prompt-markers.js +111 -0
  72. package/dist/_core/dist/agents/prompt-markers.js.map +1 -0
  73. package/dist/_core/dist/agents/registry.d.ts +35 -0
  74. package/dist/_core/dist/agents/registry.d.ts.map +1 -0
  75. package/dist/_core/dist/agents/registry.js +102 -0
  76. package/dist/_core/dist/agents/registry.js.map +1 -0
  77. package/dist/_core/dist/agents/selector.d.ts +33 -0
  78. package/dist/_core/dist/agents/selector.d.ts.map +1 -0
  79. package/dist/_core/dist/agents/selector.js +120 -0
  80. package/dist/_core/dist/agents/selector.js.map +1 -0
  81. package/dist/_core/dist/agents/slash-materializer.d.ts +63 -0
  82. package/dist/_core/dist/agents/slash-materializer.d.ts.map +1 -0
  83. package/dist/_core/dist/agents/slash-materializer.js +131 -0
  84. package/dist/_core/dist/agents/slash-materializer.js.map +1 -0
  85. package/dist/_core/dist/agents/types.d.ts +121 -0
  86. package/dist/_core/dist/agents/types.d.ts.map +1 -0
  87. package/dist/_core/dist/agents/types.js +10 -0
  88. package/dist/_core/dist/agents/types.js.map +1 -0
  89. package/dist/_core/dist/audit/hash.d.ts +4 -0
  90. package/dist/_core/dist/audit/hash.d.ts.map +1 -0
  91. package/dist/_core/dist/audit/hash.js +12 -0
  92. package/dist/_core/dist/audit/hash.js.map +1 -0
  93. package/dist/_core/dist/audit/index.d.ts +6 -0
  94. package/dist/_core/dist/audit/index.d.ts.map +1 -0
  95. package/dist/_core/dist/audit/index.js +6 -0
  96. package/dist/_core/dist/audit/index.js.map +1 -0
  97. package/dist/_core/dist/audit/logger.d.ts +77 -0
  98. package/dist/_core/dist/audit/logger.d.ts.map +1 -0
  99. package/dist/_core/dist/audit/logger.js +93 -0
  100. package/dist/_core/dist/audit/logger.js.map +1 -0
  101. package/dist/_core/dist/audit/query.d.ts +13 -0
  102. package/dist/_core/dist/audit/query.d.ts.map +1 -0
  103. package/dist/_core/dist/audit/query.js +57 -0
  104. package/dist/_core/dist/audit/query.js.map +1 -0
  105. package/dist/_core/dist/audit/schema.d.ts +455 -0
  106. package/dist/_core/dist/audit/schema.d.ts.map +1 -0
  107. package/dist/_core/dist/audit/schema.js +341 -0
  108. package/dist/_core/dist/audit/schema.js.map +1 -0
  109. package/dist/_core/dist/audit/validate.d.ts +21 -0
  110. package/dist/_core/dist/audit/validate.d.ts.map +1 -0
  111. package/dist/_core/dist/audit/validate.js +139 -0
  112. package/dist/_core/dist/audit/validate.js.map +1 -0
  113. package/dist/_core/dist/constitution/core.d.ts +22 -0
  114. package/dist/_core/dist/constitution/core.d.ts.map +1 -0
  115. package/dist/_core/dist/constitution/core.js +102 -0
  116. package/dist/_core/dist/constitution/core.js.map +1 -0
  117. package/dist/_core/dist/constitution/index.d.ts +2 -0
  118. package/dist/_core/dist/constitution/index.d.ts.map +1 -0
  119. package/dist/_core/dist/constitution/index.js +2 -0
  120. package/dist/_core/dist/constitution/index.js.map +1 -0
  121. package/dist/_core/dist/extensions/index.d.ts +12 -0
  122. package/dist/_core/dist/extensions/index.d.ts.map +1 -0
  123. package/dist/_core/dist/extensions/index.js +12 -0
  124. package/dist/_core/dist/extensions/index.js.map +1 -0
  125. package/dist/_core/dist/extensions/integrate.d.ts +69 -0
  126. package/dist/_core/dist/extensions/integrate.d.ts.map +1 -0
  127. package/dist/_core/dist/extensions/integrate.js +181 -0
  128. package/dist/_core/dist/extensions/integrate.js.map +1 -0
  129. package/dist/_core/dist/extensions/loader.d.ts +24 -0
  130. package/dist/_core/dist/extensions/loader.d.ts.map +1 -0
  131. package/dist/_core/dist/extensions/loader.js +73 -0
  132. package/dist/_core/dist/extensions/loader.js.map +1 -0
  133. package/dist/_core/dist/extensions/manifest.d.ts +23 -0
  134. package/dist/_core/dist/extensions/manifest.d.ts.map +1 -0
  135. package/dist/_core/dist/extensions/manifest.js +176 -0
  136. package/dist/_core/dist/extensions/manifest.js.map +1 -0
  137. package/dist/_core/dist/extensions/registry.d.ts +32 -0
  138. package/dist/_core/dist/extensions/registry.d.ts.map +1 -0
  139. package/dist/_core/dist/extensions/registry.js +57 -0
  140. package/dist/_core/dist/extensions/registry.js.map +1 -0
  141. package/dist/_core/dist/extensions/resolver.d.ts +55 -0
  142. package/dist/_core/dist/extensions/resolver.d.ts.map +1 -0
  143. package/dist/_core/dist/extensions/resolver.js +143 -0
  144. package/dist/_core/dist/extensions/resolver.js.map +1 -0
  145. package/dist/_core/dist/extensions/types.d.ts +173 -0
  146. package/dist/_core/dist/extensions/types.d.ts.map +1 -0
  147. package/dist/_core/dist/extensions/types.js +83 -0
  148. package/dist/_core/dist/extensions/types.js.map +1 -0
  149. package/dist/_core/dist/frontmatter/index.d.ts +10 -0
  150. package/dist/_core/dist/frontmatter/index.d.ts.map +1 -0
  151. package/dist/_core/dist/frontmatter/index.js +24 -0
  152. package/dist/_core/dist/frontmatter/index.js.map +1 -0
  153. package/dist/_core/dist/gates/agent-gates.d.ts +16 -0
  154. package/dist/_core/dist/gates/agent-gates.d.ts.map +1 -0
  155. package/dist/_core/dist/gates/agent-gates.js +205 -0
  156. package/dist/_core/dist/gates/agent-gates.js.map +1 -0
  157. package/dist/_core/dist/gates/builtin.d.ts +18 -0
  158. package/dist/_core/dist/gates/builtin.d.ts.map +1 -0
  159. package/dist/_core/dist/gates/builtin.js +860 -0
  160. package/dist/_core/dist/gates/builtin.js.map +1 -0
  161. package/dist/_core/dist/gates/index.d.ts +7 -0
  162. package/dist/_core/dist/gates/index.d.ts.map +1 -0
  163. package/dist/_core/dist/gates/index.js +7 -0
  164. package/dist/_core/dist/gates/index.js.map +1 -0
  165. package/dist/_core/dist/gates/m7-gates.d.ts +17 -0
  166. package/dist/_core/dist/gates/m7-gates.d.ts.map +1 -0
  167. package/dist/_core/dist/gates/m7-gates.js +309 -0
  168. package/dist/_core/dist/gates/m7-gates.js.map +1 -0
  169. package/dist/_core/dist/gates/phase-gates.d.ts +18 -0
  170. package/dist/_core/dist/gates/phase-gates.d.ts.map +1 -0
  171. package/dist/_core/dist/gates/phase-gates.js +275 -0
  172. package/dist/_core/dist/gates/phase-gates.js.map +1 -0
  173. package/dist/_core/dist/gates/runner.d.ts +4 -0
  174. package/dist/_core/dist/gates/runner.d.ts.map +1 -0
  175. package/dist/_core/dist/gates/runner.js +64 -0
  176. package/dist/_core/dist/gates/runner.js.map +1 -0
  177. package/dist/_core/dist/gates/types.d.ts +36 -0
  178. package/dist/_core/dist/gates/types.d.ts.map +1 -0
  179. package/dist/_core/dist/gates/types.js +2 -0
  180. package/dist/_core/dist/gates/types.js.map +1 -0
  181. package/dist/_core/dist/hooks/index.d.ts +4 -0
  182. package/dist/_core/dist/hooks/index.d.ts.map +1 -0
  183. package/dist/_core/dist/hooks/index.js +4 -0
  184. package/dist/_core/dist/hooks/index.js.map +1 -0
  185. package/dist/_core/dist/hooks/runner.d.ts +28 -0
  186. package/dist/_core/dist/hooks/runner.d.ts.map +1 -0
  187. package/dist/_core/dist/hooks/runner.js +294 -0
  188. package/dist/_core/dist/hooks/runner.js.map +1 -0
  189. package/dist/_core/dist/hooks/runtime.d.ts +65 -0
  190. package/dist/_core/dist/hooks/runtime.d.ts.map +1 -0
  191. package/dist/_core/dist/hooks/runtime.js +212 -0
  192. package/dist/_core/dist/hooks/runtime.js.map +1 -0
  193. package/dist/_core/dist/hooks/types.d.ts +36 -0
  194. package/dist/_core/dist/hooks/types.d.ts.map +1 -0
  195. package/dist/_core/dist/hooks/types.js +23 -0
  196. package/dist/_core/dist/hooks/types.js.map +1 -0
  197. package/dist/_core/dist/index.d.ts +21 -0
  198. package/dist/_core/dist/index.d.ts.map +1 -0
  199. package/dist/_core/dist/index.js +20 -0
  200. package/dist/_core/dist/index.js.map +1 -0
  201. package/dist/_core/dist/manifest/index.d.ts +119 -0
  202. package/dist/_core/dist/manifest/index.d.ts.map +1 -0
  203. package/dist/_core/dist/manifest/index.js +125 -0
  204. package/dist/_core/dist/manifest/index.js.map +1 -0
  205. package/dist/_core/dist/markers/index.d.ts +47 -0
  206. package/dist/_core/dist/markers/index.d.ts.map +1 -0
  207. package/dist/_core/dist/markers/index.js +97 -0
  208. package/dist/_core/dist/markers/index.js.map +1 -0
  209. package/dist/_core/dist/mcp/config.d.ts +19 -0
  210. package/dist/_core/dist/mcp/config.d.ts.map +1 -0
  211. package/dist/_core/dist/mcp/config.js +114 -0
  212. package/dist/_core/dist/mcp/config.js.map +1 -0
  213. package/dist/_core/dist/mcp/index.d.ts +9 -0
  214. package/dist/_core/dist/mcp/index.d.ts.map +1 -0
  215. package/dist/_core/dist/mcp/index.js +8 -0
  216. package/dist/_core/dist/mcp/index.js.map +1 -0
  217. package/dist/_core/dist/mcp/materializer.d.ts +40 -0
  218. package/dist/_core/dist/mcp/materializer.d.ts.map +1 -0
  219. package/dist/_core/dist/mcp/materializer.js +161 -0
  220. package/dist/_core/dist/mcp/materializer.js.map +1 -0
  221. package/dist/_core/dist/mcp/targets.d.ts +37 -0
  222. package/dist/_core/dist/mcp/targets.d.ts.map +1 -0
  223. package/dist/_core/dist/mcp/targets.js +56 -0
  224. package/dist/_core/dist/mcp/targets.js.map +1 -0
  225. package/dist/_core/dist/mcp/types.d.ts +34 -0
  226. package/dist/_core/dist/mcp/types.d.ts.map +1 -0
  227. package/dist/_core/dist/mcp/types.js +8 -0
  228. package/dist/_core/dist/mcp/types.js.map +1 -0
  229. package/dist/_core/dist/models/analyze.d.ts +131 -0
  230. package/dist/_core/dist/models/analyze.d.ts.map +1 -0
  231. package/dist/_core/dist/models/analyze.js +301 -0
  232. package/dist/_core/dist/models/analyze.js.map +1 -0
  233. package/dist/_core/dist/models/checklist.d.ts +113 -0
  234. package/dist/_core/dist/models/checklist.d.ts.map +1 -0
  235. package/dist/_core/dist/models/checklist.js +159 -0
  236. package/dist/_core/dist/models/checklist.js.map +1 -0
  237. package/dist/_core/dist/models/clarify.d.ts +116 -0
  238. package/dist/_core/dist/models/clarify.d.ts.map +1 -0
  239. package/dist/_core/dist/models/clarify.js +166 -0
  240. package/dist/_core/dist/models/clarify.js.map +1 -0
  241. package/dist/_core/dist/models/impl-log.d.ts +64 -0
  242. package/dist/_core/dist/models/impl-log.d.ts.map +1 -0
  243. package/dist/_core/dist/models/impl-log.js +137 -0
  244. package/dist/_core/dist/models/impl-log.js.map +1 -0
  245. package/dist/_core/dist/models/index.d.ts +8 -0
  246. package/dist/_core/dist/models/index.d.ts.map +1 -0
  247. package/dist/_core/dist/models/index.js +8 -0
  248. package/dist/_core/dist/models/index.js.map +1 -0
  249. package/dist/_core/dist/models/plan.d.ts +24 -0
  250. package/dist/_core/dist/models/plan.d.ts.map +1 -0
  251. package/dist/_core/dist/models/plan.js +15 -0
  252. package/dist/_core/dist/models/plan.js.map +1 -0
  253. package/dist/_core/dist/models/spec.d.ts +23 -0
  254. package/dist/_core/dist/models/spec.d.ts.map +1 -0
  255. package/dist/_core/dist/models/spec.js +22 -0
  256. package/dist/_core/dist/models/spec.js.map +1 -0
  257. package/dist/_core/dist/models/tasks.d.ts +33 -0
  258. package/dist/_core/dist/models/tasks.d.ts.map +1 -0
  259. package/dist/_core/dist/models/tasks.js +78 -0
  260. package/dist/_core/dist/models/tasks.js.map +1 -0
  261. package/dist/_core/dist/presets/gates.d.ts +9 -0
  262. package/dist/_core/dist/presets/gates.d.ts.map +1 -0
  263. package/dist/_core/dist/presets/gates.js +173 -0
  264. package/dist/_core/dist/presets/gates.js.map +1 -0
  265. package/dist/_core/dist/presets/index.d.ts +10 -0
  266. package/dist/_core/dist/presets/index.d.ts.map +1 -0
  267. package/dist/_core/dist/presets/index.js +7 -0
  268. package/dist/_core/dist/presets/index.js.map +1 -0
  269. package/dist/_core/dist/presets/loader.d.ts +56 -0
  270. package/dist/_core/dist/presets/loader.d.ts.map +1 -0
  271. package/dist/_core/dist/presets/loader.js +216 -0
  272. package/dist/_core/dist/presets/loader.js.map +1 -0
  273. package/dist/_core/dist/presets/mobile-opinionated.d.ts +3 -0
  274. package/dist/_core/dist/presets/mobile-opinionated.d.ts.map +1 -0
  275. package/dist/_core/dist/presets/mobile-opinionated.js +78 -0
  276. package/dist/_core/dist/presets/mobile-opinionated.js.map +1 -0
  277. package/dist/_core/dist/presets/registry.d.ts +5 -0
  278. package/dist/_core/dist/presets/registry.d.ts.map +1 -0
  279. package/dist/_core/dist/presets/registry.js +14 -0
  280. package/dist/_core/dist/presets/registry.js.map +1 -0
  281. package/dist/_core/dist/presets/renderer.d.ts +5 -0
  282. package/dist/_core/dist/presets/renderer.d.ts.map +1 -0
  283. package/dist/_core/dist/presets/renderer.js +37 -0
  284. package/dist/_core/dist/presets/renderer.js.map +1 -0
  285. package/dist/_core/dist/presets/stacking.d.ts +29 -0
  286. package/dist/_core/dist/presets/stacking.d.ts.map +1 -0
  287. package/dist/_core/dist/presets/stacking.js +91 -0
  288. package/dist/_core/dist/presets/stacking.js.map +1 -0
  289. package/dist/_core/dist/presets/types.d.ts +22 -0
  290. package/dist/_core/dist/presets/types.d.ts.map +1 -0
  291. package/dist/_core/dist/presets/types.js +2 -0
  292. package/dist/_core/dist/presets/types.js.map +1 -0
  293. package/dist/_core/dist/prompts/audit-log.d.ts +73 -0
  294. package/dist/_core/dist/prompts/audit-log.d.ts.map +1 -0
  295. package/dist/_core/dist/prompts/audit-log.js +73 -0
  296. package/dist/_core/dist/prompts/audit-log.js.map +1 -0
  297. package/dist/_core/dist/prompts/index.d.ts +9 -0
  298. package/dist/_core/dist/prompts/index.d.ts.map +1 -0
  299. package/dist/_core/dist/prompts/index.js +7 -0
  300. package/dist/_core/dist/prompts/index.js.map +1 -0
  301. package/dist/_core/dist/prompts/renderer.d.ts +73 -0
  302. package/dist/_core/dist/prompts/renderer.d.ts.map +1 -0
  303. package/dist/_core/dist/prompts/renderer.js +179 -0
  304. package/dist/_core/dist/prompts/renderer.js.map +1 -0
  305. package/dist/_core/dist/prompts/resumption.d.ts +59 -0
  306. package/dist/_core/dist/prompts/resumption.d.ts.map +1 -0
  307. package/dist/_core/dist/prompts/resumption.js +149 -0
  308. package/dist/_core/dist/prompts/resumption.js.map +1 -0
  309. package/dist/_core/dist/skills/config.d.ts +27 -0
  310. package/dist/_core/dist/skills/config.d.ts.map +1 -0
  311. package/dist/_core/dist/skills/config.js +102 -0
  312. package/dist/_core/dist/skills/config.js.map +1 -0
  313. package/dist/_core/dist/skills/index.d.ts +9 -0
  314. package/dist/_core/dist/skills/index.d.ts.map +1 -0
  315. package/dist/_core/dist/skills/index.js +8 -0
  316. package/dist/_core/dist/skills/index.js.map +1 -0
  317. package/dist/_core/dist/skills/materializer.d.ts +45 -0
  318. package/dist/_core/dist/skills/materializer.d.ts.map +1 -0
  319. package/dist/_core/dist/skills/materializer.js +97 -0
  320. package/dist/_core/dist/skills/materializer.js.map +1 -0
  321. package/dist/_core/dist/skills/registry.d.ts +18 -0
  322. package/dist/_core/dist/skills/registry.d.ts.map +1 -0
  323. package/dist/_core/dist/skills/registry.js +36 -0
  324. package/dist/_core/dist/skills/registry.js.map +1 -0
  325. package/dist/_core/dist/skills/types.d.ts +39 -0
  326. package/dist/_core/dist/skills/types.d.ts.map +1 -0
  327. package/dist/_core/dist/skills/types.js +13 -0
  328. package/dist/_core/dist/skills/types.js.map +1 -0
  329. package/dist/_core/dist/state/feature.d.ts +58 -0
  330. package/dist/_core/dist/state/feature.d.ts.map +1 -0
  331. package/dist/_core/dist/state/feature.js +81 -0
  332. package/dist/_core/dist/state/feature.js.map +1 -0
  333. package/dist/_core/dist/state/index.d.ts +8 -0
  334. package/dist/_core/dist/state/index.d.ts.map +1 -0
  335. package/dist/_core/dist/state/index.js +6 -0
  336. package/dist/_core/dist/state/index.js.map +1 -0
  337. package/dist/_core/dist/state/init-options.d.ts +60 -0
  338. package/dist/_core/dist/state/init-options.d.ts.map +1 -0
  339. package/dist/_core/dist/state/init-options.js +74 -0
  340. package/dist/_core/dist/state/init-options.js.map +1 -0
  341. package/dist/_core/dist/template/engine.d.ts +7 -0
  342. package/dist/_core/dist/template/engine.d.ts.map +1 -0
  343. package/dist/_core/dist/template/engine.js +86 -0
  344. package/dist/_core/dist/template/engine.js.map +1 -0
  345. package/dist/_core/dist/template/helpers.d.ts +5 -0
  346. package/dist/_core/dist/template/helpers.d.ts.map +1 -0
  347. package/dist/_core/dist/template/helpers.js +59 -0
  348. package/dist/_core/dist/template/helpers.js.map +1 -0
  349. package/dist/_core/dist/template/index.d.ts +6 -0
  350. package/dist/_core/dist/template/index.d.ts.map +1 -0
  351. package/dist/_core/dist/template/index.js +6 -0
  352. package/dist/_core/dist/template/index.js.map +1 -0
  353. package/dist/_core/dist/template/loader.d.ts +36 -0
  354. package/dist/_core/dist/template/loader.d.ts.map +1 -0
  355. package/dist/_core/dist/template/loader.js +62 -0
  356. package/dist/_core/dist/template/loader.js.map +1 -0
  357. package/dist/_core/dist/template/parser.d.ts +3 -0
  358. package/dist/_core/dist/template/parser.d.ts.map +1 -0
  359. package/dist/_core/dist/template/parser.js +234 -0
  360. package/dist/_core/dist/template/parser.js.map +1 -0
  361. package/dist/_core/dist/template/types.d.ts +40 -0
  362. package/dist/_core/dist/template/types.d.ts.map +1 -0
  363. package/dist/_core/dist/template/types.js +14 -0
  364. package/dist/_core/dist/template/types.js.map +1 -0
  365. package/dist/_core/dist/verify/a11y.d.ts +36 -0
  366. package/dist/_core/dist/verify/a11y.d.ts.map +1 -0
  367. package/dist/_core/dist/verify/a11y.js +153 -0
  368. package/dist/_core/dist/verify/a11y.js.map +1 -0
  369. package/dist/_core/dist/verify/architecture.d.ts +37 -0
  370. package/dist/_core/dist/verify/architecture.d.ts.map +1 -0
  371. package/dist/_core/dist/verify/architecture.js +113 -0
  372. package/dist/_core/dist/verify/architecture.js.map +1 -0
  373. package/dist/_core/dist/verify/index.d.ts +10 -0
  374. package/dist/_core/dist/verify/index.d.ts.map +1 -0
  375. package/dist/_core/dist/verify/index.js +10 -0
  376. package/dist/_core/dist/verify/index.js.map +1 -0
  377. package/dist/_core/dist/verify/os-matrix.d.ts +35 -0
  378. package/dist/_core/dist/verify/os-matrix.d.ts.map +1 -0
  379. package/dist/_core/dist/verify/os-matrix.js +104 -0
  380. package/dist/_core/dist/verify/os-matrix.js.map +1 -0
  381. package/dist/_core/dist/verify/perf.d.ts +43 -0
  382. package/dist/_core/dist/verify/perf.d.ts.map +1 -0
  383. package/dist/_core/dist/verify/perf.js +69 -0
  384. package/dist/_core/dist/verify/perf.js.map +1 -0
  385. package/dist/_core/dist/verify/stores.d.ts +38 -0
  386. package/dist/_core/dist/verify/stores.d.ts.map +1 -0
  387. package/dist/_core/dist/verify/stores.js +57 -0
  388. package/dist/_core/dist/verify/stores.js.map +1 -0
  389. package/dist/_core/dist/version.d.ts +8 -0
  390. package/dist/_core/dist/version.d.ts.map +1 -0
  391. package/dist/_core/dist/version.js +11 -0
  392. package/dist/_core/dist/version.js.map +1 -0
  393. package/dist/_core/dist/workflows/bundled.d.ts +32 -0
  394. package/dist/_core/dist/workflows/bundled.d.ts.map +1 -0
  395. package/dist/_core/dist/workflows/bundled.js +254 -0
  396. package/dist/_core/dist/workflows/bundled.js.map +1 -0
  397. package/dist/_core/dist/workflows/engine.d.ts +74 -0
  398. package/dist/_core/dist/workflows/engine.d.ts.map +1 -0
  399. package/dist/_core/dist/workflows/engine.js +574 -0
  400. package/dist/_core/dist/workflows/engine.js.map +1 -0
  401. package/dist/_core/dist/workflows/expressions.d.ts +48 -0
  402. package/dist/_core/dist/workflows/expressions.d.ts.map +1 -0
  403. package/dist/_core/dist/workflows/expressions.js +336 -0
  404. package/dist/_core/dist/workflows/expressions.js.map +1 -0
  405. package/dist/_core/dist/workflows/index.d.ts +16 -0
  406. package/dist/_core/dist/workflows/index.d.ts.map +1 -0
  407. package/dist/_core/dist/workflows/index.js +15 -0
  408. package/dist/_core/dist/workflows/index.js.map +1 -0
  409. package/dist/_core/dist/workflows/parser.d.ts +38 -0
  410. package/dist/_core/dist/workflows/parser.d.ts.map +1 -0
  411. package/dist/_core/dist/workflows/parser.js +386 -0
  412. package/dist/_core/dist/workflows/parser.js.map +1 -0
  413. package/dist/_core/dist/workflows/sdd-flow.d.ts +85 -0
  414. package/dist/_core/dist/workflows/sdd-flow.d.ts.map +1 -0
  415. package/dist/_core/dist/workflows/sdd-flow.js +269 -0
  416. package/dist/_core/dist/workflows/sdd-flow.js.map +1 -0
  417. package/dist/_core/dist/workflows/types.d.ts +285 -0
  418. package/dist/_core/dist/workflows/types.d.ts.map +1 -0
  419. package/dist/_core/dist/workflows/types.js +13 -0
  420. package/dist/_core/dist/workflows/types.js.map +1 -0
  421. package/dist/_core/package.json +6 -0
  422. package/dist/_core/templates/constitution.md.hbs +46 -0
  423. package/dist/_core/templates/ghaWorkflow.yml.hbs +58 -0
  424. package/dist/_core/templates/hotfix.md.hbs +39 -0
  425. package/dist/_core/templates/plan.md.hbs +212 -0
  426. package/dist/_core/templates/preCommitHook.sh.hbs +30 -0
  427. package/dist/_core/templates/prePushHook.sh.hbs +45 -0
  428. package/dist/_core/templates/raptor.yml.hbs +24 -0
  429. package/dist/_core/templates/spec.md.hbs +127 -0
  430. package/dist/_core/templates/tasks.md.hbs +71 -0
  431. package/dist/commands/add-agent.d.ts +22 -0
  432. package/dist/commands/add-agent.d.ts.map +1 -0
  433. package/dist/commands/add-agent.js +121 -0
  434. package/dist/commands/add-agent.js.map +1 -0
  435. package/dist/commands/add-extension.d.ts +18 -0
  436. package/dist/commands/add-extension.d.ts.map +1 -0
  437. package/dist/commands/add-extension.js +83 -0
  438. package/dist/commands/add-extension.js.map +1 -0
  439. package/dist/commands/analyze.d.ts +18 -0
  440. package/dist/commands/analyze.d.ts.map +1 -0
  441. package/dist/commands/analyze.js +323 -0
  442. package/dist/commands/analyze.js.map +1 -0
  443. package/dist/commands/approve.d.ts +14 -0
  444. package/dist/commands/approve.d.ts.map +1 -0
  445. package/dist/commands/approve.js +116 -0
  446. package/dist/commands/approve.js.map +1 -0
  447. package/dist/commands/audit/query.d.ts +23 -0
  448. package/dist/commands/audit/query.d.ts.map +1 -0
  449. package/dist/commands/audit/query.js +118 -0
  450. package/dist/commands/audit/query.js.map +1 -0
  451. package/dist/commands/audit/show.d.ts +17 -0
  452. package/dist/commands/audit/show.d.ts.map +1 -0
  453. package/dist/commands/audit/show.js +53 -0
  454. package/dist/commands/audit/show.js.map +1 -0
  455. package/dist/commands/checklist.d.ts +17 -0
  456. package/dist/commands/checklist.d.ts.map +1 -0
  457. package/dist/commands/checklist.js +255 -0
  458. package/dist/commands/checklist.js.map +1 -0
  459. package/dist/commands/clarify.d.ts +17 -0
  460. package/dist/commands/clarify.d.ts.map +1 -0
  461. package/dist/commands/clarify.js +254 -0
  462. package/dist/commands/clarify.js.map +1 -0
  463. package/dist/commands/doctor.d.ts +8 -0
  464. package/dist/commands/doctor.d.ts.map +1 -0
  465. package/dist/commands/doctor.js +435 -0
  466. package/dist/commands/doctor.js.map +1 -0
  467. package/dist/commands/extension/add.d.ts +15 -0
  468. package/dist/commands/extension/add.d.ts.map +1 -0
  469. package/dist/commands/extension/add.js +93 -0
  470. package/dist/commands/extension/add.js.map +1 -0
  471. package/dist/commands/extension/info.d.ts +13 -0
  472. package/dist/commands/extension/info.d.ts.map +1 -0
  473. package/dist/commands/extension/info.js +75 -0
  474. package/dist/commands/extension/info.js.map +1 -0
  475. package/dist/commands/extension/list.d.ts +10 -0
  476. package/dist/commands/extension/list.d.ts.map +1 -0
  477. package/dist/commands/extension/list.js +71 -0
  478. package/dist/commands/extension/list.js.map +1 -0
  479. package/dist/commands/extension/remove.d.ts +14 -0
  480. package/dist/commands/extension/remove.d.ts.map +1 -0
  481. package/dist/commands/extension/remove.js +49 -0
  482. package/dist/commands/extension/remove.js.map +1 -0
  483. package/dist/commands/gate/approve.d.ts +15 -0
  484. package/dist/commands/gate/approve.d.ts.map +1 -0
  485. package/dist/commands/gate/approve.js +106 -0
  486. package/dist/commands/gate/approve.js.map +1 -0
  487. package/dist/commands/gate/list.d.ts +6 -0
  488. package/dist/commands/gate/list.d.ts.map +1 -0
  489. package/dist/commands/gate/list.js +38 -0
  490. package/dist/commands/gate/list.js.map +1 -0
  491. package/dist/commands/gate/skip.d.ts +14 -0
  492. package/dist/commands/gate/skip.d.ts.map +1 -0
  493. package/dist/commands/gate/skip.js +95 -0
  494. package/dist/commands/gate/skip.js.map +1 -0
  495. package/dist/commands/hook/list.d.ts +11 -0
  496. package/dist/commands/hook/list.d.ts.map +1 -0
  497. package/dist/commands/hook/list.js +152 -0
  498. package/dist/commands/hook/list.js.map +1 -0
  499. package/dist/commands/hook/run.d.ts +16 -0
  500. package/dist/commands/hook/run.d.ts.map +1 -0
  501. package/dist/commands/hook/run.js +74 -0
  502. package/dist/commands/hook/run.js.map +1 -0
  503. package/dist/commands/hotfix.d.ts +21 -0
  504. package/dist/commands/hotfix.d.ts.map +1 -0
  505. package/dist/commands/hotfix.js +216 -0
  506. package/dist/commands/hotfix.js.map +1 -0
  507. package/dist/commands/implement.d.ts +19 -0
  508. package/dist/commands/implement.d.ts.map +1 -0
  509. package/dist/commands/implement.js +282 -0
  510. package/dist/commands/implement.js.map +1 -0
  511. package/dist/commands/init.d.ts +43 -0
  512. package/dist/commands/init.d.ts.map +1 -0
  513. package/dist/commands/init.js +465 -0
  514. package/dist/commands/init.js.map +1 -0
  515. package/dist/commands/list-agents.d.ts +12 -0
  516. package/dist/commands/list-agents.d.ts.map +1 -0
  517. package/dist/commands/list-agents.js +55 -0
  518. package/dist/commands/list-agents.js.map +1 -0
  519. package/dist/commands/mcp/add.d.ts +21 -0
  520. package/dist/commands/mcp/add.d.ts.map +1 -0
  521. package/dist/commands/mcp/add.js +119 -0
  522. package/dist/commands/mcp/add.js.map +1 -0
  523. package/dist/commands/mcp/list.d.ts +10 -0
  524. package/dist/commands/mcp/list.d.ts.map +1 -0
  525. package/dist/commands/mcp/list.js +54 -0
  526. package/dist/commands/mcp/list.js.map +1 -0
  527. package/dist/commands/mcp/remove.d.ts +10 -0
  528. package/dist/commands/mcp/remove.d.ts.map +1 -0
  529. package/dist/commands/mcp/remove.js +53 -0
  530. package/dist/commands/mcp/remove.js.map +1 -0
  531. package/dist/commands/mcp/sync.d.ts +7 -0
  532. package/dist/commands/mcp/sync.d.ts.map +1 -0
  533. package/dist/commands/mcp/sync.js +31 -0
  534. package/dist/commands/mcp/sync.js.map +1 -0
  535. package/dist/commands/new.d.ts +19 -0
  536. package/dist/commands/new.d.ts.map +1 -0
  537. package/dist/commands/new.js +306 -0
  538. package/dist/commands/new.js.map +1 -0
  539. package/dist/commands/plan.d.ts +17 -0
  540. package/dist/commands/plan.d.ts.map +1 -0
  541. package/dist/commands/plan.js +200 -0
  542. package/dist/commands/plan.js.map +1 -0
  543. package/dist/commands/preset/add.d.ts +13 -0
  544. package/dist/commands/preset/add.d.ts.map +1 -0
  545. package/dist/commands/preset/add.js +66 -0
  546. package/dist/commands/preset/add.js.map +1 -0
  547. package/dist/commands/preset/info.d.ts +13 -0
  548. package/dist/commands/preset/info.d.ts.map +1 -0
  549. package/dist/commands/preset/info.js +80 -0
  550. package/dist/commands/preset/info.js.map +1 -0
  551. package/dist/commands/preset/list.d.ts +10 -0
  552. package/dist/commands/preset/list.d.ts.map +1 -0
  553. package/dist/commands/preset/list.js +63 -0
  554. package/dist/commands/preset/list.js.map +1 -0
  555. package/dist/commands/preset/remove.d.ts +14 -0
  556. package/dist/commands/preset/remove.d.ts.map +1 -0
  557. package/dist/commands/preset/remove.js +60 -0
  558. package/dist/commands/preset/remove.js.map +1 -0
  559. package/dist/commands/repair/constitution.d.ts +11 -0
  560. package/dist/commands/repair/constitution.d.ts.map +1 -0
  561. package/dist/commands/repair/constitution.js +117 -0
  562. package/dist/commands/repair/constitution.js.map +1 -0
  563. package/dist/commands/resync.d.ts +22 -0
  564. package/dist/commands/resync.d.ts.map +1 -0
  565. package/dist/commands/resync.js +103 -0
  566. package/dist/commands/resync.js.map +1 -0
  567. package/dist/commands/skill/add.d.ts +19 -0
  568. package/dist/commands/skill/add.d.ts.map +1 -0
  569. package/dist/commands/skill/add.js +107 -0
  570. package/dist/commands/skill/add.js.map +1 -0
  571. package/dist/commands/skill/list.d.ts +10 -0
  572. package/dist/commands/skill/list.d.ts.map +1 -0
  573. package/dist/commands/skill/list.js +56 -0
  574. package/dist/commands/skill/list.js.map +1 -0
  575. package/dist/commands/skill/remove.d.ts +10 -0
  576. package/dist/commands/skill/remove.d.ts.map +1 -0
  577. package/dist/commands/skill/remove.js +47 -0
  578. package/dist/commands/skill/remove.js.map +1 -0
  579. package/dist/commands/skill/sync.d.ts +7 -0
  580. package/dist/commands/skill/sync.d.ts.map +1 -0
  581. package/dist/commands/skill/sync.js +30 -0
  582. package/dist/commands/skill/sync.js.map +1 -0
  583. package/dist/commands/status.d.ts +17 -0
  584. package/dist/commands/status.d.ts.map +1 -0
  585. package/dist/commands/status.js +265 -0
  586. package/dist/commands/status.js.map +1 -0
  587. package/dist/commands/tasks.d.ts +16 -0
  588. package/dist/commands/tasks.d.ts.map +1 -0
  589. package/dist/commands/tasks.js +176 -0
  590. package/dist/commands/tasks.js.map +1 -0
  591. package/dist/commands/trace.d.ts +16 -0
  592. package/dist/commands/trace.d.ts.map +1 -0
  593. package/dist/commands/trace.js +113 -0
  594. package/dist/commands/trace.js.map +1 -0
  595. package/dist/commands/upgrade.d.ts +20 -0
  596. package/dist/commands/upgrade.d.ts.map +1 -0
  597. package/dist/commands/upgrade.js +178 -0
  598. package/dist/commands/upgrade.js.map +1 -0
  599. package/dist/commands/verify/a11y.d.ts +15 -0
  600. package/dist/commands/verify/a11y.d.ts.map +1 -0
  601. package/dist/commands/verify/a11y.js +121 -0
  602. package/dist/commands/verify/a11y.js.map +1 -0
  603. package/dist/commands/verify/architecture.d.ts +11 -0
  604. package/dist/commands/verify/architecture.d.ts.map +1 -0
  605. package/dist/commands/verify/architecture.js +71 -0
  606. package/dist/commands/verify/architecture.js.map +1 -0
  607. package/dist/commands/verify/audit.d.ts +18 -0
  608. package/dist/commands/verify/audit.d.ts.map +1 -0
  609. package/dist/commands/verify/audit.js +108 -0
  610. package/dist/commands/verify/audit.js.map +1 -0
  611. package/dist/commands/verify/constitution.d.ts +10 -0
  612. package/dist/commands/verify/constitution.d.ts.map +1 -0
  613. package/dist/commands/verify/constitution.js +91 -0
  614. package/dist/commands/verify/constitution.js.map +1 -0
  615. package/dist/commands/verify/os-matrix.d.ts +14 -0
  616. package/dist/commands/verify/os-matrix.d.ts.map +1 -0
  617. package/dist/commands/verify/os-matrix.js +108 -0
  618. package/dist/commands/verify/os-matrix.js.map +1 -0
  619. package/dist/commands/verify/perf.d.ts +17 -0
  620. package/dist/commands/verify/perf.d.ts.map +1 -0
  621. package/dist/commands/verify/perf.js +106 -0
  622. package/dist/commands/verify/perf.js.map +1 -0
  623. package/dist/commands/verify/stores.d.ts +14 -0
  624. package/dist/commands/verify/stores.d.ts.map +1 -0
  625. package/dist/commands/verify/stores.js +98 -0
  626. package/dist/commands/verify/stores.js.map +1 -0
  627. package/dist/commands/verify.d.ts +14 -0
  628. package/dist/commands/verify.d.ts.map +1 -0
  629. package/dist/commands/verify.js +97 -0
  630. package/dist/commands/verify.js.map +1 -0
  631. package/dist/commands/workflow/catalog.d.ts +11 -0
  632. package/dist/commands/workflow/catalog.d.ts.map +1 -0
  633. package/dist/commands/workflow/catalog.js +164 -0
  634. package/dist/commands/workflow/catalog.js.map +1 -0
  635. package/dist/commands/workflow/list.d.ts +7 -0
  636. package/dist/commands/workflow/list.d.ts.map +1 -0
  637. package/dist/commands/workflow/list.js +50 -0
  638. package/dist/commands/workflow/list.js.map +1 -0
  639. package/dist/commands/workflow/resume.d.ts +13 -0
  640. package/dist/commands/workflow/resume.d.ts.map +1 -0
  641. package/dist/commands/workflow/resume.js +126 -0
  642. package/dist/commands/workflow/resume.js.map +1 -0
  643. package/dist/commands/workflow/run.d.ts +14 -0
  644. package/dist/commands/workflow/run.d.ts.map +1 -0
  645. package/dist/commands/workflow/run.js +139 -0
  646. package/dist/commands/workflow/run.js.map +1 -0
  647. package/dist/commands/workflow/status.d.ts +10 -0
  648. package/dist/commands/workflow/status.d.ts.map +1 -0
  649. package/dist/commands/workflow/status.js +86 -0
  650. package/dist/commands/workflow/status.js.map +1 -0
  651. package/dist/index.d.ts +2 -0
  652. package/dist/index.d.ts.map +1 -0
  653. package/dist/index.js +2 -0
  654. package/dist/index.js.map +1 -0
  655. package/dist/shared/agents.d.ts +12 -0
  656. package/dist/shared/agents.d.ts.map +1 -0
  657. package/dist/shared/agents.js +31 -0
  658. package/dist/shared/agents.js.map +1 -0
  659. package/dist/shared/artifact-io.d.ts +54 -0
  660. package/dist/shared/artifact-io.d.ts.map +1 -0
  661. package/dist/shared/artifact-io.js +71 -0
  662. package/dist/shared/artifact-io.js.map +1 -0
  663. package/dist/shared/feature-prompt.d.ts +18 -0
  664. package/dist/shared/feature-prompt.d.ts.map +1 -0
  665. package/dist/shared/feature-prompt.js +21 -0
  666. package/dist/shared/feature-prompt.js.map +1 -0
  667. package/dist/shared/hooks.d.ts +7 -0
  668. package/dist/shared/hooks.d.ts.map +1 -0
  669. package/dist/shared/hooks.js +52 -0
  670. package/dist/shared/hooks.js.map +1 -0
  671. package/dist/shared/mcp.d.ts +9 -0
  672. package/dist/shared/mcp.d.ts.map +1 -0
  673. package/dist/shared/mcp.js +15 -0
  674. package/dist/shared/mcp.js.map +1 -0
  675. package/dist/shared/project.d.ts +42 -0
  676. package/dist/shared/project.d.ts.map +1 -0
  677. package/dist/shared/project.js +98 -0
  678. package/dist/shared/project.js.map +1 -0
  679. package/dist/shared/workflow-resolver.d.ts +19 -0
  680. package/dist/shared/workflow-resolver.d.ts.map +1 -0
  681. package/dist/shared/workflow-resolver.js +71 -0
  682. package/dist/shared/workflow-resolver.js.map +1 -0
  683. package/dist/workflow/args-builder.d.ts +31 -0
  684. package/dist/workflow/args-builder.d.ts.map +1 -0
  685. package/dist/workflow/args-builder.js +110 -0
  686. package/dist/workflow/args-builder.js.map +1 -0
  687. package/dist/workflow/executor.d.ts +18 -0
  688. package/dist/workflow/executor.d.ts.map +1 -0
  689. package/dist/workflow/executor.js +112 -0
  690. package/dist/workflow/executor.js.map +1 -0
  691. package/extensions/git/commands/rpt.git.feature.md +85 -0
  692. package/extensions/git/extension.yml +47 -0
  693. package/package.json +58 -0
  694. package/scripts/bash/check-prerequisites.sh +149 -0
  695. package/scripts/bash/common.sh +389 -0
  696. package/scripts/bash/create-new-feature.sh +164 -0
  697. package/scripts/bash/setup-plan.sh +113 -0
  698. package/scripts/check-naming.sh +138 -0
  699. package/scripts/check-prompts.sh +165 -0
  700. package/scripts/check-tasks.sh +166 -0
  701. package/scripts/powershell/check-prerequisites.ps1 +117 -0
  702. package/scripts/powershell/common.ps1 +328 -0
  703. package/scripts/powershell/create-new-feature.ps1 +138 -0
  704. package/scripts/powershell/setup-plan.ps1 +96 -0
  705. package/scripts/prepare-npm.mjs +157 -0
  706. package/templates/checklist-template.md +103 -0
  707. package/templates/commands/analyze.md +103 -0
  708. package/templates/commands/checklist.md +87 -0
  709. package/templates/commands/clarify.md +85 -0
  710. package/templates/commands/constitution.md +126 -0
  711. package/templates/commands/implement.md +117 -0
  712. package/templates/commands/plan.md +125 -0
  713. package/templates/commands/specify.md +127 -0
  714. package/templates/commands/tasks.md +98 -0
  715. package/templates/commands/taskstoissues.md +81 -0
  716. package/templates/constitution-template.md +48 -0
  717. package/templates/plan-template.md +150 -0
  718. package/templates/spec-template.md +116 -0
  719. package/templates/tasks-template.md +77 -0
@@ -0,0 +1,157 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * prepare-npm.mjs — Assemble a single, self-contained publishable npm package
4
+ * (`raptor-aios`) from the pnpm monorepo into `build/npm/`.
5
+ *
6
+ * The CLI uses oclif file-based command discovery (dist/commands/*.js) and the
7
+ * core reads its templates relative to its own dist, so we DON'T flatten into a
8
+ * single bundle. Instead we VENDOR @raptor/core into `dist/_core/` and rewrite
9
+ * every `@raptor/core` import specifier to a relative path. Templates,
10
+ * extensions and shell scripts are copied to the package root because
11
+ * `init` resolves them by walking up to a dir containing `scripts/bash`.
12
+ */
13
+ import {
14
+ cpSync,
15
+ existsSync,
16
+ mkdirSync,
17
+ readFileSync,
18
+ readdirSync,
19
+ rmSync,
20
+ statSync,
21
+ writeFileSync,
22
+ } from "node:fs";
23
+ import { dirname, join, relative, resolve } from "node:path";
24
+ import { fileURLToPath } from "node:url";
25
+
26
+ const HERE = dirname(fileURLToPath(import.meta.url));
27
+ const ROOT = resolve(HERE, "..");
28
+ const CLI = join(ROOT, "packages", "cli");
29
+ const CORE = join(ROOT, "packages", "core");
30
+ const OUT = join(ROOT, "build", "npm");
31
+
32
+ const VERSION = "0.1.0";
33
+
34
+ function log(msg) {
35
+ process.stdout.write(` ${msg}\n`);
36
+ }
37
+
38
+ // --- 0. sanity: builds must exist ---
39
+ for (const [name, d] of [
40
+ ["cli/dist", join(CLI, "dist")],
41
+ ["core/dist", join(CORE, "dist")],
42
+ ]) {
43
+ if (!existsSync(d)) {
44
+ console.error(`✗ Missing ${name} — run \`pnpm build\` first.`);
45
+ process.exit(1);
46
+ }
47
+ }
48
+
49
+ // --- 1. clean staging ---
50
+ rmSync(OUT, { recursive: true, force: true });
51
+ mkdirSync(OUT, { recursive: true });
52
+ log("clean staging build/npm/");
53
+
54
+ // --- 2. copy CLI bin + dist ---
55
+ cpSync(join(CLI, "bin"), join(OUT, "bin"), { recursive: true });
56
+ cpSync(join(CLI, "dist"), join(OUT, "dist"), { recursive: true });
57
+ log("copied cli bin + dist");
58
+
59
+ // --- 3. vendor @raptor/core into dist/_core ---
60
+ const VENDOR = join(OUT, "dist", "_core");
61
+ mkdirSync(VENDOR, { recursive: true });
62
+ cpSync(join(CORE, "dist"), join(VENDOR, "dist"), { recursive: true });
63
+ cpSync(join(CORE, "templates"), join(VENDOR, "templates"), { recursive: true });
64
+ writeFileSync(
65
+ join(VENDOR, "package.json"),
66
+ JSON.stringify(
67
+ { name: "@raptor/core", version: VERSION, type: "module", main: "dist/index.js" },
68
+ null,
69
+ 2,
70
+ ) + "\n",
71
+ );
72
+ log("vendored @raptor/core → dist/_core");
73
+
74
+ // --- 4. rewrite @raptor/core specifiers in cli dist to relative paths ---
75
+ const coreEntry = join(OUT, "dist", "_core", "dist", "index.js");
76
+ let rewritten = 0;
77
+ function walk(dir) {
78
+ for (const name of readdirSync(dir)) {
79
+ const p = join(dir, name);
80
+ const st = statSync(p);
81
+ if (st.isDirectory()) {
82
+ if (p === VENDOR) continue; // don't touch vendored core
83
+ walk(p);
84
+ } else if (name.endsWith(".js")) {
85
+ const src = readFileSync(p, "utf8");
86
+ if (!src.includes("@raptor/core")) continue;
87
+ let rel = relative(dirname(p), coreEntry).split("\\").join("/");
88
+ if (!rel.startsWith(".")) rel = "./" + rel;
89
+ const next = src
90
+ .split('"@raptor/core"')
91
+ .join(`"${rel}"`)
92
+ .split("'@raptor/core'")
93
+ .join(`'${rel}'`);
94
+ writeFileSync(p, next);
95
+ rewritten++;
96
+ }
97
+ }
98
+ }
99
+ walk(join(OUT, "dist"));
100
+ log(`rewrote @raptor/core → relative in ${rewritten} file(s)`);
101
+
102
+ // --- 5. copy root-level resources init resolves (templates/extensions/scripts) ---
103
+ for (const d of ["templates", "extensions", "scripts"]) {
104
+ cpSync(join(ROOT, d), join(OUT, d), { recursive: true });
105
+ }
106
+ log("copied templates/, extensions/, scripts/");
107
+
108
+ // --- 6. docs ---
109
+ for (const f of ["README.md", "LICENSE", "CHANGELOG.md"]) {
110
+ if (existsSync(join(ROOT, f))) cpSync(join(ROOT, f), join(OUT, f));
111
+ }
112
+ log("copied README/LICENSE/CHANGELOG");
113
+
114
+ // --- 7. publishable package.json ---
115
+ const pkg = {
116
+ name: "raptor-aios",
117
+ version: VERSION,
118
+ description:
119
+ "Raptor — Spec-Driven Development (SDD) CLI for modern mobile apps. Constitutional gates, audit trail, real verification (a11y/perf/stores/OS matrix), and AI-agent slash commands.",
120
+ type: "module",
121
+ bin: { raptor: "./bin/raptor.js" },
122
+ files: ["bin", "dist", "templates", "extensions", "scripts", "README.md", "LICENSE", "CHANGELOG.md"],
123
+ engines: { node: ">=20" },
124
+ oclif: {
125
+ bin: "raptor",
126
+ dirname: "raptor",
127
+ commands: "./dist/commands",
128
+ topicSeparator: " ",
129
+ },
130
+ keywords: [
131
+ "sdd",
132
+ "spec-driven-development",
133
+ "cli",
134
+ "mobile",
135
+ "react-native",
136
+ "spec-kit",
137
+ "ai",
138
+ "claude",
139
+ "governance",
140
+ "audit",
141
+ ],
142
+ author: "lucaspedronet",
143
+ license: "MIT",
144
+ repository: { type: "git", url: "git+https://github.com/lucaspedronet/raptor-aios.git" },
145
+ homepage: "https://github.com/lucaspedronet/raptor-aios#readme",
146
+ bugs: { url: "https://github.com/lucaspedronet/raptor-aios/issues" },
147
+ publishConfig: { access: "public" },
148
+ dependencies: {
149
+ "@oclif/core": "^4",
150
+ ajv: "^8.18.0",
151
+ yaml: "^2.5.0",
152
+ },
153
+ };
154
+ writeFileSync(join(OUT, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
155
+ log("wrote publishable package.json (raptor-aios)");
156
+
157
+ log(`\n✓ Staged raptor-aios@${VERSION} at build/npm/`);
@@ -0,0 +1,103 @@
1
+ # Quality Checklist — {{featureName}}
2
+
3
+ > Generated by `/rpt.checklist`. Source: spec.md + plan.md (+ tasks.md if present).
4
+ > Spec Kit ref: E09 — quality gate before `/rpt.implement` proceeds.
5
+
6
+ ---
7
+
8
+ ## Metadata
9
+
10
+ - **Feature**: `{{featureDirectory}}`
11
+ - **Generated**: `{{generatedAt}}`
12
+ - **Spec status**: {{specStatus}}
13
+ - **Plan status**: {{planStatus}}
14
+
15
+ ---
16
+
17
+ ## Code Quality
18
+
19
+ - [ ] All files follow project coding standards (lint clean)
20
+ - [ ] No `TODO` / `FIXME` markers remain in production code
21
+ - [ ] Error handling covers both expected and unexpected failures
22
+ - [ ] Logging follows project conventions (no console.log in prod paths)
23
+ - [ ] Public APIs have type signatures
24
+ - [ ] No dead code or unused imports
25
+
26
+ ## Testing
27
+
28
+ - [ ] Unit tests cover business logic (target ≥ 80% coverage)
29
+ - [ ] Integration tests for external dependencies
30
+ - [ ] Edge cases documented and tested
31
+ - [ ] Test fixtures are realistic (no `foo`/`bar` placeholders)
32
+ - [ ] Tests are deterministic (no flaky timing/ordering)
33
+ - [ ] Tests run independently (no shared mutable state)
34
+
35
+ ## Security
36
+
37
+ - [ ] Input validation on all endpoints / boundaries
38
+ - [ ] Authentication and authorization verified
39
+ - [ ] No secrets in code, fixtures, or configuration files
40
+ - [ ] OWASP Top 10 reviewed (injection, XSS, auth, etc.)
41
+ - [ ] Sensitive data handling (PII, tokens) audited
42
+ - [ ] Dependency vulnerabilities checked
43
+
44
+ ## Performance
45
+
46
+ - [ ] No N+1 query patterns
47
+ - [ ] Pagination on list endpoints
48
+ - [ ] Caching strategy documented (where applicable)
49
+ - [ ] Load characteristics measured for critical paths
50
+ - [ ] Memory / connection pools sized appropriately
51
+
52
+ ## Documentation
53
+
54
+ - [ ] API documentation reflects new contracts
55
+ - [ ] README updated when surface changes
56
+ - [ ] Architecture decisions recorded (in `plan.md` Decisions section)
57
+ - [ ] Operational runbook (if applicable)
58
+ - [ ] Migration / rollback procedure documented
59
+
60
+ ## Accessibility (UI features)
61
+
62
+ - [ ] Screen-reader compatible
63
+ - [ ] Keyboard navigation supported (no mouse-only flows)
64
+ - [ ] Color contrast meets WCAG AA
65
+ - [ ] Touch targets ≥ 44px on mobile
66
+ - [ ] Localizable strings (no hardcoded user-facing text)
67
+
68
+ ## Mobile (when applicable)
69
+
70
+ - [ ] Tested on iOS minimum supported version
71
+ - [ ] Tested on Android minimum supported version
72
+ - [ ] Offline-friendly (graceful degradation)
73
+ - [ ] Battery / data usage acceptable
74
+ - [ ] Push / notification permissions handled correctly
75
+
76
+ ## Constitution
77
+
78
+ - [ ] No principle violated without explicit, documented mitigation
79
+ - [ ] Test-First respected (where mandated)
80
+ - [ ] Library-First respected (no in-house reimplementation of common libs)
81
+
82
+ ## Observability
83
+
84
+ - [ ] Critical paths emit logs at appropriate level
85
+ - [ ] Key metrics exported (latency, errors, throughput)
86
+ - [ ] Distributed tracing in place (where applicable)
87
+ - [ ] Alerts wired for SLO violations
88
+
89
+ ---
90
+
91
+ ## Sign-Off
92
+
93
+ - [ ] All boxes above checked OR justified inline with `<!-- justification: ... -->`
94
+ - [ ] Reviewer: `{{reviewerEmail}}`
95
+ - [ ] Date: `{{signOffDate}}`
96
+
97
+ ---
98
+
99
+ ## Rules
100
+
101
+ 1. **No partial sign-off**: every box must be ticked OR justified.
102
+ 2. **Justifications are auditable**: inline justifications must reference a decision in `plan.md` or an issue number.
103
+ 3. **Re-runnable**: `/rpt.checklist` regenerates this file when artifacts change; user-justifications are preserved between runs.
@@ -0,0 +1,103 @@
1
+ ---
2
+ description: Analyze consistency between spec, plan, tasks, and implementation
3
+ handoffs:
4
+ - label: Fix issues in spec
5
+ agent: rpt.specify
6
+ prompt: "Update the spec to resolve inconsistencies"
7
+ send: false
8
+ - label: Generate checklist
9
+ agent: rpt.checklist
10
+ prompt: "Generate a quality checklist"
11
+ send: false
12
+ scripts:
13
+ sh: scripts/bash/check-prerequisites.sh --json
14
+ ---
15
+
16
+ <!-- prompt-version: 1.0.0 -->
17
+
18
+ # /rpt.analyze
19
+
20
+ ## User Input
21
+
22
+ ```text
23
+ $ARGUMENTS
24
+ ```
25
+
26
+ ## Pre-Execution Checks
27
+
28
+ 1. Read `.raptor/extensions.yml` (if present).
29
+ 2. For each hook registered under `before_analyze`:
30
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
31
+ - If `optional: true` → suggest `/<command>` to the user.
32
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
33
+
34
+ ## Outline
35
+
36
+ 1. **Setup**: Run `{SCRIPT}` from repo root. Parse JSON for `FEATURE_DIR`, `AVAILABLE_DOCS`.
37
+ 2. **Load artifacts**: Read all available documents.
38
+ 3. **Cross-reference analysis**: Check consistency between artifacts.
39
+ 4. **Report findings**: Generate structured consistency report.
40
+
41
+ ## Analysis Dimensions
42
+
43
+ ### 1. Spec ↔ Plan Alignment
44
+
45
+ - Every user story in spec has a corresponding architecture decision in plan
46
+ - Plan does not introduce requirements not in spec
47
+ - Non-functional requirements are addressed in plan
48
+
49
+ ### 2. Plan ↔ Tasks Coverage
50
+
51
+ - Every architecture decision maps to at least one task
52
+ - No orphan tasks (task without plan backing)
53
+ - Phase ordering reflects dependency analysis
54
+
55
+ ### 3. Spec ↔ Tasks Traceability
56
+
57
+ - Every user story has `[US<N>]` tagged tasks
58
+ - Acceptance criteria map to verifiable tasks
59
+ - Priority ordering (P1/P2/P3) is preserved
60
+
61
+ ### 4. Constitution Compliance
62
+
63
+ - Read `.raptor/memory/constitution.md`
64
+ - Verify all principles are honored in current artifacts
65
+ - Flag violations with severity
66
+
67
+ ### 5. Completeness
68
+
69
+ - No `[NEEDS CLARIFICATION]` items remaining
70
+ - All `TODO` markers resolved
71
+ - Contracts match data model
72
+
73
+ ## Output Format
74
+
75
+ ```markdown
76
+ # Consistency Analysis — <feature-name>
77
+
78
+ ## Summary
79
+ - ✅ N checks passed
80
+ - ⚠️ N warnings
81
+ - ❌ N errors
82
+
83
+ ## Findings
84
+
85
+ ### [ERROR/WARNING] <Finding Title>
86
+ - **Affected artifacts**: spec.md, plan.md
87
+ - **Description**: ...
88
+ - **Recommendation**: ...
89
+
90
+ ## Traceability Matrix
91
+
92
+ | User Story | Plan Section | Tasks | Status |
93
+ |------------|-------------|-------|--------|
94
+ | US1 | §2.1 | T005, T006 | ✅ |
95
+ ```
96
+
97
+ ## Final Hook Check
98
+
99
+ 1. Read `.raptor/extensions.yml` (if present).
100
+ 2. For each hook registered under `after_analyze`:
101
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
102
+ - If `optional: true` → suggest `/<command>` to the user.
103
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
@@ -0,0 +1,87 @@
1
+ ---
2
+ description: Generate quality checklist for the feature
3
+ handoffs:
4
+ - label: Implement the feature
5
+ agent: rpt.implement
6
+ prompt: "Execute tasks and write code"
7
+ send: false
8
+ scripts:
9
+ sh: scripts/bash/check-prerequisites.sh --json
10
+ ---
11
+
12
+ <!-- prompt-version: 1.0.0 -->
13
+
14
+ # /rpt.checklist
15
+
16
+ ## User Input
17
+
18
+ ```text
19
+ $ARGUMENTS
20
+ ```
21
+
22
+ ## Pre-Execution Checks
23
+
24
+ 1. Read `.raptor/extensions.yml` (if present).
25
+ 2. For each hook registered under `before_checklist`:
26
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
27
+ - If `optional: true` → suggest `/<command>` to the user.
28
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
29
+
30
+ ## Outline
31
+
32
+ 1. **Setup**: Run `{SCRIPT}` from repo root. Parse JSON for `FEATURE_DIR`, `AVAILABLE_DOCS`.
33
+ 2. **Load artifacts**: Read spec.md, plan.md, tasks.md (if available).
34
+ 3. **Generate checklist**: Create comprehensive quality checklist.
35
+ 4. **Write**: Save to `<FEATURE_DIR>/checklists/requirements.md`.
36
+
37
+ ## Checklist Categories
38
+
39
+ ### Code Quality
40
+
41
+ - [ ] All files follow project coding standards
42
+ - [ ] No TODO/FIXME markers remain in production code
43
+ - [ ] Error handling is comprehensive
44
+ - [ ] Logging follows project conventions
45
+
46
+ ### Testing
47
+
48
+ - [ ] Unit tests cover business logic (≥80% coverage)
49
+ - [ ] Integration tests for external dependencies
50
+ - [ ] Edge cases documented and tested
51
+ - [ ] Test fixtures are realistic
52
+
53
+ ### Security
54
+
55
+ - [ ] Input validation on all endpoints
56
+ - [ ] Authentication/authorization verified
57
+ - [ ] No secrets in code or configuration
58
+ - [ ] OWASP top 10 addressed
59
+
60
+ ### Performance
61
+
62
+ - [ ] No N+1 query patterns
63
+ - [ ] Pagination for list endpoints
64
+ - [ ] Caching strategy documented
65
+ - [ ] Load testing performed
66
+
67
+ ### Documentation
68
+
69
+ - [ ] API documentation updated
70
+ - [ ] README updated if needed
71
+ - [ ] Architecture decisions recorded
72
+ - [ ] Runbook for operations
73
+
74
+ ### Accessibility (if UI)
75
+
76
+ - [ ] Screen reader compatible
77
+ - [ ] Keyboard navigation works
78
+ - [ ] Color contrast meets WCAG AA
79
+ - [ ] Touch targets ≥ 44px
80
+
81
+ ## Final Hook Check
82
+
83
+ 1. Read `.raptor/extensions.yml` (if present).
84
+ 2. For each hook registered under `after_checklist`:
85
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
86
+ - If `optional: true` → suggest `/<command>` to the user.
87
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
@@ -0,0 +1,85 @@
1
+ ---
2
+ description: Ask clarifying questions to resolve NEEDS CLARIFICATION items in the spec
3
+ handoffs:
4
+ - label: Plan the implementation
5
+ agent: rpt.plan
6
+ prompt: "Create an implementation plan based on the clarified spec"
7
+ send: false
8
+ scripts:
9
+ sh: scripts/bash/check-prerequisites.sh --json
10
+ ---
11
+
12
+ <!-- prompt-version: 1.0.0 -->
13
+
14
+ # /rpt.clarify
15
+
16
+ ## User Input
17
+
18
+ ```text
19
+ $ARGUMENTS
20
+ ```
21
+
22
+ ## Pre-Execution Checks
23
+
24
+ 1. Read `.raptor/extensions.yml` (if present).
25
+ 2. For each hook registered under `before_clarify`:
26
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
27
+ - If `optional: true` → suggest `/<command>` to the user.
28
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
29
+
30
+ ## Outline
31
+
32
+ 1. **Setup**: Run `{SCRIPT}` from repo root. Parse JSON for `FEATURE_DIR`.
33
+ 2. **Load spec**: Read `<FEATURE_DIR>/spec.md`.
34
+ 3. **Find clarification needs**: Extract all `[NEEDS CLARIFICATION: <question>]` markers.
35
+ 4. **Generate questions**: For each marker, formulate a clear, answerable question.
36
+ 5. **Present Q&A table**: Show questions to the user in a numbered table.
37
+ 6. **Process answers**: Update `spec.md` with resolved clarifications.
38
+
39
+ ## Phases
40
+
41
+ ### Phase 0 — Load Context
42
+
43
+ Run `{SCRIPT}` and parse JSON. Read `<FEATURE_DIR>/spec.md`.
44
+
45
+ ### Phase 1 — Extract Clarifications
46
+
47
+ Scan `spec.md` for all `[NEEDS CLARIFICATION: ...]` markers. For each:
48
+
49
+ - Extract the embedded question.
50
+ - Categorize: `scope`, `technical`, `ux`, `business`.
51
+
52
+ ### Phase 2 — Q&A Session
53
+
54
+ Present a numbered table:
55
+
56
+ | # | Category | Question | Current Assumption |
57
+ |---|----------|----------|-------------------|
58
+ | 1 | scope | ... | ... |
59
+
60
+ If `$ARGUMENTS` contains answers (e.g., "1: yes, 2: use PostgreSQL"), process them directly.
61
+ Otherwise, wait for user input.
62
+
63
+ ### Phase 3 — Resolution
64
+
65
+ For each answered question:
66
+
67
+ 1. Remove the `[NEEDS CLARIFICATION: ...]` marker.
68
+ 2. Replace with the resolved text.
69
+ 3. If the answer reveals new requirements, add them to the appropriate section.
70
+
71
+ ### Phase 4 — Re-validate
72
+
73
+ After all clarifications are resolved:
74
+
75
+ 1. Re-read the spec.
76
+ 2. Check for any remaining `[NEEDS CLARIFICATION]` items.
77
+ 3. If none remain, mark the spec as `clarified`.
78
+
79
+ ## Final Hook Check
80
+
81
+ 1. Read `.raptor/extensions.yml` (if present).
82
+ 2. For each hook registered under `after_clarify`:
83
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
84
+ - If `optional: true` → suggest `/<command>` to the user.
85
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
@@ -0,0 +1,126 @@
1
+ ---
2
+ description: Create or update the project constitution with interactive ratification
3
+ handoffs:
4
+ - label: Review constitution
5
+ agent: rpt.plan
6
+ prompt: "Plan the next feature with the updated constitution"
7
+ send: false
8
+ - label: Specify a new feature
9
+ agent: rpt.specify
10
+ prompt: "Specify a new feature"
11
+ send: false
12
+ scripts:
13
+ sh: scripts/bash/common.sh
14
+ ---
15
+
16
+ <!-- prompt-version: 1.0.0 -->
17
+
18
+ # /rpt.constitution
19
+
20
+ ## User Input
21
+
22
+ ```text
23
+ $ARGUMENTS
24
+ ```
25
+
26
+ ## Pre-Execution Checks
27
+
28
+ 1. Read `.raptor/extensions.yml` (if present).
29
+ 2. For each hook registered under `before_constitution`:
30
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
31
+ - If `optional: true` → suggest `/<command>` to the user.
32
+ - If `enabled: false` → skip silently.
33
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.
34
+
35
+ ## Outline
36
+
37
+ 1. **Check existing constitution**: Read `.raptor/memory/constitution.md` if it exists.
38
+ 2. **Mode selection**:
39
+ - If constitution exists → UPDATE mode (present current principles, ask what to change).
40
+ - If constitution does not exist → CREATE mode (start from template).
41
+ 3. **Interactive ratification**:
42
+ - Present each principle for review.
43
+ - User can approve, modify, or reject each principle.
44
+ - Track changes for the ratification history.
45
+ 4. **Version bump**: Increment the version number (patch for edits, minor for new sections, major for structural changes).
46
+ 5. **Write**: Save the constitution to `.raptor/memory/constitution.md`.
47
+ 6. **Update ratification history**: Append a new row to the history table.
48
+
49
+ ## Phases
50
+
51
+ ### Phase 0 — Load Existing Constitution
52
+
53
+ Read `.raptor/memory/constitution.md` if it exists. Parse the current principles, sections, and ratification history.
54
+
55
+ If creating from scratch, copy from the constitution template (`templates/constitution-template.md` via priority stack resolution).
56
+
57
+ ### Phase 1 — Principle Review
58
+
59
+ For each principle section in the constitution:
60
+
61
+ 1. Present the principle name and description.
62
+ 2. Ask the user: **Approve / Modify / Remove?**
63
+ 3. If **Modify**: ask for the new description. Replace in-place.
64
+ 4. If **Remove**: mark for deletion. Confirm with user.
65
+
66
+ ### Phase 2 — New Principles
67
+
68
+ Ask: "Do you want to add new principles?"
69
+
70
+ For each new principle:
71
+
72
+ 1. Ask for principle name.
73
+ 2. Ask for principle description.
74
+ 3. Place in the appropriate section.
75
+
76
+ ### Phase 3 — Section Management
77
+
78
+ Ask: "Do you want to add, rename, or remove sections?"
79
+
80
+ Handle section-level operations.
81
+
82
+ ### Phase 4 — Ratification
83
+
84
+ 1. Show a summary diff of all changes.
85
+ 2. Ask for final approval.
86
+ 3. If approved:
87
+ - Bump version.
88
+ - Update `Last Updated` timestamp.
89
+ - Append to ratification history.
90
+ - Write file.
91
+ 4. If rejected: discard changes.
92
+
93
+ ## Output Format
94
+
95
+ The constitution is a Markdown file with the following structure:
96
+
97
+ ```markdown
98
+ # Constitution — <Project Name>
99
+
100
+ > **Version**: x.y.z
101
+ > **Last Updated**: <ISO 8601>
102
+
103
+ ## Core Principles
104
+
105
+ ### <Principle Name>
106
+ <Principle Description>
107
+
108
+ ## <Section Name>
109
+
110
+ ### <Section Principle Name>
111
+ <Section Principle Description>
112
+
113
+ ## Ratification History
114
+
115
+ | Version | Date | Author | Change |
116
+ |---------|------|--------|--------|
117
+ | x.y.z | date | author | description |
118
+ ```
119
+
120
+ ## Final Hook Check
121
+
122
+ 1. Read `.raptor/extensions.yml` (if present).
123
+ 2. For each hook registered under `after_constitution`:
124
+ - If `optional: false` → execute `EXECUTE_COMMAND: <command>` and wait.
125
+ - If `optional: true` → suggest `/<command>` to the user.
126
+ 3. If `.raptor/extensions.yml` is absent or invalid, proceed silently.