popeye-cli 1.10.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -0
- package/CONTRIBUTING.md +38 -3
- package/README.md +104 -18
- package/dist/adapters/gemini.js +3 -3
- package/dist/adapters/openai.js +2 -2
- package/dist/adapters/openai.js.map +1 -1
- package/dist/auth/gemini.js +1 -1
- package/dist/cli/commands/create.d.ts.map +1 -1
- package/dist/cli/commands/create.js +11 -5
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/resume.d.ts.map +1 -1
- package/dist/cli/commands/resume.js +9 -1
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/interactive.d.ts.map +1 -1
- package/dist/cli/interactive.js +29 -3
- package/dist/cli/interactive.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +7 -2
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/index.d.ts +1 -7
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/popeye-md.d.ts +32 -0
- package/dist/config/popeye-md.d.ts.map +1 -0
- package/dist/config/popeye-md.js +111 -0
- package/dist/config/popeye-md.js.map +1 -0
- package/dist/config/schema.d.ts +3 -21
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +21 -8
- package/dist/config/schema.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/bridges/review-bridge.d.ts +70 -0
- package/dist/pipeline/bridges/review-bridge.d.ts.map +1 -0
- package/dist/pipeline/bridges/review-bridge.js +266 -0
- package/dist/pipeline/bridges/review-bridge.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 +30 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +242 -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 +45 -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 +49 -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 +93 -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 +207 -0
- package/dist/pipeline/type-defs/artifacts.d.ts.map +1 -0
- package/dist/pipeline/type-defs/artifacts.js +67 -0
- package/dist/pipeline/type-defs/artifacts.js.map +1 -0
- package/dist/pipeline/type-defs/audit.d.ts +259 -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 +82 -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 +821 -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 +455 -0
- package/dist/pipeline/type-defs/state.d.ts.map +1 -0
- package/dist/pipeline/type-defs/state.js +90 -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/types/consensus.d.ts +5 -1
- package/dist/types/consensus.d.ts.map +1 -1
- package/dist/types/consensus.js +15 -4
- package/dist/types/consensus.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/project.d.ts +1 -1
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/project.js +39 -10
- package/dist/types/project.js.map +1 -1
- package/dist/types/workflow.d.ts +1 -7
- package/dist/types/workflow.d.ts.map +1 -1
- package/dist/types/workflow.js +1 -1
- package/dist/types/workflow.js.map +1 -1
- package/dist/upgrade/handlers.js +5 -5
- package/dist/upgrade/handlers.js.map +1 -1
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +52 -0
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/website-strategy.js +1 -1
- package/dist/workflow/website-strategy.js.map +1 -1
- package/package.json +1 -1
- package/skills/PHASE_GATE_ENGINE_SPEC.md +113 -20
- package/skills/POPEYE_FULL_AUTONOMY_PIPELINE.md +66 -13
- package/src/adapters/gemini.ts +3 -3
- package/src/adapters/openai.ts +2 -2
- package/src/auth/gemini.ts +1 -1
- package/src/cli/commands/create.ts +12 -6
- package/src/cli/commands/resume.ts +9 -1
- package/src/cli/interactive.ts +32 -3
- package/src/config/defaults.ts +7 -2
- package/src/config/popeye-md.ts +139 -0
- package/src/config/schema.ts +21 -8
- package/src/pipeline/artifact-manager.ts +339 -0
- package/src/pipeline/artifact-validators.ts +224 -0
- package/src/pipeline/bridges/review-bridge.ts +371 -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 +322 -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 +52 -0
- package/src/pipeline/phases/index.ts +21 -0
- package/src/pipeline/phases/intake.ts +68 -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 +120 -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 +82 -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 +167 -0
- package/src/pipeline/types.ts +16 -0
- package/src/types/consensus.ts +16 -4
- package/src/types/index.ts +1 -0
- package/src/types/project.ts +39 -10
- package/src/types/workflow.ts +1 -1
- package/src/upgrade/handlers.ts +5 -5
- package/src/workflow/index.ts +52 -0
- package/src/workflow/website-strategy.ts +1 -1
- package/tests/cli/model-command.test.ts +19 -9
- package/tests/config/config.test.ts +3 -3
- package/tests/config/popeye-md.test.ts +168 -0
- package/tests/pipeline/artifact-manager.test.ts +183 -0
- package/tests/pipeline/artifact-validators.test.ts +207 -0
- package/tests/pipeline/bridges/review-bridge.test.ts +243 -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/session-guidance.test.ts +205 -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
- package/tests/types/consensus.test.ts +1 -1
- package/tests/workflow/pipeline-bootstrap.test.ts +162 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gate Engine — pure deterministic state machine for the pipeline.
|
|
3
|
+
* No side effects. Reads artifacts and check results, never executes anything.
|
|
4
|
+
* All 14 phases with specific required artifacts and checks per phase.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type {
|
|
8
|
+
PipelinePhase,
|
|
9
|
+
PipelineState,
|
|
10
|
+
ArtifactType,
|
|
11
|
+
ArtifactEntry,
|
|
12
|
+
GateCheckType,
|
|
13
|
+
} from './types.js';
|
|
14
|
+
|
|
15
|
+
// ─── Gate Definition ─────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
export interface GateDefinition {
|
|
18
|
+
phase: PipelinePhase;
|
|
19
|
+
requiredArtifacts: ArtifactType[];
|
|
20
|
+
requiredChecks: GateCheckType[];
|
|
21
|
+
consensusThreshold?: number;
|
|
22
|
+
minReviewers?: number;
|
|
23
|
+
allowedTransitions: PipelinePhase[];
|
|
24
|
+
failTransition: PipelinePhase;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface GateResult {
|
|
28
|
+
phase: PipelinePhase;
|
|
29
|
+
pass: boolean;
|
|
30
|
+
score?: number;
|
|
31
|
+
blockers: string[];
|
|
32
|
+
missingArtifacts: ArtifactType[];
|
|
33
|
+
failedChecks: GateCheckType[];
|
|
34
|
+
consensusScore?: number;
|
|
35
|
+
timestamp: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ─── Gate Definitions Map ────────────────────────────────
|
|
39
|
+
|
|
40
|
+
const GATE_DEFINITIONS: Record<PipelinePhase, GateDefinition> = {
|
|
41
|
+
INTAKE: {
|
|
42
|
+
phase: 'INTAKE',
|
|
43
|
+
requiredArtifacts: ['master_plan', 'repo_snapshot', 'constitution'],
|
|
44
|
+
requiredChecks: [],
|
|
45
|
+
allowedTransitions: ['CONSENSUS_MASTER_PLAN'],
|
|
46
|
+
failTransition: 'RECOVERY_LOOP',
|
|
47
|
+
},
|
|
48
|
+
CONSENSUS_MASTER_PLAN: {
|
|
49
|
+
phase: 'CONSENSUS_MASTER_PLAN',
|
|
50
|
+
requiredArtifacts: ['master_plan', 'consensus'],
|
|
51
|
+
requiredChecks: [],
|
|
52
|
+
consensusThreshold: 0.95,
|
|
53
|
+
minReviewers: 2,
|
|
54
|
+
allowedTransitions: ['ARCHITECTURE'],
|
|
55
|
+
failTransition: 'RECOVERY_LOOP',
|
|
56
|
+
},
|
|
57
|
+
ARCHITECTURE: {
|
|
58
|
+
phase: 'ARCHITECTURE',
|
|
59
|
+
requiredArtifacts: ['architecture', 'repo_snapshot'],
|
|
60
|
+
requiredChecks: [],
|
|
61
|
+
allowedTransitions: ['CONSENSUS_ARCHITECTURE'],
|
|
62
|
+
failTransition: 'RECOVERY_LOOP',
|
|
63
|
+
},
|
|
64
|
+
CONSENSUS_ARCHITECTURE: {
|
|
65
|
+
phase: 'CONSENSUS_ARCHITECTURE',
|
|
66
|
+
requiredArtifacts: ['architecture', 'consensus'],
|
|
67
|
+
requiredChecks: [],
|
|
68
|
+
consensusThreshold: 0.95,
|
|
69
|
+
minReviewers: 2,
|
|
70
|
+
allowedTransitions: ['ROLE_PLANNING'],
|
|
71
|
+
failTransition: 'RECOVERY_LOOP',
|
|
72
|
+
},
|
|
73
|
+
ROLE_PLANNING: {
|
|
74
|
+
phase: 'ROLE_PLANNING',
|
|
75
|
+
requiredArtifacts: ['role_plan'],
|
|
76
|
+
requiredChecks: [],
|
|
77
|
+
allowedTransitions: ['CONSENSUS_ROLE_PLANS'],
|
|
78
|
+
failTransition: 'RECOVERY_LOOP',
|
|
79
|
+
},
|
|
80
|
+
CONSENSUS_ROLE_PLANS: {
|
|
81
|
+
phase: 'CONSENSUS_ROLE_PLANS',
|
|
82
|
+
requiredArtifacts: ['role_plan', 'consensus'],
|
|
83
|
+
requiredChecks: [],
|
|
84
|
+
consensusThreshold: 0.95,
|
|
85
|
+
minReviewers: 2,
|
|
86
|
+
allowedTransitions: ['IMPLEMENTATION'],
|
|
87
|
+
failTransition: 'RECOVERY_LOOP',
|
|
88
|
+
},
|
|
89
|
+
IMPLEMENTATION: {
|
|
90
|
+
phase: 'IMPLEMENTATION',
|
|
91
|
+
requiredArtifacts: ['repo_snapshot'],
|
|
92
|
+
requiredChecks: [],
|
|
93
|
+
allowedTransitions: ['QA_VALIDATION'],
|
|
94
|
+
failTransition: 'RECOVERY_LOOP',
|
|
95
|
+
},
|
|
96
|
+
QA_VALIDATION: {
|
|
97
|
+
phase: 'QA_VALIDATION',
|
|
98
|
+
requiredArtifacts: ['qa_validation'],
|
|
99
|
+
requiredChecks: ['test'],
|
|
100
|
+
allowedTransitions: ['REVIEW'],
|
|
101
|
+
failTransition: 'RECOVERY_LOOP',
|
|
102
|
+
},
|
|
103
|
+
REVIEW: {
|
|
104
|
+
phase: 'REVIEW',
|
|
105
|
+
requiredArtifacts: ['review_decision', 'repo_snapshot'],
|
|
106
|
+
requiredChecks: [],
|
|
107
|
+
allowedTransitions: ['AUDIT'],
|
|
108
|
+
failTransition: 'RECOVERY_LOOP',
|
|
109
|
+
},
|
|
110
|
+
AUDIT: {
|
|
111
|
+
phase: 'AUDIT',
|
|
112
|
+
requiredArtifacts: ['audit_report'],
|
|
113
|
+
requiredChecks: [],
|
|
114
|
+
allowedTransitions: ['PRODUCTION_GATE'],
|
|
115
|
+
failTransition: 'RECOVERY_LOOP',
|
|
116
|
+
},
|
|
117
|
+
PRODUCTION_GATE: {
|
|
118
|
+
phase: 'PRODUCTION_GATE',
|
|
119
|
+
requiredArtifacts: ['production_readiness'],
|
|
120
|
+
requiredChecks: ['build', 'test', 'lint', 'typecheck'],
|
|
121
|
+
allowedTransitions: ['DONE'],
|
|
122
|
+
failTransition: 'RECOVERY_LOOP',
|
|
123
|
+
},
|
|
124
|
+
RECOVERY_LOOP: {
|
|
125
|
+
phase: 'RECOVERY_LOOP',
|
|
126
|
+
requiredArtifacts: ['rca_report'],
|
|
127
|
+
requiredChecks: [],
|
|
128
|
+
allowedTransitions: [
|
|
129
|
+
'INTAKE', 'CONSENSUS_MASTER_PLAN', 'ARCHITECTURE',
|
|
130
|
+
'CONSENSUS_ARCHITECTURE', 'ROLE_PLANNING', 'CONSENSUS_ROLE_PLANS',
|
|
131
|
+
'IMPLEMENTATION', 'QA_VALIDATION', 'REVIEW', 'AUDIT',
|
|
132
|
+
'PRODUCTION_GATE', 'STUCK',
|
|
133
|
+
],
|
|
134
|
+
failTransition: 'STUCK',
|
|
135
|
+
},
|
|
136
|
+
DONE: {
|
|
137
|
+
phase: 'DONE',
|
|
138
|
+
requiredArtifacts: ['release_notes', 'deployment', 'rollback'],
|
|
139
|
+
requiredChecks: [],
|
|
140
|
+
allowedTransitions: [],
|
|
141
|
+
failTransition: 'DONE', // terminal
|
|
142
|
+
},
|
|
143
|
+
STUCK: {
|
|
144
|
+
phase: 'STUCK',
|
|
145
|
+
requiredArtifacts: ['stuck_report'],
|
|
146
|
+
requiredChecks: [],
|
|
147
|
+
allowedTransitions: [],
|
|
148
|
+
failTransition: 'STUCK', // terminal
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** Ordered phase sequence for linear progression */
|
|
153
|
+
const PHASE_SEQUENCE: PipelinePhase[] = [
|
|
154
|
+
'INTAKE',
|
|
155
|
+
'CONSENSUS_MASTER_PLAN',
|
|
156
|
+
'ARCHITECTURE',
|
|
157
|
+
'CONSENSUS_ARCHITECTURE',
|
|
158
|
+
'ROLE_PLANNING',
|
|
159
|
+
'CONSENSUS_ROLE_PLANS',
|
|
160
|
+
'IMPLEMENTATION',
|
|
161
|
+
'QA_VALIDATION',
|
|
162
|
+
'REVIEW',
|
|
163
|
+
'AUDIT',
|
|
164
|
+
'PRODUCTION_GATE',
|
|
165
|
+
'DONE',
|
|
166
|
+
];
|
|
167
|
+
|
|
168
|
+
// ─── Gate Engine ─────────────────────────────────────────
|
|
169
|
+
|
|
170
|
+
export class GateEngine {
|
|
171
|
+
/** Get gate definition for a specific phase */
|
|
172
|
+
getGateDefinition(phase: PipelinePhase): GateDefinition {
|
|
173
|
+
return GATE_DEFINITIONS[phase];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Evaluate whether a phase's gate passes.
|
|
178
|
+
*
|
|
179
|
+
* Args:
|
|
180
|
+
* phase: The phase to evaluate.
|
|
181
|
+
* pipeline: Current pipeline state.
|
|
182
|
+
* options: Optional checks like constitution verification.
|
|
183
|
+
*/
|
|
184
|
+
evaluateGate(
|
|
185
|
+
phase: PipelinePhase,
|
|
186
|
+
pipeline: PipelineState,
|
|
187
|
+
options?: { constitutionValid?: boolean; constitutionReason?: string },
|
|
188
|
+
): GateResult {
|
|
189
|
+
const gateDef = GATE_DEFINITIONS[phase];
|
|
190
|
+
const blockers: string[] = [];
|
|
191
|
+
const missingArtifacts: ArtifactType[] = [];
|
|
192
|
+
const failedChecks: GateCheckType[] = [];
|
|
193
|
+
|
|
194
|
+
// Constitution verification (v1.1) — applied to all gates after INTAKE
|
|
195
|
+
if (options?.constitutionValid === false) {
|
|
196
|
+
blockers.push(options.constitutionReason ?? 'Constitution verification failed');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Check required artifacts exist
|
|
200
|
+
for (const requiredType of gateDef.requiredArtifacts) {
|
|
201
|
+
const hasArtifact = pipeline.artifacts.some(
|
|
202
|
+
(a) => a.type === requiredType && a.phase === phase,
|
|
203
|
+
);
|
|
204
|
+
if (!hasArtifact) {
|
|
205
|
+
missingArtifacts.push(requiredType);
|
|
206
|
+
blockers.push(`Missing artifact: ${requiredType}`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Check required check results
|
|
211
|
+
const phaseChecks = pipeline.gateChecks[phase] ?? [];
|
|
212
|
+
for (const requiredCheck of gateDef.requiredChecks) {
|
|
213
|
+
const checkResult = phaseChecks.find((c) => c.check_type === requiredCheck);
|
|
214
|
+
if (!checkResult) {
|
|
215
|
+
failedChecks.push(requiredCheck);
|
|
216
|
+
blockers.push(`Missing check result: ${requiredCheck}`);
|
|
217
|
+
} else if (checkResult.status === 'fail') {
|
|
218
|
+
failedChecks.push(requiredCheck);
|
|
219
|
+
blockers.push(`Check failed: ${requiredCheck} (exit code ${checkResult.exit_code})`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Check consensus threshold for consensus phases
|
|
224
|
+
let consensusScore: number | undefined;
|
|
225
|
+
if (gateDef.consensusThreshold !== undefined) {
|
|
226
|
+
const consensusArtifact = findLatestConsensusForPhase(pipeline, phase);
|
|
227
|
+
if (consensusArtifact) {
|
|
228
|
+
consensusScore = parseConsensusScore(pipeline, phase);
|
|
229
|
+
if (consensusScore !== undefined && consensusScore < gateDef.consensusThreshold) {
|
|
230
|
+
blockers.push(
|
|
231
|
+
`Consensus score ${consensusScore.toFixed(2)} below threshold ${gateDef.consensusThreshold}`,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
blockers.push('No consensus packet found');
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Check audit status for post-audit phases
|
|
240
|
+
if (phase === 'PRODUCTION_GATE') {
|
|
241
|
+
const auditArtifact = pipeline.artifacts.find(
|
|
242
|
+
(a) => a.type === 'audit_report',
|
|
243
|
+
);
|
|
244
|
+
if (!auditArtifact) {
|
|
245
|
+
blockers.push('Audit report required before production gate');
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const pass = blockers.length === 0;
|
|
250
|
+
|
|
251
|
+
return {
|
|
252
|
+
phase,
|
|
253
|
+
pass,
|
|
254
|
+
blockers,
|
|
255
|
+
missingArtifacts,
|
|
256
|
+
failedChecks,
|
|
257
|
+
consensusScore,
|
|
258
|
+
timestamp: new Date().toISOString(),
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** Get the next phase after a successful gate */
|
|
263
|
+
getNextPhase(
|
|
264
|
+
current: PipelinePhase,
|
|
265
|
+
_gateResult: GateResult,
|
|
266
|
+
): PipelinePhase {
|
|
267
|
+
const currentIndex = PHASE_SEQUENCE.indexOf(current);
|
|
268
|
+
if (currentIndex === -1 || currentIndex >= PHASE_SEQUENCE.length - 1) {
|
|
269
|
+
return 'DONE';
|
|
270
|
+
}
|
|
271
|
+
return PHASE_SEQUENCE[currentIndex + 1];
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/** Check if a transition between two phases is allowed */
|
|
275
|
+
canTransition(
|
|
276
|
+
from: PipelinePhase,
|
|
277
|
+
to: PipelinePhase,
|
|
278
|
+
pipeline: PipelineState,
|
|
279
|
+
): { allowed: boolean; blockers: string[] } {
|
|
280
|
+
const gateDef = GATE_DEFINITIONS[from];
|
|
281
|
+
const blockers: string[] = [];
|
|
282
|
+
|
|
283
|
+
if (!gateDef.allowedTransitions.includes(to)) {
|
|
284
|
+
blockers.push(`Transition from ${from} to ${to} is not allowed`);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Verify gate passes before transition
|
|
288
|
+
const gateResult = this.evaluateGate(from, pipeline);
|
|
289
|
+
if (!gateResult.pass) {
|
|
290
|
+
blockers.push(...gateResult.blockers);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
allowed: blockers.length === 0,
|
|
295
|
+
blockers,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** Get the ordered phase sequence */
|
|
300
|
+
getPhaseSequence(): PipelinePhase[] {
|
|
301
|
+
return [...PHASE_SEQUENCE];
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** Get phase index in the sequence (for progress tracking) */
|
|
305
|
+
getPhaseIndex(phase: PipelinePhase): number {
|
|
306
|
+
return PHASE_SEQUENCE.indexOf(phase);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** Factory function */
|
|
311
|
+
export function createGateEngine(): GateEngine {
|
|
312
|
+
return new GateEngine();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// ─── Helpers ─────────────────────────────────────────────
|
|
316
|
+
|
|
317
|
+
function findLatestConsensusForPhase(
|
|
318
|
+
pipeline: PipelineState,
|
|
319
|
+
phase: PipelinePhase,
|
|
320
|
+
): ArtifactEntry | undefined {
|
|
321
|
+
return pipeline.artifacts
|
|
322
|
+
.filter((a) => a.type === 'consensus' && a.phase === phase)
|
|
323
|
+
.sort((a, b) => b.timestamp.localeCompare(a.timestamp))[0];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Extract consensus score from pipeline gate results.
|
|
328
|
+
* The score is stored by consensus phase handlers after running consensus.
|
|
329
|
+
* Falls back to reading from the consensus artifact's stored data.
|
|
330
|
+
*/
|
|
331
|
+
function parseConsensusScore(
|
|
332
|
+
pipeline: PipelineState,
|
|
333
|
+
phase: PipelinePhase,
|
|
334
|
+
): number | undefined {
|
|
335
|
+
// Look up stored score from gateResults (set by consensus phase handlers)
|
|
336
|
+
const gateResult = pipeline.gateResults[phase];
|
|
337
|
+
if (gateResult?.score !== undefined) {
|
|
338
|
+
return gateResult.score;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Fallback: check consensusScore field
|
|
342
|
+
if (gateResult?.consensusScore !== undefined) {
|
|
343
|
+
return gateResult.consensusScore;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
return undefined;
|
|
347
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pipeline module — re-exports all public APIs.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Core types
|
|
6
|
+
export type {
|
|
7
|
+
PipelinePhase,
|
|
8
|
+
PipelineRole,
|
|
9
|
+
PipelineState,
|
|
10
|
+
PipelineResult,
|
|
11
|
+
ArtifactType,
|
|
12
|
+
ArtifactRef,
|
|
13
|
+
ArtifactEntry,
|
|
14
|
+
PlanPacket,
|
|
15
|
+
ConsensusPacket,
|
|
16
|
+
ReviewerVote,
|
|
17
|
+
RCAPacket,
|
|
18
|
+
AuditFinding,
|
|
19
|
+
AuditReport,
|
|
20
|
+
RepoSnapshot,
|
|
21
|
+
GateCheckResult,
|
|
22
|
+
ResolvedCommands,
|
|
23
|
+
ChangeRequest,
|
|
24
|
+
} from './types.js';
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
PipelinePhaseSchema,
|
|
28
|
+
PipelineRoleSchema,
|
|
29
|
+
createDefaultPipelineState,
|
|
30
|
+
} from './types.js';
|
|
31
|
+
|
|
32
|
+
// Orchestrator
|
|
33
|
+
export { runPipeline, resumePipeline } from './orchestrator.js';
|
|
34
|
+
export type { PipelineOptions } from './orchestrator.js';
|
|
35
|
+
|
|
36
|
+
// Gate Engine
|
|
37
|
+
export { createGateEngine, GateEngine } from './gate-engine.js';
|
|
38
|
+
export type { GateDefinition, GateResult } from './gate-engine.js';
|
|
39
|
+
|
|
40
|
+
// Artifact Manager
|
|
41
|
+
export { createArtifactManager, ArtifactManager } from './artifact-manager.js';
|
|
42
|
+
|
|
43
|
+
// Repo Snapshot
|
|
44
|
+
export { generateRepoSnapshot, diffSnapshots } from './repo-snapshot.js';
|
|
45
|
+
|
|
46
|
+
// Command Resolver
|
|
47
|
+
export { resolveCommands, detectProjectType } from './command-resolver.js';
|
|
48
|
+
|
|
49
|
+
// Check Runner
|
|
50
|
+
export { runCheck, runAllChecks, runPlaceholderScan, runStartCheck, runEnvCheck } from './check-runner.js';
|
|
51
|
+
|
|
52
|
+
// Packet Builders
|
|
53
|
+
export { buildPlanPacket, buildConsensusPacket, buildRCAPacket, buildAuditReport } from './packets/index.js';
|
|
54
|
+
|
|
55
|
+
// Skill Loader
|
|
56
|
+
export { createSkillLoader, SkillLoader } from './skill-loader.js';
|
|
57
|
+
|
|
58
|
+
// Consensus Runner
|
|
59
|
+
export { createConsensusRunner, ConsensusRunner } from './consensus/consensus-runner.js';
|
|
60
|
+
|
|
61
|
+
// Migration
|
|
62
|
+
export { migrateToPipelineState, needsPipelineMigration, toLegacyPhase } from './migration.js';
|
|
63
|
+
|
|
64
|
+
// Constitution (v1.1)
|
|
65
|
+
export { computeConstitutionHash, createConstitutionArtifact, verifyConstitution } from './constitution.js';
|
|
66
|
+
|
|
67
|
+
// Artifact Validators (v1.1)
|
|
68
|
+
export { validateArtifactCompleteness, getValidatableArtifactTypes } from './artifact-validators.js';
|
|
69
|
+
export type { ValidationResult } from './artifact-validators.js';
|
|
70
|
+
|
|
71
|
+
// Change Request (v1.1)
|
|
72
|
+
export { buildChangeRequest, routeChangeRequest, formatChangeRequest } from './change-request.js';
|
|
73
|
+
|
|
74
|
+
// Role Execution Adapter (v1.1)
|
|
75
|
+
export { buildRoleExecutionContext, executeWithRoleContext, buildAllRoleContexts } from './role-execution-adapter.js';
|
|
76
|
+
export type { RoleExecutionContext } from './role-execution-adapter.js';
|
|
77
|
+
|
|
78
|
+
// Consensus Packet Builder (v1.1 weighted scoring)
|
|
79
|
+
export { computeConsensusScore } from './packets/consensus-packet-builder.js';
|
|
80
|
+
|
|
81
|
+
// Phase types
|
|
82
|
+
export type { PhaseContext, PhaseResult } from './phases/index.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State Migration — bridges old 3-phase workflow to new pipeline state.
|
|
3
|
+
* Auto-triggered on load when pipelinePhase is missing from state.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { PipelinePhase, PipelineState, PipelineRole } from './types.js';
|
|
7
|
+
import { createDefaultPipelineState } from './types.js';
|
|
8
|
+
import type { ProjectState, WorkflowPhase } from '../types/workflow.js';
|
|
9
|
+
|
|
10
|
+
// ─── Phase Mapping ───────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
const LEGACY_PHASE_MAP: Record<string, PipelinePhase> = {
|
|
13
|
+
plan: 'INTAKE',
|
|
14
|
+
execution: 'IMPLEMENTATION',
|
|
15
|
+
complete: 'DONE',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** Convert legacy WorkflowPhase to PipelinePhase */
|
|
19
|
+
export function toPipelinePhase(legacyPhase: WorkflowPhase): PipelinePhase {
|
|
20
|
+
return LEGACY_PHASE_MAP[legacyPhase] ?? 'INTAKE';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Convert PipelinePhase back to legacy WorkflowPhase */
|
|
24
|
+
export function toLegacyPhase(pipelinePhase: PipelinePhase): WorkflowPhase {
|
|
25
|
+
switch (pipelinePhase) {
|
|
26
|
+
case 'INTAKE':
|
|
27
|
+
case 'CONSENSUS_MASTER_PLAN':
|
|
28
|
+
case 'ARCHITECTURE':
|
|
29
|
+
case 'CONSENSUS_ARCHITECTURE':
|
|
30
|
+
case 'ROLE_PLANNING':
|
|
31
|
+
case 'CONSENSUS_ROLE_PLANS':
|
|
32
|
+
return 'plan';
|
|
33
|
+
case 'IMPLEMENTATION':
|
|
34
|
+
case 'QA_VALIDATION':
|
|
35
|
+
case 'REVIEW':
|
|
36
|
+
case 'AUDIT':
|
|
37
|
+
case 'PRODUCTION_GATE':
|
|
38
|
+
case 'RECOVERY_LOOP':
|
|
39
|
+
return 'execution';
|
|
40
|
+
case 'DONE':
|
|
41
|
+
case 'STUCK':
|
|
42
|
+
return 'complete';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ─── Migration ───────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
/** Migrate a legacy ProjectState to include PipelineState */
|
|
49
|
+
export function migrateToPipelineState(state: ProjectState): PipelineState {
|
|
50
|
+
const pipeline = createDefaultPipelineState();
|
|
51
|
+
|
|
52
|
+
// Map legacy phase
|
|
53
|
+
pipeline.pipelinePhase = toPipelinePhase(state.phase);
|
|
54
|
+
|
|
55
|
+
// Derive active roles from language
|
|
56
|
+
pipeline.activeRoles = deriveActiveRoles(state.language);
|
|
57
|
+
|
|
58
|
+
return pipeline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Check if a state object needs pipeline migration */
|
|
62
|
+
export function needsPipelineMigration(state: unknown): boolean {
|
|
63
|
+
return !(state as Record<string, unknown>).pipeline;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ─── Role Derivation ─────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
function deriveActiveRoles(language: string): PipelineRole[] {
|
|
69
|
+
const baseRoles: PipelineRole[] = [
|
|
70
|
+
'DISPATCHER', 'ARCHITECT', 'REVIEWER', 'ARBITRATOR',
|
|
71
|
+
'DEBUGGER', 'AUDITOR', 'JOURNALIST', 'RELEASE_MANAGER',
|
|
72
|
+
'QA_TESTER',
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
switch (language) {
|
|
76
|
+
case 'fullstack':
|
|
77
|
+
case 'all':
|
|
78
|
+
return [
|
|
79
|
+
...baseRoles,
|
|
80
|
+
'DB_EXPERT', 'BACKEND_PROGRAMMER', 'FRONTEND_PROGRAMMER',
|
|
81
|
+
'WEBSITE_PROGRAMMER', 'UI_UX_SPECIALIST',
|
|
82
|
+
];
|
|
83
|
+
case 'python':
|
|
84
|
+
case 'typescript':
|
|
85
|
+
return [...baseRoles, 'BACKEND_PROGRAMMER'];
|
|
86
|
+
case 'website':
|
|
87
|
+
return [...baseRoles, 'WEBSITE_PROGRAMMER', 'MARKETING_EXPERT', 'SOCIAL_EXPERT'];
|
|
88
|
+
default:
|
|
89
|
+
return [...baseRoles, 'BACKEND_PROGRAMMER'];
|
|
90
|
+
}
|
|
91
|
+
}
|