popeye-cli 1.9.5 → 2.0.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 (318) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/CONTRIBUTING.md +15 -1
  3. package/README.md +57 -0
  4. package/cheatsheet.md +65 -0
  5. package/dist/cli/commands/debug-context.d.ts +64 -0
  6. package/dist/cli/commands/debug-context.d.ts.map +1 -0
  7. package/dist/cli/commands/debug-context.js +221 -0
  8. package/dist/cli/commands/debug-context.js.map +1 -0
  9. package/dist/cli/commands/debug-prompts.d.ts +25 -0
  10. package/dist/cli/commands/debug-prompts.d.ts.map +1 -0
  11. package/dist/cli/commands/debug-prompts.js +80 -0
  12. package/dist/cli/commands/debug-prompts.js.map +1 -0
  13. package/dist/cli/commands/debug.d.ts +68 -0
  14. package/dist/cli/commands/debug.d.ts.map +1 -0
  15. package/dist/cli/commands/debug.js +543 -0
  16. package/dist/cli/commands/debug.js.map +1 -0
  17. package/dist/cli/commands/index.d.ts +1 -0
  18. package/dist/cli/commands/index.d.ts.map +1 -1
  19. package/dist/cli/commands/index.js +1 -0
  20. package/dist/cli/commands/index.js.map +1 -1
  21. package/dist/cli/index.d.ts.map +1 -1
  22. package/dist/cli/index.js +2 -1
  23. package/dist/cli/index.js.map +1 -1
  24. package/dist/cli/interactive.d.ts.map +1 -1
  25. package/dist/cli/interactive.js +25 -0
  26. package/dist/cli/interactive.js.map +1 -1
  27. package/dist/generators/all.d.ts.map +1 -1
  28. package/dist/generators/all.js +2 -0
  29. package/dist/generators/all.js.map +1 -1
  30. package/dist/generators/templates/database-docker.d.ts.map +1 -1
  31. package/dist/generators/templates/database-docker.js +10 -0
  32. package/dist/generators/templates/database-docker.js.map +1 -1
  33. package/dist/generators/templates/fullstack.d.ts +4 -1
  34. package/dist/generators/templates/fullstack.d.ts.map +1 -1
  35. package/dist/generators/templates/fullstack.js +6 -2
  36. package/dist/generators/templates/fullstack.js.map +1 -1
  37. package/dist/pipeline/artifact-manager.d.ts +47 -0
  38. package/dist/pipeline/artifact-manager.d.ts.map +1 -0
  39. package/dist/pipeline/artifact-manager.js +251 -0
  40. package/dist/pipeline/artifact-manager.js.map +1 -0
  41. package/dist/pipeline/artifact-validators.d.ts +29 -0
  42. package/dist/pipeline/artifact-validators.d.ts.map +1 -0
  43. package/dist/pipeline/artifact-validators.js +173 -0
  44. package/dist/pipeline/artifact-validators.js.map +1 -0
  45. package/dist/pipeline/change-request.d.ts +47 -0
  46. package/dist/pipeline/change-request.d.ts.map +1 -0
  47. package/dist/pipeline/change-request.js +91 -0
  48. package/dist/pipeline/change-request.js.map +1 -0
  49. package/dist/pipeline/check-runner.d.ts +47 -0
  50. package/dist/pipeline/check-runner.d.ts.map +1 -0
  51. package/dist/pipeline/check-runner.js +417 -0
  52. package/dist/pipeline/check-runner.js.map +1 -0
  53. package/dist/pipeline/command-resolver.d.ts +9 -0
  54. package/dist/pipeline/command-resolver.d.ts.map +1 -0
  55. package/dist/pipeline/command-resolver.js +140 -0
  56. package/dist/pipeline/command-resolver.js.map +1 -0
  57. package/dist/pipeline/consensus/consensus-runner.d.ts +44 -0
  58. package/dist/pipeline/consensus/consensus-runner.d.ts.map +1 -0
  59. package/dist/pipeline/consensus/consensus-runner.js +212 -0
  60. package/dist/pipeline/consensus/consensus-runner.js.map +1 -0
  61. package/dist/pipeline/constitution.d.ts +45 -0
  62. package/dist/pipeline/constitution.d.ts.map +1 -0
  63. package/dist/pipeline/constitution.js +82 -0
  64. package/dist/pipeline/constitution.js.map +1 -0
  65. package/dist/pipeline/gate-engine.d.ts +55 -0
  66. package/dist/pipeline/gate-engine.d.ts.map +1 -0
  67. package/dist/pipeline/gate-engine.js +270 -0
  68. package/dist/pipeline/gate-engine.js.map +1 -0
  69. package/dist/pipeline/index.d.ts +26 -0
  70. package/dist/pipeline/index.d.ts.map +1 -0
  71. package/dist/pipeline/index.js +35 -0
  72. package/dist/pipeline/index.js.map +1 -0
  73. package/dist/pipeline/migration.d.ts +15 -0
  74. package/dist/pipeline/migration.d.ts.map +1 -0
  75. package/dist/pipeline/migration.js +76 -0
  76. package/dist/pipeline/migration.js.map +1 -0
  77. package/dist/pipeline/orchestrator.d.ts +28 -0
  78. package/dist/pipeline/orchestrator.d.ts.map +1 -0
  79. package/dist/pipeline/orchestrator.js +238 -0
  80. package/dist/pipeline/orchestrator.js.map +1 -0
  81. package/dist/pipeline/packets/audit-report-builder.d.ts +11 -0
  82. package/dist/pipeline/packets/audit-report-builder.d.ts.map +1 -0
  83. package/dist/pipeline/packets/audit-report-builder.js +32 -0
  84. package/dist/pipeline/packets/audit-report-builder.js.map +1 -0
  85. package/dist/pipeline/packets/consensus-packet-builder.d.ts +35 -0
  86. package/dist/pipeline/packets/consensus-packet-builder.d.ts.map +1 -0
  87. package/dist/pipeline/packets/consensus-packet-builder.js +80 -0
  88. package/dist/pipeline/packets/consensus-packet-builder.js.map +1 -0
  89. package/dist/pipeline/packets/index.d.ts +12 -0
  90. package/dist/pipeline/packets/index.d.ts.map +1 -0
  91. package/dist/pipeline/packets/index.js +8 -0
  92. package/dist/pipeline/packets/index.js.map +1 -0
  93. package/dist/pipeline/packets/plan-packet-builder.d.ts +21 -0
  94. package/dist/pipeline/packets/plan-packet-builder.d.ts.map +1 -0
  95. package/dist/pipeline/packets/plan-packet-builder.js +27 -0
  96. package/dist/pipeline/packets/plan-packet-builder.js.map +1 -0
  97. package/dist/pipeline/packets/rca-packet-builder.d.ts +19 -0
  98. package/dist/pipeline/packets/rca-packet-builder.d.ts.map +1 -0
  99. package/dist/pipeline/packets/rca-packet-builder.js +22 -0
  100. package/dist/pipeline/packets/rca-packet-builder.js.map +1 -0
  101. package/dist/pipeline/phases/architecture.d.ts +7 -0
  102. package/dist/pipeline/phases/architecture.d.ts.map +1 -0
  103. package/dist/pipeline/phases/architecture.js +60 -0
  104. package/dist/pipeline/phases/architecture.js.map +1 -0
  105. package/dist/pipeline/phases/audit.d.ts +8 -0
  106. package/dist/pipeline/phases/audit.d.ts.map +1 -0
  107. package/dist/pipeline/phases/audit.js +144 -0
  108. package/dist/pipeline/phases/audit.js.map +1 -0
  109. package/dist/pipeline/phases/consensus-architecture.d.ts +7 -0
  110. package/dist/pipeline/phases/consensus-architecture.d.ts.map +1 -0
  111. package/dist/pipeline/phases/consensus-architecture.js +84 -0
  112. package/dist/pipeline/phases/consensus-architecture.js.map +1 -0
  113. package/dist/pipeline/phases/consensus-master-plan.d.ts +7 -0
  114. package/dist/pipeline/phases/consensus-master-plan.d.ts.map +1 -0
  115. package/dist/pipeline/phases/consensus-master-plan.js +81 -0
  116. package/dist/pipeline/phases/consensus-master-plan.js.map +1 -0
  117. package/dist/pipeline/phases/consensus-role-plans.d.ts +7 -0
  118. package/dist/pipeline/phases/consensus-role-plans.d.ts.map +1 -0
  119. package/dist/pipeline/phases/consensus-role-plans.js +85 -0
  120. package/dist/pipeline/phases/consensus-role-plans.js.map +1 -0
  121. package/dist/pipeline/phases/done.d.ts +7 -0
  122. package/dist/pipeline/phases/done.d.ts.map +1 -0
  123. package/dist/pipeline/phases/done.js +45 -0
  124. package/dist/pipeline/phases/done.js.map +1 -0
  125. package/dist/pipeline/phases/implementation.d.ts +8 -0
  126. package/dist/pipeline/phases/implementation.d.ts.map +1 -0
  127. package/dist/pipeline/phases/implementation.js +42 -0
  128. package/dist/pipeline/phases/implementation.js.map +1 -0
  129. package/dist/pipeline/phases/index.d.ts +20 -0
  130. package/dist/pipeline/phases/index.d.ts.map +1 -0
  131. package/dist/pipeline/phases/index.js +19 -0
  132. package/dist/pipeline/phases/index.js.map +1 -0
  133. package/dist/pipeline/phases/intake.d.ts +8 -0
  134. package/dist/pipeline/phases/intake.d.ts.map +1 -0
  135. package/dist/pipeline/phases/intake.js +40 -0
  136. package/dist/pipeline/phases/intake.js.map +1 -0
  137. package/dist/pipeline/phases/phase-context.d.ts +30 -0
  138. package/dist/pipeline/phases/phase-context.d.ts.map +1 -0
  139. package/dist/pipeline/phases/phase-context.js +33 -0
  140. package/dist/pipeline/phases/phase-context.js.map +1 -0
  141. package/dist/pipeline/phases/production-gate.d.ts +8 -0
  142. package/dist/pipeline/phases/production-gate.d.ts.map +1 -0
  143. package/dist/pipeline/phases/production-gate.js +84 -0
  144. package/dist/pipeline/phases/production-gate.js.map +1 -0
  145. package/dist/pipeline/phases/qa-validation.d.ts +7 -0
  146. package/dist/pipeline/phases/qa-validation.d.ts.map +1 -0
  147. package/dist/pipeline/phases/qa-validation.js +50 -0
  148. package/dist/pipeline/phases/qa-validation.js.map +1 -0
  149. package/dist/pipeline/phases/recovery-loop.d.ts +7 -0
  150. package/dist/pipeline/phases/recovery-loop.d.ts.map +1 -0
  151. package/dist/pipeline/phases/recovery-loop.js +91 -0
  152. package/dist/pipeline/phases/recovery-loop.js.map +1 -0
  153. package/dist/pipeline/phases/review.d.ts +8 -0
  154. package/dist/pipeline/phases/review.d.ts.map +1 -0
  155. package/dist/pipeline/phases/review.js +127 -0
  156. package/dist/pipeline/phases/review.js.map +1 -0
  157. package/dist/pipeline/phases/role-planning.d.ts +7 -0
  158. package/dist/pipeline/phases/role-planning.d.ts.map +1 -0
  159. package/dist/pipeline/phases/role-planning.js +75 -0
  160. package/dist/pipeline/phases/role-planning.js.map +1 -0
  161. package/dist/pipeline/phases/stuck.d.ts +7 -0
  162. package/dist/pipeline/phases/stuck.d.ts.map +1 -0
  163. package/dist/pipeline/phases/stuck.js +51 -0
  164. package/dist/pipeline/phases/stuck.js.map +1 -0
  165. package/dist/pipeline/repo-snapshot.d.ts +24 -0
  166. package/dist/pipeline/repo-snapshot.d.ts.map +1 -0
  167. package/dist/pipeline/repo-snapshot.js +343 -0
  168. package/dist/pipeline/repo-snapshot.js.map +1 -0
  169. package/dist/pipeline/role-execution-adapter.d.ts +59 -0
  170. package/dist/pipeline/role-execution-adapter.d.ts.map +1 -0
  171. package/dist/pipeline/role-execution-adapter.js +159 -0
  172. package/dist/pipeline/role-execution-adapter.js.map +1 -0
  173. package/dist/pipeline/skill-loader.d.ts +34 -0
  174. package/dist/pipeline/skill-loader.d.ts.map +1 -0
  175. package/dist/pipeline/skill-loader.js +156 -0
  176. package/dist/pipeline/skill-loader.js.map +1 -0
  177. package/dist/pipeline/skills/defaults.d.ts +16 -0
  178. package/dist/pipeline/skills/defaults.d.ts.map +1 -0
  179. package/dist/pipeline/skills/defaults.js +189 -0
  180. package/dist/pipeline/skills/defaults.js.map +1 -0
  181. package/dist/pipeline/type-defs/artifacts.d.ts +202 -0
  182. package/dist/pipeline/type-defs/artifacts.d.ts.map +1 -0
  183. package/dist/pipeline/type-defs/artifacts.js +66 -0
  184. package/dist/pipeline/type-defs/artifacts.js.map +1 -0
  185. package/dist/pipeline/type-defs/audit.d.ts +256 -0
  186. package/dist/pipeline/type-defs/audit.d.ts.map +1 -0
  187. package/dist/pipeline/type-defs/audit.js +54 -0
  188. package/dist/pipeline/type-defs/audit.js.map +1 -0
  189. package/dist/pipeline/type-defs/checks.d.ts +81 -0
  190. package/dist/pipeline/type-defs/checks.d.ts.map +1 -0
  191. package/dist/pipeline/type-defs/checks.js +38 -0
  192. package/dist/pipeline/type-defs/checks.js.map +1 -0
  193. package/dist/pipeline/type-defs/enums.d.ts +43 -0
  194. package/dist/pipeline/type-defs/enums.d.ts.map +1 -0
  195. package/dist/pipeline/type-defs/enums.js +55 -0
  196. package/dist/pipeline/type-defs/enums.js.map +1 -0
  197. package/dist/pipeline/type-defs/index.d.ts +12 -0
  198. package/dist/pipeline/type-defs/index.d.ts.map +1 -0
  199. package/dist/pipeline/type-defs/index.js +12 -0
  200. package/dist/pipeline/type-defs/index.js.map +1 -0
  201. package/dist/pipeline/type-defs/packets.d.ts +806 -0
  202. package/dist/pipeline/type-defs/packets.d.ts.map +1 -0
  203. package/dist/pipeline/type-defs/packets.js +109 -0
  204. package/dist/pipeline/type-defs/packets.js.map +1 -0
  205. package/dist/pipeline/type-defs/snapshot.d.ts +52 -0
  206. package/dist/pipeline/type-defs/snapshot.d.ts.map +1 -0
  207. package/dist/pipeline/type-defs/snapshot.js +35 -0
  208. package/dist/pipeline/type-defs/snapshot.js.map +1 -0
  209. package/dist/pipeline/type-defs/state.d.ts +449 -0
  210. package/dist/pipeline/type-defs/state.d.ts.map +1 -0
  211. package/dist/pipeline/type-defs/state.js +88 -0
  212. package/dist/pipeline/type-defs/state.js.map +1 -0
  213. package/dist/pipeline/types.d.ts +16 -0
  214. package/dist/pipeline/types.d.ts.map +1 -0
  215. package/dist/pipeline/types.js +16 -0
  216. package/dist/pipeline/types.js.map +1 -0
  217. package/dist/types/audit.d.ts +6 -6
  218. package/dist/workflow/index.d.ts.map +1 -1
  219. package/dist/workflow/index.js +48 -0
  220. package/dist/workflow/index.js.map +1 -1
  221. package/package.json +1 -1
  222. package/skills/ARBITRATOR.md +137 -0
  223. package/skills/ARCHITECT.md +167 -0
  224. package/skills/AUDITOR.md +128 -0
  225. package/skills/AUDIT_REPORT_SCHEMA.md +20 -0
  226. package/skills/BACKEND_PROGRAMMER.md +95 -0
  227. package/skills/CONSENSUS_PACKET_SCHEMA.md +166 -0
  228. package/skills/DB_EXPERT.md +106 -0
  229. package/skills/DEBUGGER.md +286 -0
  230. package/skills/DISPATCHER.md +157 -0
  231. package/skills/FRONTEND_PROGRAMMER.md +84 -0
  232. package/skills/JOURNALIST.md +247 -0
  233. package/skills/MARKETING_EXPERT.md +23 -0
  234. package/skills/PHASE_GATE_ENGINE_SPEC.md +171 -0
  235. package/skills/PLAN_PACKET_SCHEMA.md +222 -0
  236. package/skills/POPEYE_CONSTITUTION.md +177 -0
  237. package/skills/POPEYE_FULL_AUTONOMY_PIPELINE.md +537 -0
  238. package/skills/PRODUCTION_READINESS_SCHEMA.md +19 -0
  239. package/skills/QA_TESTER.md +40 -0
  240. package/skills/RCA_PACKET_SCHEMA.md +22 -0
  241. package/skills/RELEASE_MANAGER.md +60 -0
  242. package/skills/REVIEWER.md +133 -0
  243. package/skills/SOCIAL_EXPERT.md +22 -0
  244. package/skills/UI_UX_SPECIALIST.md +22 -0
  245. package/skills/WEBSITE_PROGRAMMER.md +37 -0
  246. package/src/cli/commands/debug-context.ts +265 -0
  247. package/src/cli/commands/debug-prompts.ts +91 -0
  248. package/src/cli/commands/debug.ts +662 -0
  249. package/src/cli/commands/index.ts +1 -0
  250. package/src/cli/index.ts +2 -0
  251. package/src/cli/interactive.ts +27 -0
  252. package/src/generators/all.ts +2 -0
  253. package/src/generators/templates/database-docker.ts +10 -0
  254. package/src/generators/templates/fullstack.ts +6 -2
  255. package/src/pipeline/artifact-manager.ts +339 -0
  256. package/src/pipeline/artifact-validators.ts +224 -0
  257. package/src/pipeline/change-request.ts +119 -0
  258. package/src/pipeline/check-runner.ts +504 -0
  259. package/src/pipeline/command-resolver.ts +168 -0
  260. package/src/pipeline/consensus/consensus-runner.ts +317 -0
  261. package/src/pipeline/constitution.ts +109 -0
  262. package/src/pipeline/gate-engine.ts +347 -0
  263. package/src/pipeline/index.ts +82 -0
  264. package/src/pipeline/migration.ts +91 -0
  265. package/src/pipeline/orchestrator.ts +314 -0
  266. package/src/pipeline/packets/audit-report-builder.ts +47 -0
  267. package/src/pipeline/packets/consensus-packet-builder.ts +112 -0
  268. package/src/pipeline/packets/index.ts +15 -0
  269. package/src/pipeline/packets/plan-packet-builder.ts +52 -0
  270. package/src/pipeline/packets/rca-packet-builder.ts +38 -0
  271. package/src/pipeline/phases/architecture.ts +73 -0
  272. package/src/pipeline/phases/audit.ts +193 -0
  273. package/src/pipeline/phases/consensus-architecture.ts +104 -0
  274. package/src/pipeline/phases/consensus-master-plan.ts +100 -0
  275. package/src/pipeline/phases/consensus-role-plans.ts +105 -0
  276. package/src/pipeline/phases/done.ts +68 -0
  277. package/src/pipeline/phases/implementation.ts +48 -0
  278. package/src/pipeline/phases/index.ts +21 -0
  279. package/src/pipeline/phases/intake.ts +54 -0
  280. package/src/pipeline/phases/phase-context.ts +86 -0
  281. package/src/pipeline/phases/production-gate.ts +113 -0
  282. package/src/pipeline/phases/qa-validation.ts +63 -0
  283. package/src/pipeline/phases/recovery-loop.ts +118 -0
  284. package/src/pipeline/phases/review.ts +149 -0
  285. package/src/pipeline/phases/role-planning.ts +92 -0
  286. package/src/pipeline/phases/stuck.ts +62 -0
  287. package/src/pipeline/repo-snapshot.ts +395 -0
  288. package/src/pipeline/role-execution-adapter.ts +238 -0
  289. package/src/pipeline/skill-loader.ts +192 -0
  290. package/src/pipeline/skills/defaults.ts +215 -0
  291. package/src/pipeline/type-defs/artifacts.ts +81 -0
  292. package/src/pipeline/type-defs/audit.ts +67 -0
  293. package/src/pipeline/type-defs/checks.ts +47 -0
  294. package/src/pipeline/type-defs/enums.ts +62 -0
  295. package/src/pipeline/type-defs/index.ts +12 -0
  296. package/src/pipeline/type-defs/packets.ts +131 -0
  297. package/src/pipeline/type-defs/snapshot.ts +55 -0
  298. package/src/pipeline/type-defs/state.ts +165 -0
  299. package/src/pipeline/types.ts +16 -0
  300. package/src/workflow/index.ts +48 -0
  301. package/tests/cli/commands/debug.test.ts +376 -0
  302. package/tests/pipeline/artifact-manager.test.ts +183 -0
  303. package/tests/pipeline/artifact-validators.test.ts +207 -0
  304. package/tests/pipeline/change-request.test.ts +180 -0
  305. package/tests/pipeline/check-runner.test.ts +157 -0
  306. package/tests/pipeline/command-resolver.test.ts +159 -0
  307. package/tests/pipeline/consensus-runner.test.ts +206 -0
  308. package/tests/pipeline/consensus-scoring.test.ts +163 -0
  309. package/tests/pipeline/constitution.test.ts +122 -0
  310. package/tests/pipeline/gate-engine.test.ts +195 -0
  311. package/tests/pipeline/migration.test.ts +133 -0
  312. package/tests/pipeline/orchestrator.test.ts +614 -0
  313. package/tests/pipeline/packets/builders.test.ts +347 -0
  314. package/tests/pipeline/repo-snapshot.test.ts +189 -0
  315. package/tests/pipeline/role-execution-adapter.test.ts +299 -0
  316. package/tests/pipeline/skill-loader.test.ts +186 -0
  317. package/tests/pipeline/start-env-checks.test.ts +123 -0
  318. package/tests/pipeline/types.test.ts +156 -0
