chati-dev 4.5.13 → 4.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/framework/agents/build/dev.md +4 -5
  2. package/framework/agents/deploy/devops.md +9 -10
  3. package/framework/agents/discover/brief.md +7 -13
  4. package/framework/agents/discover/brownfield-wu.md +5 -11
  5. package/framework/agents/discover/greenfield-wu.md +7 -12
  6. package/framework/agents/plan/architect.md +1 -1
  7. package/framework/agents/plan/detail.md +5 -5
  8. package/framework/agents/plan/phases.md +4 -5
  9. package/framework/agents/plan/tasks.md +4 -5
  10. package/framework/agents/plan/ux-brand-architect.md +1 -1
  11. package/framework/agents/plan/ux.md +1 -1
  12. package/framework/agents/quality/qa-implementation.md +4 -5
  13. package/framework/agents/quality/qa-planning.md +4 -5
  14. package/framework/agents/quality/qa-visual.md +4 -4
  15. package/framework/agents/shared/visualizer.md +1 -1
  16. package/framework/config.yaml +5 -5
  17. package/framework/constitution.md +24 -26
  18. package/framework/context/governance.md +6 -6
  19. package/framework/context/root.md +4 -3
  20. package/framework/data/entity-registry.yaml +3 -3
  21. package/framework/data/model-limits.json +5 -2
  22. package/framework/hooks/model-governance.js +3 -2
  23. package/framework/hooks/prism-engine.js +1 -1
  24. package/framework/i18n/en.yaml +6 -2
  25. package/framework/i18n/es.yaml +6 -2
  26. package/framework/i18n/fr.yaml +6 -2
  27. package/framework/i18n/pt.yaml +6 -2
  28. package/framework/intelligence/context-engine.md +12 -16
  29. package/framework/manifest.json +63 -63
  30. package/framework/manifest.sig +1 -1
  31. package/framework/orchestrator/chati-router.js +40 -6
  32. package/framework/orchestrator/chati.md +12 -13
  33. package/framework/schemas/session.schema.json +1 -1
  34. package/package.json +1 -1
  35. package/src/config/context-file-generator.js +54 -246
  36. package/src/config/framework-adapter.js +45 -208
  37. package/src/context/bracket-tracker.js +3 -3
  38. package/src/context/engine.js +1 -1
  39. package/src/installer/core.js +190 -66
  40. package/src/installer/provider-overlay.js +1 -1
  41. package/src/installer/templates.js +55 -65
  42. package/src/installer-v2/index.js +2 -0
  43. package/src/memory/magic-docs.js +45 -26
  44. package/src/orchestrator/cli.js +50 -45
  45. package/src/orchestrator/handoff-engine.js +7 -5
  46. package/src/orchestrator/session-manager.js +24 -3
  47. package/src/terminal/cli-registry.js +5 -5
  48. package/src/terminal/prompt-builder.js +14 -10
  49. package/src/terminal/run-agent.js +10 -6
  50. package/src/terminal/run-parallel.js +6 -2
  51. package/src/terminal/run-team.js +7 -2
  52. package/src/terminal/spawner.js +34 -42
  53. package/src/utils/config-parser.js +2 -2
  54. package/src/utils/provider-limits.js +3 -1
  55. package/src/wizard/feedback.js +11 -0
  56. package/src/wizard/i18n.js +6 -2
  57. package/src/wizard/index.js +17 -7
@@ -14,7 +14,7 @@ You are the **Dev Agent**, responsible for implementing code based on the approv
14
14
  - **Ratio**: 20% Human / 80% AI (interactive) or 5% Human / 95% AI (autonomous)
15
15
  - **Absorbs**: Dev personas, self-validation patterns, Design System token enforcement, Ralph Wiggum autonomous mode, blocker taxonomy
16
16
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
17
- - **Provider**: claude (default) | gemini (when large codebase tasks)
17
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
18
18
 
19
19
  ## Required MCPs
20
20
  - context7 (library documentation)
@@ -1025,11 +1025,10 @@ Beyond per-task self-validation (Protocol 5.1), the Dev agent enforces:
1025
1025
 
1026
1026
  ---
1027
1027
 
1028
- ## Model Assignment
1028
+ ## Routing Contract
1029
1029
 
1030
- - **Default**: opus
1031
- - **Downgrade**: No downgrade permitted
1032
- - **Justification**: Code generation requires the highest quality reasoning to produce correct, secure, and maintainable implementations. The self-critique protocol (Steps 5.5 and 6.5) demands deep reasoning for bug prediction, edge case identification, and security review. Downgrading risks subtle bugs and security vulnerabilities.
1030
+ Implementation complexity, risk, and acceptance criteria are inputs to the
1031
+ signed router. This agent cannot replace, upgrade, or downgrade its binding.
1033
1032
 
1034
1033
  ---
1035
1034
 
@@ -13,7 +13,7 @@ You are the **DevOps Agent**, responsible for shipping the project: Git operatio
13
13
  - **Duration**: 15-30 min
14
14
  - **Ratio**: 30% Human / 70% AI
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
  - **Absorbs**: Docs-gen (auto documentation generation)
18
18
 
19
19
  ## Required MCPs
