chati-dev 2.0.5 → 2.0.7
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/README.md +51 -38
- package/framework/agents/{clarity → planning}/architect.md +1 -1
- package/framework/agents/{clarity → planning}/brief.md +1 -1
- package/framework/agents/{clarity → planning}/brownfield-wu.md +1 -1
- package/framework/agents/{clarity → planning}/detail.md +1 -1
- package/framework/agents/{clarity → planning}/greenfield-wu.md +1 -1
- package/framework/agents/{clarity → planning}/phases.md +1 -1
- package/framework/agents/{clarity → planning}/tasks.md +1 -1
- package/framework/agents/{clarity → planning}/ux.md +1 -1
- package/framework/agents/quality/qa-planning.md +5 -5
- package/framework/constitution.md +7 -7
- package/framework/context/governance.md +4 -4
- package/framework/context/quality.md +3 -2
- package/framework/context/root.md +1 -1
- package/framework/data/entity-registry.yaml +9 -9
- package/framework/domains/agents/qa-implementation.yaml +1 -1
- package/framework/domains/constitution.yaml +2 -2
- package/framework/domains/global.yaml +1 -1
- package/framework/hooks/mode-governance.js +5 -5
- package/framework/hooks/prism-engine.js +22 -2
- package/framework/hooks/read-protection.js +107 -0
- package/framework/hooks/session-digest.js +1 -1
- package/framework/hooks/settings.json +9 -0
- package/framework/i18n/en.yaml +1 -3
- package/framework/i18n/es.yaml +1 -3
- package/framework/i18n/fr.yaml +1 -3
- package/framework/i18n/pt.yaml +1 -3
- package/framework/intelligence/context-engine.md +3 -3
- package/framework/orchestrator/chati.md +24 -24
- package/framework/quality-gates/planning-gate.md +1 -1
- package/framework/schemas/context.schema.json +1 -1
- package/framework/schemas/session.schema.json +3 -3
- package/framework/tasks/architect-api-design.md +1 -1
- package/framework/tasks/architect-consolidate.md +1 -1
- package/framework/tasks/architect-db-design.md +1 -1
- package/framework/tasks/architect-design.md +1 -1
- package/framework/tasks/architect-security-review.md +1 -1
- package/framework/tasks/architect-stack-selection.md +1 -1
- package/framework/tasks/brief-consolidate.md +1 -1
- package/framework/tasks/brief-constraint-identify.md +1 -1
- package/framework/tasks/brief-extract-requirements.md +1 -1
- package/framework/tasks/brief-stakeholder-map.md +1 -1
- package/framework/tasks/brief-validate-completeness.md +1 -1
- package/framework/tasks/brownfield-wu-architecture-map.md +1 -1
- package/framework/tasks/brownfield-wu-deep-discovery.md +1 -1
- package/framework/tasks/brownfield-wu-dependency-scan.md +1 -1
- package/framework/tasks/brownfield-wu-migration-plan.md +1 -1
- package/framework/tasks/brownfield-wu-report.md +1 -1
- package/framework/tasks/brownfield-wu-risk-assess.md +1 -1
- package/framework/tasks/detail-acceptance-criteria.md +1 -1
- package/framework/tasks/detail-consolidate.md +1 -1
- package/framework/tasks/detail-edge-case-analysis.md +1 -1
- package/framework/tasks/detail-expand-prd.md +1 -1
- package/framework/tasks/detail-nfr-extraction.md +1 -1
- package/framework/tasks/greenfield-wu-analyze-empty.md +1 -1
- package/framework/tasks/greenfield-wu-report.md +1 -1
- package/framework/tasks/greenfield-wu-scaffold-detection.md +1 -1
- package/framework/tasks/greenfield-wu-tech-stack-assess.md +1 -1
- package/framework/tasks/orchestrator-deviation.md +3 -3
- package/framework/tasks/orchestrator-escalate.md +2 -2
- package/framework/tasks/orchestrator-handoff.md +6 -6
- package/framework/tasks/orchestrator-health.md +1 -1
- package/framework/tasks/orchestrator-mode-switch.md +20 -20
- package/framework/tasks/orchestrator-resume.md +6 -6
- package/framework/tasks/orchestrator-route.md +7 -7
- package/framework/tasks/orchestrator-status.md +8 -8
- package/framework/tasks/orchestrator-suggest-mode.md +13 -13
- package/framework/tasks/phases-breakdown.md +1 -1
- package/framework/tasks/phases-dependency-mapping.md +1 -1
- package/framework/tasks/phases-mvp-scoping.md +1 -1
- package/framework/tasks/qa-impl-regression-check.md +2 -2
- package/framework/tasks/qa-planning-consolidate.md +3 -3
- package/framework/tasks/qa-planning-coverage-plan.md +1 -1
- package/framework/tasks/qa-planning-gate-define.md +7 -7
- package/framework/tasks/qa-planning-risk-matrix.md +1 -1
- package/framework/tasks/qa-planning-test-strategy.md +1 -1
- package/framework/tasks/tasks-acceptance-write.md +1 -1
- package/framework/tasks/tasks-consolidate.md +1 -1
- package/framework/tasks/tasks-decompose.md +1 -1
- package/framework/tasks/tasks-estimate.md +1 -1
- package/framework/tasks/ux-a11y-check.md +1 -1
- package/framework/tasks/ux-component-map.md +1 -1
- package/framework/tasks/ux-consolidate.md +1 -1
- package/framework/tasks/ux-user-flow.md +1 -1
- package/framework/tasks/ux-wireframe.md +1 -1
- package/framework/workflows/brownfield-discovery.yaml +7 -7
- package/framework/workflows/brownfield-fullstack.yaml +9 -9
- package/framework/workflows/brownfield-service.yaml +5 -5
- package/framework/workflows/brownfield-ui.yaml +5 -5
- package/framework/workflows/greenfield-fullstack.yaml +9 -9
- package/package.json +3 -3
- package/scripts/bundle-framework.js +1 -1
- package/scripts/generate-signing-key.js +33 -0
- package/scripts/health-check.js +8 -8
- package/scripts/populate-entity-registry.js +1 -1
- package/scripts/semantic-lint.js +328 -0
- package/scripts/sign-manifest.js +53 -0
- package/scripts/validate-agents.js +1 -1
- package/scripts/validate-package.js +257 -0
- package/scripts/validate-tasks.js +1 -1
- package/src/autonomy/autonomous-gate.js +2 -2
- package/src/autonomy/progress-reporter.js +9 -9
- package/src/config/mcp-configs.js +16 -85
- package/src/context/engine.js +2 -2
- package/src/context/layers/l1-global.js +3 -3
- package/src/dashboard/layout.js +7 -7
- package/src/dashboard/renderer.js +2 -2
- package/src/gates/g1-planning-complete.js +9 -9
- package/src/gates/g4-qa-implementation.js +9 -9
- package/src/installer/core.js +27 -12
- package/src/installer/manifest.js +33 -1
- package/src/installer/signing-public-key.pem +3 -0
- package/src/installer/templates.js +1 -1
- package/src/installer/validator.js +41 -8
- package/src/intelligence/registry-manager.js +4 -4
- package/src/memory/agent-memory.js +20 -0
- package/src/memory/session-digest.js +1 -1
- package/src/orchestrator/agent-selector.js +10 -10
- package/src/orchestrator/intent-classifier.js +4 -4
- package/src/orchestrator/pipeline-manager.js +4 -4
- package/src/orchestrator/pipeline-state.js +1 -1
- package/src/orchestrator/session-manager.js +3 -3
- package/src/tasks/executor.js +1 -1
- package/src/tasks/loader.js +1 -1
- package/src/terminal/prompt-builder.js +10 -10
- package/src/wizard/i18n.js +1 -3
- package/src/wizard/index.js +10 -15
- package/src/wizard/questions.js +7 -70
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Read Protection Hook — PreToolUse (Read)
|
|
4
|
+
*
|
|
5
|
+
* BLOCKS reading sensitive files that may contain secrets:
|
|
6
|
+
* - .env files (except .env.example, .env.template)
|
|
7
|
+
* - Private keys (*.pem, *.key) — except signing-public-key.pem
|
|
8
|
+
* - Credentials and secrets files
|
|
9
|
+
* - .git/config (may contain tokens)
|
|
10
|
+
*
|
|
11
|
+
* Enforces Article IV: Secret protection.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { relative, basename } from 'path';
|
|
15
|
+
|
|
16
|
+
const SENSITIVE_PATTERNS = [
|
|
17
|
+
/^\.env$/,
|
|
18
|
+
/^\.env\.[^.]+$/,
|
|
19
|
+
/\.pem$/,
|
|
20
|
+
/^credentials\./,
|
|
21
|
+
/^secrets\./,
|
|
22
|
+
/\.key$/,
|
|
23
|
+
/^\.git\/config$/,
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const ALLOWED_EXCEPTIONS = [
|
|
27
|
+
/signing-public-key\.pem$/,
|
|
28
|
+
/\.env\.example$/,
|
|
29
|
+
/\.env\.template$/,
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Check if a file path is sensitive (should not be read).
|
|
34
|
+
* @param {string} filePath - Absolute or relative file path
|
|
35
|
+
* @param {string} cwd - Current working directory
|
|
36
|
+
* @returns {{ sensitive: boolean, reason: string }}
|
|
37
|
+
*/
|
|
38
|
+
function isSensitivePath(filePath, cwd) {
|
|
39
|
+
if (!filePath || typeof filePath !== 'string') {
|
|
40
|
+
return { sensitive: false, reason: '' };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Normalize to relative path
|
|
44
|
+
let rel;
|
|
45
|
+
try {
|
|
46
|
+
rel = relative(cwd, filePath);
|
|
47
|
+
} catch {
|
|
48
|
+
rel = filePath;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const name = basename(rel);
|
|
52
|
+
|
|
53
|
+
// Check allowed exceptions first
|
|
54
|
+
for (const pattern of ALLOWED_EXCEPTIONS) {
|
|
55
|
+
if (pattern.test(name) || pattern.test(rel)) {
|
|
56
|
+
return { sensitive: false, reason: '' };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Check sensitive patterns against both filename and relative path
|
|
61
|
+
for (const pattern of SENSITIVE_PATTERNS) {
|
|
62
|
+
if (pattern.test(name) || pattern.test(rel)) {
|
|
63
|
+
return {
|
|
64
|
+
sensitive: true,
|
|
65
|
+
reason: `File matches sensitive pattern: ${pattern.source}`,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return { sensitive: false, reason: '' };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function main() {
|
|
74
|
+
let input = '';
|
|
75
|
+
for await (const chunk of process.stdin) {
|
|
76
|
+
input += chunk;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
const event = JSON.parse(input);
|
|
81
|
+
const toolInput = event.tool_input || {};
|
|
82
|
+
const filePath = toolInput.file_path || '';
|
|
83
|
+
const cwd = event.cwd || process.cwd();
|
|
84
|
+
|
|
85
|
+
const result = isSensitivePath(filePath, cwd);
|
|
86
|
+
|
|
87
|
+
if (result.sensitive) {
|
|
88
|
+
process.stdout.write(JSON.stringify({
|
|
89
|
+
decision: 'block',
|
|
90
|
+
reason: `[Article IV] ${result.reason}. Use environment variables or secure vaults instead of reading sensitive files directly.`,
|
|
91
|
+
}));
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
process.stdout.write(JSON.stringify({ decision: 'allow' }));
|
|
96
|
+
} catch {
|
|
97
|
+
process.stdout.write(JSON.stringify({ decision: 'allow' }));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { isSensitivePath, SENSITIVE_PATTERNS, ALLOWED_EXCEPTIONS };
|
|
102
|
+
|
|
103
|
+
// Only run main when executed directly (not imported by tests)
|
|
104
|
+
import { fileURLToPath } from 'url';
|
|
105
|
+
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
106
|
+
main();
|
|
107
|
+
}
|
|
@@ -21,7 +21,7 @@ function extractDigest(projectDir) {
|
|
|
21
21
|
|
|
22
22
|
return {
|
|
23
23
|
timestamp: new Date().toISOString(),
|
|
24
|
-
mode: extract('mode') || '
|
|
24
|
+
mode: extract('mode') || 'planning',
|
|
25
25
|
currentAgent: extract('current_agent') || 'none',
|
|
26
26
|
pipelinePosition: extract('pipeline_position') || 'unknown',
|
|
27
27
|
workflow: extract('workflow') || 'unknown',
|
package/framework/i18n/en.yaml
CHANGED
|
@@ -10,15 +10,13 @@ installer:
|
|
|
10
10
|
brownfield: "Brownfield (existing project integration)"
|
|
11
11
|
detected_brownfield: "Detected package.json and src/ in current directory"
|
|
12
12
|
suggestion_brownfield: "Suggestion: Brownfield"
|
|
13
|
-
select_ides: "Select IDE(s) for Chati.dev configuration:"
|
|
14
|
-
select_mcps: "Select MCPs to install (project-level):"
|
|
15
13
|
confirmation_title: "Installation Summary"
|
|
16
14
|
project_label: "Project"
|
|
17
15
|
language_label: "Language"
|
|
18
16
|
ides_label: "IDEs"
|
|
19
17
|
mcps_label: "MCPs"
|
|
20
18
|
will_install: "Will install:"
|
|
21
|
-
agents_count: "13 agent definitions (
|
|
19
|
+
agents_count: "13 agent definitions (PLANNING, BUILD, DEPLOY phases)"
|
|
22
20
|
workflows_count: "5 workflow blueprints"
|
|
23
21
|
templates_count: "5 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate)"
|
|
24
22
|
constitution: "Constitution (17 Articles + Preamble)"
|
package/framework/i18n/es.yaml
CHANGED
|
@@ -10,15 +10,13 @@ installer:
|
|
|
10
10
|
brownfield: "Brownfield (integracion con proyecto existente)"
|
|
11
11
|
detected_brownfield: "Detectado package.json y src/ en el directorio actual"
|
|
12
12
|
suggestion_brownfield: "Sugerencia: Brownfield"
|
|
13
|
-
select_ides: "Seleccione IDE(s) para configuracion de Chati.dev:"
|
|
14
|
-
select_mcps: "Seleccione MCPs para instalar (nivel de proyecto):"
|
|
15
13
|
confirmation_title: "Resumen de Instalacion"
|
|
16
14
|
project_label: "Proyecto"
|
|
17
15
|
language_label: "Idioma"
|
|
18
16
|
ides_label: "IDEs"
|
|
19
17
|
mcps_label: "MCPs"
|
|
20
18
|
will_install: "Se instalara:"
|
|
21
|
-
agents_count: "13 definiciones de agentes (fases
|
|
19
|
+
agents_count: "13 definiciones de agentes (fases PLANNING, BUILD, DEPLOY)"
|
|
22
20
|
workflows_count: "5 blueprints de workflow"
|
|
23
21
|
templates_count: "5 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate)"
|
|
24
22
|
constitution: "Constitucion (17 Articulos + Preambulo)"
|
package/framework/i18n/fr.yaml
CHANGED
|
@@ -10,15 +10,13 @@ installer:
|
|
|
10
10
|
brownfield: "Brownfield (integration avec un projet existant)"
|
|
11
11
|
detected_brownfield: "Detecte package.json et src/ dans le repertoire actuel"
|
|
12
12
|
suggestion_brownfield: "Suggestion: Brownfield"
|
|
13
|
-
select_ides: "Selectionnez IDE(s) pour la configuration de Chati.dev:"
|
|
14
|
-
select_mcps: "Selectionnez les MCPs a installer (niveau projet):"
|
|
15
13
|
confirmation_title: "Resume de l'Installation"
|
|
16
14
|
project_label: "Projet"
|
|
17
15
|
language_label: "Langue"
|
|
18
16
|
ides_label: "IDEs"
|
|
19
17
|
mcps_label: "MCPs"
|
|
20
18
|
will_install: "Sera installe:"
|
|
21
|
-
agents_count: "13 definitions d'agents (phases
|
|
19
|
+
agents_count: "13 definitions d'agents (phases PLANNING, BUILD, DEPLOY)"
|
|
22
20
|
workflows_count: "5 blueprints de workflow"
|
|
23
21
|
templates_count: "5 templates (PRD, PRD Brownfield, Architecture, Task, QA Gate)"
|
|
24
22
|
constitution: "Constitution (17 Articles + Preambule)"
|
package/framework/i18n/pt.yaml
CHANGED
|
@@ -10,15 +10,13 @@ installer:
|
|
|
10
10
|
brownfield: "Brownfield (integracao com projeto existente)"
|
|
11
11
|
detected_brownfield: "Detectado package.json e src/ no diretorio atual"
|
|
12
12
|
suggestion_brownfield: "Sugestao: Brownfield"
|
|
13
|
-
select_ides: "Selecione IDE(s) para configuracao do Chati.dev:"
|
|
14
|
-
select_mcps: "Selecione MCPs para instalar (nivel de projeto):"
|
|
15
13
|
confirmation_title: "Resumo da Instalacao"
|
|
16
14
|
project_label: "Projeto"
|
|
17
15
|
language_label: "Idioma"
|
|
18
16
|
ides_label: "IDEs"
|
|
19
17
|
mcps_label: "MCPs"
|
|
20
18
|
will_install: "Sera instalado:"
|
|
21
|
-
agents_count: "13 definicoes de agentes (fases
|
|
19
|
+
agents_count: "13 definicoes de agentes (fases PLANNING, BUILD, DEPLOY)"
|
|
22
20
|
workflows_count: "5 blueprints de workflow"
|
|
23
21
|
templates_count: "5 templates (PRD, PRD Brownfield, Arquitetura, Task, QA Gate)"
|
|
24
22
|
constitution: "Constituicao (17 Artigos + Preambulo)"
|
|
@@ -26,7 +26,7 @@ The orchestrator injects context through 5 hierarchical layers:
|
|
|
26
26
|
| Layer | Name | Source | When Active |
|
|
27
27
|
|-------|------|--------|-------------|
|
|
28
28
|
| **L0** | Constitution | `chati.dev/constitution.md` (Articles I-XVI) | ALWAYS (non-negotiable) |
|
|
29
|
-
| **L1** | Mode + Global | `config.yaml` + mode governance (
|
|
29
|
+
| **L1** | Mode + Global | `config.yaml` + mode governance (planning/build/deploy) | ALWAYS |
|
|
30
30
|
| **L2** | Agent Scope | `chati.dev/agents/{agent}/` — mission, inputs, outputs, criteria | When agent is active |
|
|
31
31
|
| **L3** | Pipeline State | `.chati/session.yaml` — pipeline position, scores, backlog | When session is active |
|
|
32
32
|
| **L4** | Task Context | Active artifact + previous agent's handoff | When task is active |
|
|
@@ -53,11 +53,11 @@ The orchestrator produces a structured XML block injected into agent prompts:
|
|
|
53
53
|
Key: Self-validation required. Loop until quality threshold.
|
|
54
54
|
Guided options (1,2,3). Persistent session state.
|
|
55
55
|
Two-layer handoff. Language protocol. Deviation protocol.
|
|
56
|
-
Mode governance (
|
|
56
|
+
Mode governance (planning/build/deploy).
|
|
57
57
|
Context brackets. Memory governance. Registry governance.
|
|
58
58
|
</constitution>
|
|
59
59
|
|
|
60
|
-
<mode>
|
|
60
|
+
<mode>planning</mode>
|
|
61
61
|
|
|
62
62
|
<agent name="brief" mission="Extract user requirements in 5 structured phases">
|
|
63
63
|
<inputs>WU artifact, user access</inputs>
|
|
@@ -96,7 +96,7 @@ If not already set in session.yaml:
|
|
|
96
96
|
project:
|
|
97
97
|
name: "{detected or asked}"
|
|
98
98
|
type: greenfield | brownfield
|
|
99
|
-
state:
|
|
99
|
+
state: planning
|
|
100
100
|
execution_mode: interactive
|
|
101
101
|
current_agent: greenfield-wu | brownfield-wu
|
|
102
102
|
language: "{detected}"
|
|
@@ -106,8 +106,8 @@ user_level_confidence: 0.0
|
|
|
106
106
|
|
|
107
107
|
#### 3d. Route to First Agent
|
|
108
108
|
```
|
|
109
|
-
If greenfield -> Read chati.dev/agents/
|
|
110
|
-
If brownfield -> Read chati.dev/agents/
|
|
109
|
+
If greenfield -> Read chati.dev/agents/planning/greenfield-wu.md -> Activate
|
|
110
|
+
If brownfield -> Read chati.dev/agents/planning/brownfield-wu.md -> Activate
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
### Step 5: Session Resume
|
|
@@ -144,14 +144,14 @@ brownfield-wu -> Brief -> Architect -> Detail -> UX -> Phases -> Tasks -> QA-Pla
|
|
|
144
144
|
### Agent Location Map
|
|
145
145
|
| Agent | File |
|
|
146
146
|
|-------|------|
|
|
147
|
-
| greenfield-wu | chati.dev/agents/
|
|
148
|
-
| brownfield-wu | chati.dev/agents/
|
|
149
|
-
| brief | chati.dev/agents/
|
|
150
|
-
| detail | chati.dev/agents/
|
|
151
|
-
| architect | chati.dev/agents/
|
|
152
|
-
| ux | chati.dev/agents/
|
|
153
|
-
| phases | chati.dev/agents/
|
|
154
|
-
| tasks | chati.dev/agents/
|
|
147
|
+
| greenfield-wu | chati.dev/agents/planning/greenfield-wu.md |
|
|
148
|
+
| brownfield-wu | chati.dev/agents/planning/brownfield-wu.md |
|
|
149
|
+
| brief | chati.dev/agents/planning/brief.md |
|
|
150
|
+
| detail | chati.dev/agents/planning/detail.md |
|
|
151
|
+
| architect | chati.dev/agents/planning/architect.md |
|
|
152
|
+
| ux | chati.dev/agents/planning/ux.md |
|
|
153
|
+
| phases | chati.dev/agents/planning/phases.md |
|
|
154
|
+
| tasks | chati.dev/agents/planning/tasks.md |
|
|
155
155
|
| qa-planning | chati.dev/agents/quality/qa-planning.md |
|
|
156
156
|
| dev | chati.dev/agents/build/dev.md |
|
|
157
157
|
| qa-implementation | chati.dev/agents/quality/qa-implementation.md |
|
|
@@ -167,7 +167,7 @@ When an agent completes (score >= 95%):
|
|
|
167
167
|
4. Orchestrator identifies next agent from pipeline
|
|
168
168
|
5. Update session.yaml: current_agent = next_agent
|
|
169
169
|
6. Update project.state if crossing macro-phase boundary:
|
|
170
|
-
- WU through QA-Planning =
|
|
170
|
+
- WU through QA-Planning = planning
|
|
171
171
|
- Dev + QA-Implementation = build
|
|
172
172
|
- Final validation = validate
|
|
173
173
|
- DevOps = deploy
|
|
@@ -230,7 +230,7 @@ For autonomous agents:
|
|
|
230
230
|
╔══════════════════════════════════════════════════════════════╗
|
|
231
231
|
║ PARALLELIZATION CHECK (MANDATORY — DO NOT SKIP) ║
|
|
232
232
|
║ ║
|
|
233
|
-
║ GROUP 1 —
|
|
233
|
+
║ GROUP 1 — Planning Phase (after Brief completes): ║
|
|
234
234
|
║ Agents: [detail, architect, ux] ║
|
|
235
235
|
║ ALL run in parallel via separate terminals ║
|
|
236
236
|
║ ║
|
|
@@ -344,7 +344,7 @@ model_selections:
|
|
|
344
344
|
Before any agent writes a file, the orchestrator validates the operation against the current mode:
|
|
345
345
|
|
|
346
346
|
```
|
|
347
|
-
If project.state == "
|
|
347
|
+
If project.state == "planning":
|
|
348
348
|
ALLOW write to: chati.dev/**, .chati/**
|
|
349
349
|
BLOCK write to: everything else
|
|
350
350
|
ALLOW read: everything (essential for brownfield-wu codebase analysis)
|
|
@@ -364,13 +364,13 @@ If project.state == "deploy":
|
|
|
364
364
|
Mode transitions are AUTOMATIC based on quality gate results. The orchestrator executes the transition when the trigger condition is met.
|
|
365
365
|
|
|
366
366
|
```
|
|
367
|
-
|
|
367
|
+
planning -> build:
|
|
368
368
|
TRIGGER: qa-planning agent completes with score >= 95%
|
|
369
369
|
ACTION:
|
|
370
370
|
1. Update project.state = "build"
|
|
371
371
|
2. Log transition in session.yaml mode_transitions:
|
|
372
372
|
- timestamp: "{now}"
|
|
373
|
-
from:
|
|
373
|
+
from: planning
|
|
374
374
|
to: build
|
|
375
375
|
trigger: "qa-planning completed with score {score}%"
|
|
376
376
|
type: automatic
|
|
@@ -403,12 +403,12 @@ deploy -> completed:
|
|
|
403
403
|
### Backward Transitions
|
|
404
404
|
|
|
405
405
|
```
|
|
406
|
-
build/validate ->
|
|
406
|
+
build/validate -> planning:
|
|
407
407
|
TRIGGER: qa-implementation classifies issue as:
|
|
408
408
|
- issue_type: "spec" (requirement gap, ambiguity, conflict)
|
|
409
409
|
- issue_type: "architecture" (design flaw, missing component)
|
|
410
410
|
ACTION:
|
|
411
|
-
1. Update project.state = "
|
|
411
|
+
1. Update project.state = "planning"
|
|
412
412
|
2. Log backward transition in mode_transitions:
|
|
413
413
|
- type: backward
|
|
414
414
|
reason: "{QA finding description}"
|
|
@@ -432,8 +432,8 @@ When user requests to skip phases (e.g., "I need to code this NOW"):
|
|
|
432
432
|
```
|
|
433
433
|
1. Orchestrator detects intent to change mode
|
|
434
434
|
2. Inform user of current state and what will be skipped:
|
|
435
|
-
"You're in
|
|
436
|
-
- {list of pending
|
|
435
|
+
"You're in PLANNING mode. Skipping to BUILD will bypass:
|
|
436
|
+
- {list of pending PLANNING agents}
|
|
437
437
|
Artifacts from these agents will not be generated."
|
|
438
438
|
3. Request explicit confirmation
|
|
439
439
|
4. If confirmed:
|
|
@@ -445,7 +445,7 @@ When user requests to skip phases (e.g., "I need to code this NOW"):
|
|
|
445
445
|
- Mark skipped agents as "skipped" in session.yaml (not "completed")
|
|
446
446
|
- Continue with target agent
|
|
447
447
|
5. After override session completes, suggest:
|
|
448
|
-
"You skipped
|
|
448
|
+
"You skipped PLANNING phases. Want to go back and complete planning?"
|
|
449
449
|
```
|
|
450
450
|
|
|
451
451
|
---
|
|
@@ -550,7 +550,7 @@ Display project status dashboard:
|
|
|
550
550
|
Phase: {state} Mode: {execution_mode}
|
|
551
551
|
Language: {language} IDE: {ides}
|
|
552
552
|
|
|
553
|
-
|
|
553
|
+
PLANNING:
|
|
554
554
|
WU: {score} Brief: {score} Detail: {score} Arch: {score}
|
|
555
555
|
UX: {score} Phases: {score} Tasks: {score} QA-P: {score}
|
|
556
556
|
|
|
@@ -756,7 +756,7 @@ If agent fails repeatedly:
|
|
|
756
756
|
### Exclusive (only the orchestrator can do this)
|
|
757
757
|
- Route user messages to agents
|
|
758
758
|
- Activate/deactivate agents
|
|
759
|
-
- Execute mode transitions (
|
|
759
|
+
- Execute mode transitions (planning -> build -> validate -> deploy)
|
|
760
760
|
- Manage session lock (activate/deactivate)
|
|
761
761
|
- Handle deviations and re-routing
|
|
762
762
|
- Manage backlog items
|
|
@@ -938,7 +938,7 @@ Level 4 - Graceful Degradation:
|
|
|
938
938
|
1. **Single Entry Point**: The orchestrator is the ONLY way users interact with Chati.dev. No agent is directly accessible.
|
|
939
939
|
2. **Transparent Routing**: Users should understand which agent is active and why, but never need to manage agents directly.
|
|
940
940
|
3. **State Preservation**: Every state change is logged in session.yaml. No action is lossy.
|
|
941
|
-
4. **Fail-Safe Defaults**: When uncertain, default to the most restrictive mode (
|
|
941
|
+
4. **Fail-Safe Defaults**: When uncertain, default to the most restrictive mode (planning) and the safest agent.
|
|
942
942
|
5. **Progressive Disclosure**: Show complexity only when the user needs it. Start simple, reveal depth on demand.
|
|
943
943
|
6. **Pipeline Respect**: Never skip pipeline steps without explicit user consent and documented risk.
|
|
944
944
|
7. **Language Fidelity**: Interaction always in user's language. Artifacts always in English. No exceptions.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Planning Quality Gate
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
|
-
Validates traceability and consistency across all
|
|
4
|
+
Validates traceability and consistency across all PLANNING artifacts before allowing transition to BUILD phase.
|
|
5
5
|
|
|
6
6
|
## When
|
|
7
7
|
After Tasks agent completes, before Dev agent starts.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Summarized constitution content (always injected, L0 layer)"
|
|
15
15
|
},
|
|
16
16
|
"mode": {
|
|
17
|
-
"enum": ["
|
|
17
|
+
"enum": ["planning", "build", "deploy"],
|
|
18
18
|
"description": "Current execution mode from session state (L1 layer)"
|
|
19
19
|
},
|
|
20
20
|
"agent": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"properties": {
|
|
12
12
|
"name": { "type": "string", "description": "Project name" },
|
|
13
13
|
"type": { "enum": ["greenfield", "brownfield"], "description": "Project type" },
|
|
14
|
-
"state": { "enum": ["
|
|
14
|
+
"state": { "enum": ["planning", "build", "validate", "deploy", "completed"], "description": "Current pipeline macro-phase" }
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"execution_mode": {
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"required": ["timestamp", "from", "to", "trigger"],
|
|
123
123
|
"properties": {
|
|
124
124
|
"timestamp": { "type": "string", "format": "date-time" },
|
|
125
|
-
"from": { "enum": ["
|
|
126
|
-
"to": { "enum": ["
|
|
125
|
+
"from": { "enum": ["planning", "build", "validate", "deploy", "completed"] },
|
|
126
|
+
"to": { "enum": ["planning", "build", "validate", "deploy", "completed"] },
|
|
127
127
|
"trigger": { "type": "string", "description": "What caused the transition (agent completion, override, backward)" },
|
|
128
128
|
"type": { "enum": ["automatic", "backward", "override"], "description": "Transition classification" },
|
|
129
129
|
"skipped_agents": {
|