chati-dev 1.3.3 → 1.4.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/README.md +4 -3
- package/framework/agents/clarity/architect.md +1 -0
- package/framework/agents/clarity/brief.md +1 -0
- package/framework/agents/clarity/brownfield-wu.md +1 -0
- package/framework/agents/clarity/detail.md +1 -0
- package/framework/agents/clarity/greenfield-wu.md +1 -0
- package/framework/agents/clarity/phases.md +1 -0
- package/framework/agents/clarity/tasks.md +1 -0
- package/framework/agents/clarity/ux.md +1 -0
- package/framework/agents/deploy/devops.md +1 -0
- package/framework/agents/quality/qa-implementation.md +1 -0
- package/framework/agents/quality/qa-planning.md +1 -0
- package/framework/constitution.md +28 -1
- package/framework/data/entity-registry.yaml +1 -1
- package/framework/i18n/en.yaml +3 -3
- package/framework/i18n/es.yaml +3 -3
- package/framework/i18n/fr.yaml +3 -3
- package/framework/i18n/pt.yaml +3 -3
- package/framework/intelligence/context-engine.md +2 -2
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/orchestrator/chati.md +66 -1
- package/framework/schemas/session.schema.json +15 -0
- package/package.json +1 -1
- package/src/installer/validator.js +1 -1
- package/src/intelligence/registry-manager.js +2 -2
- package/src/wizard/i18n.js +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="packages/chati-dev/assets/logo.svg" alt="chati.dev" width="380">
|
|
4
4
|
<br><br>
|
|
5
5
|
<strong>AI-Powered Multi-Agent Orchestration System</strong><br>
|
|
6
|
-
<em>13 agents.
|
|
6
|
+
<em>13 agents. 16 articles. 6 IDEs. 4 languages. Structured vibe coding.</em>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
@@ -167,7 +167,7 @@ Every agent follows 8 universal protocols:
|
|
|
167
167
|
|
|
168
168
|
### Constitution
|
|
169
169
|
|
|
170
|
-
The system is governed by a **
|
|
170
|
+
The system is governed by a **16-article Constitution** that enforces agent behavior, quality standards, security, and system integrity. Key articles:
|
|
171
171
|
|
|
172
172
|
| Article | Governance |
|
|
173
173
|
|---------|-----------|
|
|
@@ -177,6 +177,7 @@ The system is governed by a **15-article Constitution** that enforces agent beha
|
|
|
177
177
|
| XI | Mode governance (clarity/build/deploy) with autonomous transitions |
|
|
178
178
|
| XII-XIV | Context bracket governance, memory governance, framework registry |
|
|
179
179
|
| XV | Session lock governance — mandatory lock, explicit exit only |
|
|
180
|
+
| XVI | Model governance — opus/sonnet/haiku per agent, no downgrade rule |
|
|
180
181
|
|
|
181
182
|
---
|
|
182
183
|
|
|
@@ -256,7 +257,7 @@ your-project/
|
|
|
256
257
|
│ ├── data/ # Entity registry
|
|
257
258
|
│ ├── i18n/ # EN, PT, ES, FR translations
|
|
258
259
|
│ ├── migrations/ # Version migration scripts
|
|
259
|
-
│ ├── constitution.md #
|
|
260
|
+
│ ├── constitution.md # 16 Articles + Preamble
|
|
260
261
|
│ └── config.yaml # System configuration
|
|
261
262
|
├── chati.dev/artifacts/ # Generated during pipeline
|
|
262
263
|
│ ├── 0-WU/
|
|
@@ -13,6 +13,7 @@ You are the **Architect Agent**, responsible for defining HOW the system will be
|
|
|
13
13
|
- **Duration**: 45-90 min
|
|
14
14
|
- **Ratio**: 50% Human / 50% AI
|
|
15
15
|
- **Absorbs**: Data Engineer (data modeling, DB audit, schema design, RLS policies)
|
|
16
|
+
- **Model**: opus | no downgrade (architecture decisions require deep reasoning)
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
18
19
|
- context7 (library documentation search)
|
|
@@ -12,6 +12,7 @@ You are the **Brief Agent**, responsible for extracting and structuring the core
|
|
|
12
12
|
- **Question Answered**: WHAT is the problem?
|
|
13
13
|
- **Duration**: 30-60 min
|
|
14
14
|
- **Ratio**: 90% Human / 10% AI
|
|
15
|
+
- **Model**: sonnet | upgrade: opus if enterprise or 10+ integrations
|
|
15
16
|
|
|
16
17
|
## Required MCPs
|
|
17
18
|
- None
|
|
@@ -12,6 +12,7 @@ You are the **Brownfield WU Agent**, responsible for comprehensive discovery of
|
|
|
12
12
|
- **Question Answered**: HOW does it work today? (both code and operations)
|
|
13
13
|
- **Duration**: 1-4h depending on codebase size
|
|
14
14
|
- **Ratio**: 40% Human / 60% AI
|
|
15
|
+
- **Model**: opus | no downgrade (codebase analysis requires deep reasoning)
|
|
15
16
|
|
|
16
17
|
## Required MCPs
|
|
17
18
|
- git (read-only)
|
|
@@ -13,6 +13,7 @@ You are the **Detail Agent**, responsible for transforming the Brief into a form
|
|
|
13
13
|
- **Duration**: 45-90 min
|
|
14
14
|
- **Ratio**: 70% Human / 30% AI
|
|
15
15
|
- **Absorbs**: PM (PRD creation, product strategy), Analyst (market research, competitive analysis)
|
|
16
|
+
- **Model**: opus | no downgrade (PRD traceability requires deep reasoning)
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
18
19
|
- None
|
|
@@ -12,6 +12,7 @@ You are the **Greenfield WU Agent**, responsible for understanding HOW the user
|
|
|
12
12
|
- **Question Answered**: HOW does it work today?
|
|
13
13
|
- **Duration**: 15-30 min
|
|
14
14
|
- **Ratio**: 70% Human / 30% AI
|
|
15
|
+
- **Model**: haiku | upgrade: sonnet if multi-stack or enterprise
|
|
15
16
|
|
|
16
17
|
## Required MCPs
|
|
17
18
|
- None
|
|
@@ -13,6 +13,7 @@ You are the **Phases Agent**, responsible for breaking the PRD into development
|
|
|
13
13
|
- **Duration**: 20-40 min
|
|
14
14
|
- **Ratio**: 60% Human / 40% AI
|
|
15
15
|
- **Absorbs**: SM (sprint planning, prioritization, wave sequencing)
|
|
16
|
+
- **Model**: sonnet | upgrade: opus if 20+ requirements or complex dependencies
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
18
19
|
- None
|
|
@@ -13,6 +13,7 @@ You are the **Tasks Agent**, responsible for breaking phases into atomic, execut
|
|
|
13
13
|
- **Duration**: 30-60 min
|
|
14
14
|
- **Ratio**: 50% Human / 50% AI
|
|
15
15
|
- **Absorbs**: SM (structured task creation, Given-When-Then criteria)
|
|
16
|
+
- **Model**: sonnet | upgrade: opus if 50+ tasks or complex acceptance criteria
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
18
19
|
- None
|
|
@@ -13,6 +13,7 @@ You are the **UX Agent**, responsible for defining HOW the product will look and
|
|
|
13
13
|
- **Duration**: 30-60 min
|
|
14
14
|
- **Ratio**: 60% Human / 40% AI
|
|
15
15
|
- **Absorbs**: Design System init + audit (embedded workflow)
|
|
16
|
+
- **Model**: sonnet | upgrade: opus if design system creation from scratch
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
18
19
|
- None
|
|
@@ -12,6 +12,7 @@ You are the **DevOps Agent**, responsible for shipping the project: Git operatio
|
|
|
12
12
|
- **Question Answered**: SHIP it
|
|
13
13
|
- **Duration**: 15-30 min
|
|
14
14
|
- **Ratio**: 30% Human / 70% AI
|
|
15
|
+
- **Model**: sonnet | upgrade: opus if multi-environment or infrastructure-as-code
|
|
15
16
|
- **Absorbs**: Docs-gen (auto documentation generation)
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
@@ -12,6 +12,7 @@ You are the **QA-Implementation Agent**, the quality gate between BUILD and DEPL
|
|
|
12
12
|
- **Question Answered**: DOES it work correctly?
|
|
13
13
|
- **Duration**: 15-45 min (mostly automated)
|
|
14
14
|
- **Ratio**: 90% AI / 10% Human
|
|
15
|
+
- **Model**: opus | no downgrade (code review and SAST require deep reasoning)
|
|
15
16
|
- **Absorbs**: Tests + SAST + CodeRabbit code review
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
@@ -12,6 +12,7 @@ You are the **QA-Planning Agent**, the quality gate between CLARITY (planning) a
|
|
|
12
12
|
- **Question Answered**: IS everything traceable and rigorous?
|
|
13
13
|
- **Duration**: 15-30 min (automated validation)
|
|
14
14
|
- **Ratio**: 95% AI / 5% Human
|
|
15
|
+
- **Model**: opus | no downgrade (cross-artifact validation requires deep reasoning)
|
|
15
16
|
- **Absorbs**: Manager (cross-artifact validation), PO (quality gate validation, coherence checks)
|
|
16
17
|
|
|
17
18
|
## Required MCPs
|
|
@@ -345,5 +345,32 @@ Once the orchestrator is activated via `/chati`, a session lock engages. All age
|
|
|
345
345
|
|
|
346
346
|
---
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
## Article XVI: Model Governance
|
|
349
|
+
|
|
350
|
+
The orchestrator SHALL select the optimal AI model for each agent to balance quality and cost efficiency.
|
|
351
|
+
|
|
352
|
+
1. Every agent definition MUST include a `Model` field in its Identity section specifying default model and upgrade conditions.
|
|
353
|
+
|
|
354
|
+
2. Three model tiers are recognized:
|
|
355
|
+
- **opus**: Deep reasoning, complex analysis, code generation. Use for agents that make critical decisions or produce complex artifacts.
|
|
356
|
+
- **sonnet**: Structured tasks, guided workflows, template-based output. Use for agents with clear inputs and predictable output formats.
|
|
357
|
+
- **haiku**: Simple detection, classification, status checks. Use for agents with minimal reasoning requirements.
|
|
358
|
+
|
|
359
|
+
3. The orchestrator SHALL read the agent's `Model` field before activation and communicate the recommended model to the user.
|
|
360
|
+
|
|
361
|
+
4. Agents marked `no downgrade` MUST NOT run on a model below their default. Quality degradation in these agents compromises downstream artifacts.
|
|
362
|
+
|
|
363
|
+
5. Upgrade conditions (e.g., "upgrade: opus if enterprise") are evaluated by the orchestrator based on session context: project type, codebase size, number of integrations, and complexity signals from previous agents.
|
|
364
|
+
|
|
365
|
+
6. In IDE environments (Claude Code, Cursor, VS Code), the orchestrator SHALL display a model recommendation message before activating each agent. The user decides whether to switch.
|
|
366
|
+
|
|
367
|
+
7. In programmatic environments (Agent SDK, API), the model selection SHALL be automatic — no user intervention required.
|
|
368
|
+
|
|
369
|
+
8. Model selections are logged in session.yaml under `model_selections[]` for cost tracking and optimization.
|
|
370
|
+
|
|
371
|
+
**Enforcement: GUIDE** — Model recommendations are advisory in IDE mode; automatic in SDK mode.
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
*chati.dev Constitution v1.4.0 — 16 Articles + Preamble*
|
|
349
376
|
*All agents are bound by this Constitution. Violations are enforced per article.*
|
|
@@ -241,7 +241,7 @@ entities:
|
|
|
241
241
|
constitution:
|
|
242
242
|
path: chati.dev/constitution.md
|
|
243
243
|
type: governance
|
|
244
|
-
purpose: "
|
|
244
|
+
purpose: "16 Articles + Preamble governing all agent behavior"
|
|
245
245
|
keywords: [constitution, governance, rules, articles, enforcement]
|
|
246
246
|
dependencies: []
|
|
247
247
|
adaptability: 0.1
|
package/framework/i18n/en.yaml
CHANGED
|
@@ -21,7 +21,7 @@ installer:
|
|
|
21
21
|
agents_count: "13 agent definitions (CLARITY, BUILD, DEPLOY phases)"
|
|
22
22
|
workflows_count: "5 workflow blueprints"
|
|
23
23
|
templates_count: "5 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate)"
|
|
24
|
-
constitution: "Constitution (
|
|
24
|
+
constitution: "Constitution (16 Articles + Preamble)"
|
|
25
25
|
session_mgmt: "Session management system"
|
|
26
26
|
quality_gates: "Quality gates (4-tier validation)"
|
|
27
27
|
proceed: "Proceed with installation?"
|
|
@@ -29,7 +29,7 @@ installer:
|
|
|
29
29
|
created_chati: "Created .chati/ session directory"
|
|
30
30
|
created_framework: "Created chati.dev/ system directory (agents, templates, workflows)"
|
|
31
31
|
created_commands: "Created .claude/commands/ (thin router)"
|
|
32
|
-
installed_constitution: "Installed Constitution (Articles I-
|
|
32
|
+
installed_constitution: "Installed Constitution (Articles I-XVI)"
|
|
33
33
|
created_session: "Created session.yaml schema"
|
|
34
34
|
created_claude_md: "Created CLAUDE.md"
|
|
35
35
|
configured_mcps: "Configured MCPs:"
|
|
@@ -37,7 +37,7 @@ installer:
|
|
|
37
37
|
agents_valid: "All 13 agents implement 8 protocols"
|
|
38
38
|
handoff_ok: "Handoff protocol: OK"
|
|
39
39
|
validation_ok: "Self-validation criteria: OK"
|
|
40
|
-
constitution_ok: "Constitution:
|
|
40
|
+
constitution_ok: "Constitution: 16 articles verified"
|
|
41
41
|
created_memories: "Created .chati/memories/ (Memory Layer)"
|
|
42
42
|
installed_intelligence: "Installed Intelligence Layer (Context Engine, Memory, Registry)"
|
|
43
43
|
intelligence_valid: "Intelligence: 6 spec files verified"
|
package/framework/i18n/es.yaml
CHANGED
|
@@ -21,7 +21,7 @@ installer:
|
|
|
21
21
|
agents_count: "13 definiciones de agentes (fases CLARITY, BUILD, DEPLOY)"
|
|
22
22
|
workflows_count: "5 blueprints de workflow"
|
|
23
23
|
templates_count: "5 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate)"
|
|
24
|
-
constitution: "Constitucion (
|
|
24
|
+
constitution: "Constitucion (16 Articulos + Preambulo)"
|
|
25
25
|
session_mgmt: "Sistema de gestion de sesion"
|
|
26
26
|
quality_gates: "Quality gates (validacion en 4 capas)"
|
|
27
27
|
proceed: "Proceder con la instalacion?"
|
|
@@ -29,7 +29,7 @@ installer:
|
|
|
29
29
|
created_chati: "Creado directorio de sesion .chati/"
|
|
30
30
|
created_framework: "Creado directorio del sistema chati.dev/ (agentes, templates, workflows)"
|
|
31
31
|
created_commands: "Creado .claude/commands/ (enrutador)"
|
|
32
|
-
installed_constitution: "Instalada Constitucion (Articulos I-
|
|
32
|
+
installed_constitution: "Instalada Constitucion (Articulos I-XVI)"
|
|
33
33
|
created_session: "Creado schema session.yaml"
|
|
34
34
|
created_claude_md: "Creado CLAUDE.md"
|
|
35
35
|
configured_mcps: "MCPs configurados:"
|
|
@@ -37,7 +37,7 @@ installer:
|
|
|
37
37
|
agents_valid: "Los 13 agentes implementan 8 protocolos"
|
|
38
38
|
handoff_ok: "Protocolo de handoff: OK"
|
|
39
39
|
validation_ok: "Criterios de auto-validacion: OK"
|
|
40
|
-
constitution_ok: "Constitucion:
|
|
40
|
+
constitution_ok: "Constitucion: 16 articulos verificados"
|
|
41
41
|
created_memories: "Creado .chati/memories/ (Memory Layer)"
|
|
42
42
|
installed_intelligence: "Instalada Intelligence Layer (Context Engine, Memory, Registry)"
|
|
43
43
|
intelligence_valid: "Intelligence: 6 archivos de spec verificados"
|
package/framework/i18n/fr.yaml
CHANGED
|
@@ -21,7 +21,7 @@ installer:
|
|
|
21
21
|
agents_count: "13 definitions d'agents (phases CLARITY, BUILD, DEPLOY)"
|
|
22
22
|
workflows_count: "5 blueprints de workflow"
|
|
23
23
|
templates_count: "5 templates (PRD, PRD Brownfield, Architecture, Task, QA Gate)"
|
|
24
|
-
constitution: "Constitution (
|
|
24
|
+
constitution: "Constitution (16 Articles + Preambule)"
|
|
25
25
|
session_mgmt: "Systeme de gestion de session"
|
|
26
26
|
quality_gates: "Quality gates (validation en 4 couches)"
|
|
27
27
|
proceed: "Proceder a l'installation?"
|
|
@@ -29,7 +29,7 @@ installer:
|
|
|
29
29
|
created_chati: "Cree le repertoire de session .chati/"
|
|
30
30
|
created_framework: "Cree le repertoire du systeme chati.dev/ (agents, templates, workflows)"
|
|
31
31
|
created_commands: "Cree .claude/commands/ (routeur)"
|
|
32
|
-
installed_constitution: "Installee la Constitution (Articles I-
|
|
32
|
+
installed_constitution: "Installee la Constitution (Articles I-XVI)"
|
|
33
33
|
created_session: "Cree le schema session.yaml"
|
|
34
34
|
created_claude_md: "Cree CLAUDE.md"
|
|
35
35
|
configured_mcps: "MCPs configures:"
|
|
@@ -37,7 +37,7 @@ installer:
|
|
|
37
37
|
agents_valid: "Les 13 agents implementent 8 protocoles"
|
|
38
38
|
handoff_ok: "Protocole de passation: OK"
|
|
39
39
|
validation_ok: "Criteres d'auto-validation: OK"
|
|
40
|
-
constitution_ok: "Constitution:
|
|
40
|
+
constitution_ok: "Constitution: 16 articles verifies"
|
|
41
41
|
created_memories: "Cree .chati/memories/ (Memory Layer)"
|
|
42
42
|
installed_intelligence: "Installee Intelligence Layer (Context Engine, Memory, Registry)"
|
|
43
43
|
intelligence_valid: "Intelligence: 6 fichiers de spec verifies"
|
package/framework/i18n/pt.yaml
CHANGED
|
@@ -21,7 +21,7 @@ installer:
|
|
|
21
21
|
agents_count: "13 definicoes de agentes (fases CLARITY, BUILD, DEPLOY)"
|
|
22
22
|
workflows_count: "5 blueprints de workflow"
|
|
23
23
|
templates_count: "5 templates (PRD, PRD Brownfield, Arquitetura, Task, QA Gate)"
|
|
24
|
-
constitution: "Constituicao (
|
|
24
|
+
constitution: "Constituicao (16 Artigos + Preambulo)"
|
|
25
25
|
session_mgmt: "Sistema de gerenciamento de sessao"
|
|
26
26
|
quality_gates: "Quality gates (validacao em 4 camadas)"
|
|
27
27
|
proceed: "Prosseguir com a instalacao?"
|
|
@@ -29,7 +29,7 @@ installer:
|
|
|
29
29
|
created_chati: "Criado diretorio de sessao .chati/"
|
|
30
30
|
created_framework: "Criado diretorio do sistema chati.dev/ (agentes, templates, workflows)"
|
|
31
31
|
created_commands: "Criado .claude/commands/ (roteador)"
|
|
32
|
-
installed_constitution: "Instalada Constituicao (Artigos I-
|
|
32
|
+
installed_constitution: "Instalada Constituicao (Artigos I-XVI)"
|
|
33
33
|
created_session: "Criado schema session.yaml"
|
|
34
34
|
created_claude_md: "Criado CLAUDE.md"
|
|
35
35
|
configured_mcps: "MCPs configurados:"
|
|
@@ -37,7 +37,7 @@ installer:
|
|
|
37
37
|
agents_valid: "Todos os 13 agentes implementam 8 protocolos"
|
|
38
38
|
handoff_ok: "Protocolo de handoff: OK"
|
|
39
39
|
validation_ok: "Criterios de auto-validacao: OK"
|
|
40
|
-
constitution_ok: "Constituicao:
|
|
40
|
+
constitution_ok: "Constituicao: 16 artigos verificados"
|
|
41
41
|
created_memories: "Criado .chati/memories/ (Memory Layer)"
|
|
42
42
|
installed_intelligence: "Instalada Intelligence Layer (Context Engine, Memory, Registry)"
|
|
43
43
|
intelligence_valid: "Intelligence: 6 arquivos de spec verificados"
|
|
@@ -25,7 +25,7 @@ The orchestrator injects context through 5 hierarchical layers:
|
|
|
25
25
|
|
|
26
26
|
| Layer | Name | Source | When Active |
|
|
27
27
|
|-------|------|--------|-------------|
|
|
28
|
-
| **L0** | Constitution | `chati.dev/constitution.md` (Articles I-
|
|
28
|
+
| **L0** | Constitution | `chati.dev/constitution.md` (Articles I-XVI) | ALWAYS (non-negotiable) |
|
|
29
29
|
| **L1** | Mode + Global | `config.yaml` + mode governance (clarity/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 |
|
|
@@ -49,7 +49,7 @@ The orchestrator produces a structured XML block injected into agent prompts:
|
|
|
49
49
|
```xml
|
|
50
50
|
<chati-context bracket="MODERATE">
|
|
51
51
|
<constitution>
|
|
52
|
-
Articles I-
|
|
52
|
+
Articles I-XVI governing agent behavior.
|
|
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.
|
|
@@ -96,7 +96,7 @@ npx chati-dev health
|
|
|
96
96
|
Checks:
|
|
97
97
|
1. All registered entities exist on disk
|
|
98
98
|
2. Schema files are valid JSON
|
|
99
|
-
3. Constitution has >=
|
|
99
|
+
3. Constitution has >= 16 articles
|
|
100
100
|
4. Agents contain required protocol references
|
|
101
101
|
5. Entity count matches actual file count
|
|
102
102
|
6. Checksums match (if calculated)
|
|
@@ -10,6 +10,7 @@ You are the **chati.dev Orchestrator**, the single entry point for the chati.dev
|
|
|
10
10
|
- **Role**: Orchestrator & Router
|
|
11
11
|
- **Position**: Entry point (always first contact)
|
|
12
12
|
- **Scope**: System-wide routing, session management, deviation handling, backlog
|
|
13
|
+
- **Model**: sonnet | upgrade: opus if complex routing or deviation handling
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
@@ -169,7 +170,71 @@ When an agent completes (score >= 95%):
|
|
|
169
170
|
- Dev + QA-Implementation = build
|
|
170
171
|
- Final validation = validate
|
|
171
172
|
- DevOps = deploy
|
|
172
|
-
7. Read next agent's command file ->
|
|
173
|
+
7. Read next agent's command file -> Extract Model field from Identity section
|
|
174
|
+
8. Evaluate upgrade conditions against session context
|
|
175
|
+
9. Display model recommendation (see Model Selection Protocol below)
|
|
176
|
+
10. Activate agent
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Model Selection Protocol
|
|
182
|
+
|
|
183
|
+
Before activating any agent, the orchestrator reads the agent's `Model` field and recommends the optimal model.
|
|
184
|
+
|
|
185
|
+
### Model Map (Quick Reference)
|
|
186
|
+
|
|
187
|
+
| Agent | Default | Upgrade Condition |
|
|
188
|
+
|-------|---------|-------------------|
|
|
189
|
+
| greenfield-wu | haiku | sonnet if multi-stack or enterprise |
|
|
190
|
+
| brownfield-wu | opus | no downgrade |
|
|
191
|
+
| brief | sonnet | opus if enterprise or 10+ integrations |
|
|
192
|
+
| detail | opus | no downgrade |
|
|
193
|
+
| architect | opus | no downgrade |
|
|
194
|
+
| ux | sonnet | opus if design system from scratch |
|
|
195
|
+
| phases | sonnet | opus if 20+ requirements |
|
|
196
|
+
| tasks | sonnet | opus if 50+ tasks |
|
|
197
|
+
| qa-planning | opus | no downgrade |
|
|
198
|
+
| dev | opus | no downgrade |
|
|
199
|
+
| qa-implementation | opus | no downgrade |
|
|
200
|
+
| devops | sonnet | opus if multi-environment or IaC |
|
|
201
|
+
|
|
202
|
+
### Evaluation Logic
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
1. Read agent's Model field from its .md file
|
|
206
|
+
2. Extract default model and upgrade condition
|
|
207
|
+
3. If upgrade condition exists:
|
|
208
|
+
a. Check session context (project.type, codebase_size, integrations_count, requirements_count)
|
|
209
|
+
b. Check previous agent signals (handoff complexity, discovered tech debt)
|
|
210
|
+
c. If condition matches -> recommend upgraded model
|
|
211
|
+
d. If condition does not match -> use default model
|
|
212
|
+
4. If "no downgrade" -> always use the specified model
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Recommendation Message (IDE Mode)
|
|
216
|
+
|
|
217
|
+
When the recommended model differs from the current model, display:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
💡 Model recommendation for {agent_name}: {recommended_model}
|
|
221
|
+
Reason: {justification}
|
|
222
|
+
Current: {current_model}
|
|
223
|
+
|
|
224
|
+
To switch: /model {recommended_model}
|
|
225
|
+
Or continue with current model.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Session Logging
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
# Appended to session.yaml on each agent activation
|
|
232
|
+
model_selections:
|
|
233
|
+
- agent: brief
|
|
234
|
+
recommended: sonnet
|
|
235
|
+
actual: opus # What the user actually used
|
|
236
|
+
reason: "default"
|
|
237
|
+
timestamp: "2026-..."
|
|
173
238
|
```
|
|
174
239
|
|
|
175
240
|
---
|
|
@@ -99,6 +99,21 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
|
+
"model_selections": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"description": "Model selection log for cost tracking (Article XVI)",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": ["agent", "recommended", "timestamp"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"agent": { "type": "string", "description": "Agent name" },
|
|
110
|
+
"recommended": { "enum": ["opus", "sonnet", "haiku"], "description": "Recommended model" },
|
|
111
|
+
"actual": { "enum": ["opus", "sonnet", "haiku"], "description": "Model actually used" },
|
|
112
|
+
"reason": { "type": "string", "description": "Why this model was selected (default, upgrade condition, no downgrade)" },
|
|
113
|
+
"timestamp": { "type": "string", "format": "date-time" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
102
117
|
"mode_transitions": {
|
|
103
118
|
"type": "array",
|
|
104
119
|
"description": "Audit trail of all mode transitions",
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ export async function validateInstallation(targetDir) {
|
|
|
59
59
|
if (existsSync(constitutionPath)) {
|
|
60
60
|
const content = readFileSync(constitutionPath, 'utf-8');
|
|
61
61
|
const articleCount = (content.match(/^## Article/gm) || []).length;
|
|
62
|
-
results.constitution.pass = articleCount >=
|
|
62
|
+
results.constitution.pass = articleCount >= 16;
|
|
63
63
|
results.constitution.details.push({ articleCount });
|
|
64
64
|
}
|
|
65
65
|
results.total += 1;
|
|
@@ -131,8 +131,8 @@ export function runHealthCheck(targetDir) {
|
|
|
131
131
|
if (existsSync(constitutionPath)) {
|
|
132
132
|
const content = readFileSync(constitutionPath, 'utf-8');
|
|
133
133
|
const articleCount = (content.match(/^## Article/gm) || []).length;
|
|
134
|
-
checks.constitution.pass = articleCount >=
|
|
135
|
-
checks.constitution.details = `${articleCount}/
|
|
134
|
+
checks.constitution.pass = articleCount >= 16;
|
|
135
|
+
checks.constitution.details = `${articleCount}/16 articles`;
|
|
136
136
|
} else {
|
|
137
137
|
checks.constitution.details = 'Not found';
|
|
138
138
|
}
|
package/src/wizard/i18n.js
CHANGED
|
@@ -26,7 +26,7 @@ const FALLBACK_EN = {
|
|
|
26
26
|
agents_count: '13 agent definitions (CLARITY, BUILD, DEPLOY phases)',
|
|
27
27
|
workflows_count: '5 workflow blueprints',
|
|
28
28
|
templates_count: '5 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate)',
|
|
29
|
-
constitution: 'Constitution (
|
|
29
|
+
constitution: 'Constitution (16 Articles + Preamble)',
|
|
30
30
|
session_mgmt: 'Session management system',
|
|
31
31
|
quality_gates: 'Quality gates (4-tier validation)',
|
|
32
32
|
proceed: 'Proceed with installation?',
|
|
@@ -34,7 +34,7 @@ const FALLBACK_EN = {
|
|
|
34
34
|
created_chati: 'Created .chati/ session directory',
|
|
35
35
|
created_framework: 'Created chati.dev/ system directory (agents, templates, workflows)',
|
|
36
36
|
created_commands: 'Created .claude/commands/ (thin router)',
|
|
37
|
-
installed_constitution: 'Installed Constitution (Articles I-
|
|
37
|
+
installed_constitution: 'Installed Constitution (Articles I-XVI)',
|
|
38
38
|
created_session: 'Created session.yaml schema',
|
|
39
39
|
created_claude_md: 'Created CLAUDE.md',
|
|
40
40
|
configured_mcps: 'Configured MCPs:',
|
|
@@ -42,7 +42,7 @@ const FALLBACK_EN = {
|
|
|
42
42
|
agents_valid: 'All 13 agents implement 8 protocols',
|
|
43
43
|
handoff_ok: 'Handoff protocol: OK',
|
|
44
44
|
validation_ok: 'Self-validation criteria: OK',
|
|
45
|
-
constitution_ok: 'Constitution:
|
|
45
|
+
constitution_ok: 'Constitution: 16 articles verified',
|
|
46
46
|
created_memories: 'Created .chati/memories/ (Memory Layer)',
|
|
47
47
|
installed_intelligence: 'Installed Intelligence Layer (Context Engine, Memory, Registry)',
|
|
48
48
|
intelligence_valid: 'Intelligence: 6 spec files verified',
|