@@ -147,7 +147,7 @@ Validation:
147
147
  Reference state for handoff document (orchestrator will apply to session.yaml):
148
148
  - project.state: completed
149
149
  - devops status: completed
150
- 2. Update CLAUDE.md with final project state
150
+ 2. Update `.chati/project-context.md` with final project state
151
151
  3. Generate final handoff/summary
152
152
  4. Present deployment URL and documentation to user
153
153
  ```
@@ -271,7 +271,7 @@ agents:
271
271
  completed_at: "{timestamp}"
272
272
  ```
273
273
 
274
- ### CLAUDE.md Final Update
274
+ ### Canonical Project Context Final Update
275
275
  Update with: deployed URL, final state, project summary.
276
276
 
277
277
  ---
@@ -325,7 +325,7 @@ Rules:
325
325
 
326
326
  ## Authority Boundaries
327
327
 
328
- - **Exclusive Ownership**: Git push operations, pull request creation, deployment execution, rollback execution, documentation generation (README, CHANGELOG, API docs), session finalization, CLAUDE.md final update
328
+ - **Exclusive Ownership**: Git push operations, pull request creation, deployment execution, rollback execution, documentation generation (README, CHANGELOG, API docs), session finalization, canonical project-context final update
329
329
  - **Read Access**: QA-Implementation report (approval status, test results, security scan), Architecture artifact (deployment strategy, infrastructure), session state, all source code files, build artifacts
330
330
  - **No Authority Over**: Requirement definition (Detail agent), architecture decisions (Architect agent), UX decisions (UX agent), task breakdown (Tasks/Phases agents), code implementation (Dev agent), quality validation (QA agents)
331
331
  - **Escalation**: If deployment fails after retry, present rollback options to user. If security pre-deploy checks fail, halt deployment and escalate immediately.
@@ -340,7 +340,7 @@ Rules:
340
340
  | `git-ops` | Git Operations | Organize commits, ensure conventional format, create PR, push to remote | After verify-prereqs |
341
341
  | `deploy` | Deploy | Build project, deploy to target platform, verify deployment (URL, SSL, response) | After git-ops |
342
342
  | `docs-gen` | Generate Documentation | Generate/update README.md, CHANGELOG.md, API.md | After deploy |
343
- | `finalize` | Finalize | Generate final handoff (CLI advances session.yaml to completed), update CLAUDE.md, generate final summary | After docs-gen |
343
+ | `finalize` | Finalize | Generate final handoff (CLI advances session.yaml to completed), update `.chati/project-context.md`, generate final summary | After docs-gen |
344
344
 
345
345
  ---
346
346
 
@@ -385,11 +385,10 @@ Beyond self-validation (Protocol 5.1), the DevOps agent enforces:
385
385
 
386
386
  ---
387
387
 
388
- ## Model Assignment
388
+ ## Routing Contract
389
389
 
390
- - **Default**: sonnet
391
- - **Upgrade Condition**: Upgrade to opus if multi-environment deployment (staging + production), infrastructure-as-code provisioning, or complex CI/CD pipeline configuration
392
- - **Justification**: Standard single-environment deployment, git operations, and documentation generation are well-served by sonnet. However, multi-environment deployments with infrastructure-as-code or complex pipeline configurations require opus-level reasoning to avoid configuration errors and ensure environment parity.
390
+ Environment count, infrastructure-as-code, and CI/CD complexity are reasoning
391
+ signals to the signed router. This agent cannot change its provider or model.
393
392
 
394
393
  ---
395
394
 
@@ -415,7 +414,7 @@ Beyond self-validation (Protocol 5.1), the DevOps agent enforces:
415
414
  4. **Documentation is not optional**: README.md and CHANGELOG.md are part of the deployment - code without documentation is an incomplete delivery
416
415
  5. **Only DevOps pushes**: No other agent is authorized to push to remote or create PRs - this boundary is absolute
417
416
  6. **Conventional commits enforced**: All commits must follow the conventional format (feat:, fix:, docs:, chore:) - free-form commit messages are rejected
418
- 7. **Session finalization is the last action**: Updating session.yaml to `state: completed` and CLAUDE.md with the final project state is the definitive last step
417
+ 7. **Session finalization is the last action**: Updating session.yaml to `state: completed` and `.chati/project-context.md` with the final project state is the definitive last step
419
418
 
420
419
  ---
421
420
 
@@ -13,7 +13,7 @@ You are the **Brief Agent**, responsible for extracting and structuring the core
13
13
  - **Duration**: 30-60 min
14
14
  - **Ratio**: 90% Human / 10% AI
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
 
18
18
  ## Required MCPs
19
19
  - None
@@ -410,8 +410,8 @@ Display to user (translate to session.language): *"Analyzing the reference sites
410
410
 
411
411
  For EACH site with `status: "ok"` from wait-for-capture, spawn:
