chati-dev 2.0.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +32 -21
  2. package/assets/logo - co/314/201pia.png +0 -0
  3. package/assets/logo - co/314/201pia.svg" +42 -0
  4. package/bin/chati.js +3 -3
  5. package/framework/agents/{planning → discover}/brief.md +24 -2
  6. package/framework/agents/{planning → discover}/brownfield-wu.md +1 -1
  7. package/framework/agents/{planning → discover}/greenfield-wu.md +1 -1
  8. package/framework/agents/{planning → plan}/architect.md +1 -1
  9. package/framework/agents/{planning → plan}/detail.md +1 -1
  10. package/framework/agents/{planning → plan}/phases.md +1 -1
  11. package/framework/agents/{planning → plan}/tasks.md +1 -1
  12. package/framework/agents/{planning → plan}/ux.md +1 -1
  13. package/framework/agents/quality/qa-implementation.md +53 -4
  14. package/framework/agents/quality/qa-planning.md +53 -2
  15. package/framework/config.yaml +3 -3
  16. package/framework/constitution.md +4 -4
  17. package/framework/context/quality.md +1 -1
  18. package/framework/context/root.md +5 -4
  19. package/framework/data/entity-registry.yaml +35 -11
  20. package/framework/domains/agents/brief.yaml +14 -0
  21. package/framework/domains/agents/qa-implementation.yaml +16 -0
  22. package/framework/domains/agents/qa-planning.yaml +16 -0
  23. package/framework/domains/constitution.yaml +6 -2
  24. package/framework/domains/workflows/brownfield-discovery.yaml +5 -4
  25. package/framework/domains/workflows/quick-flow.yaml +23 -0
  26. package/framework/hooks/mode-governance.js +14 -2
  27. package/framework/hooks/model-governance.js +5 -1
  28. package/framework/hooks/prism-engine.js +1 -1
  29. package/framework/hooks/session-digest.js +6 -2
  30. package/framework/hooks/settings.json +11 -0
  31. package/framework/i18n/en.yaml +3 -3
  32. package/framework/i18n/es.yaml +3 -3
  33. package/framework/i18n/fr.yaml +3 -3
  34. package/framework/i18n/pt.yaml +3 -3
  35. package/framework/intelligence/context-engine.md +2 -2
  36. package/framework/intelligence/decision-engine.md +2 -2
  37. package/framework/manifest.json +5 -0
  38. package/framework/manifest.sig +1 -0
  39. package/framework/orchestrator/chati.md +68 -20
  40. package/framework/patterns/elicitation-library.yaml +592 -0
  41. package/framework/patterns/elicitation.md +2 -0
  42. package/framework/quality-gates/planning-gate.md +1 -1
  43. package/framework/schemas/session.schema.json +36 -3
  44. package/framework/tasks/architect-api-design.md +1 -1
  45. package/framework/tasks/architect-consolidate.md +1 -1
  46. package/framework/tasks/architect-db-design.md +1 -1
  47. package/framework/tasks/architect-design.md +1 -1
  48. package/framework/tasks/architect-security-review.md +1 -1
  49. package/framework/tasks/architect-stack-selection.md +1 -1
  50. package/framework/tasks/brief-consolidate.md +1 -1
  51. package/framework/tasks/brief-constraint-identify.md +1 -1
  52. package/framework/tasks/brief-extract-requirements.md +1 -1
  53. package/framework/tasks/brief-stakeholder-map.md +1 -1
  54. package/framework/tasks/brief-validate-completeness.md +1 -1
  55. package/framework/tasks/brownfield-wu-architecture-map.md +1 -1
  56. package/framework/tasks/brownfield-wu-deep-discovery.md +1 -1
  57. package/framework/tasks/brownfield-wu-dependency-scan.md +1 -1
  58. package/framework/tasks/brownfield-wu-migration-plan.md +1 -1
  59. package/framework/tasks/brownfield-wu-report.md +1 -1
  60. package/framework/tasks/brownfield-wu-risk-assess.md +1 -1
  61. package/framework/tasks/detail-acceptance-criteria.md +1 -1
  62. package/framework/tasks/detail-consolidate.md +1 -1
  63. package/framework/tasks/detail-edge-case-analysis.md +1 -1
  64. package/framework/tasks/detail-expand-prd.md +1 -1
  65. package/framework/tasks/detail-nfr-extraction.md +1 -1
  66. package/framework/tasks/greenfield-wu-analyze-empty.md +1 -1
  67. package/framework/tasks/greenfield-wu-report.md +1 -1
  68. package/framework/tasks/greenfield-wu-scaffold-detection.md +1 -1
  69. package/framework/tasks/greenfield-wu-tech-stack-assess.md +1 -1
  70. package/framework/tasks/orchestrator-deviation.md +2 -2
  71. package/framework/tasks/orchestrator-escalate.md +1 -1
  72. package/framework/tasks/orchestrator-handoff.md +3 -3
  73. package/framework/tasks/orchestrator-mode-switch.md +16 -5
  74. package/framework/tasks/orchestrator-preview.md +181 -0
  75. package/framework/tasks/orchestrator-resume.md +2 -2
  76. package/framework/tasks/orchestrator-route.md +5 -4
  77. package/framework/tasks/orchestrator-status.md +4 -4
  78. package/framework/tasks/orchestrator-suggest-mode.md +7 -7
  79. package/framework/tasks/phases-breakdown.md +1 -1
  80. package/framework/tasks/phases-dependency-mapping.md +1 -1
  81. package/framework/tasks/phases-mvp-scoping.md +1 -1
  82. package/framework/tasks/qa-impl-consolidate.md +2 -2
  83. package/framework/tasks/qa-impl-verdict.md +2 -2
  84. package/framework/tasks/qa-planning-consolidate.md +1 -1
  85. package/framework/tasks/qa-planning-coverage-plan.md +2 -2
  86. package/framework/tasks/qa-planning-gate-define.md +1 -1
  87. package/framework/tasks/qa-planning-risk-matrix.md +1 -1
  88. package/framework/tasks/qa-planning-test-strategy.md +1 -1
  89. package/framework/tasks/tasks-acceptance-write.md +1 -1
  90. package/framework/tasks/tasks-consolidate.md +1 -1
  91. package/framework/tasks/tasks-decompose.md +1 -1
  92. package/framework/tasks/tasks-estimate.md +1 -1
  93. package/framework/tasks/ux-a11y-check.md +1 -1
  94. package/framework/tasks/ux-component-map.md +1 -1
  95. package/framework/tasks/ux-consolidate.md +1 -1
  96. package/framework/tasks/ux-user-flow.md +1 -1
  97. package/framework/tasks/ux-wireframe.md +1 -1
  98. package/framework/templates/quick-brief-tmpl.yaml +90 -0
  99. package/framework/workflows/brownfield-discovery.yaml +7 -7
  100. package/framework/workflows/brownfield-fullstack.yaml +24 -10
  101. package/framework/workflows/brownfield-service.yaml +41 -5
  102. package/framework/workflows/brownfield-ui.yaml +41 -5
  103. package/framework/workflows/greenfield-fullstack.yaml +24 -10
  104. package/framework/workflows/quick-flow.yaml +125 -0
  105. package/package.json +4 -4
  106. package/scripts/bundle-framework.js +1 -1
  107. package/scripts/populate-entity-registry.js +1 -1
  108. package/scripts/semantic-lint.js +2 -2
  109. package/scripts/validate-agents.js +2 -1
  110. package/scripts/validate-package.js +1 -1
  111. package/scripts/validate-tasks.js +1 -1
  112. package/src/autonomy/progress-reporter.js +26 -19
  113. package/src/context/engine.js +1 -1
  114. package/src/context/layers/l1-global.js +17 -5
  115. package/src/dashboard/layout.js +2 -1
  116. package/src/gates/g1-planning-complete.js +10 -10
  117. package/src/installer/core.js +14 -12
  118. package/src/installer/templates.js +1 -1
  119. package/src/installer/validator.js +8 -8
  120. package/src/intelligence/registry-manager.js +4 -4
  121. package/src/memory/session-digest.js +1 -1
  122. package/src/orchestrator/agent-selector.js +11 -11
  123. package/src/orchestrator/intent-classifier.js +12 -8
  124. package/src/orchestrator/pipeline-manager.js +100 -3
  125. package/src/orchestrator/pipeline-state.js +1 -1
  126. package/src/orchestrator/session-manager.js +13 -4
  127. package/src/preview/detector.js +238 -0
  128. package/src/preview/index.js +20 -0
  129. package/src/preview/launcher.js +235 -0
  130. package/src/preview/log-buffer.js +103 -0
  131. package/src/tasks/executor.js +1 -1
  132. package/src/tasks/loader.js +1 -1
  133. package/src/terminal/prompt-builder.js +10 -10
  134. package/src/wizard/i18n.js +3 -3