@@ -0,0 +1,167 @@
1
+ # Skill: SYSTEM & SOFTWARE ARCHITECT
2
+ Role Type: Strategic Technical Authority
3
+ Authority Level: Architecture Ownership
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Translate the approved Master Plan into:
10
+
11
+ - System architecture
12
+ - Component boundaries
13
+ - Data flow
14
+ - Integration contracts
15
+ - Non-functional requirements
16
+ - Repo structure blueprint
17
+
18
+ Architect defines structure BEFORE implementation begins.
19
+
20
+ ---
21
+
22
+ ## Primary Responsibilities
23
+
24
+ - Define system topology
25
+ - Define service boundaries
26
+ - Define API contracts
27
+ - Define folder structure
28
+ - Define environment variables
29
+ - Define authentication model
30
+ - Define data ownership
31
+ - Define integration contracts (FE-BE-DB)
32
+ - Identify risks
33
+ - Identify scalability concerns
34
+
35
+ ---
36
+
37
+ ## Non-Responsibilities
38
+
39
+ - Does NOT implement code
40
+ - Does NOT write migrations
41
+ - Does NOT write UI components
42
+ - Does NOT override DB expert
43
+ - Does NOT write tests
44
+
45
+ ---
46
+
47
+ ## Required Inputs
48
+
49
+ - Approved Master Plan
50
+ - Existing repo structure (if any)
51
+ - Technology stack constraints
52
+ - Performance/security requirements
53
+ - Infrastructure constraints
54
+
55
+ ---
56
+
57
+ ## Required Outputs
58
+
59
+ ### 1. Architecture Document (Required)
60
+
61
+ Must include:
62
+
63
+ - High-level system diagram (text-based)
64
+ - Component breakdown
65
+ - Data flow mapping
66
+ - API contract definitions
67
+ - Authentication flow
68
+ - Folder structure
69
+ - Environment variables list
70
+ - Non-functional requirements
71
+ - Scaling assumptions
72
+ - Known risks
73
+
74
+ ---
75
+
76
+ ### 2. Interface Contracts
77
+
78
+ Example:
79
+ API: POST /users
80
+ Request:
81
+ {
82
+ email: string,
83
+ password: string
84
+ }
85
+
86
+ Response:
87
+ {
88
+ id: UUID,
89
+ email: string,
90
+ created_at: datetime
91
+ }
92
+
93
+
94
+ ---
95
+
96
+ ### 3. Dependency Map
97
+
98
+ Example:
99
+
100
+ - FE depends on OpenAPI spec
101
+ - BE depends on DB schema
102
+ - DB depends on migration engine
103
+ - Auth service depends on JWT secret
104
+
105
+ ---
106
+
107
+ ## Evidence Requirements
108
+
109
+ Architect must reference:
110
+
111
+ - Existing folders (if repo exists)
112
+ - Confirmed stack versions
113
+ - Declared frameworks
114
+ - Verified constraints from Master Plan
115
+
116
+ ---
117
+
118
+ ## Validation Checklist
119
+
120
+ - All system components identified
121
+ - No undefined integration gaps
122
+ - API contracts defined before FE work
123
+ - DB boundaries defined
124
+ - Env vars enumerated
125
+ - Auth model explicit
126
+ - Error handling strategy defined
127
+
128
+ ---
129
+
130
+ ## Anti-Shortcut Rules
131
+
132
+ Architect may NOT:
133
+
134
+ - Assume default behavior without stating it
135
+ - Leave API contracts undefined
136
+ - Skip environment variable definition
137
+ - Omit authentication decisions
138
+ - Leave scalability undefined in multi-tenant systems
139
+
140
+ ---
141
+
142
+ ## Definition of Done
143
+
144
+ Architecture is complete when:
145
+
146
+ - It covers all features from Master Plan
147
+ - No integration gaps exist
148
+ - Contracts are explicit
149
+ - Dependencies clear
150
+ - Dispatcher approves artifact presence
151
+ - Reviewer confirms no architectural ambiguity
152
+
153
+ ---
154
+
155
+ ## Failure Conditions
156
+
157
+ - Missing API contracts
158
+ - Undefined data flow
159
+ - Missing environment variables
160
+ - Ambiguous component boundaries
161
+ - Ignored non-functional requirements
162
+
163
+ Automatic rejection if any present.
164
+
165
+ ---
166
+
167
+ End of Skill.
@@ -0,0 +1,128 @@
1
+ # Skill: AUDITOR (HOLISTIC SYSTEM AUDIT AUTHORITY)
2
+ Role Type: Final System Verifier
3
+ Authority Level: Pre-Production Gatekeeper
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Perform a comprehensive, system-wide audit before Production Gate.
10
+
11
+ The Auditor verifies:
12
+
13
+ - Integration completeness
14
+ - Wiring correctness
15
+ - Security basics
16
+ - Test coverage sufficiency
17
+ - Configuration integrity
18
+ - Deployment readiness
19
+ - Constitution compliance
20
+
21
+ Auditor does NOT implement fixes.
22
+ Auditor identifies systemic gaps.
23
+
24
+ ---
25
+
26
+ ## Trigger
27
+
28
+ Invoked after:
29
+ - Implementation
30
+ - QA
31
+ - Reviewer approval
32
+
33
+ Before:
34
+ - Production Gate
35
+
36
+ ---
37
+
38
+ ## Required Inputs
39
+
40
+ - Repo Snapshot
41
+ - Architecture Document
42
+ - All Role Plans
43
+ - Consensus Packets
44
+ - Debugger RCAs (if any)
45
+ - Build + test results
46
+ - Environment configuration
47
+ - Deployment configuration
48
+
49
+ ---
50
+
51
+ ## Audit Categories (Mandatory)
52
+
53
+ ### 1. Integration Audit
54
+ - FE → BE calls verified?
55
+ - BE → DB queries aligned with schema?
56
+ - Auth enforced end-to-end?
57
+ - Error handling consistent?
58
+
59
+ ### 2. Configuration Audit
60
+ - All env vars defined?
61
+ - No hardcoded secrets?
62
+ - Dev vs prod config separated?
63
+
64
+ ### 3. Test Coverage Audit
65
+ - Critical paths covered?
66
+ - Integration tests present?
67
+ - Regression risks identified?
68
+
69
+ ### 4. Schema & Migration Audit
70
+ - Migrations apply cleanly?
71
+ - Rollback possible?
72
+ - No destructive changes without approval?
73
+
74
+ ### 5. Security Baseline Audit
75
+ - Input validation present?
76
+ - Auth required where needed?
77
+ - Basic rate limiting if public API?
78
+ - No obvious injection risks?
79
+
80
+ ### 6. Deployment Audit
81
+ - Docker or deployment instructions present?
82
+ - Health checks defined?
83
+ - Logs structured?
84
+ - Monitoring hooks defined?
85
+
86
+ ---
87
+
88
+ ## Output Format: AUDIT REPORT
89
+
90
+ # AUDIT REPORT
91
+
92
+ ## Summary
93
+ PASS / FAIL
94
+
95
+ ## Findings
96
+ Each finding must include:
97
+ - Severity (P0/P1/P2/P3)
98
+ - Evidence (file path + reference)
99
+ - Impact
100
+ - Recommended Owner
101
+
102
+ ## Blocking Issues
103
+ Explicit list of P0/P1 issues.
104
+
105
+ ## System Risk Score (0–100)
106
+
107
+ ## Recommended Dispatcher Action
108
+ - Proceed to Production Gate
109
+ - Enter Recovery Loop
110
+
111
+ ---
112
+
113
+ ## Automatic Fail Conditions
114
+
115
+ Audit fails if:
116
+ - Missing integration wiring
117
+ - Critical paths untested
118
+ - Schema mismatch
119
+ - Hardcoded secrets
120
+ - Production config missing
121
+ - Unresolved Debugger RCA
122
+
123
+ ---
124
+
125
+ ## Definition of Done
126
+
127
+ Audit report stored under `/docs/audit/`
128
+ Dispatcher notified with PASS/FAIL.
@@ -0,0 +1,20 @@
1
+ # AUDIT REPORT SCHEMA
2
+
3
+ Required Fields:
4
+
5
+ - audit_id
6
+ - timestamp
7
+ - repo_snapshot_hash
8
+ - overall_status (PASS/FAIL)
9
+ - findings[]
10
+
11
+ Each finding must include:
12
+ - id
13
+ - severity
14
+ - description
15
+ - evidence
16
+ - suggested_owner
17
+ - blocking (true/false)
18
+
19
+ - system_risk_score (0–100)
20
+ - recovery_required (boolean)
@@ -0,0 +1,95 @@
1
+ # Skill: BACKEND PROGRAMMER
2
+ Role Type: Service Implementer
3
+ Authority Level: Business Logic
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Implement backend services strictly according to:
10
+
11
+ - Approved Architecture
12
+ - Approved DB Schema
13
+ - Defined API Contracts
14
+
15
+ ---
16
+
17
+ ## Primary Responsibilities
18
+
19
+ - Implement endpoints
20
+ - Implement business logic
21
+ - Integrate with DB
22
+ - Handle validation
23
+ - Implement error handling
24
+ - Implement auth enforcement
25
+ - Write unit tests
26
+
27
+ ---
28
+
29
+ ## Non-Responsibilities
30
+
31
+ - Does NOT redefine schema
32
+ - Does NOT redefine API contracts
33
+ - Does NOT skip auth
34
+ - Does NOT mock DB unless explicitly allowed
35
+
36
+ ---
37
+
38
+ ## Required Inputs
39
+
40
+ - Architecture document
41
+ - DB schema
42
+ - API contracts
43
+ - Environment variables list
44
+
45
+ ---
46
+
47
+ ## Required Outputs
48
+
49
+ - Endpoint implementations
50
+ - Service layer
51
+ - Validation layer
52
+ - Auth middleware
53
+ - Unit tests
54
+ - Integration test stubs
55
+
56
+ ---
57
+
58
+ ## Evidence Requirements
59
+
60
+ - File paths for endpoints
61
+ - Service class references
62
+ - DB call references
63
+ - Test file paths
64
+
65
+ ---
66
+
67
+ ## Validation Checklist
68
+
69
+ - Every API contract implemented
70
+ - Error responses match spec
71
+ - Auth enforced
72
+ - No direct SQL if ORM required
73
+ - No business logic in controller if layered architecture required
74
+
75
+ ---
76
+
77
+ ## Anti-Shortcut Rules
78
+
79
+ - No TODOs
80
+ - No hardcoded values
81
+ - No bypassing auth
82
+ - No partial endpoint
83
+
84
+ ---
85
+
86
+ ## Definition of Done
87
+
88
+ - All endpoints implemented
89
+ - Tests passing
90
+ - Build passes
91
+ - Reviewer confirms no Constitution violation
92
+
93
+ ---
94
+
95
+ End of Skill.
@@ -0,0 +1,166 @@
1
+ # CONSENSUS PACKET SCHEMA
2
+ Version: 1.0
3
+ Purpose: Structured record of Reviewer votes and Arbitrator decisions.
4
+
5
+ Consensus is computed from this packet.
6
+
7
+ ---
8
+
9
+ # 1. Required Top-Level Fields
10
+
11
+ 1. metadata
12
+ 2. plan_packet_reference
13
+ 3. reviewer_votes
14
+ 4. consensus_rules
15
+ 5. consensus_result
16
+ 6. arbitrator_result (if applicable)
17
+ 7. final_status
18
+
19
+ ---
20
+
21
+ # 2. Field Definitions
22
+
23
+ ## 2.1 metadata
24
+
25
+ - consensus_id (UUID)
26
+ - timestamp
27
+ - phase
28
+ - target_artifact
29
+
30
+ ---
31
+
32
+ ## 2.2 plan_packet_reference
33
+
34
+ - packet_id
35
+ - version
36
+ - hash (optional but recommended)
37
+
38
+ Must match Plan Packet exactly.
39
+ No voting on outdated packets allowed.
40
+
41
+ ---
42
+
43
+ ## 2.3 reviewer_votes
44
+
45
+ Array of structured votes:
46
+
47
+ Each vote MUST contain:
48
+
49
+ - reviewer_id
50
+ - verdict (APPROVE / APPROVE_WITH_MINOR_CHANGES / REJECT / BLOCKED)
51
+ - score (0–100)
52
+ - blocking_issues[]
53
+ - non_blocking_issues[]
54
+ - hallucination_flags[]
55
+ - constitution_violations[]
56
+ - confidence_level (Low / Medium / High)
57
+
58
+ ---
59
+
60
+ ## 2.4 consensus_rules
61
+
62
+ Example:
63
+
64
+ - required_threshold: 95%
65
+ - minimum_reviewers: 2
66
+ - reject_if_any_hallucination: true
67
+ - reject_if_blocking_issue: true
68
+
69
+ Rules must be explicit.
70
+ No implicit assumptions.
71
+
72
+ ---
73
+
74
+ ## 2.5 consensus_result
75
+
76
+ Computed fields:
77
+
78
+ - total_reviewers
79
+ - approvals
80
+ - rejections
81
+ - approval_percentage
82
+ - blocking_issue_count
83
+ - hallucination_count
84
+ - constitution_violation_count
85
+
86
+ Must be mechanically computable.
87
+
88
+ ---
89
+
90
+ ## 2.6 arbitrator_result (if triggered)
91
+
92
+ Required if:
93
+
94
+ - Approval percentage < threshold
95
+ - Reviewers conflict
96
+ - Hallucination flags present
97
+ - Blocking issues exist
98
+
99
+ Must include:
100
+
101
+ - final_verdict
102
+ - convergence_summary
103
+ - merged_patch (if any)
104
+ - rejected_items
105
+ - required_revisions
106
+ - dispatcher_next_action
107
+
108
+ ---
109
+
110
+ ## 2.7 final_status
111
+
112
+ One of:
113
+
114
+ - APPROVED
115
+ - APPROVED_WITH_PATCH
116
+ - REJECTED
117
+ - BLOCKED
118
+ - REVISION_REQUIRED
119
+
120
+ No ambiguous states allowed.
121
+
122
+ ---
123
+
124
+ # 3. Automatic Consensus Failure Conditions
125
+
126
+ Consensus fails automatically if:
127
+
128
+ - Any reviewer flags hallucination AND evidence confirms it
129
+ - Any blocking issue remains unresolved
130
+ - Approval percentage < required threshold
131
+ - Constitution violation exists
132
+
133
+ ---
134
+
135
+ # 4. Consensus Success Conditions
136
+
137
+ Consensus succeeds if:
138
+
139
+ - Approval percentage ≥ threshold
140
+ - No unresolved blocking issues
141
+ - No confirmed hallucinations
142
+ - Constitution compliance confirmed
143
+
144
+ ---
145
+
146
+ # 5. Revision Flow
147
+
148
+ If final_status = REVISION_REQUIRED:
149
+
150
+ Dispatcher must:
151
+ 1. Update Plan Packet
152
+ 2. Increment version
153
+ 3. Re-run full review cycle
154
+
155
+ Partial voting not allowed.
156
+
157
+ ---
158
+
159
+ # 6. Immutable Record Rule
160
+
161
+ Consensus Packet must be stored and never mutated.
162
+ New version requires new packet_id.
163
+
164
+ ---
165
+
166
+ End of Schema.
@@ -0,0 +1,106 @@
1
+ # Skill: DATABASE EXPERT
2
+ Role Type: Persistence Authority
3
+ Authority Level: Data Ownership
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Design, validate, and enforce database schema integrity, migrations, constraints,
10
+ indexes, and transactional correctness.
11
+
12
+ DB Expert owns the truth of persistence.
13
+
14
+ ---
15
+
16
+ ## Primary Responsibilities
17
+
18
+ - Define schema
19
+ - Define migrations
20
+ - Define constraints (FK, uniqueness, indexes)
21
+ - Define transaction boundaries
22
+ - Define data normalization strategy
23
+ - Define seed strategy
24
+ - Define rollback strategy
25
+ - Define performance indexes
26
+ - Define multi-tenant data isolation (if applicable)
27
+
28
+ ---
29
+
30
+ ## Non-Responsibilities
31
+
32
+ - Does NOT implement business logic
33
+ - Does NOT design API routes
34
+ - Does NOT implement UI
35
+ - Does NOT override architecture
36
+
37
+ ---
38
+
39
+ ## Required Inputs
40
+
41
+ - Architecture document
42
+ - Master Plan
43
+ - Data flow definitions
44
+ - Performance requirements
45
+
46
+ ---
47
+
48
+ ## Required Outputs
49
+
50
+ ### 1. Schema Definition
51
+ - Tables
52
+ - Fields
53
+ - Types
54
+ - Relationships
55
+ - Constraints
56
+
57
+ ### 2. Migration Plan
58
+ - Migration files
59
+ - Rollback plan
60
+ - Order of execution
61
+
62
+ ### 3. Index Strategy
63
+ - Explicit index definitions
64
+ - Query performance considerations
65
+
66
+ ---
67
+
68
+ ## Evidence Requirements
69
+
70
+ - File path of schema
71
+ - File path of migration files
72
+ - Explicit index definitions
73
+ - ORM model references (if applicable)
74
+
75
+ ---
76
+
77
+ ## Validation Checklist
78
+
79
+ - All entities from Master Plan mapped
80
+ - All foreign keys defined
81
+ - No orphan tables
82
+ - Indexes for query-heavy paths
83
+ - No undefined fields
84
+ - Migration order deterministic
85
+
86
+ ---
87
+
88
+ ## Anti-Shortcut Rules
89
+
90
+ - No implicit relationships
91
+ - No missing constraints
92
+ - No skipping indexes for production systems
93
+ - No schema defined only in ORM without migration
94
+
95
+ ---
96
+
97
+ ## Definition of Done
98
+
99
+ - Schema aligns with architecture
100
+ - Migrations apply cleanly
101
+ - Rollbacks validated
102
+ - Reviewer confirms structural integrity
103
+
104
+ ---
105
+
106
+ End of Skill.