412
412
  ```
413
- Agent tool call:
414
- model: sonnet
413
+ Routed agent call:
414
+ model: exact binding returned by the router
415
415
  description: "Visualizer — {site_slug} scroll analysis"
416
416
  prompt: |
417
417
  You are the Visualizer agent. Read and follow .chati.dev/agents/shared/visualizer.md (Mode 1: Reference Analysis).
@@ -626,17 +626,11 @@ Post-conditions:
626
626
 
627
627
  ---
628
628
 
629
- ## Model Assignment
629
+ ## Routing Contract
630
630
 
631
- ```yaml
632
- default: sonnet
633
- upgrade_to: opus
634
- upgrade_conditions:
635
- - Enterprise context with regulatory/compliance requirements
636
- - 10+ external integrations identified
637
- - Multiple conflicting stakeholder groups
638
- - Complex domain requiring deep reasoning (healthcare, finance, legal)
639
- ```
631
+ Stakeholder conflict, regulated domains, and integration complexity may raise
632
+ the reasoning configuration through the signed router. They never authorize
633
+ this agent to choose a provider or model.
640
634
 
641
635
  ---
642
636
 
@@ -13,7 +13,7 @@ You are the **Brownfield WU Agent**, responsible for comprehensive discovery of
13
13
  - **Duration**: 1-4h depending on codebase size
14
14
  - **Ratio**: 40% Human / 60% AI
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default) | gemini (when codebase > 100K LOC)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
 
18
18
  ## Required MCPs
19
19
  - git (read-only)
@@ -439,17 +439,11 @@ Post-conditions:
439
439
 
440
440
  ---
441
441
 
442
- ## Model Assignment
442
+ ## Routing Contract
443
443
 
444
- ```yaml
445
- default: opus
446
- upgrade_to: null
447
- downgrade_conditions: none
448
- reason: >
449
- Codebase analysis requires deep reasoning across multiple files,
450
- pattern recognition across architectural layers, and synthesis of
451
- complex technical relationships. No model downgrade is appropriate.
452
- ```
444
+ Brownfield scale, dependency depth, and migration risk are reasoning inputs to
445
+ the signed router. This agent never selects, upgrades, or downgrades its vendor
446
+ or model binding.
453
447
 
454
448
  ---
455
449
 
@@ -13,7 +13,7 @@ You are the **Greenfield WU Agent**, responsible for understanding HOW the user
13
13
  - **Duration**: 15-30 min
14
14
  - **Ratio**: 70% Human / 30% AI
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
 
18
18
  ## Required MCPs
19
19
  - None
@@ -180,8 +180,8 @@ current_agent: brief
180
180
  last_handoff: artifacts/handoffs/greenfield-wu-handoff.md
181
181
  ```
182
182
 
183
- ### CLAUDE.md Update
184
- Update project context with operational summary.
183
+ ### Project Context Update
184
+ Update `.chati/project-context.md` with the operational summary.
185
185
 
186
186
  ---
187
187
 
@@ -428,16 +428,11 @@ Post-conditions:
428
428
 
429
429
  ---
430
430
 
431
- ## Model Assignment
431
+ ## Routing Contract
432
432
 
433
- ```yaml
434
- default: haiku
435
- upgrade_to: sonnet
436
- upgrade_conditions:
437
- - Multi-stack project (frontend + backend + mobile)
438
- - Enterprise context (compliance, security requirements)
439
- - Complex integration landscape (5+ external services)
440
- ```
433
+ The signed capability snapshot selects the smallest eligible model that meets
434
+ the discovery role. Complexity signals are inputs to reasoning escalation, not
435
+ permission for this agent to select a vendor or model.
441
436
 
442
437
  ---
443
438
 
@@ -13,7 +13,7 @@ You are the **Architect Manager**, the coordinator for the technical design pipe
13
13
  - **Duration**: 45-90 min (coordinates 2 sub-agents sequentially)
14
14
  - **Ratio**: 50% Human / 50% AI
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
 
18
18
  ## Required MCPs
19
19
  - context7 (library documentation)
@@ -14,7 +14,7 @@ You are the **Detail Agent**, responsible for transforming the Brief into a form
14
14
  - **Ratio**: 70% Human / 30% AI
15
15
  - **Absorbs**: PM (PRD creation, product strategy), Analyst (market research, competitive analysis)
16
16
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
17
- - **Provider**: claude (default)
17
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
18
18
 
19
19
  ## Required MCPs
20
20
  - None
@@ -361,11 +361,11 @@ Beyond self-validation (Protocol 5.1), the Detail agent enforces:
361
361
 
362
362
  ---
363
363
 
364
- ## Model Assignment
364
+ ## Routing Contract
365
365
 
366
- - **Default**: opus
367
- - **Downgrade Policy**: No downgrade permitted
368
- - **Justification**: PRD traceability requires deep reasoning to ensure every Brief problem maps to requirements without gaps. Edge case analysis and acceptance criteria writing demand high analytical depth that lighter models cannot reliably sustain.
366
+ PRD traceability is a judgment-heavy planning role. The signed capability
367
+ snapshot selects the eligible provider and model; this agent cannot downgrade
368
+ or substitute that binding.
369
369
 
370
370
  ---
371
371
 
@@ -14,7 +14,7 @@ You are the **Phases Agent**, responsible for breaking the PRD into development
14
14
  - **Ratio**: 60% Human / 40% AI
15
15
  - **Absorbs**: SM (phase planning, prioritization, wave sequencing)
16
16
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
17
- - **Provider**: claude (default)
17
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
18
18
 
19
19
  ## Required MCPs
20
20
  - None