package/README.md CHANGED
@@ -33,8 +33,8 @@ AI-assisted development today suffers from three critical issues:
33
33
  Chati.dev introduces **Agent-Driven Development**: a pipeline of 13 specialized agents where each agent owns a specific phase, produces validated artifacts, and hands off context to the next agent. An Intelligence Layer ensures context is never lost, knowledge persists across sessions, and the user never accidentally leaves the system.
34
34
 
35
35
  ```
36
- PLANNING (planning) → Quality Gate → BUILD → Quality Gate → DEPLOY
37
- 8 agents QA-Planning Dev QA-Impl DevOps
36
+ DISCOVERPLAN → Quality Gate → BUILD → Quality Gate → DEPLOY
37
+ 3 agents 5 agents QA-Planning Dev QA-Impl DevOps
38
38
  ```
39
39
 
40
40
  ### Key Innovations
@@ -55,17 +55,30 @@ PLANNING (planning) → Quality Gate → BUILD → Quality Gate → DEPL
55
55
 
56
56
  ---
57
57
 
58
+ ## Prerequisites
59
+
60
+ - **Node.js** >= 20.0.0 ([download](https://nodejs.org/))
61
+ - **Claude Code** — the CLI for Claude ([install guide](https://docs.anthropic.com/en/docs/claude-code/overview))
62
+
63
+ Other supported IDEs: VS Code, Cursor, Gemini CLI, GitHub Copilot, AntiGravity (see [Supported IDEs](#supported-ides)).
64
+
65
+ ---
66
+
58
67
  ## Quick Start
59
68
 
60
- ### Install
69
+ ### 1. Install in your project
70
+
71
+ Open a terminal in your project directory:
61
72
 
62
73
  ```bash
63
74
  npx chati-dev init
64
75
  ```
65
76
 
66
- The wizard guides you through language and project type, then auto-configures Claude Code with the required MCPs.
77
+ The wizard asks your language and project type, then auto-configures Claude Code with the required MCPs.
78
+
79
+ ### 2. Start Claude Code and activate
67
80
 
68
- ### Activate
81
+ Open Claude Code in the same project directory, then type:
69
82
 
70
83
  ```
71
84
  /chati
@@ -73,6 +86,10 @@ The wizard guides you through language and project type, then auto-configures Cl
73
86
 
74
87
  The orchestrator loads your session, detects where you left off, and routes you to the right agent. You stay inside the system until you explicitly exit.
75
88
 
89
+ ### 3. Build
90
+
91
+ From here, the agents take over. You'll go through Planning (requirements, architecture, phases, tasks), Quality Gates, Build, and Deploy — all orchestrated automatically.
92
+
76
93
  ### Monitor
77
94
 
78
95
  ```bash
@@ -91,11 +108,12 @@ npx chati-dev status --watch # Auto-refresh every 5s
91
108
 
92
109
  ## Architecture
93
110
 
94
- ### 13 Agents, 4 Categories
111
+ ### 13 Agents, 5 Categories
95
112
 
96
113
  | Category | Agents | Purpose |
97
114
  |----------|--------|---------|
98
- | **PLANNING** | Greenfield WU, Brownfield WU, Brief, Detail (PRD), Architect, UX, Phases, Tasks | Planning & Requirements |
115
+ | **DISCOVER** | Greenfield WU, Brownfield WU, Brief | User Interaction & Discovery |
116
+ | **PLAN** | Detail (PRD), Architect, UX, Phases, Tasks | Autonomous Planning |
99
117
  | **Quality** | QA-Planning, QA-Implementation | Validation & Gates |
100
118
  | **BUILD** | Dev | Implementation |
101
119
  | **DEPLOY** | DevOps | Shipping |
@@ -114,13 +132,13 @@ User Request
114
132
 
115
133
  ├── In-conversation ──┐
116
134
  │ ▼
117
- │ ┌─── PLANNING (interactive) ───┐
135
+ │ ┌─── DISCOVER (interactive) ──┐
118
136
  │ │ WU → Brief │
119
137
  │ └─────────────────────────────┘
120
138
 
121
139
  ├── Spawns terminals ──────────────────────────┐
122
140
  │ ▼
123
- │ ┌─── PLANNING (autonomous) ─── Parallel ───┐
141
+ │ ┌─── PLAN (autonomous) ─────── Parallel ───┐
124
142
  │ │ Detail (opus) ──┐ │
125
143
  │ │ Architect (opus)├── run simultaneously │
126
144
  │ │ UX (sonnet) ────┘ │
@@ -267,13 +285,14 @@ your-project/
267
285
  ├── chati.dev/
268
286
  │ ├── orchestrator/ # Main orchestrator
269
287
  │ ├── agents/ # 13 agent definitions
270
- │ │ ├── planning/ # 8 planning agents
288
+ │ │ ├── discover/ # 3 discover agents (WU, Brief)
289
+ │ │ ├── plan/ # 5 plan agents (Detail, Architect, UX, Phases, Tasks)
271
290
  │ │ ├── quality/ # 2 quality gate agents
272
291
  │ │ ├── build/ # Dev agent
273
292
  │ │ └── deploy/ # DevOps agent
274
293
  │ ├── tasks/ # 72 task definitions (YAML frontmatter)
275
- │ ├── workflows/ # 5 workflow blueprints
276
- │ ├── templates/ # 5 artifact templates
294
+ │ ├── workflows/ # 6 workflow blueprints
295
+ │ ├── templates/ # 6 artifact templates
277
296
  │ ├── schemas/ # 5 JSON schemas for validation
278
297
  │ ├── intelligence/ # Context Engine, Memory Layer, Decision Engine
279
298
  │ ├── domains/ # Domain loading configs (per-agent, per-workflow)
@@ -282,7 +301,7 @@ your-project/
282
301
  │ ├── frameworks/ # Decision heuristics, quality dims
283
302
  │ ├── quality-gates/ # Planning & implementation gates
284
303
  │ ├── patterns/ # Elicitation patterns
285
- │ ├── data/ # Entity registry (48 artifacts)
304
+ │ ├── data/ # Entity registry (50 artifacts)
286
305
  │ ├── i18n/ # EN, PT, ES, FR translations
287
306
  │ ├── migrations/ # Version migration scripts
288
307
  │ ├── constitution.md # 17 Articles + Preamble
@@ -332,14 +351,6 @@ Upgrades include automatic backup, migrations, validation, and config merging. R
332
351
 
333
352
  ---
334
353
 
335
- ## Prerequisites
336
-
337
- - **Node.js** >= 20.0.0
338
- - **npm** >= 9.0.0
339
- - A supported IDE with AI assistant capabilities
340
-
341
- ---
342
-
343
354
  ## Contributing
344
355
 
345
356
  We welcome contributions from agents, templates, workflows, intelligence data, translations, and CLI improvements. Please see [CONTRIBUTING.md](.github/CONTRIBUTING.md) for guidelines.
Binary file
@@ -0,0 +1,42 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 200">
2
+ <defs>
3
+ <clipPath id="c">
4
+ <path d="M100,8 C155,8 190,40 190,90 C190,140 155,172 100,172 C82,172 66,167 52,159 L22,192 L34,155 C18,140 10,118 10,90 C10,40 45,8 100,8 Z"/>
5
+ </clipPath>
6
+ <radialGradient id="g" cx="38%" cy="30%" r="68%">
7
+ <stop offset="0%" stop-color="#8EC5F5"/>
8
+ <stop offset="40%" stop-color="#5DA2E2"/>
9
+ <stop offset="75%" stop-color="#4A90D9"/>
10
+ <stop offset="100%" stop-color="#2D6BAF"/>
11
+ </radialGradient>
12
+ <linearGradient id="r" x1="0" y1="0" x2="0" y2="1">
13
+ <stop offset="0%" stop-color="rgba(255,255,255,0.5)"/>
14
+ <stop offset="30%" stop-color="rgba(255,255,255,0.15)"/>
15
+ <stop offset="100%" stop-color="rgba(0,0,0,0)"/>
16
+ </linearGradient>
17
+ <linearGradient id="bs" x1="0" y1="0" x2="0" y2="1">
18
+ <stop offset="0%" stop-color="rgba(0,0,0,0)"/>
19
+ <stop offset="65%" stop-color="rgba(0,0,0,0)"/>
20
+ <stop offset="100%" stop-color="rgba(15,30,60,0.25)"/>
21
+ </linearGradient>
22
+ </defs>
23
+
24
+ <!-- Chat bubble -->
25
+ <path d="M100,8 C155,8 190,40 190,90 C190,140 155,172 100,172 C82,172 66,167 52,159 L22,192 L34,155 C18,140 10,118 10,90 C10,40 45,8 100,8 Z" fill="url(#g)"/>
26
+ <ellipse cx="82" cy="38" rx="52" ry="25" fill="rgba(255,255,255,0.18)" clip-path="url(#c)"/>
27
+ <path d="M100,8 C155,8 190,40 190,90 C190,140 155,172 100,172 C82,172 66,167 52,159 L22,192 L34,155 C18,140 10,118 10,90 C10,40 45,8 100,8 Z" fill="url(#bs)" clip-path="url(#c)"/>
28
+ <path d="M100,8 C155,8 190,40 190,90 C190,140 155,172 100,172 C82,172 66,167 52,159 L22,192 L34,155 C18,140 10,118 10,90 C10,40 45,8 100,8 Z" fill="none" stroke="url(#r)" stroke-width="1.5"/>
29
+
30
+ <!-- Eyes -->
31
+ <ellipse cx="72" cy="95" rx="18" ry="20" fill="#1a1a2e"/>
32
+ <ellipse cx="128" cy="95" rx="18" ry="20" fill="#1a1a2e"/>
33
+ <ellipse cx="65" cy="86" rx="7" ry="5" fill="rgba(255,255,255,0.55)"/>
34
+ <ellipse cx="121" cy="86" rx="7" ry="5" fill="rgba(255,255,255,0.55)"/>
35
+ <ellipse cx="77" cy="100" rx="3.5" ry="2.5" fill="rgba(255,255,255,0.3)"/>
36
+ <ellipse cx="133" cy="100" rx="3.5" ry="2.5" fill="rgba(255,255,255,0.3)"/>
37
+
38
+ <!-- "Chati.dev" text inline -->
39
+ <text x="210" y="122" font-family="ui-monospace,'SF Mono','Menlo','Consolas','Liberation Mono',monospace" font-weight="700" font-size="68" letter-spacing="-1">
40
+ <tspan fill="#e6edf3">Chati</tspan><tspan fill="#4A90D9">.</tspan><tspan fill="#e6edf3">dev</tspan>
41
+ </text>
42
+ </svg>
package/bin/chati.js CHANGED
@@ -253,9 +253,9 @@ async function main() {
253
253
  console.log();
254
254
  console.log('v1.0.0 - Initial Release');
255
255
  console.log(' - 13 agents (orchestrator + 12 specialized)');
256
- console.log(' - 5 workflow blueprints');
257
- console.log(' - 5 templates');
258
- console.log(' - Constitution (10 Articles + Preamble)');
256
+ console.log(' - 6 workflow blueprints');
257
+ console.log(' - 6 templates');
258
+ console.log(' - Constitution (17 Articles + Preamble)');
259
259
  console.log(' - Dashboard TUI');
260
260
  console.log(' - Upgrade system with migrations');
261
261
  console.log(' - 6 IDE support');
@@ -8,7 +8,7 @@ You are the **Brief Agent**, responsible for extracting and structuring the core
8
8
 
9
9
  - **Role**: Problem Extraction Specialist
10
10
  - **Pipeline Position**: 2nd agent (after WU)
11
- - **Category**: PLANNING
11
+ - **Category**: DISCOVER
12
12
  - **Question Answered**: WHAT is the problem?
13
13
  - **Duration**: 30-60 min
14
14
  - **Ratio**: 90% Human / 10% AI
@@ -42,6 +42,28 @@ Extract, analyze, and document the core problems, desired outcomes, target users
42
42
 
43
43
  ## Execution: 5 Phases
44
44
 
45
+ ### Elicitation Method Selection
46
+
47
+ Before starting extraction, select elicitation methods from the library:
48
+
49
+ ```
50
+ Reference: chati.dev/patterns/elicitation-library.yaml
51
+
52
+ Auto-selection based on context:
53
+ IF greenfield + vibecoder -> brain-dump, moscow, persona-building, playback
54
+ IF greenfield + power_user -> constraint-mapping, decision-matrix, pre-mortem
55
+ IF brownfield -> gap-analysis, constraint-mapping, event-storming-lite
56
+ IF many requirements (>20) -> add moscow, impact-effort-matrix
57
+ IF multiple stakeholders (>3) -> add stakeholder-map, six-thinking-hats
58
+
59
+ Primary methods for Brief: brain-dump, five-whys, moscow, stakeholder-map, playback
60
+ Secondary methods (use when needed): scamper, competitor-teardown, persona-building
61
+
62
+ Adapt method depth to user level:
63
+ Vibecoder: More open-discovery, explain why each question matters, use examples
64
+ Power User: More constraint-check, be concise, accept technical shorthand
65
+ ```
66
+
45
67
  ### Phase 1: Extraction (Brain Dump)
46
68
  ```
47
69
  Purpose: Get everything out of the user's head without filtering
@@ -52,7 +74,7 @@ Prompts:
52
74
  - "What happens if we don't build this?"
53
75
  - "Any references, competitors, or inspirations?"
54
76
 
55
- Technique: Open Discovery
77
+ Technique: Open Discovery (see elicitation-library.yaml -> brain-dump)
56
78
  Duration: 10-15 min
57
79
  Output: Raw, unfiltered user input captured
58
80
  ```
@@ -8,7 +8,7 @@ You are the **Brownfield WU Agent**, responsible for comprehensive discovery of
8
8
 
9
9
  - **Role**: Technical + Operational Discovery Agent
10
10
  - **Pipeline Position**: 1st agent (brownfield projects)
11
- - **Category**: PLANNING
11
+ - **Category**: DISCOVER
12
12
  - **Question Answered**: HOW does it work today? (both code and operations)
13
13
  - **Duration**: 1-4h depending on codebase size
14
14
  - **Ratio**: 40% Human / 60% AI
@@ -8,7 +8,7 @@ You are the **Greenfield WU Agent**, responsible for understanding HOW the user
8
8
 
9
9
  - **Role**: Operational Discovery Agent
10
10
  - **Pipeline Position**: 1st agent (greenfield projects)
11
- - **Category**: PLANNING
11
+ - **Category**: DISCOVER
12
12
  - **Question Answered**: HOW does it work today?
13
13
  - **Duration**: 15-30 min
14
14
  - **Ratio**: 70% Human / 30% AI
@@ -8,7 +8,7 @@ You are the **Architect Agent**, responsible for defining HOW the system will be
8
8
 
9
9
  - **Role**: Technical Design & Data Architecture Specialist
10
10
  - **Pipeline Position**: 4th (greenfield, after Detail) or 3rd (brownfield, after Brief)
11
- - **Category**: PLANNING
11
+ - **Category**: PLAN
12
12
  - **Question Answered**: HOW will we build it?
13
13
  - **Duration**: 45-90 min
14
14
  - **Ratio**: 50% Human / 50% AI
@@ -8,7 +8,7 @@ You are the **Detail Agent**, responsible for transforming the Brief into a form
8
8
 
9
9
  - **Role**: Product Specification & Requirements Analyst
10
10
  - **Pipeline Position**: 3rd (greenfield) or 4th (brownfield, after Architect)
11
- - **Category**: PLANNING
11
+ - **Category**: PLAN
12
12
  - **Question Answered**: WHAT will we build?
13
13
  - **Duration**: 45-90 min
14
14
  - **Ratio**: 70% Human / 30% AI
@@ -8,7 +8,7 @@ You are the **Phases Agent**, responsible for breaking the PRD into development
8
8
 
9
9
  - **Role**: Roadmap & Execution Planning Specialist
10
10
  - **Pipeline Position**: 6th (after UX)
11
- - **Category**: PLANNING
11
+ - **Category**: PLAN
12
12
  - **Question Answered**: WHEN will we build it?
13
13
  - **Duration**: 20-40 min
14
14
  - **Ratio**: 60% Human / 40% AI
@@ -8,7 +8,7 @@ You are the **Tasks Agent**, responsible for breaking phases into atomic, execut
8
8
 
9
9
  - **Role**: Work Breakdown & Task Definition Specialist
10
10
  - **Pipeline Position**: 7th (after Phases)
11
- - **Category**: PLANNING
11
+ - **Category**: PLAN
12
12
  - **Question Answered**: WHO does WHAT specifically?
13
13
  - **Duration**: 30-60 min
14
14
  - **Ratio**: 50% Human / 50% AI
@@ -8,7 +8,7 @@ You are the **UX Agent**, responsible for defining HOW the product will look and
8
8
 
9
9
  - **Role**: User Experience & Design System Specialist
10
10
  - **Pipeline Position**: 5th (after Architect in both flows)
11
- - **Category**: PLANNING
11
+ - **Category**: PLAN
12
12
  - **Question Answered**: HOW will it look/feel?
13
13
  - **Duration**: 30-60 min
14
14
  - **Ratio**: 60% Human / 40% AI
@@ -119,18 +119,56 @@ For each completed task:
119
119
  Flag unverified criteria for manual review
120
120
  ```
121
121
 
122
- ### Phase 5: Score & Decide
122
+ ### Phase 5: Adversarial Review (Mandatory)
123
+ ```
124
+ RULE: Every QA pass MUST identify minimum 3 findings.
125
+ Zero findings = suspiciously clean -> mandatory re-review.
126
+
127
+ Process:
128
+ 1. After Phases 1-4, count total findings across all categories
129
+ 2. IF findings < 3:
130
+ - Log: "Adversarial trigger: only {N} findings detected"
131
+ - Re-run Phases 2-4 with DEEPER analysis:
132
+ * Lower severity threshold (include INFO-level observations)
133
+ * Check for implicit issues (poor naming, missing edge cases, weak error messages)
134
+ * Look for "things that work but could fail under load/scale"
135
+ - Findings now include: improvements, suggestions, best-practice deviations
136
+ 3. IF findings still < 3 after deep re-review:
137
+ - Document explicitly WHY the code is genuinely clean
138
+ - This documentation itself counts as a finding (type: attestation)
139
+
140
+ Devil's Advocate Pass:
141
+ After initial review concludes APPROVED:
142
+ 1. Assume the opposite: "This code has a hidden flaw"
143
+ 2. Spend one focused pass actively seeking:
144
+ - Race conditions, memory leaks, unhandled edge cases
145
+ - Security assumptions that could be wrong
146
+ - Performance bottlenecks under 10x load
147
+ - Integration failures with external services
148
+ 3. Document what you looked for and why it held up (or didn't)
149
+ 4. This analysis is ALWAYS included in the report, even if no new issues found
150
+
151
+ Findings Classification:
152
+ - ERROR: Must be fixed before APPROVED
153
+ - WARNING: Should be fixed, can proceed with documentation
154
+ - SUGGESTION: Improvement opportunity, does not block
155
+ - ATTESTATION: Explicit documentation of why something is clean
156
+ ```
157
+
158
+ ### Phase 6: Score & Decide
123
159
  ```
124
160
  Calculate overall quality score:
125
- Tests: weight 0.30
126
- Coverage: weight 0.20
161
+ Tests: weight 0.25
162
+ Coverage: weight 0.15
127
163
  Security: weight 0.25
128
164
  Code Quality: weight 0.15
129
165
  Acceptance Criteria: weight 0.10
166
+ Adversarial Review: weight 0.10
130
167
 
131
168
  Result:
132
- - All checks pass -> APPROVED -> proceed to DevOps
169
+ - All checks pass AND adversarial review complete -> APPROVED -> proceed to DevOps
133
170
  - Any check fails -> enter silent correction loop
171
+ - Adversarial review incomplete -> CANNOT approve (re-run Phase 5)
134
172
  ```
135
173
 
136
174
  ---
@@ -233,6 +271,17 @@ Save to: `chati.dev/artifacts/8-Validation/qa-implementation-report.md`
233
271
  |------|----------|----------|--------|
234
272
  | T1.1 | {criterion} | Yes/No | {OK/FAIL} |
235
273
 
274
+ ## Adversarial Review
275
+ | # | Type | Category | Description | Severity |
276
+ |---|------|----------|-------------|----------|
277
+ | 1 | {finding/attestation} | {security/performance/quality} | {desc} | {error/warning/suggestion/attestation} |
278
+
279
+ ### Devil's Advocate Analysis
280
+ **Initial conclusion**: {APPROVED/NEEDS CORRECTION}
281
+ **Adversarial hypothesis**: "This code has a hidden flaw in {area}"
282
+ **Investigation**: {what was checked and why}
283
+ **Result**: {held up / new issue found: {desc}}
284
+
236
285
  ## Correction History
237
286
  | Loop | Issue | Resolution |
238
287
  |------|-------|------------|
@@ -121,7 +121,44 @@ For each agent that completed PLANNING:
121
121
  - Example: Brief said "Brief is well-written" (subjective, not binary)
122
122
  ```
123
123
 
124
- ### Step 4: Calculate Score & Decide
124
+ ### Step 4: Adversarial Review (Mandatory)
125
+
126
+ ```
127
+ RULE: Every planning validation MUST identify minimum 3 findings.
128
+ Zero findings = suspiciously clean -> mandatory re-review.
129
+
130
+ Process:
131
+ 1. After Steps 1-3, count total findings (flags, penalties, observations)
132
+ 2. IF findings < 3:
133
+ - Log: "Adversarial trigger: only {N} findings detected"
134
+ - Re-analyze with DEEPER scrutiny:
135
+ * Check for implicit assumptions not documented
136
+ * Look for missing non-functional requirements (performance, security, a11y)
137
+ * Verify edge cases are covered in acceptance criteria
138
+ * Challenge requirement prioritization
139
+ - Findings now include: suggestions, missing considerations, best-practice gaps
140
+ 3. IF findings still < 3 after deep re-review:
141
+ - Document explicitly WHY the planning is genuinely complete
142
+ - This documentation itself counts as a finding (type: attestation)
143
+
144
+ Devil's Advocate Pass:
145
+ After traceability validation concludes APPROVED:
146
+ 1. Assume the plan has a hidden flaw
147
+ 2. Challenge:
148
+ - "What requirement is missing that will surface during BUILD?"
149
+ - "Which acceptance criterion is too vague to test objectively?"
150
+ - "What stakeholder need was mentioned but not traced to a task?"
151
+ - "Which architectural decision might not scale?"
152
+ 3. Document the adversarial analysis in the report
153
+
154
+ Findings Classification:
155
+ - GAP: Missing traceability link (blocks approval)
156
+ - WEAK: Subjective or vague criterion (should be fixed)
157
+ - SUGGESTION: Improvement opportunity (does not block)
158
+ - ATTESTATION: Explicit justification of completeness
159
+ ```
160
+
161
+ ### Step 5: Calculate Score & Decide
125
162
 
126
163
  ```
127
164
  Starting score: 100
@@ -134,10 +171,12 @@ Scoring:
134
171
  - Critical gap: -20 points
135
172
  - Placeholder: -5 points each
136
173
  - Agent defined weak criteria: -10 points
174
+ - Adversarial review incomplete: -15 points
137
175
 
138
176
  Result:
139
- - Score >= 95: APPROVED -> GO to BUILD
177
+ - Score >= 95 AND adversarial review complete: APPROVED -> GO to BUILD
140
178
  - Score < 95: Enter silent correction loop
179
+ - Adversarial review incomplete: CANNOT approve (re-run Step 4)
141
180
  ```
142
181
 
143
182
  ---
@@ -208,6 +247,18 @@ Save to: `chati.dev/artifacts/7-QA-Planning/qa-planning-report.md`
208
247
  |------|------|------|
209
248
  | {file} | {placeholder} | {line} |
210
249
 
250
+ ## Adversarial Review
251
+ | # | Type | Area | Description | Severity |
252
+ |---|------|------|-------------|----------|
253
+ | 1 | {gap/weak/suggestion/attestation} | {traceability/criteria/scope} | {desc} | {blocks/should-fix/info} |
254
+
255
+ ### Devil's Advocate Analysis
256
+ **Initial conclusion**: {APPROVED/NEEDS CORRECTION}
257
+ **Adversarial challenges**:
258
+ 1. "What requirement is missing?" → {finding or "None — all Brief problems traced to tasks"}
259
+ 2. "Which criterion is too vague?" → {finding or "None — all GWT criteria are binary"}
260
+ 3. "What will surface during BUILD?" → {finding or "None — edge cases covered"}
261
+
211
262
  ## Correction History
212
263
  | Loop | Agent | Issue | Resolution |
213
264
  |------|-------|-------|------------|
@@ -1,8 +1,8 @@
1
1
  # chati.dev Configuration
2
- version: "2.0.1"
2
+ version: "2.1.0"
3
3
  installed_at: "2026-02-07T10:00:00Z"
4
- updated_at: "2026-02-13T00:00:00Z"
5
- installer_version: "2.0.1"
4
+ updated_at: "2026-02-17T00:00:00Z"
5
+ installer_version: "2.1.0"
6
6
  project_type: greenfield
7
7
  language: en
8
8
  ides: [claude-code]
@@ -6,7 +6,7 @@ Chati.dev is a planning-first AI-assisted orchestration system that coordinates
6
6
 
7
7
  ### 4 Core Principles
8
8
 
9
- 1. **Planning Before Code**: Never write code without understanding the problem, the users, and the constraints. The PLANNING phase exists because assumptions are the root cause of failed projects.
9
+ 1. **Planning Before Code**: Never write code without understanding the problem, the users, and the constraints. The DISCOVER and PLAN phases exist because assumptions are the root cause of failed projects.
10
10
 
11
11
  2. **Short Iterations**: Deliver value in small, verifiable increments. Every agent validates its own output before passing forward. Every quality gate catches issues early.
12
12
 
@@ -242,7 +242,7 @@ The pipeline operates in three execution modes that control agent permissions. M
242
242
 
243
243
  | Mode | States | Read Scope | Write Scope |
244
244
  |------|--------|------------|-------------|
245
- | **planning** | planning | Entire project (codebase + chati.dev/) | `chati.dev/` and `.chati/` only |
245
+ | **planning** | discover, plan | Entire project (codebase + chati.dev/) | `chati.dev/` and `.chati/` only |
246
246
  | **build** | build, validate | Entire project | Entire project |
247
247
  | **deploy** | deploy | Entire project | Entire project + infra/CI operations |
248
248
 
@@ -390,7 +390,7 @@ The system SHALL support two execution modes that govern the degree of human inv
390
390
 
391
391
  4. Certain agents are ALWAYS human-in-the-loop regardless of mode:
392
392
  - **brief**: Requirements extraction requires human validation
393
- - **deviation-handler**: Deviations from the plan always need human approval
393
+ - **orchestrator (deviation protocol)**: Deviations from the plan always need human approval
394
394
 
395
395
  5. Safety net triggers SHALL pause autonomous execution when dangerous conditions are detected: consecutive failures, circular approaches, resource limits, or destructive operations.
396
396
 
@@ -402,5 +402,5 @@ The system SHALL support two execution modes that govern the degree of human inv
402
402
 
403
403
  ---
404
404
 
405
- *Chati.dev Constitution v2.0.0 — 17 Articles + Preamble*
405
+ *Chati.dev Constitution v2.1.0 — 17 Articles + Preamble*
406
406
  *All agents are bound by this Constitution. Violations are enforced per article.*
@@ -11,7 +11,7 @@
11
11
  Scores within 5 points below threshold trigger REVIEW (human confirmation required even in autonomous mode).
12
12
 
13
13
  ## 5 Pipeline Gates
14
- 1. **Planning Complete** — All PLANNING agents finished
14
+ 1. **Planning Complete** — All DISCOVER + PLAN agents finished
15
15
  2. **QA Planning** — QA-Planning agent validates plan coherence (95% threshold)
16
16
  3. **Implementation** — Dev agent completes all tasks
17
17
  4. **QA Implementation** — Tests pass, SAST clean, coverage adequate (95% threshold)
@@ -1,7 +1,7 @@
1
1
  # Chati.dev System Context
2
2
 
3
3
  ## Framework
4
- - **Version**: 2.0.1
4
+ - **Version**: 2.1.0
5
5
  - **Agents**: 13 (12 specialized + orchestrator)
6
6
  - **Constitution**: 17 Articles + Preamble
7
7
  - **Quality**: 5 pipeline gates + 4-tier validation
@@ -15,9 +15,10 @@
15
15
 
16
16
  ## Pipeline
17
17
  ```
18
- PLANNING: WU -> Brief -> Detail -> Architect -> UX -> Phases -> Tasks -> QA-Planning
19
- BUILD: Dev -> QA-Implementation
20
- DEPLOY: DevOps
18
+ DISCOVER: WU -> Brief
19
+ PLAN: Detail -> Architect -> UX -> Phases -> Tasks -> QA-Planning
20
+ BUILD: Dev -> QA-Implementation
21
+ DEPLOY: DevOps
21
22
  ```
22
23
 
23
24
  ## How to Use