chati-dev 2.0.5 → 2.0.7

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