chati-dev 2.1.2 → 3.0.1
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 +95 -24
- package/bin/chati.js +1 -1
- package/framework/agents/build/dev.md +1 -0
- package/framework/agents/deploy/devops.md +1 -0
- package/framework/agents/discover/brief.md +1 -0
- package/framework/agents/discover/brownfield-wu.md +1 -0
- package/framework/agents/discover/greenfield-wu.md +1 -0
- package/framework/agents/plan/architect.md +1 -0
- package/framework/agents/plan/detail.md +1 -0
- package/framework/agents/plan/phases.md +3 -2
- package/framework/agents/plan/tasks.md +1 -0
- package/framework/agents/plan/ux.md +1 -0
- package/framework/agents/quality/qa-implementation.md +1 -0
- package/framework/agents/quality/qa-planning.md +1 -0
- package/framework/config.yaml +21 -2
- package/framework/constitution.md +67 -2
- package/framework/context/governance.md +16 -3
- package/framework/context/root.md +3 -3
- package/framework/data/entity-registry.yaml +1 -1
- package/framework/domains/agents/brownfield-wu.yaml +4 -0
- package/framework/domains/agents/detail.yaml +1 -1
- package/framework/domains/agents/dev.yaml +4 -0
- package/framework/domains/agents/orchestrator.yaml +8 -0
- package/framework/domains/agents/phases.yaml +2 -2
- package/framework/domains/agents/tasks.yaml +2 -2
- package/framework/domains/constitution.yaml +30 -2
- package/framework/domains/global.yaml +20 -0
- package/framework/hooks/model-governance.js +17 -15
- package/framework/hooks/read-protection.js +1 -0
- package/framework/i18n/en.yaml +11 -4
- package/framework/i18n/es.yaml +11 -4
- package/framework/i18n/fr.yaml +11 -4
- package/framework/i18n/pt.yaml +11 -4
- package/framework/intelligence/context-engine.md +31 -2
- package/framework/intelligence/decision-engine.md +1 -1
- package/framework/intelligence/memory-layer.md +17 -0
- package/framework/orchestrator/chati.md +94 -14
- package/framework/patterns/elicitation-library.yaml +2 -2
- package/framework/schemas/config.schema.json +44 -0
- package/framework/schemas/session.schema.json +27 -0
- package/framework/tasks/brownfield-wu-dependency-scan.md +1 -1
- package/framework/tasks/brownfield-wu-migration-plan.md +4 -4
- package/framework/tasks/brownfield-wu-risk-assess.md +2 -2
- package/framework/tasks/detail-expand-prd.md +2 -2
- package/framework/tasks/greenfield-wu-report.md +1 -1
- package/framework/tasks/orchestrator-handoff.md +2 -2
- package/framework/tasks/orchestrator-resume.md +1 -1
- package/framework/tasks/qa-impl-performance-test.md +2 -2
- package/framework/tasks/qa-impl-sast-scan.md +6 -6
- package/framework/tasks/qa-planning-consolidate.md +1 -1
- package/framework/tasks/qa-planning-coverage-plan.md +9 -9
- package/framework/tasks/qa-planning-gate-define.md +6 -6
- package/framework/tasks/qa-planning-risk-matrix.md +1 -1
- package/framework/tasks/tasks-consolidate.md +5 -5
- package/package.json +5 -1
- package/scripts/changelog-generator.js +2 -2
- package/scripts/ide-sync.js +9 -4
- package/scripts/pr-review.js +5 -5
- package/scripts/semantic-lint.js +3 -3
- package/src/autonomy/build-loop.js +194 -0
- package/src/autonomy/build-state.js +269 -0
- package/src/autonomy/execution-profile.js +151 -0
- package/src/config/context-file-generator.js +203 -0
- package/src/config/ide-configs.js +6 -6
- package/src/gates/g2-qa-planning.js +4 -2
- package/src/gates/g4-qa-implementation.js +5 -2
- package/src/gates/gate-base.js +33 -1
- package/src/health/engine.js +245 -0
- package/src/installer/core.js +54 -16
- package/src/installer/templates.js +131 -2
- package/src/installer/validator.js +5 -3
- package/src/intelligence/file-tracker.js +117 -0
- package/src/intelligence/registry-manager.js +2 -2
- package/src/intelligence/timeline.js +144 -0
- package/src/memory/gotchas-auto-capture.js +253 -0
- package/src/preview/detector.js +1 -1
- package/src/terminal/adapters/claude-adapter.js +33 -0
- package/src/terminal/adapters/codex-adapter.js +31 -0
- package/src/terminal/adapters/copilot-adapter.js +28 -0
- package/src/terminal/adapters/gemini-adapter.js +28 -0
- package/src/terminal/adapters/index.js +8 -0
- package/src/terminal/cli-registry.js +190 -0
- package/src/terminal/prompt-builder.js +9 -20
- package/src/terminal/run-agent.js +2 -1
- package/src/terminal/spawner.js +44 -14
- package/src/terminal/wave-analyzer.js +143 -0
- package/src/utils/config-parser.js +97 -0
- package/src/wizard/feedback.js +1 -1
- package/src/wizard/i18n.js +11 -4
- package/src/wizard/index.js +22 -10
- package/src/wizard/questions.js +50 -2
- package/framework/manifest.json +0 -5
- package/framework/manifest.sig +0 -1
- /package/assets/{logo - co/314/201pia.png" → logo - c/303/263pia.png"} +0 -0
- /package/assets/{logo - co/314/201pia.svg" → logo - c/303/263pia.svg"} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Constitution Domain — Extracted governance rules for PRISM L0
|
|
2
|
-
# Source: chati.dev/constitution.md (
|
|
2
|
+
# Source: chati.dev/constitution.md (19 Articles + Preamble)
|
|
3
3
|
|
|
4
4
|
summary: >
|
|
5
5
|
Constitution governance: self-validation required (loop until quality >= 95%),
|
|
@@ -9,7 +9,7 @@ summary: >
|
|
|
9
9
|
context brackets, memory governance, registry governance,
|
|
10
10
|
session lock, model governance.
|
|
11
11
|
|
|
12
|
-
articleCount:
|
|
12
|
+
articleCount: 19
|
|
13
13
|
|
|
14
14
|
rules:
|
|
15
15
|
- id: art-i
|
|
@@ -79,3 +79,31 @@ rules:
|
|
|
79
79
|
- id: art-xvii
|
|
80
80
|
text: "Execution mode governance: autonomous requires gate >= 90%. Safety net with circuit breaker (3 failures)."
|
|
81
81
|
priority: critical
|
|
82
|
+
|
|
83
|
+
articles:
|
|
84
|
+
article-xviii:
|
|
85
|
+
name: "Execution Profile Governance"
|
|
86
|
+
enforcement: block
|
|
87
|
+
rules:
|
|
88
|
+
- profile-explore: "In explore profile, agents read and analyze only. No write operations permitted."
|
|
89
|
+
priority: critical
|
|
90
|
+
- profile-guided: "In guided profile, agents propose actions and wait for user confirmation before writes."
|
|
91
|
+
priority: high
|
|
92
|
+
- profile-autonomous: "In autonomous profile, agents execute without confirmation when gate scores >= 90%."
|
|
93
|
+
priority: critical
|
|
94
|
+
- profile-always-confirm: "Destructive operations, deployments, deviations, and backward transitions always require confirmation regardless of profile."
|
|
95
|
+
priority: critical
|
|
96
|
+
article-xix:
|
|
97
|
+
name: "Multi-CLI Governance"
|
|
98
|
+
enforcement: guide
|
|
99
|
+
rules:
|
|
100
|
+
- provider-registry: "CLI Provider Registry is source of truth for provider capabilities."
|
|
101
|
+
priority: high
|
|
102
|
+
- provider-agnostic-handoff: "Handoff format is provider-agnostic. All agents produce handoffs in the same two-layer format."
|
|
103
|
+
priority: critical
|
|
104
|
+
- provider-fallback: "If a configured provider is unavailable, fall back to primary provider (claude) with warning."
|
|
105
|
+
priority: high
|
|
106
|
+
- provider-hooks: "Hook-based governance applies only to providers with hook support. Others use prompt injection."
|
|
107
|
+
priority: high
|
|
108
|
+
- provider-context-files: "Context file generation is automatic when a provider is enabled."
|
|
109
|
+
priority: normal
|
|
@@ -18,6 +18,26 @@ rules:
|
|
|
18
18
|
text: "Interact with user in their preferred language. Artifacts stay in English."
|
|
19
19
|
priority: normal
|
|
20
20
|
|
|
21
|
+
# Execution Profile Rules (v3.0.0)
|
|
22
|
+
execution-profiles:
|
|
23
|
+
- explore-readonly: "In explore profile, all write/edit tool calls are blocked."
|
|
24
|
+
priority: critical
|
|
25
|
+
- guided-confirmation: "In guided profile, significant writes require user confirmation."
|
|
26
|
+
priority: high
|
|
27
|
+
- autonomous-gate-check: "Autonomous profile requires cumulative gate scores >= 90%."
|
|
28
|
+
priority: critical
|
|
29
|
+
- profile-downgrade: "If quality drops below threshold during autonomous execution, auto-downgrade to guided."
|
|
30
|
+
priority: critical
|
|
31
|
+
|
|
32
|
+
# Multi-CLI Rules (v3.0.0)
|
|
33
|
+
multi-cli:
|
|
34
|
+
- primary-provider: "Claude is the default and primary provider. Multi-CLI is opt-in."
|
|
35
|
+
priority: high
|
|
36
|
+
- provider-validation: "Health check validates provider availability before spawning."
|
|
37
|
+
priority: high
|
|
38
|
+
- provider-model-map: "Each provider has its own model map. Agent assignments reference tier (opus/sonnet/haiku) which maps to provider-specific models."
|
|
39
|
+
priority: normal
|
|
40
|
+
|
|
21
41
|
modes:
|
|
22
42
|
planning:
|
|
23
43
|
writeScope: "chati.dev/"
|
|
@@ -27,19 +27,19 @@ import { existsSync, readFileSync } from 'fs';
|
|
|
27
27
|
import { join } from 'path';
|
|
28
28
|
|
|
29
29
|
const AGENT_MODELS = {
|
|
30
|
-
orchestrator: 'sonnet',
|
|
31
|
-
'greenfield-wu': 'haiku',
|
|
32
|
-
'brownfield-wu': 'opus',
|
|
33
|
-
brief: 'sonnet',
|
|
34
|
-
detail: 'opus',
|
|
35
|
-
architect: 'opus',
|
|
36
|
-
ux: 'sonnet',
|
|
37
|
-
phases: 'sonnet',
|
|
38
|
-
tasks: 'sonnet',
|
|
39
|
-
'qa-planning': 'opus',
|
|
40
|
-
'qa-implementation': 'opus',
|
|
41
|
-
dev: 'opus',
|
|
42
|
-
devops: 'sonnet',
|
|
30
|
+
orchestrator: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
31
|
+
'greenfield-wu': { provider: 'claude', model: 'haiku', tier: 'haiku' },
|
|
32
|
+
'brownfield-wu': { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
33
|
+
brief: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
34
|
+
detail: { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
35
|
+
architect: { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
36
|
+
ux: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
37
|
+
phases: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
38
|
+
tasks: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
39
|
+
'qa-planning': { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
40
|
+
'qa-implementation': { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
41
|
+
dev: { provider: 'claude', model: 'opus', tier: 'opus' },
|
|
42
|
+
devops: { provider: 'claude', model: 'sonnet', tier: 'sonnet' },
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -77,11 +77,13 @@ async function main() {
|
|
|
77
77
|
const agent = getCurrentAgent(projectDir);
|
|
78
78
|
|
|
79
79
|
if (agent && AGENT_MODELS[agent]) {
|
|
80
|
-
const
|
|
80
|
+
const assignment = AGENT_MODELS[agent];
|
|
81
|
+
const expected = assignment.model || assignment;
|
|
82
|
+
const provider = assignment.provider || 'claude';
|
|
81
83
|
// Advisory note — appended to context
|
|
82
84
|
process.stdout.write(JSON.stringify({
|
|
83
85
|
result: 'allow',
|
|
84
|
-
prefix: `<!-- [Article XVI] Agent "${agent}" assigned model: ${expected} -->`,
|
|
86
|
+
prefix: `<!-- [Article XVI] Agent "${agent}" assigned model: ${expected} (provider: ${provider}) -->`,
|
|
85
87
|
}));
|
|
86
88
|
} else {
|
|
87
89
|
process.stdout.write(JSON.stringify({ result: 'allow' }));
|
package/framework/i18n/en.yaml
CHANGED
|
@@ -15,19 +15,26 @@ installer:
|
|
|
15
15
|
language_label: "Language"
|
|
16
16
|
ides_label: "IDEs"
|
|
17
17
|
mcps_label: "MCPs"
|
|
18
|
+
llm_provider_title: "Select your default AI provider:"
|
|
19
|
+
llm_provider_claude: "Claude (Anthropic) — Best for structured reasoning"
|
|
20
|
+
llm_provider_gemini: "Gemini (Google) — 1M token context window"
|
|
21
|
+
llm_provider_codex: "Codex (OpenAI) — Optimized for code generation"
|
|
22
|
+
llm_provider_copilot: "Copilot (GitHub) — Multi-model, GitHub integrated"
|
|
23
|
+
llm_provider_not_installed: "(CLI not detected)"
|
|
24
|
+
llm_provider_label: "AI Provider"
|
|
18
25
|
will_install: "Will install:"
|
|
19
26
|
agents_count: "13 agent definitions (DISCOVER, PLAN, BUILD, DEPLOY phases)"
|
|
20
27
|
workflows_count: "6 workflow blueprints"
|
|
21
28
|
templates_count: "6 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate, Quick Brief)"
|
|
22
|
-
constitution: "Constitution (
|
|
29
|
+
constitution: "Constitution (19 Articles + Preamble)"
|
|
23
30
|
session_mgmt: "Session management system"
|
|
24
|
-
quality_gates: "Quality gates (
|
|
31
|
+
quality_gates: "Quality gates (3-tier verdicts)"
|
|
25
32
|
proceed: "Proceed with installation?"
|
|
26
33
|
installing: "Installing Chati.dev..."
|
|
27
34
|
created_chati: "Created .chati/ session directory"
|
|
28
35
|
created_framework: "Created chati.dev/ system directory (agents, templates, workflows)"
|
|
29
36
|
created_commands: "Created .claude/commands/ (thin router)"
|
|
30
|
-
installed_constitution: "Installed Constitution (Articles I-
|
|
37
|
+
installed_constitution: "Installed Constitution (Articles I-XIX)"
|
|
31
38
|
created_session: "Created session.yaml schema"
|
|
32
39
|
created_claude_md: "Created CLAUDE.md"
|
|
33
40
|
configured_mcps: "Configured MCPs:"
|
|
@@ -35,7 +42,7 @@ installer:
|
|
|
35
42
|
agents_valid: "All 13 agents implement 8 protocols"
|
|
36
43
|
handoff_ok: "Handoff protocol: OK"
|
|
37
44
|
validation_ok: "Self-validation criteria: OK"
|
|
38
|
-
constitution_ok: "Constitution:
|
|
45
|
+
constitution_ok: "Constitution: 19 articles verified"
|
|
39
46
|
created_memories: "Created .chati/memories/ (Memory Layer)"
|
|
40
47
|
installed_intelligence: "Installed Intelligence Layer (Context Engine, Memory, Registry)"
|
|
41
48
|
intelligence_valid: "Intelligence: 6 spec files verified"
|
package/framework/i18n/es.yaml
CHANGED
|
@@ -15,19 +15,26 @@ installer:
|
|
|
15
15
|
language_label: "Idioma"
|
|
16
16
|
ides_label: "IDEs"
|
|
17
17
|
mcps_label: "MCPs"
|
|
18
|
+
llm_provider_title: "Seleccione su proveedor de IA predeterminado:"
|
|
19
|
+
llm_provider_claude: "Claude (Anthropic) — Mejor para razonamiento estructurado"
|
|
20
|
+
llm_provider_gemini: "Gemini (Google) — Ventana de contexto de 1M tokens"
|
|
21
|
+
llm_provider_codex: "Codex (OpenAI) — Optimizado para generacion de codigo"
|
|
22
|
+
llm_provider_copilot: "Copilot (GitHub) — Multi-modelo, integrado con GitHub"
|
|
23
|
+
llm_provider_not_installed: "(CLI no detectada)"
|
|
24
|
+
llm_provider_label: "Proveedor de IA"
|
|
18
25
|
will_install: "Se instalara:"
|
|
19
26
|
agents_count: "13 definiciones de agentes (fases DISCOVER, PLAN, BUILD, DEPLOY)"
|
|
20
27
|
workflows_count: "6 blueprints de workflow"
|
|
21
28
|
templates_count: "6 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate, Quick Brief)"
|
|
22
|
-
constitution: "Constitucion (
|
|
29
|
+
constitution: "Constitucion (19 Articulos + Preambulo)"
|
|
23
30
|
session_mgmt: "Sistema de gestion de sesion"
|
|
24
|
-
quality_gates: "Quality gates (
|
|
31
|
+
quality_gates: "Quality gates (veredictos en 3 niveles)"
|
|
25
32
|
proceed: "Proceder con la instalacion?"
|
|
26
33
|
installing: "Instalando Chati.dev..."
|
|
27
34
|
created_chati: "Creado directorio de sesion .chati/"
|
|
28
35
|
created_framework: "Creado directorio del sistema chati.dev/ (agentes, templates, workflows)"
|
|
29
36
|
created_commands: "Creado .claude/commands/ (enrutador)"
|
|
30
|
-
installed_constitution: "Instalada Constitucion (Articulos I-
|
|
37
|
+
installed_constitution: "Instalada Constitucion (Articulos I-XIX)"
|
|
31
38
|
created_session: "Creado schema session.yaml"
|
|
32
39
|
created_claude_md: "Creado CLAUDE.md"
|
|
33
40
|
configured_mcps: "MCPs configurados:"
|
|
@@ -35,7 +42,7 @@ installer:
|
|
|
35
42
|
agents_valid: "Los 13 agentes implementan 8 protocolos"
|
|
36
43
|
handoff_ok: "Protocolo de handoff: OK"
|
|
37
44
|
validation_ok: "Criterios de auto-validacion: OK"
|
|
38
|
-
constitution_ok: "Constitucion:
|
|
45
|
+
constitution_ok: "Constitucion: 19 articulos verificados"
|
|
39
46
|
created_memories: "Creado .chati/memories/ (Memory Layer)"
|
|
40
47
|
installed_intelligence: "Instalada Intelligence Layer (Context Engine, Memory, Registry)"
|
|
41
48
|
intelligence_valid: "Intelligence: 6 archivos de spec verificados"
|
package/framework/i18n/fr.yaml
CHANGED
|
@@ -15,19 +15,26 @@ installer:
|
|
|
15
15
|
language_label: "Langue"
|
|
16
16
|
ides_label: "IDEs"
|
|
17
17
|
mcps_label: "MCPs"
|
|
18
|
+
llm_provider_title: "Selectionnez votre fournisseur IA par defaut:"
|
|
19
|
+
llm_provider_claude: "Claude (Anthropic) — Ideal pour le raisonnement structure"
|
|
20
|
+
llm_provider_gemini: "Gemini (Google) — Fenetre de contexte de 1M tokens"
|
|
21
|
+
llm_provider_codex: "Codex (OpenAI) — Optimise pour la generation de code"
|
|
22
|
+
llm_provider_copilot: "Copilot (GitHub) — Multi-modele, integre a GitHub"
|
|
23
|
+
llm_provider_not_installed: "(CLI non detecte)"
|
|
24
|
+
llm_provider_label: "Fournisseur IA"
|
|
18
25
|
will_install: "Sera installe:"
|
|
19
26
|
agents_count: "13 definitions d'agents (phases DISCOVER, PLAN, BUILD, DEPLOY)"
|
|
20
27
|
workflows_count: "6 blueprints de workflow"
|
|
21
28
|
templates_count: "6 templates (PRD, PRD Brownfield, Architecture, Task, QA Gate, Quick Brief)"
|
|
22
|
-
constitution: "Constitution (
|
|
29
|
+
constitution: "Constitution (19 Articles + Preambule)"
|
|
23
30
|
session_mgmt: "Systeme de gestion de session"
|
|
24
|
-
quality_gates: "Quality gates (
|
|
31
|
+
quality_gates: "Quality gates (verdicts en 3 niveaux)"
|
|
25
32
|
proceed: "Proceder a l'installation?"
|
|
26
33
|
installing: "Installation de Chati.dev..."
|
|
27
34
|
created_chati: "Cree le repertoire de session .chati/"
|
|
28
35
|
created_framework: "Cree le repertoire du systeme chati.dev/ (agents, templates, workflows)"
|
|
29
36
|
created_commands: "Cree .claude/commands/ (routeur)"
|
|
30
|
-
installed_constitution: "Installee la Constitution (Articles I-
|
|
37
|
+
installed_constitution: "Installee la Constitution (Articles I-XIX)"
|
|
31
38
|
created_session: "Cree le schema session.yaml"
|
|
32
39
|
created_claude_md: "Cree CLAUDE.md"
|
|
33
40
|
configured_mcps: "MCPs configures:"
|
|
@@ -35,7 +42,7 @@ installer:
|
|
|
35
42
|
agents_valid: "Les 13 agents implementent 8 protocoles"
|
|
36
43
|
handoff_ok: "Protocole de passation: OK"
|
|
37
44
|
validation_ok: "Criteres d'auto-validation: OK"
|
|
38
|
-
constitution_ok: "Constitution:
|
|
45
|
+
constitution_ok: "Constitution: 19 articles verifies"
|
|
39
46
|
created_memories: "Cree .chati/memories/ (Memory Layer)"
|
|
40
47
|
installed_intelligence: "Installee Intelligence Layer (Context Engine, Memory, Registry)"
|
|
41
48
|
intelligence_valid: "Intelligence: 6 fichiers de spec verifies"
|
package/framework/i18n/pt.yaml
CHANGED
|
@@ -15,19 +15,26 @@ installer:
|
|
|
15
15
|
language_label: "Idioma"
|
|
16
16
|
ides_label: "IDEs"
|
|
17
17
|
mcps_label: "MCPs"
|
|
18
|
+
llm_provider_title: "Selecione seu provedor de IA padrao:"
|
|
19
|
+
llm_provider_claude: "Claude (Anthropic) — Melhor para raciocinio estruturado"
|
|
20
|
+
llm_provider_gemini: "Gemini (Google) — Janela de contexto de 1M tokens"
|
|
21
|
+
llm_provider_codex: "Codex (OpenAI) — Otimizado para geracao de codigo"
|
|
22
|
+
llm_provider_copilot: "Copilot (GitHub) — Multi-modelo, integrado ao GitHub"
|
|
23
|
+
llm_provider_not_installed: "(CLI nao detectada)"
|
|
24
|
+
llm_provider_label: "Provedor de IA"
|
|
18
25
|
will_install: "Sera instalado:"
|
|
19
26
|
agents_count: "13 definicoes de agentes (fases DISCOVER, PLAN, BUILD, DEPLOY)"
|
|
20
27
|
workflows_count: "6 blueprints de workflow"
|
|
21
28
|
templates_count: "6 templates (PRD, PRD Brownfield, Arquitetura, Task, QA Gate, Quick Brief)"
|
|
22
|
-
constitution: "Constituicao (
|
|
29
|
+
constitution: "Constituicao (19 Artigos + Preambulo)"
|
|
23
30
|
session_mgmt: "Sistema de gerenciamento de sessao"
|
|
24
|
-
quality_gates: "Quality gates (
|
|
31
|
+
quality_gates: "Quality gates (veredictos em 3 niveis)"
|
|
25
32
|
proceed: "Prosseguir com a instalacao?"
|
|
26
33
|
installing: "Instalando Chati.dev..."
|
|
27
34
|
created_chati: "Criado diretorio de sessao .chati/"
|
|
28
35
|
created_framework: "Criado diretorio do sistema chati.dev/ (agentes, templates, workflows)"
|
|
29
36
|
created_commands: "Criado .claude/commands/ (roteador)"
|
|
30
|
-
installed_constitution: "Instalada Constituicao (Artigos I-
|
|
37
|
+
installed_constitution: "Instalada Constituicao (Artigos I-XIX)"
|
|
31
38
|
created_session: "Criado schema session.yaml"
|
|
32
39
|
created_claude_md: "Criado CLAUDE.md"
|
|
33
40
|
configured_mcps: "MCPs configurados:"
|
|
@@ -35,7 +42,7 @@ installer:
|
|
|
35
42
|
agents_valid: "Todos os 13 agentes implementam 8 protocolos"
|
|
36
43
|
handoff_ok: "Protocolo de handoff: OK"
|
|
37
44
|
validation_ok: "Criterios de auto-validacao: OK"
|
|
38
|
-
constitution_ok: "Constituicao:
|
|
45
|
+
constitution_ok: "Constituicao: 19 artigos verificados"
|
|
39
46
|
created_memories: "Criado .chati/memories/ (Memory Layer)"
|
|
40
47
|
installed_intelligence: "Instalada Intelligence Layer (Context Engine, Memory, Registry)"
|
|
41
48
|
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-XIX) | ALWAYS (non-negotiable) |
|
|
29
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 |
|
|
@@ -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-XIX 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.
|
|
@@ -161,3 +161,32 @@ If Smart Continuation is insufficient, the orchestrator spawns a new session:
|
|
|
161
161
|
---
|
|
162
162
|
|
|
163
163
|
*Context Engine v1.0 — Chati.dev Intelligence Layer*
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Multi-CLI Context Strategy (v3.0.0)
|
|
168
|
+
|
|
169
|
+
When agents execute on different CLI providers, context injection adapts to the provider's capabilities:
|
|
170
|
+
|
|
171
|
+
### Hook-Based Providers (Claude Code, Gemini CLI, Copilot CLI)
|
|
172
|
+
- PRISM context injected via `UserPromptSubmit` hook
|
|
173
|
+
- Mode governance enforced via `PreToolUse` hook
|
|
174
|
+
- Constitution guard enforced via `PreToolUse` hook
|
|
175
|
+
- Full governance parity with Claude Code
|
|
176
|
+
|
|
177
|
+
### Prompt-Based Providers (Codex CLI)
|
|
178
|
+
- PRISM context embedded directly in the spawned prompt (via prompt-builder)
|
|
179
|
+
- Governance directives included as system instructions in the prompt
|
|
180
|
+
- Softer enforcement — relies on model compliance rather than hook interception
|
|
181
|
+
- Write scope restrictions communicated via prompt, not blocked at tool level
|
|
182
|
+
|
|
183
|
+
### Context File Mapping
|
|
184
|
+
| Provider | Context File | Generation |
|
|
185
|
+
|----------|-------------|------------|
|
|
186
|
+
| Claude Code | CLAUDE.md | Native (already exists) |
|
|
187
|
+
| Gemini CLI | GEMINI.md | Auto-generated from CLAUDE.md |
|
|
188
|
+
| Codex CLI | AGENTS.md | Auto-generated from CLAUDE.md |
|
|
189
|
+
| Copilot CLI | All three | Reads CLAUDE.md, GEMINI.md, AGENTS.md natively |
|
|
190
|
+
|
|
191
|
+
### Cross-Provider Handoff
|
|
192
|
+
Handoff format is identical regardless of which provider executed the agent. The two-layer structure (Article VIII) ensures any provider can read any handoff. Session state in `.chati/session.yaml` is the single source of truth — all providers read from and write to the same session file.
|
|
@@ -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 >= 19 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)
|
|
@@ -185,3 +185,20 @@ This prevents cross-contamination while enabling knowledge sharing.
|
|
|
185
185
|
---
|
|
186
186
|
|
|
187
187
|
*Memory Layer v1.0 — Chati.dev Intelligence Layer*
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Cross-CLI Memory Persistence (v3.0.0)
|
|
192
|
+
|
|
193
|
+
Memory is provider-agnostic. All providers read from and write to the same memory store (`.chati/memories/`).
|
|
194
|
+
|
|
195
|
+
### Memory Capture Across Providers
|
|
196
|
+
- **Hook-based providers**: Capture via `PreCompact` hook (session-digest.js)
|
|
197
|
+
- **Prompt-based providers**: Capture via explicit instructions in the spawned prompt — the agent is instructed to output a `<chati-memory>` block that the orchestrator parses from stdout
|
|
198
|
+
|
|
199
|
+
### Memory Injection Across Providers
|
|
200
|
+
- **Hook-based providers**: Injected via PRISM engine hook (prism-engine.js)
|
|
201
|
+
- **Prompt-based providers**: Relevant memories are included in the spawned prompt by the prompt-builder
|
|
202
|
+
|
|
203
|
+
### Gotchas Auto-Capture
|
|
204
|
+
Gotchas are captured regardless of provider. The auto-capture engine monitors agent stdout for error patterns and tracks frequency. When an error pattern appears 3+ times across any provider combination, a gotcha is auto-created.
|
|
@@ -45,10 +45,15 @@ Before determining state, check if the user passed a subcommand:
|
|
|
45
45
|
-> Resume session with full context recovery
|
|
46
46
|
-> Re-activate session lock
|
|
47
47
|
|
|
48
|
+
/chati providers:
|
|
49
|
+
-> Display enabled providers and per-agent overrides (see Provider Routing section)
|
|
50
|
+
-> Stay locked
|
|
51
|
+
|
|
48
52
|
/chati help:
|
|
49
53
|
-> Display available commands:
|
|
50
54
|
/chati Start or resume session
|
|
51
55
|
/chati status Show project dashboard
|
|
56
|
+
/chati providers List enabled providers and overrides
|
|
52
57
|
/chati resume Resume from continuation file
|
|
53
58
|
/chati exit Save and exit session
|
|
54
59
|
/chati help Show this help
|
|
@@ -338,20 +343,20 @@ Model selection is **enforced by construction**: the orchestrator passes `--mode
|
|
|
338
343
|
|
|
339
344
|
### Model Map (Quick Reference)
|
|
340
345
|
|
|
341
|
-
| Agent | Default | Upgrade Condition |
|
|
342
|
-
|
|
343
|
-
| greenfield-wu | haiku | sonnet if multi-stack or enterprise |
|
|
344
|
-
| brownfield-wu | opus | no downgrade |
|
|
345
|
-
| brief | sonnet | opus if enterprise or 10+ integrations |
|
|
346
|
-
| detail | opus | no downgrade |
|
|
347
|
-
| architect | opus | no downgrade |
|
|
348
|
-
| ux | sonnet | opus if design system from scratch |
|
|
349
|
-
| phases | sonnet | opus if 20+ requirements |
|
|
350
|
-
| tasks | sonnet | opus if 50+ tasks |
|
|
351
|
-
| qa-planning | opus | no downgrade |
|
|
352
|
-
| dev | opus | no downgrade |
|
|
353
|
-
| qa-implementation | opus | no downgrade |
|
|
354
|
-
| devops | sonnet | opus if multi-environment or IaC |
|
|
346
|
+
| Agent | Default | Upgrade Condition | Provider |
|
|
347
|
+
|-------|---------|-------------------|----------|
|
|
348
|
+
| greenfield-wu | haiku | sonnet if multi-stack or enterprise | claude (default) |
|
|
349
|
+
| brownfield-wu | opus | no downgrade | claude (default) | gemini (when codebase > 100K LOC) |
|
|
350
|
+
| brief | sonnet | opus if enterprise or 10+ integrations | claude (default) |
|
|
351
|
+
| detail | opus | no downgrade | claude (default) |
|
|
352
|
+
| architect | opus | no downgrade | claude (default) |
|
|
353
|
+
| ux | sonnet | opus if design system from scratch | claude (default) |
|
|
354
|
+
| phases | sonnet | opus if 20+ requirements | claude (default) |
|
|
355
|
+
| tasks | sonnet | opus if 50+ tasks | claude (default) |
|
|
356
|
+
| qa-planning | opus | no downgrade | claude (default) |
|
|
357
|
+
| dev | opus | no downgrade | claude (default) | gemini (when large codebase tasks) |
|
|
358
|
+
| qa-implementation | opus | no downgrade | claude (default) |
|
|
359
|
+
| devops | sonnet | opus if multi-environment or IaC | claude (default) |
|
|
355
360
|
|
|
356
361
|
### Enforcement
|
|
357
362
|
|
|
@@ -383,6 +388,81 @@ model_selections:
|
|
|
383
388
|
|
|
384
389
|
---
|
|
385
390
|
|
|
391
|
+
## Provider Routing
|
|
392
|
+
|
|
393
|
+
The orchestrator selects the optimal provider for each agent based on the task context, codebase characteristics, and configuration. Provider routing determines WHICH CLI or API backend executes the agent, while model selection determines WHICH model runs within that provider.
|
|
394
|
+
|
|
395
|
+
### Provider Selection Priority
|
|
396
|
+
|
|
397
|
+
```
|
|
398
|
+
Resolution order (highest to lowest priority):
|
|
399
|
+
1. agent_overrides (config.yaml) — explicit per-agent provider override
|
|
400
|
+
2. Agent default (AGENT_MODELS map) — provider defined in agent Identity section
|
|
401
|
+
3. Primary provider — the project-level default provider (claude)
|
|
402
|
+
|
|
403
|
+
Example resolution:
|
|
404
|
+
config.yaml has: agent_overrides.brownfield-wu.provider = gemini
|
|
405
|
+
Agent default has: Provider: claude (default) | gemini (when codebase > 100K LOC)
|
|
406
|
+
Primary provider: claude
|
|
407
|
+
|
|
408
|
+
-> Result: gemini (config.yaml override wins)
|
|
409
|
+
|
|
410
|
+
If no override exists and no agent default specifies a condition match:
|
|
411
|
+
-> Result: claude (primary provider fallback)
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Provider Fallback
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
If the selected provider is unavailable (CLI not installed, API unreachable, auth failure):
|
|
418
|
+
1. Log the failure:
|
|
419
|
+
provider_fallback:
|
|
420
|
+
agent: {name}
|
|
421
|
+
intended_provider: {selected}
|
|
422
|
+
fallback_provider: claude
|
|
423
|
+
reason: "{error_message}"
|
|
424
|
+
timestamp: "{now}"
|
|
425
|
+
2. Fall back to the primary provider (claude)
|
|
426
|
+
3. Continue agent execution with fallback provider
|
|
427
|
+
4. Record the fallback in session.yaml for audit
|
|
428
|
+
|
|
429
|
+
The primary provider (claude) is always the last-resort fallback.
|
|
430
|
+
Provider fallback NEVER blocks the pipeline — it degrades gracefully.
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### Subcommand: /chati providers
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
When the user types `/chati providers`:
|
|
437
|
+
Display enabled providers and their status:
|
|
438
|
+
|
|
439
|
+
Providers:
|
|
440
|
+
claude PRIMARY Enabled Claude Code CLI
|
|
441
|
+
gemini - Enabled Gemini CLI
|
|
442
|
+
codex - Disabled OpenAI Codex CLI
|
|
443
|
+
|
|
444
|
+
Agent Overrides (from config.yaml):
|
|
445
|
+
brownfield-wu -> gemini (when codebase > 100K LOC)
|
|
446
|
+
dev -> gemini (when large codebase tasks)
|
|
447
|
+
|
|
448
|
+
To configure: edit chati.dev/config.yaml -> providers section
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Provider Logging
|
|
452
|
+
|
|
453
|
+
```yaml
|
|
454
|
+
# Appended to session.yaml on each agent activation
|
|
455
|
+
provider_selections:
|
|
456
|
+
- agent: brownfield-wu
|
|
457
|
+
resolved_provider: gemini
|
|
458
|
+
resolution_source: agent_default # config_override | agent_default | primary
|
|
459
|
+
reason: "codebase > 100K LOC"
|
|
460
|
+
model: opus
|
|
461
|
+
timestamp: "2026-..."
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
386
466
|
## Mode Enforcement Protocol
|
|
387
467
|
|
|
388
468
|
### Scope Validation
|
|
@@ -307,7 +307,7 @@ categories:
|
|
|
307
307
|
- "Goals: What do they want to achieve?"
|
|
308
308
|
- "Frustrations: What annoys them about current solutions?"
|
|
309
309
|
- "Typical day: When/where/how do they use the product?"
|
|
310
|
-
- "Key scenario:
|
|
310
|
+
- "Key scenario: Define one key scenario for this persona"
|
|
311
311
|
- "Prioritize personas by frequency of use"
|
|
312
312
|
anti_patterns:
|
|
313
313
|
- "Creating too many personas (3-5 is ideal)"
|
|
@@ -500,7 +500,7 @@ categories:
|
|
|
500
500
|
steps:
|
|
501
501
|
- "Top row: user activities (high-level goals)"
|
|
502
502
|
- "Second row: user tasks (steps within each activity)"
|
|
503
|
-
- "Below each task:
|
|
503
|
+
- "Below each task: specific features and requirements"
|
|
504
504
|
- "Draw horizontal lines for release boundaries"
|
|
505
505
|
- "Everything above first line = MVP"
|
|
506
506
|
- "Validate: Does MVP deliver end-to-end value?"
|
|
@@ -37,6 +37,50 @@
|
|
|
37
37
|
"type": "array",
|
|
38
38
|
"items": { "type": "string" },
|
|
39
39
|
"description": "IDEs configured during installation"
|
|
40
|
+
},
|
|
41
|
+
"providers": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "CLI provider configuration",
|
|
44
|
+
"properties": {
|
|
45
|
+
"claude": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"enabled": { "type": "boolean", "default": true },
|
|
49
|
+
"primary": { "type": "boolean", "default": true }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"gemini": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"enabled": { "type": "boolean", "default": false },
|
|
56
|
+
"model_default": { "type": "string", "default": "pro" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"codex": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"enabled": { "type": "boolean", "default": false },
|
|
63
|
+
"model_default": { "type": "string", "default": "codex" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"copilot": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"enabled": { "type": "boolean", "default": false }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"agent_overrides": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"description": "Per-agent provider/model overrides",
|
|
77
|
+
"additionalProperties": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"provider": { "type": "string" },
|
|
81
|
+
"model": { "type": "string" }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
40
84
|
}
|
|
41
85
|
}
|
|
42
86
|
}
|
|
@@ -19,6 +19,32 @@
|
|
|
19
19
|
"default": "interactive",
|
|
20
20
|
"description": "interactive = agent-driven guided mode; autonomous = Ralph Wiggum mode (Dev agent)"
|
|
21
21
|
},
|
|
22
|
+
"execution_profile": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["explore", "guided", "autonomous"],
|
|
25
|
+
"default": "guided",
|
|
26
|
+
"description": "Current execution profile governing confirmation requirements"
|
|
27
|
+
},
|
|
28
|
+
"providers_enabled": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "type": "string" },
|
|
31
|
+
"default": ["claude"],
|
|
32
|
+
"description": "List of enabled CLI providers"
|
|
33
|
+
},
|
|
34
|
+
"profile_transitions": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"from": { "type": "string" },
|
|
40
|
+
"to": { "type": "string" },
|
|
41
|
+
"reason": { "type": "string" },
|
|
42
|
+
"timestamp": { "type": "string", "format": "date-time" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"default": [],
|
|
46
|
+
"description": "History of execution profile changes"
|
|
47
|
+
},
|
|
22
48
|
"current_agent": {
|
|
23
49
|
"type": "string",
|
|
24
50
|
"description": "Currently active agent name"
|
|
@@ -143,6 +169,7 @@
|
|
|
143
169
|
"recommended": { "enum": ["opus", "sonnet", "haiku"], "description": "Recommended model" },
|
|
144
170
|
"actual": { "enum": ["opus", "sonnet", "haiku"], "description": "Model actually used" },
|
|
145
171
|
"reason": { "type": "string", "description": "Why this model was selected (default, upgrade condition, no downgrade)" },
|
|
172
|
+
"provider": { "type": "string", "description": "CLI provider used (claude, gemini, codex, copilot)" },
|
|
146
173
|
"timestamp": { "type": "string", "format": "date-time" }
|
|
147
174
|
}
|
|
148
175
|
}
|
|
@@ -351,7 +351,7 @@ estimated_total_update_effort:
|
|
|
351
351
|
|
|
352
352
|
recommendations:
|
|
353
353
|
- Fix critical lodash vulnerability immediately
|
|
354
|
-
- Plan React 17→18 migration as dedicated
|
|
354
|
+
- Plan React 17→18 migration as dedicated phase (16 hours)
|
|
355
355
|
- Remove unused packages (uuid, color) to reduce bloat
|
|
356
356
|
- Replace moment with date-fns for bundle size reduction (523 KB savings)
|
|
357
357
|
- Standardize on single HTTP client (axios)
|