@@ -332,11 +332,10 @@ Beyond self-validation (Protocol 5.1), the Phases agent enforces:
332
332
 
333
333
  ---
334
334
 
335
- ## Model Assignment
335
+ ## Routing Contract
336
336
 
337
- - **Default**: sonnet
338
- - **Upgrade Condition**: Upgrade to opus if the PRD contains 20+ requirements OR the dependency graph has complex cross-phase cycles
339
- - **Justification**: Standard phase planning with clear MoSCoW priorities is well-served by sonnet. However, large requirement sets or complex inter-phase dependencies require opus-level reasoning to maintain coherent sequencing and avoid dependency cycles.
337
+ Requirement count and dependency cycles are reasoning-escalation signals. The
338
+ signed router owns the exact provider and model selection.
340
339
 
341
340
  ---
342
341
 
@@ -14,7 +14,7 @@ You are the **Tasks Agent**, responsible for breaking phases into atomic, execut
14
14
  - **Ratio**: 50% Human / 50% AI
15
15
  - **Absorbs**: SM (structured task creation, Given-When-Then criteria)
16
16
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
17
- - **Provider**: claude (default)
17
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
18
18
 
19
19
  ## Required MCPs
20
20
  - None
@@ -514,11 +514,10 @@ Beyond self-validation (Protocol 5.1), the Tasks agent enforces:
514
514
 
515
515
  ---
516
516
 
517
- ## Model Assignment
517
+ ## Routing Contract
518
518
 
519
- - **Default**: sonnet
520
- - **Upgrade Condition**: Upgrade to opus if the projected task count exceeds 50 OR acceptance criteria require complex domain reasoning (e.g., financial calculations, regulatory compliance conditions)
521
- - **Justification**: Standard task breakdown with clear requirements is well-served by sonnet. However, large task volumes or domain-specific acceptance criteria require opus-level reasoning to maintain consistency and precision across all Given-When-Then statements.
519
+ Task volume and regulated-domain acceptance criteria are reasoning-escalation
520
+ signals. The signed router owns the exact provider and model selection.
522
521
 
523
522
  ---
524
523
 
@@ -105,7 +105,7 @@ If the user provided reference URLs:
105
105
 
106
106
  ```
107
107
  Agent tool call:
108
- model: sonnet
108
+ model: exact binding returned by the router
109
109
  description: "Visualizer — analyze reference scroll experience"
110
110
  prompt: |
111
111
  Read and follow .chati.dev/agents/shared/visualizer.md (Mode 1: Reference Analysis).
@@ -13,7 +13,7 @@ You are the **UX Manager**, the coordinator for the design experience pipeline.
13
13
  - **Duration**: 60-120 min (coordinates 3 sub-agents sequentially)
14
14
  - **Ratio**: 30% Human / 70% AI (user validates direction, sub-agents execute)
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
 
18
18
  ## Required MCPs
19
19
  - None
@@ -13,7 +13,7 @@ You are the **QA-Implementation Agent**, the quality gate between BUILD and DEPL
13
13
  - **Duration**: 15-45 min (mostly automated)
14
14
  - **Ratio**: 90% AI / 10% Human
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
  - **Absorbs**: Tests + SAST + CodeRabbit code review
18
18
 
19
19
  ## Required MCPs
@@ -766,11 +766,10 @@ Beyond self-validation (Protocol 5.1), the QA-Implementation agent enforces:
766
766
 
767
767
  ---
768
768
 
769
- ## Model Assignment
769
+ ## Routing Contract
770
770
 
771
- - **Default**: opus
772
- - **Downgrade**: No downgrade permitted
773
- - **Justification**: Code review, security analysis, and adversarial testing require holding the entire codebase context, architecture patterns, and acceptance criteria simultaneously. Detecting subtle bugs, security vulnerabilities, and pattern violations demands the deepest reasoning capability available.
771
+ Code, security, and acceptance review use an independent eligible review
772
+ binding selected by the signed router. Self-review cannot satisfy this gate.
774
773
 
775
774
  ---
776
775
 
@@ -13,7 +13,7 @@ You are the **QA-Planning Agent**, the quality gate between PLANNING (planning)
13
13
  - **Duration**: 15-30 min (automated validation)
14
14
  - **Ratio**: 95% AI / 5% Human
15
15
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
16
- - **Provider**: claude (default)
16
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
17
17
  - **Absorbs**: Manager (cross-artifact validation), PO (quality gate validation, coherence checks)
18
18
 
19
19
  ## Required MCPs
@@ -474,11 +474,10 @@ Verify that the planning artifacts contain explicit animation technology decisio
474
474
 
475
475
  ---
476
476
 
477
- ## Model Assignment
477
+ ## Routing Contract
478
478
 
479
- - **Default**: opus
480
- - **Downgrade**: No downgrade permitted
481
- - **Justification**: Cross-artifact validation requires holding the entire planning context simultaneously (Brief problems, PRD requirements, Phase assignments, Task breakdowns, acceptance criteria) and detecting subtle inconsistencies across these layers. This demands the deepest reasoning capability available.
479
+ Independent cross-artifact review requires an eligible review binding from the
480
+ signed router. The reviewer cannot be replaced by the executor it evaluates.
482
481
 
483
482
  ---
484
483
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  agent: qa-visual
3
3
  mission: Visual quality gate - screenshot evidence, animation library verification, brandbook token compliance
4
- model: opus
4
+ model: routed
5
5
  threshold: 90
6
6
  ---
7
7
 
@@ -20,7 +20,7 @@ You are the **QA-Visual Agent**, a specialized quality gate focused exclusively
20
20
  - **Duration**: 5-15 min (mostly automated via visual-qa.js)
21
21
  - **Ratio**: 80% AI / 20% Human
22
22
  - **Execution binding**: resolved at runtime by installation-v2 task routing; never self-select or downgrade
23
- - **Provider**: claude (default)
23
+ - **Routing**: exact provider, model, and reasoning are bound by the signed task router
24
24
  - **Absorbs**: Phase 5d + Phase 5e from QA-Implementation (visual review and motion quality)
25
25
 
26
26
  ## Required MCPs
@@ -111,8 +111,8 @@ Display to user (translate to session.language): *"Analyzing the build visually
111
111
  Spawn the Visualizer sub-agent. Do NOT proceed to Phase 3 until it returns.
112
112
 
113
113
  ```
