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.
- package/CHANGELOG.md +59 -0
- package/CONTRIBUTING.md +15 -1
- package/README.md +57 -0
- package/cheatsheet.md +65 -0
- package/dist/cli/commands/debug-context.d.ts +64 -0
- package/dist/cli/commands/debug-context.d.ts.map +1 -0
- package/dist/cli/commands/debug-context.js +221 -0
- package/dist/cli/commands/debug-context.js.map +1 -0
- package/dist/cli/commands/debug-prompts.d.ts +25 -0
- package/dist/cli/commands/debug-prompts.d.ts.map +1 -0
- package/dist/cli/commands/debug-prompts.js +80 -0
- package/dist/cli/commands/debug-prompts.js.map +1 -0
- package/dist/cli/commands/debug.d.ts +68 -0
- package/dist/cli/commands/debug.d.ts.map +1 -0
- package/dist/cli/commands/debug.js +543 -0
- package/dist/cli/commands/debug.js.map +1 -0
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +25 -0
- package/dist/cli/interactive.js.map +1 -1
- package/dist/generators/all.d.ts.map +1 -1
- package/dist/generators/all.js +2 -0
- package/dist/generators/all.js.map +1 -1
- package/dist/generators/templates/database-docker.d.ts.map +1 -1
- package/dist/generators/templates/database-docker.js +10 -0
- package/dist/generators/templates/database-docker.js.map +1 -1
- package/dist/generators/templates/fullstack.d.ts +4 -1
- package/dist/generators/templates/fullstack.d.ts.map +1 -1
- package/dist/generators/templates/fullstack.js +6 -2
- package/dist/generators/templates/fullstack.js.map +1 -1
- package/dist/pipeline/artifact-manager.d.ts +47 -0
- package/dist/pipeline/artifact-manager.d.ts.map +1 -0
- package/dist/pipeline/artifact-manager.js +251 -0
- package/dist/pipeline/artifact-manager.js.map +1 -0
- package/dist/pipeline/artifact-validators.d.ts +29 -0
- package/dist/pipeline/artifact-validators.d.ts.map +1 -0
- package/dist/pipeline/artifact-validators.js +173 -0
- package/dist/pipeline/artifact-validators.js.map +1 -0
- package/dist/pipeline/change-request.d.ts +47 -0
- package/dist/pipeline/change-request.d.ts.map +1 -0
- package/dist/pipeline/change-request.js +91 -0
- package/dist/pipeline/change-request.js.map +1 -0
- package/dist/pipeline/check-runner.d.ts +47 -0
- package/dist/pipeline/check-runner.d.ts.map +1 -0
- package/dist/pipeline/check-runner.js +417 -0
- package/dist/pipeline/check-runner.js.map +1 -0
- package/dist/pipeline/command-resolver.d.ts +9 -0
- package/dist/pipeline/command-resolver.d.ts.map +1 -0
- package/dist/pipeline/command-resolver.js +140 -0
- package/dist/pipeline/command-resolver.js.map +1 -0
- package/dist/pipeline/consensus/consensus-runner.d.ts +44 -0
- package/dist/pipeline/consensus/consensus-runner.d.ts.map +1 -0
- package/dist/pipeline/consensus/consensus-runner.js +212 -0
- package/dist/pipeline/consensus/consensus-runner.js.map +1 -0
- package/dist/pipeline/constitution.d.ts +45 -0
- package/dist/pipeline/constitution.d.ts.map +1 -0
- package/dist/pipeline/constitution.js +82 -0
- package/dist/pipeline/constitution.js.map +1 -0
- package/dist/pipeline/gate-engine.d.ts +55 -0
- package/dist/pipeline/gate-engine.d.ts.map +1 -0
- package/dist/pipeline/gate-engine.js +270 -0
- package/dist/pipeline/gate-engine.js.map +1 -0
- package/dist/pipeline/index.d.ts +26 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/index.js +35 -0
- package/dist/pipeline/index.js.map +1 -0
- package/dist/pipeline/migration.d.ts +15 -0
- package/dist/pipeline/migration.d.ts.map +1 -0
- package/dist/pipeline/migration.js +76 -0
- package/dist/pipeline/migration.js.map +1 -0
- package/dist/pipeline/orchestrator.d.ts +28 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +238 -0
- package/dist/pipeline/orchestrator.js.map +1 -0
- package/dist/pipeline/packets/audit-report-builder.d.ts +11 -0
- package/dist/pipeline/packets/audit-report-builder.d.ts.map +1 -0
- package/dist/pipeline/packets/audit-report-builder.js +32 -0
- package/dist/pipeline/packets/audit-report-builder.js.map +1 -0
- package/dist/pipeline/packets/consensus-packet-builder.d.ts +35 -0
- package/dist/pipeline/packets/consensus-packet-builder.d.ts.map +1 -0
- package/dist/pipeline/packets/consensus-packet-builder.js +80 -0
- package/dist/pipeline/packets/consensus-packet-builder.js.map +1 -0
- package/dist/pipeline/packets/index.d.ts +12 -0
- package/dist/pipeline/packets/index.d.ts.map +1 -0
- package/dist/pipeline/packets/index.js +8 -0
- package/dist/pipeline/packets/index.js.map +1 -0
- package/dist/pipeline/packets/plan-packet-builder.d.ts +21 -0
- package/dist/pipeline/packets/plan-packet-builder.d.ts.map +1 -0
- package/dist/pipeline/packets/plan-packet-builder.js +27 -0
- package/dist/pipeline/packets/plan-packet-builder.js.map +1 -0
- package/dist/pipeline/packets/rca-packet-builder.d.ts +19 -0
- package/dist/pipeline/packets/rca-packet-builder.d.ts.map +1 -0
- package/dist/pipeline/packets/rca-packet-builder.js +22 -0
- package/dist/pipeline/packets/rca-packet-builder.js.map +1 -0
- package/dist/pipeline/phases/architecture.d.ts +7 -0
- package/dist/pipeline/phases/architecture.d.ts.map +1 -0
- package/dist/pipeline/phases/architecture.js +60 -0
- package/dist/pipeline/phases/architecture.js.map +1 -0
- package/dist/pipeline/phases/audit.d.ts +8 -0
- package/dist/pipeline/phases/audit.d.ts.map +1 -0
- package/dist/pipeline/phases/audit.js +144 -0
- package/dist/pipeline/phases/audit.js.map +1 -0
- package/dist/pipeline/phases/consensus-architecture.d.ts +7 -0
- package/dist/pipeline/phases/consensus-architecture.d.ts.map +1 -0
- package/dist/pipeline/phases/consensus-architecture.js +84 -0
- package/dist/pipeline/phases/consensus-architecture.js.map +1 -0
- package/dist/pipeline/phases/consensus-master-plan.d.ts +7 -0
- package/dist/pipeline/phases/consensus-master-plan.d.ts.map +1 -0
- package/dist/pipeline/phases/consensus-master-plan.js +81 -0
- package/dist/pipeline/phases/consensus-master-plan.js.map +1 -0
- package/dist/pipeline/phases/consensus-role-plans.d.ts +7 -0
- package/dist/pipeline/phases/consensus-role-plans.d.ts.map +1 -0
- package/dist/pipeline/phases/consensus-role-plans.js +85 -0
- package/dist/pipeline/phases/consensus-role-plans.js.map +1 -0
- package/dist/pipeline/phases/done.d.ts +7 -0
- package/dist/pipeline/phases/done.d.ts.map +1 -0
- package/dist/pipeline/phases/done.js +45 -0
- package/dist/pipeline/phases/done.js.map +1 -0
- package/dist/pipeline/phases/implementation.d.ts +8 -0
- package/dist/pipeline/phases/implementation.d.ts.map +1 -0
- package/dist/pipeline/phases/implementation.js +42 -0
- package/dist/pipeline/phases/implementation.js.map +1 -0
- package/dist/pipeline/phases/index.d.ts +20 -0
- package/dist/pipeline/phases/index.d.ts.map +1 -0
- package/dist/pipeline/phases/index.js +19 -0
- package/dist/pipeline/phases/index.js.map +1 -0
- package/dist/pipeline/phases/intake.d.ts +8 -0
- package/dist/pipeline/phases/intake.d.ts.map +1 -0
- package/dist/pipeline/phases/intake.js +40 -0
- package/dist/pipeline/phases/intake.js.map +1 -0
- package/dist/pipeline/phases/phase-context.d.ts +30 -0
- package/dist/pipeline/phases/phase-context.d.ts.map +1 -0
- package/dist/pipeline/phases/phase-context.js +33 -0
- package/dist/pipeline/phases/phase-context.js.map +1 -0
- package/dist/pipeline/phases/production-gate.d.ts +8 -0
- package/dist/pipeline/phases/production-gate.d.ts.map +1 -0
- package/dist/pipeline/phases/production-gate.js +84 -0
- package/dist/pipeline/phases/production-gate.js.map +1 -0
- package/dist/pipeline/phases/qa-validation.d.ts +7 -0
- package/dist/pipeline/phases/qa-validation.d.ts.map +1 -0
- package/dist/pipeline/phases/qa-validation.js +50 -0
- package/dist/pipeline/phases/qa-validation.js.map +1 -0
- package/dist/pipeline/phases/recovery-loop.d.ts +7 -0
- package/dist/pipeline/phases/recovery-loop.d.ts.map +1 -0
- package/dist/pipeline/phases/recovery-loop.js +91 -0
- package/dist/pipeline/phases/recovery-loop.js.map +1 -0
- package/dist/pipeline/phases/review.d.ts +8 -0
- package/dist/pipeline/phases/review.d.ts.map +1 -0
- package/dist/pipeline/phases/review.js +127 -0
- package/dist/pipeline/phases/review.js.map +1 -0
- package/dist/pipeline/phases/role-planning.d.ts +7 -0
- package/dist/pipeline/phases/role-planning.d.ts.map +1 -0
- package/dist/pipeline/phases/role-planning.js +75 -0
- package/dist/pipeline/phases/role-planning.js.map +1 -0
- package/dist/pipeline/phases/stuck.d.ts +7 -0
- package/dist/pipeline/phases/stuck.d.ts.map +1 -0
- package/dist/pipeline/phases/stuck.js +51 -0
- package/dist/pipeline/phases/stuck.js.map +1 -0
- package/dist/pipeline/repo-snapshot.d.ts +24 -0
- package/dist/pipeline/repo-snapshot.d.ts.map +1 -0
- package/dist/pipeline/repo-snapshot.js +343 -0
- package/dist/pipeline/repo-snapshot.js.map +1 -0
- package/dist/pipeline/role-execution-adapter.d.ts +59 -0
- package/dist/pipeline/role-execution-adapter.d.ts.map +1 -0
- package/dist/pipeline/role-execution-adapter.js +159 -0
- package/dist/pipeline/role-execution-adapter.js.map +1 -0
- package/dist/pipeline/skill-loader.d.ts +34 -0
- package/dist/pipeline/skill-loader.d.ts.map +1 -0
- package/dist/pipeline/skill-loader.js +156 -0
- package/dist/pipeline/skill-loader.js.map +1 -0
- package/dist/pipeline/skills/defaults.d.ts +16 -0
- package/dist/pipeline/skills/defaults.d.ts.map +1 -0
- package/dist/pipeline/skills/defaults.js +189 -0
- package/dist/pipeline/skills/defaults.js.map +1 -0
- package/dist/pipeline/type-defs/artifacts.d.ts +202 -0
- package/dist/pipeline/type-defs/artifacts.d.ts.map +1 -0
- package/dist/pipeline/type-defs/artifacts.js +66 -0
- package/dist/pipeline/type-defs/artifacts.js.map +1 -0
- package/dist/pipeline/type-defs/audit.d.ts +256 -0
- package/dist/pipeline/type-defs/audit.d.ts.map +1 -0
- package/dist/pipeline/type-defs/audit.js +54 -0
- package/dist/pipeline/type-defs/audit.js.map +1 -0
- package/dist/pipeline/type-defs/checks.d.ts +81 -0
- package/dist/pipeline/type-defs/checks.d.ts.map +1 -0
- package/dist/pipeline/type-defs/checks.js +38 -0
- package/dist/pipeline/type-defs/checks.js.map +1 -0
- package/dist/pipeline/type-defs/enums.d.ts +43 -0
- package/dist/pipeline/type-defs/enums.d.ts.map +1 -0
- package/dist/pipeline/type-defs/enums.js +55 -0
- package/dist/pipeline/type-defs/enums.js.map +1 -0
- package/dist/pipeline/type-defs/index.d.ts +12 -0
- package/dist/pipeline/type-defs/index.d.ts.map +1 -0
- package/dist/pipeline/type-defs/index.js +12 -0
- package/dist/pipeline/type-defs/index.js.map +1 -0
- package/dist/pipeline/type-defs/packets.d.ts +806 -0
- package/dist/pipeline/type-defs/packets.d.ts.map +1 -0
- package/dist/pipeline/type-defs/packets.js +109 -0
- package/dist/pipeline/type-defs/packets.js.map +1 -0
- package/dist/pipeline/type-defs/snapshot.d.ts +52 -0
- package/dist/pipeline/type-defs/snapshot.d.ts.map +1 -0
- package/dist/pipeline/type-defs/snapshot.js +35 -0
- package/dist/pipeline/type-defs/snapshot.js.map +1 -0
- package/dist/pipeline/type-defs/state.d.ts +449 -0
- package/dist/pipeline/type-defs/state.d.ts.map +1 -0
- package/dist/pipeline/type-defs/state.js +88 -0
- package/dist/pipeline/type-defs/state.js.map +1 -0
- package/dist/pipeline/types.d.ts +16 -0
- package/dist/pipeline/types.d.ts.map +1 -0
- package/dist/pipeline/types.js +16 -0
- package/dist/pipeline/types.js.map +1 -0
- package/dist/types/audit.d.ts +6 -6
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +48 -0
- package/dist/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ARBITRATOR.md +137 -0
- package/skills/ARCHITECT.md +167 -0
- package/skills/AUDITOR.md +128 -0
- package/skills/AUDIT_REPORT_SCHEMA.md +20 -0
- package/skills/BACKEND_PROGRAMMER.md +95 -0
- package/skills/CONSENSUS_PACKET_SCHEMA.md +166 -0
- package/skills/DB_EXPERT.md +106 -0
- package/skills/DEBUGGER.md +286 -0
- package/skills/DISPATCHER.md +157 -0
- package/skills/FRONTEND_PROGRAMMER.md +84 -0
- package/skills/JOURNALIST.md +247 -0
- package/skills/MARKETING_EXPERT.md +23 -0
- package/skills/PHASE_GATE_ENGINE_SPEC.md +171 -0
- package/skills/PLAN_PACKET_SCHEMA.md +222 -0
- package/skills/POPEYE_CONSTITUTION.md +177 -0
- package/skills/POPEYE_FULL_AUTONOMY_PIPELINE.md +537 -0
- package/skills/PRODUCTION_READINESS_SCHEMA.md +19 -0
- package/skills/QA_TESTER.md +40 -0
- package/skills/RCA_PACKET_SCHEMA.md +22 -0
- package/skills/RELEASE_MANAGER.md +60 -0
- package/skills/REVIEWER.md +133 -0
- package/skills/SOCIAL_EXPERT.md +22 -0
- package/skills/UI_UX_SPECIALIST.md +22 -0
- package/skills/WEBSITE_PROGRAMMER.md +37 -0
- package/src/cli/commands/debug-context.ts +265 -0
- package/src/cli/commands/debug-prompts.ts +91 -0
- package/src/cli/commands/debug.ts +662 -0
- package/src/cli/commands/index.ts +1 -0
- package/src/cli/index.ts +2 -0
- package/src/cli/interactive.ts +27 -0
- package/src/generators/all.ts +2 -0
- package/src/generators/templates/database-docker.ts +10 -0
- package/src/generators/templates/fullstack.ts +6 -2
- package/src/pipeline/artifact-manager.ts +339 -0
- package/src/pipeline/artifact-validators.ts +224 -0
- package/src/pipeline/change-request.ts +119 -0
- package/src/pipeline/check-runner.ts +504 -0
- package/src/pipeline/command-resolver.ts +168 -0
- package/src/pipeline/consensus/consensus-runner.ts +317 -0
- package/src/pipeline/constitution.ts +109 -0
- package/src/pipeline/gate-engine.ts +347 -0
- package/src/pipeline/index.ts +82 -0
- package/src/pipeline/migration.ts +91 -0
- package/src/pipeline/orchestrator.ts +314 -0
- package/src/pipeline/packets/audit-report-builder.ts +47 -0
- package/src/pipeline/packets/consensus-packet-builder.ts +112 -0
- package/src/pipeline/packets/index.ts +15 -0
- package/src/pipeline/packets/plan-packet-builder.ts +52 -0
- package/src/pipeline/packets/rca-packet-builder.ts +38 -0
- package/src/pipeline/phases/architecture.ts +73 -0
- package/src/pipeline/phases/audit.ts +193 -0
- package/src/pipeline/phases/consensus-architecture.ts +104 -0
- package/src/pipeline/phases/consensus-master-plan.ts +100 -0
- package/src/pipeline/phases/consensus-role-plans.ts +105 -0
- package/src/pipeline/phases/done.ts +68 -0
- package/src/pipeline/phases/implementation.ts +48 -0
- package/src/pipeline/phases/index.ts +21 -0
- package/src/pipeline/phases/intake.ts +54 -0
- package/src/pipeline/phases/phase-context.ts +86 -0
- package/src/pipeline/phases/production-gate.ts +113 -0
- package/src/pipeline/phases/qa-validation.ts +63 -0
- package/src/pipeline/phases/recovery-loop.ts +118 -0
- package/src/pipeline/phases/review.ts +149 -0
- package/src/pipeline/phases/role-planning.ts +92 -0
- package/src/pipeline/phases/stuck.ts +62 -0
- package/src/pipeline/repo-snapshot.ts +395 -0
- package/src/pipeline/role-execution-adapter.ts +238 -0
- package/src/pipeline/skill-loader.ts +192 -0
- package/src/pipeline/skills/defaults.ts +215 -0
- package/src/pipeline/type-defs/artifacts.ts +81 -0
- package/src/pipeline/type-defs/audit.ts +67 -0
- package/src/pipeline/type-defs/checks.ts +47 -0
- package/src/pipeline/type-defs/enums.ts +62 -0
- package/src/pipeline/type-defs/index.ts +12 -0
- package/src/pipeline/type-defs/packets.ts +131 -0
- package/src/pipeline/type-defs/snapshot.ts +55 -0
- package/src/pipeline/type-defs/state.ts +165 -0
- package/src/pipeline/types.ts +16 -0
- package/src/workflow/index.ts +48 -0
- package/tests/cli/commands/debug.test.ts +376 -0
- package/tests/pipeline/artifact-manager.test.ts +183 -0
- package/tests/pipeline/artifact-validators.test.ts +207 -0
- package/tests/pipeline/change-request.test.ts +180 -0
- package/tests/pipeline/check-runner.test.ts +157 -0
- package/tests/pipeline/command-resolver.test.ts +159 -0
- package/tests/pipeline/consensus-runner.test.ts +206 -0
- package/tests/pipeline/consensus-scoring.test.ts +163 -0
- package/tests/pipeline/constitution.test.ts +122 -0
- package/tests/pipeline/gate-engine.test.ts +195 -0
- package/tests/pipeline/migration.test.ts +133 -0
- package/tests/pipeline/orchestrator.test.ts +614 -0
- package/tests/pipeline/packets/builders.test.ts +347 -0
- package/tests/pipeline/repo-snapshot.test.ts +189 -0
- package/tests/pipeline/role-execution-adapter.test.ts +299 -0
- package/tests/pipeline/skill-loader.test.ts +186 -0
- package/tests/pipeline/start-env-checks.test.ts +123 -0
- 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.
|