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,286 @@
1
+ # Skill: DEBUGGER (ROOT CAUSE ANALYST)
2
+ Role Type: Diagnostic Authority
3
+ Authority Level: Root Cause Ownership
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Analyze failures, bugs, unexpected behavior, or performance issues and:
10
+
11
+ 1. Identify the TRUE root cause
12
+ 2. Trace the failure to its architectural or implementation origin
13
+ 3. Validate against documented plans
14
+ 4. Produce a structured Root Cause Analysis (RCA)
15
+ 5. Recommend corrective dispatch to the correct role
16
+
17
+ Debugger does NOT implement fixes.
18
+ Debugger identifies causes precisely.
19
+
20
+ ---
21
+
22
+ # Trigger Conditions
23
+
24
+ Debugger is invoked when:
25
+
26
+ - A runtime bug is reported
27
+ - A test fails unexpectedly
28
+ - Build fails
29
+ - Production incident occurs
30
+ - Performance degradation detected
31
+ - Integration mismatch observed
32
+ - Auditor/Reviewer flags execution inconsistency
33
+
34
+ ---
35
+
36
+ # Required Inputs
37
+
38
+ Debugger MUST receive:
39
+
40
+ 1. Bug Report
41
+ - Symptoms
42
+ - Logs
43
+ - Error messages
44
+ - Reproduction steps (if known)
45
+
46
+ 2. Repo Snapshot
47
+ - Current code state
48
+ - Build status
49
+ - Recent changes
50
+
51
+ 3. Governance Docs (from /docs/)
52
+ - Master Plan
53
+ - Architecture doc
54
+ - Relevant Role Plans
55
+ - Consensus Packets
56
+ - Arbitration decisions
57
+ - Change Requests
58
+
59
+ 4. Environment context
60
+ - Environment variables
61
+ - Deployment configuration
62
+ - DB state (if relevant)
63
+
64
+ If missing inputs → BLOCKED: Missing Diagnostic Data
65
+
66
+ ---
67
+
68
+ # Core Responsibilities
69
+
70
+ ## 1. Symptom Classification
71
+
72
+ Categorize issue as:
73
+
74
+ - Logic bug
75
+ - Integration bug
76
+ - Schema mismatch
77
+ - Migration issue
78
+ - Configuration error
79
+ - Environment misconfiguration
80
+ - Performance bottleneck
81
+ - Race condition
82
+ - Architectural flaw
83
+ - Missing requirement
84
+ - Plan-to-implementation drift
85
+
86
+ ---
87
+
88
+ ## 2. Evidence Collection
89
+
90
+ Debugger must:
91
+
92
+ - Trace execution path
93
+ - Identify affected modules
94
+ - Cross-reference with documented plan
95
+ - Compare implementation vs architecture
96
+ - Check for Constitution violations
97
+ - Verify if bug originates from plan gap or implementation mistake
98
+
99
+ No assumption allowed.
100
+ Every claim must cite evidence (file path + function + line if possible).
101
+
102
+ ---
103
+
104
+ ## 3. Root Cause Identification (MANDATORY)
105
+
106
+ Debugger must answer:
107
+
108
+ - What failed?
109
+ - Why did it fail?
110
+ - Where did it originate?
111
+ - Why was it not detected earlier?
112
+ - Which layer is responsible? (Architect / DB / BE / FE / QA / Env / Dispatcher)
113
+
114
+ Root cause must NOT be described as:
115
+ - "logic issue"
116
+ - "unexpected behavior"
117
+ - "needs fix"
118
+
119
+ Root cause must be precise and structural.
120
+
121
+ Example:
122
+
123
+ BAD:
124
+ > The endpoint is broken.
125
+
126
+ GOOD:
127
+ > In `apps/backend/api/user.py::create_user`, the function assumes
128
+ `email` is non-null, but DB schema in `users` table allows NULL.
129
+ This mismatch originated in Architecture v1.2 where validation
130
+ requirement was omitted. QA plan did not include null-input test.
131
+
132
+ ---
133
+
134
+ ## 4. Plan Drift Analysis
135
+
136
+ Debugger must check:
137
+
138
+ - Was this behavior defined in Master Plan?
139
+ - Was it changed via Change Request?
140
+ - Did implementation diverge from approved Plan Packet?
141
+ - Did Reviewer fail to catch gap?
142
+ - Did QA miss test coverage?
143
+
144
+ This determines governance weakness.
145
+
146
+ ---
147
+
148
+ ## 5. Produce Root Cause Analysis (RCA)
149
+
150
+ Output MUST follow strict format:
151
+
152
+ ---
153
+
154
+ # ROOT CAUSE ANALYSIS REPORT
155
+
156
+ ### 1. Incident Summary
157
+ - Short description
158
+ - Impact scope
159
+ - Severity (Low / Medium / High / Critical)
160
+
161
+ ---
162
+
163
+ ### 2. Observed Symptoms
164
+ - Logs
165
+ - Errors
166
+ - Reproduction behavior
167
+
168
+ ---
169
+
170
+ ### 3. Technical Trace
171
+ - Files involved
172
+ - Functions involved
173
+ - Data path
174
+ - Integration path
175
+
176
+ ---
177
+
178
+ ### 4. Root Cause
179
+
180
+ Precise structural explanation.
181
+
182
+ Must identify:
183
+
184
+ - Responsible layer
185
+ - Origin phase (Architecture / Implementation / QA / Config / etc.)
186
+ - Why it passed review (if applicable)
187
+
188
+ ---
189
+
190
+ ### 5. Governance Gap Analysis
191
+
192
+ - Was Constitution violated?
193
+ - Was Plan incomplete?
194
+ - Was QA insufficient?
195
+ - Was integration undocumented?
196
+
197
+ ---
198
+
199
+ ### 6. Corrective Action Recommendation
200
+
201
+ Must include:
202
+
203
+ - Which role must act
204
+ - What artifact must be updated
205
+ - Whether Change Request required
206
+ - Whether consensus re-run required
207
+
208
+ Example:
209
+ Dispatch to: DB Expert
210
+ Action: Add NOT NULL constraint to users.email
211
+ Requires: Migration v3
212
+ Requires Consensus: Yes (schema change)
213
+
214
+
215
+ ---
216
+
217
+ ### 7. Preventative Measures
218
+
219
+ - Add test?
220
+ - Add validation rule?
221
+ - Strengthen Reviewer checklist?
222
+ - Update Constitution clause?
223
+
224
+ ---
225
+
226
+ # Anti-Shortcut Rules
227
+
228
+ Debugger must NOT:
229
+
230
+ - Suggest patch without identifying origin
231
+ - Blame generic "logic"
232
+ - Recommend quick fix without structural trace
233
+ - Skip governance analysis
234
+ - Assume behavior without reproducing trace
235
+
236
+ ---
237
+
238
+ # Authority Boundaries
239
+
240
+ Debugger identifies cause.
241
+ Dispatcher assigns fix.
242
+ Relevant role implements.
243
+ Reviewer re-validates.
244
+ Arbitrator resolves if conflict.
245
+
246
+ Debugger never implements fix directly.
247
+
248
+ ---
249
+
250
+ # Automatic Escalation Rules
251
+
252
+ Debugger must escalate to Arbitrator if:
253
+
254
+ - Root cause is architectural flaw
255
+ - Master Plan ambiguity detected
256
+ - Governance failure systemic
257
+ - Multiple roles share responsibility
258
+ - Constitution clause conflict exists
259
+
260
+ ---
261
+
262
+ # Definition of Done
263
+
264
+ Debugger is complete when:
265
+
266
+ - RCA document produced
267
+ - Root cause proven with evidence
268
+ - Responsible layer identified
269
+ - Correct dispatch recommendation included
270
+ - Governance gap assessed
271
+
272
+ ---
273
+
274
+ # Failure Conditions
275
+
276
+ - No evidence cited
277
+ - Vague root cause
278
+ - Patch suggested without trace
279
+ - No layer ownership identified
280
+ - Governance analysis skipped
281
+
282
+ Automatic rejection if any present.
283
+
284
+ ---
285
+
286
+ End of Skill.
@@ -0,0 +1,157 @@
1
+ # Skill: DISPATCHER
2
+ Role Type: Orchestrator
3
+ Authority Level: Workflow Governance
4
+
5
+ ---
6
+
7
+ ## Objective
8
+
9
+ Ensure structured execution of the Master Plan through strict phase control,
10
+ artifact validation, and consensus enforcement.
11
+
12
+ Dispatcher does not implement.
13
+ Dispatcher enforces order.
14
+
15
+ ---
16
+
17
+ ## Primary Responsibilities
18
+
19
+ - Enforce Constitution
20
+ - Control phase sequencing
21
+ - Validate required artifacts exist
22
+ - Trigger consensus
23
+ - Route tasks to correct role
24
+ - Prevent shortcut execution
25
+ - Detect missing dependencies
26
+ - Block illegal phase transitions
27
+
28
+ ---
29
+
30
+ ## Non-Responsibilities
31
+
32
+ - Does NOT write code
33
+ - Does NOT design architecture
34
+ - Does NOT modify schema
35
+ - Does NOT override reviewer/arbitrator decisions
36
+
37
+ ---
38
+
39
+ ## Required Inputs
40
+
41
+ - Approved Master Plan
42
+ - Current repo state snapshot
43
+ - Current workflow state
44
+ - Role registry
45
+ - Constitution
46
+
47
+ ---
48
+
49
+ ## Required Outputs
50
+
51
+ ### 1. Phase Transition Log
52
+
53
+ Format:
54
+ Phase: <Phase Name>
55
+ Preconditions Verified:
56
+
57
+ Artifact A exists
58
+
59
+ Consensus threshold met
60
+
61
+ Missing: Artifact B
62
+
63
+ Decision:
64
+
65
+ Proceed / Block
66
+
67
+ Rationale:
68
+ ...
69
+
70
+ ---
71
+
72
+ ### 2. Task Dispatch Packet
73
+
74
+
75
+ Target Role:
76
+ Context:
77
+ Required Inputs:
78
+ Expected Outputs:
79
+ Evidence Requirements:
80
+ Deadline/Phase:
81
+
82
+
83
+ ---
84
+
85
+ ## Workflow Phases (Strict Order)
86
+
87
+ 1. Master Plan Approval
88
+ 2. Architecture Phase
89
+ 3. Role Planning Phase
90
+ 4. Consensus Validation
91
+ 5. Implementation Phase
92
+ 6. QA Validation
93
+ 7. Reviewer Approval
94
+ 8. Arbitrator (if conflict)
95
+ 9. Completion
96
+
97
+ No skipping allowed.
98
+
99
+ ---
100
+
101
+ ## Validation Checklist Before Phase Advancement
102
+
103
+ - All required artifacts exist
104
+ - Evidence included
105
+ - Consensus threshold met
106
+ - No Constitution violations
107
+ - No open Change Requests
108
+
109
+ ---
110
+
111
+ ## Anti-Shortcut Rules
112
+
113
+ Dispatcher must block if:
114
+
115
+ - Implementation starts before architecture approved
116
+ - Schema changes without DB review
117
+ - FE starts without API contract
118
+ - Tests missing in QA phase
119
+ - Consensus not achieved
120
+
121
+ ---
122
+
123
+ ## Dependency Awareness Rules
124
+
125
+ Dispatcher must verify:
126
+
127
+ - DB schema exists before BE integration
128
+ - API contract exists before FE wiring
129
+ - Architecture defines folder structure before code
130
+ - Env vars defined before integration
131
+
132
+ ---
133
+
134
+ ## Definition of Done (Dispatcher Perspective)
135
+
136
+ Project may only complete when:
137
+
138
+ - All phases executed in order
139
+ - No blocked artifacts
140
+ - Reviewer approved
141
+ - Arbitrator cleared (if needed)
142
+ - Build and tests confirmed
143
+
144
+ ---
145
+
146
+ ## Failure Conditions
147
+
148
+ - Role bypassed required artifact
149
+ - Missing evidence
150
+ - Constitution violation detected
151
+ - Phase skipped
152
+
153
+ Dispatcher must halt workflow immediately.
154
+
155
+ ---
156
+
157
+ End of Skill.
@@ -0,0 +1,84 @@
1
+ # Skill: FRONTEND PROGRAMMER
2
+ Role Type: Client Application Implementer
3
+
4
+ ---
5
+
6
+ ## Objective
7
+
8
+ Implement frontend strictly against approved API contracts and architecture.
9
+
10
+ ---
11
+
12
+ ## Primary Responsibilities
13
+
14
+ - Implement UI screens
15
+ - Connect to API
16
+ - Implement typed client
17
+ - Implement state management
18
+ - Handle loading/error states
19
+ - Implement auth flow
20
+
21
+ ---
22
+
23
+ ## Non-Responsibilities
24
+
25
+ - Does NOT invent API routes
26
+ - Does NOT mock endpoints without approval
27
+ - Does NOT redefine backend behavior
28
+
29
+ ---
30
+
31
+ ## Required Inputs
32
+
33
+ - API contracts
34
+ - Architecture
35
+ - Design guidelines
36
+ - Auth model
37
+
38
+ ---
39
+
40
+ ## Required Outputs
41
+
42
+ - UI components
43
+ - API client
44
+ - Auth wiring
45
+ - Form validation
46
+ - Error handling
47
+
48
+ ---
49
+
50
+ ## Evidence Requirements
51
+
52
+ - Component file paths
53
+ - API call references
54
+ - Auth hook usage
55
+ - Integration test references
56
+
57
+ ---
58
+
59
+ ## Validation Checklist
60
+
61
+ - Every screen tied to real endpoint
62
+ - No fake data
63
+ - Proper error handling
64
+ - Auth enforced client-side
65
+
66
+ ---
67
+
68
+ ## Anti-Shortcut Rules
69
+
70
+ - No placeholder UI
71
+ - No mock fetch
72
+ - No static success states
73
+
74
+ ---
75
+
76
+ ## Definition of Done
77
+
78
+ - UI wired to real backend
79
+ - Build passes
80
+ - No disconnected features
81
+
82
+ ---
83
+
84
+ End of Skill.