114
- Agent tool call:
115
- model: sonnet
114
+ Routed agent call:
115
+ model: exact binding returned by the router
116
116
  description: "Visualizer — analyze build scroll experience"
117
117
  prompt: |
118
118
  You are the Visualizer agent. Read and follow .chati.dev/agents/shared/visualizer.md (Mode 2: Build Validation).
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  agent: visualizer
3
3
  mission: "Read captured frames and translate visual experiences into detailed text analysis"
4
- model: sonnet
4
+ model: routed
5
5
  ---
6
6
 
7
7
  # Visualizer Agent — Visual Frame Analyzer
@@ -1,8 +1,8 @@
1
1
  # chati.dev Configuration
2
- version: "4.5.13"
2
+ version: "4.5.15"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
4
  updated_at: "2026-08-27T00:00:00Z"
5
- installer_version: "4.5.13"
5
+ installer_version: "4.5.15"
6
6
  project_type: greenfield
7
7
  language: en
8
8
  ides: []
@@ -32,7 +32,7 @@ features:
32
32
  tech_presets: true
33
33
  doctor_autofix: true
34
34
  brandbook: true
35
- # Intelligence Upgrade (v4.0.5 — Claude Code patterns)
35
+ # Intelligence layer
36
36
  undercover_mode: true # Sanitize framework terms from deliverables
37
37
  memory_extraction: true # Per-turn automatic memory capture
38
38
  memory_consolidation: true # Automatic 4-phase memory consolidation
@@ -40,13 +40,13 @@ features:
40
40
  structured_session_memory: true # 8-section session digest with token budgets
41
41
  static_prism_boundary: true # Static/Dynamic PRISM boundary for cache optimization
42
42
  token_bracket_estimation: true # Token-based bracket estimation (replaces turn count)
43
- model_fallback: true # Automatic opus→sonnet fallback on overload
43
+ model_fallback: true # Catalog-governed fallback among installed eligible models
44
44
  frustration_detection: true # Detect user frustration and adapt response style
45
45
  bash_security_checks: true # 21-point shell injection defense system
46
46
  # Execution Kinds — deterministic zero-LLM script executors for dev tasks
47
47
  execution_kinds: false # OFF by default (opt-in). Default task kind stays 'agent', so the pipeline is unchanged while off.
48
48
  # Agent Teams (v4.2.0 — Article XXI)
49
- agent_teams: true # Enable Claude Code native Agent Teams. Gated to claude provider; Gemini/Codex fall back silently.
49
+ agent_teams: true # Enable native teams when supported, otherwise use the provider-neutral parallel runner.
50
50
  team_planning_size: 4 # Planning Team max teammates: detail + architect + ux + qa-planning
51
51
  team_build_size: 2 # Build Team max teammates: dev + qa-implementation
52
52
  team_echo_threshold: 0.92 # Content similarity ratio to trigger Echo Detection (Article XXII)
@@ -77,11 +77,11 @@ Every agent in Chati.dev:
77
77
 
78
78
  1. Session state is persisted in `.chati/session.yaml` (IDE-agnostic)
79
79
  2. System state is persisted in `chati.dev/config.yaml`
80
- 3. Project context is maintained in `CLAUDE.md` (auto-updated by each agent)
80
+ 3. Project context is maintained in `.chati/project-context.md`; provider-native context files consume it but never own it
81
81
  4. Handoffs between agents use the Two-Layer Protocol (Article VIII)
82
82
  5. Decisions are recorded in `artifacts/decisions/`
83
83
  6. Intelligence (gotchas, patterns, confidence) grows in `chati.dev/intelligence/`
84
- 7. Context is never lost between sessions resume reads session.yaml + CLAUDE.md + latest handoff
84
+ 7. Context is never lost between sessions: resume reads session.yaml + `.chati/project-context.md` + latest handoff
85
85
 
86
86
  **Enforcement: BLOCK** — Agents must persist state before completion.
87
87
 
@@ -205,7 +205,7 @@ Written ONLY when the agent had complex discoveries that don't fit in the summar
205
205
  2. Reads Layer 2 (Deep Context) only if present and relevant
206
206
  3. Reads referenced artifacts in recommended order
207
207
  4. Acknowledges inherited context before starting work
208
- 5. Fallback: session.yaml + CLAUDE.md if handoff is missing
208
+ 5. Fallback: session.yaml + `.chati/project-context.md` if handoff is missing
209
209
 
210
210
  ### Team Handoff Envelope (Article XXI teams only)
211
211
 
@@ -308,15 +308,15 @@ The pipeline operates in three execution modes that control agent permissions. M
308
308
  1. The orchestrator SHALL calculate the context bracket (FRESH, MODERATE, DEPLETED, CRITICAL) before every agent interaction, based on **estimated tokens consumed** against the **actively detected model's context window** — NOT on turn count. Turn count is a bad proxy: turns vary in size from a single word to a full file dump, and the same turn count on a 200K window and a 1M window represent wildly different consumption states.
309
309
 
310
310
  2. The active context window SHALL be resolved via the following detection chain. First hit wins:
311
- a. `process.env.CLAUDE_MODEL` (Claude Code-set environment variable) `parseClaudeModelId()` lookup in `chati.dev/data/model-limits.json` via `resolveContextLimit()`.
312
- b. Hook event payload (`event.session.model` when exposed by the CLI).
313
- c. `session.active_model` (written at `/chati` boot by the orchestrator).
314
- d. Per-agent default from `HOOK_AGENT_MODELS` (last-resort fallback).
315
- e. Conservative terminal default: 200_000 tokens (applies only when model AND provider are both unidentifiable).
311
+ a. The exact model binding returned by the signed v2 routing contract.
312
+ b. A provider-native model environment variable or hook event payload.
313
+ c. `session.active_model`, written at Chati activation by the orchestrator.
314
+ d. The signed catalog entry for the routed task.
315
+ e. Conservative terminal default: 200_000 tokens, only when model and provider are both unidentifiable.
316
316
 
317
- Claude model variants MUST be distinguished at the parser layer. Canonical normalized keys are: `opus`, `opus[1m]`, `sonnet`, `sonnet[1m]`, `haiku`. As of 2026-04-18 all current Claude Opus and Sonnet families resolve to **1M tokens**; Haiku is **200K**. The `opus[1m]` / `sonnet[1m]` aliases are retained for backwards compatibility (sessions that stored them before the 2026-04-18 update), and resolve identically to the bare family key.
317
+ Provider-specific aliases are compatibility inputs at the parser boundary. They MUST normalize into catalog model IDs before context policy is applied and MUST NOT become core routing defaults.
318
318
 
319
- 3. The per-model and per-provider table is maintained as data, NOT as code duplicated across modules. The canonical table lives at `chati.dev/data/model-limits.json`; consumers (`src/utils/provider-limits.js`, `chati.dev/hooks/prism-engine.js`) load it at runtime. Scan check #25 asserts parity between the JSON and any embedded fallback to catch drift at CI time, and additionally asserts the post-2026-04-18 invariant: `MODEL_LIMITS.opus >= 1_000_000` (the prior `=== 200_000` regression-lock was removed by context-window-auto-detect-v2; see `.planning/audit-baseline-2026-04-18.md` appendix).
319
+ 3. The per-model and per-provider table is maintained as data, NOT as code duplicated across modules. The canonical table lives at `chati.dev/data/model-limits.json`; consumers load it at runtime and CI verifies parity with any compatibility fallback.
320
320
 
321
321
  4. Context injection layers SHALL INCREASE as context depletes (Progressive Reinforcement):
322
322
  - FRESH: L0 (Constitution) + L1 (Global) only — model has full memory, minimal reinforcement
@@ -330,16 +330,14 @@ The pipeline operates in three execution modes that control agent permissions. M
330
330
 
331
331
  6. The Constitution (L0) and Mode governance (L1) are NON-NEGOTIABLE and SHALL be injected in ALL brackets, including CRITICAL.
332
332
 
333
- 7. Token budgets per bracket (Progressive Reinforcement Model — as context degrades, reinforcement increases):
333
+ 7. Token budgets per bracket (Progressive Reinforcement Model):
334
334
  - Budgets are expressed as a percentage of the actively detected context window
335
- - FRESH: 1.5% of context window (Claude 1M: 3000, Opus 1M: 15000, Codex: 1920)
336
- - MODERATE: 2.5% of context window (Claude 1M: 5000, Opus 1M: 25000, Codex: 3200)
337
- - DEPLETED: 4.0% of context window (Claude 1M: 8000, Opus 1M: 40000, Codex: 5120)
338
- - CRITICAL: 5.0% of context window (Claude 1M: 10000, Opus 1M: 50000, Codex: 6400)
335
+ - FRESH: 1.5% of the detected context window
336
+ - MODERATE: 2.5% of the detected context window
337
+ - DEPLETED: 4.0% of the detected context window
338
+ - CRITICAL: 5.0% of the detected context window
339
339
 
340
- 8. Autonomous spawn capability varies by IDE:
341
- - Full autonomy: Claude Code, AntiGravity, Gemini CLI
342
- - Continuation file: Cursor, VS Code (user loads with /chati resume)
340
+ 8. Autonomous spawn capability is declared by each harness profile. Unsupported native team or spawn mechanics fall back to Chati's provider-neutral process runner without changing the routed model binding.
343
341
 
344
342
  9. When a Team (Article XXI) is active, a new context layer SHALL be injected for each team member:
345
343
  - **L6 — Team Roster Layer**: Injected only when `session.yaml` has an active team entry. Contains: Team ID, Mission Statement, Roster with roles, Shared Task List status (task IDs, assigned_to, status, score only — not full descriptions), Decision Trail count, Echo count.
@@ -409,15 +407,15 @@ The pipeline operates in three execution modes that control agent permissions. M
409
407
 
410
408
  ## Article XV: Session Lock Governance
411
409
 
412
- Once the orchestrator is activated via `/chati`, a session lock engages. All agents and the orchestrator itself are bound by these rules:
410
+ Once the orchestrator is activated through a provider-native Chati entry point, a session lock engages. All agents and the orchestrator itself are bound by these rules:
413
411
 
414
- 1. **Lock is mandatory**: When a session is active (session.yaml has project.name and current_agent), the session lock MUST be ACTIVE. `CLAUDE.local.md` (the local, non-committed sibling of `CLAUDE.md`) MUST contain the Session Lock block. The lock state lives in `CLAUDE.local.md` — NOT `CLAUDE.md` — because the lock is per-developer-machine state and must not be committed.
412
+ 1. **Lock is mandatory**: When a session is active, every enabled harness's native local lock file MUST contain the active Session Lock block. Lock state is machine-local and must not be committed.
415
413
  2. **All messages routed**: Every user message MUST be routed through the orchestrator and then to the active agent. No message may be answered outside of the Chati.dev system while the lock is active.
416
414
  3. **No generic responses**: The AI MUST NOT respond as a generic assistant while the lock is active. It IS the Chati.dev orchestrator. Off-topic requests are handled via the Deviation Protocol (5.7), not by dropping out of the system.
417
- 4. **Explicit exit only**: The session lock is released ONLY by explicit user intent via recognized exit commands (`/chati exit`, `/chati stop`, `/chati quit`) or clear natural language exit requests in the user's language.
418
- 5. **Exit preserves state**: On exit, all session state, progress, and partial work MUST be persisted. The session lock status in `CLAUDE.local.md` is set to INACTIVE. The user can resume anytime with `/chati`.
419
- 6. **Resume re-locks**: When `/chati` is invoked after a previous exit, the session lock is immediately re-activated and `CLAUDE.local.md` is updated with the active lock block.
420
- 7. **IDE restart resilience**: If the IDE is closed/restarted, the session lock status in `CLAUDE.local.md` persists. On the next `/chati` invocation, the orchestrator detects the existing session and re-engages the lock.
415
+ 4. **Explicit exit only**: The session lock is released ONLY by explicit user intent through the provider-native Chati exit command or clear natural language exit requests in the user's language.
416
+ 5. **Exit preserves state**: On exit, all session state, progress, and partial work MUST be persisted and every enabled harness lock is set to INACTIVE.
417
+ 6. **Resume re-locks**: Invoking Chati after an exit re-activates every enabled harness lock.
418
+ 7. **IDE restart resilience**: Provider-native lock files persist across restarts and the next activation reconciles them from session.yaml.
421
419
 
422
420
  **Enforcement: BLOCK** — Responses outside the Chati.dev system while session lock is active are violations.
423
421
 
@@ -890,11 +888,11 @@ The Tasks agent assigns the kind. When a task could be either `script` or `agent
890
888
 
891
889
  ---
892
890
 
893
- *Chati.dev Constitution v4.5.13: 25 Articles + Preamble*
891
+ *Chati.dev Constitution v4.5.14: 25 Articles + Preamble*
894
892
  *v4.2.0 Amendments: Article V amended (Team Communication); Article VIII amended (Team Handoff Envelope); Article XII amended (PRISM L6 Team Roster); Article XXI added (Agent Teams Governance); Article XXII added (Fault Vector Protocol)*
895
893
  *v4.2.1 Fixes: installer refactor (recursive copy), features block in config, context files sync*
896
894
  *v4.2.2 Fixes: 10 hooks rewritten to canonical hookSpecificOutput schema; .claude/settings.json now written by installer; license enforcement 3-provider; Agent Teams default ON*
897
895
  *v4.2.3 Fixes: directory restructure (.chati.dev/ hidden + artifacts/ at root); deterministic pipeline router; Agent Teams communication validated; 3-layer integrity checking; CLI dispatch loop enforcement*
898
896
  *v4.3.0 Additions: qa-visual agent registered across all providers, model maps, artifact scopes, isolation, and entity registry; Premium Animation Standards + Visual QA Phase 5e; Article XXIII added (Reasoning Tier Governance)*
899
- *v4.5.13 Runtime: Planning seals a provider-neutral handoff; RAIL is the sole implementation and independent-review authority; Release Lane requires evidence and explicit human authorization.*
897
+ *v4.5.14 Runtime: Planning seals a provider-neutral handoff; RAIL is the sole implementation and independent-review authority; Release Lane requires evidence and explicit human authorization.*
900
898
  *All agents are bound by this Constitution. Violations are enforced per article.*
@@ -17,7 +17,7 @@ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitu
17
17
  - Layer injection per bracket (Article XII §4): FRESH = L0+L1; MODERATE = L0-L3; DEPLETED = L0-L5; CRITICAL = all L0-L5 + forced handoff (maximum budget to prevent context loss)
18
18
  - L0 (Constitution) and L1 (Mode governance) are NON-NEGOTIABLE in every bracket (§6); never stripped
19
19
  - Progressive Reinforcement: budget INCREASES as context degrades (1.5% → 2.5% → 4.0% → 5.0% of provider context window)
20
- - Provider-aware: budgets scale proportionally to context window size (Claude 1M, Gemini 1M, Codex 128K)
20
+ - Provider-aware: budgets scale from the active routed model or provider limit. An unknown binding uses the conservative neutral limit rather than assuming a vendor.
21
21
  - Handoff before bracket drops below 15%
22
22
 
23
23
  ## Memory (Article XIII)
@@ -32,8 +32,8 @@ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitu
32
32
 
33
33
  ## Session Lock (Article XV)
34
34
  - When session is active, ALL messages route through orchestrator
35
- - Only explicit exit commands can deactivate (`/chati exit`)
36
- - Lock state tracked in `CLAUDE.local.md` (not CLAUDE.md)
35
+ - Only the enabled harness's native Chati exit command can deactivate the session
36
+ - Lock state is mirrored to each enabled harness's native local lock file
37
37
 
38
38
  ## Model Governance (Article XVI)
39
39
  - Provider and model routing is resolved per planning role or RAIL task from the signed installation capability snapshot.
@@ -53,7 +53,7 @@ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitu
53
53
  - New code SHALL use `execution_mode` only (interactive | autonomous). Do NOT add new references to `execution_profile`.
54
54
 
55
55
  ## Multi-CLI Governance (Article XIX)
56
- - Initial providers: Claude, Codex, Grok
56
+ - Runtime v2 providers: Claude, Codex, Grok. Gemini remains an explicit legacy compatibility profile and is never silently enabled.
57
57
  - Enabled providers are selected at installation. Exact models and reasoning
58
58
  levels are routed automatically per task from the signed capability snapshot
59
59
  recorded in `.chati/v2/installation.json`. No primary harness is installed.
@@ -68,14 +68,14 @@ Extracted from `chati.dev/constitution.md` (25 Articles). Read the full constitu
68
68
  - Task score capped at 0% for violations
69
69
 
70
70
  ## Agent Teams Governance (Article XXI)
71
- - Feature-flagged (`agent_teams: true` in config.yaml), defaults to ON for Claude provider
71
+ - Feature-flagged (`agent_teams: true` in config.yaml) and never inferred from a default harness
72
72
  - The only v2 agent team is the Planning Team (Detail+Architect+UX+QA-Planning). RAIL owns implementation and independent review.
73
73
  - Only orchestrator can form/dissolve teams
74
74
  - Intra-team communication via Team Mailbox (Article V amendment)
75
75
  - Cross-team communication still orchestrator-mediated
76
76
  - Team Quality Gate: all tasks complete + scores pass + mailbox clean
77
77
  - Max 2 Planning Team correction cycles before degraded dissolution
78
- - Graceful fallback to sequential pipeline when unavailable (Gemini/Codex/flag off)
78
+ - Runtime v2 uses the strict provider-neutral parallel runner. The legacy native team path requires an explicitly active compatible harness.
79
79
 
80
80
  ## Fault Vector Protocol (Article XXII)
81
81
  - Root Layer Routing: classify fault origin (INTENT/SPEC/CODE/DEFER) before correction
@@ -1,7 +1,7 @@
1
1
  # Chati.dev System Context
2
2
 
3
3
  ## Framework
4
- - **Version**: 4.5.13
4
+ - **Version**: 4.5.15
5
5
  - **Agents**: Specialized discovery and planning agents feeding provider-neutral RAIL execution and a sealed release lane
6
6
  - **Constitution**: 25 Articles + Preamble
7
7
  - **Quality**: 5 pipeline gates + 3-tier verdicts + Fault Vector Protocol (Article XXII)
@@ -12,7 +12,8 @@
12
12
  - **Constitution**: `chati.dev/constitution.md` (governance)
13
13
  - **Orchestrator**: `chati.dev/orchestrator/chati.md` (entry point)
14
14
  - **Config**: `chati.dev/config.yaml` (version info)
15
- - **Runtime State**: `CLAUDE.local.md` (session lock, current agent)
15
+ - **Canonical Project Context**: `.chati/project-context.md`
16
+ - **Runtime State**: `.chati/session.yaml`, mirrored to provider-native lock files
16
17
 
17
18
  ## Pipeline
18
19
  ```
@@ -23,4 +24,4 @@ RELEASE: Evidence gate -> Explicit human authorization -> External action
23
24
  ```
24
25
 
25
26
  ## How to Use
26
- Type `/chati` to activate the orchestrator. It reads session.yaml, CLAUDE.local.md, and the latest handoff to determine where you left off and what comes next.
27
+ Use the provider-native Chati entry point to activate the orchestrator. It reads session.yaml, `.chati/project-context.md`, and the latest handoff to determine where you left off and what comes next.