chati-dev 2.0.9 → 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 +12 -10
  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 +1 -1
  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
@@ -108,11 +108,12 @@ npx chati-dev status --watch # Auto-refresh every 5s
108
108
 
109
109
  ## Architecture
110
110
 
111
- ### 13 Agents, 4 Categories
111
+ ### 13 Agents, 5 Categories
112
112
 
113
113
  | Category | Agents | Purpose |
114
114
  |----------|--------|---------|
115
- | **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 |
116
117
  | **Quality** | QA-Planning, QA-Implementation | Validation & Gates |
117
118
  | **BUILD** | Dev | Implementation |
118
119
  | **DEPLOY** | DevOps | Shipping |
@@ -131,13 +132,13 @@ User Request
131
132
 
132
133
  ├── In-conversation ──┐
133
134
  │ ▼
134
- │ ┌─── PLANNING (interactive) ───┐
135
+ │ ┌─── DISCOVER (interactive) ──┐
135
136
  │ │ WU → Brief │
136
137
  │ └─────────────────────────────┘
137
138
 
138
139
  ├── Spawns terminals ──────────────────────────┐
139
140
  │ ▼
140
- │ ┌─── PLANNING (autonomous) ─── Parallel ───┐
141
+ │ ┌─── PLAN (autonomous) ─────── Parallel ───┐
141
142
  │ │ Detail (opus) ──┐ │
142
143
  │ │ Architect (opus)├── run simultaneously │
143
144
  │ │ UX (sonnet) ────┘ │
@@ -284,13 +285,14 @@ your-project/
284
285
  ├── chati.dev/
285
286
  │ ├── orchestrator/ # Main orchestrator
286
287
  │ ├── agents/ # 13 agent definitions
287
- │ │ ├── planning/ # 8 planning agents
288
+ │ │ ├── discover/ # 3 discover agents (WU, Brief)
289
+ │ │ ├── plan/ # 5 plan agents (Detail, Architect, UX, Phases, Tasks)
288
290
  │ │ ├── quality/ # 2 quality gate agents
289
291
  │ │ ├── build/ # Dev agent
290
292
  │ │ └── deploy/ # DevOps agent
291
293
  │ ├── tasks/ # 72 task definitions (YAML frontmatter)
292
- │ ├── workflows/ # 5 workflow blueprints
293
- │ ├── templates/ # 5 artifact templates
294
+ │ ├── workflows/ # 6 workflow blueprints
295
+ │ ├── templates/ # 6 artifact templates
294
296
  │ ├── schemas/ # 5 JSON schemas for validation
295
297
  │ ├── intelligence/ # Context Engine, Memory Layer, Decision Engine
296
298
  │ ├── domains/ # Domain loading configs (per-agent, per-workflow)
@@ -299,7 +301,7 @@ your-project/
299
301
  │ ├── frameworks/ # Decision heuristics, quality dims
300
302
  │ ├── quality-gates/ # Planning & implementation gates
301
303
  │ ├── patterns/ # Elicitation patterns
302
- │ ├── data/ # Entity registry (48 artifacts)
304
+ │ ├── data/ # Entity registry (50 artifacts)
303
305
  │ ├── i18n/ # EN, PT, ES, FR translations
304
306
  │ ├── migrations/ # Version migration scripts
305
307
  │ ├── constitution.md # 17 Articles + Preamble
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
@@ -5,7 +5,7 @@
5
5
  metadata:
6
6
  version: "1.0.0"
7
7
  last_updated: "2026-02-12T00:00:00Z"
8
- entity_count: 47
8
+ entity_count: 50
9
9
  checksum_algorithm: sha256
10
10
 
11
11
  entities:
@@ -19,7 +19,7 @@ entities:
19
19
  adaptability: 0.2
20
20
 
21
21
  greenfield-wu:
22
- path: chati.dev/agents/planning/greenfield-wu.md
22
+ path: chati.dev/agents/discover/greenfield-wu.md
23
23
  type: agent
24
24
  purpose: "Analyze greenfield project context, constraints, and technology landscape"
25
25
  keywords: [greenfield, analysis, context, technology, constraints]
@@ -27,7 +27,7 @@ entities:
27
27
  adaptability: 0.5
28
28
 
29
29
  brownfield-wu:
30
- path: chati.dev/agents/planning/brownfield-wu.md
30
+ path: chati.dev/agents/discover/brownfield-wu.md
31
31
  type: agent
32
32
  purpose: "Deep discovery of existing codebase — architecture, patterns, debt, dependencies"
33
33
  keywords: [brownfield, discovery, codebase, architecture, debt]
@@ -35,7 +35,7 @@ entities:
35
35
  adaptability: 0.5
36
36
 
37
37
  brief:
38
- path: chati.dev/agents/planning/brief.md
38
+ path: chati.dev/agents/discover/brief.md
39
39
  type: agent
40
40
  purpose: "Extract and structure user requirements through 5 elicitation phases"
41
41
  keywords: [requirements, elicitation, brief, functional, non-functional]
@@ -43,7 +43,7 @@ entities:
43
43
  adaptability: 0.4
44
44
 
45
45
  detail:
46
- path: chati.dev/agents/planning/detail.md
46
+ path: chati.dev/agents/plan/detail.md
47
47
  type: agent
48
48
  purpose: "Transform Brief into formal PRD with complete specifications"
49
49
  keywords: [prd, specification, detail, formal, requirements]
@@ -51,7 +51,7 @@ entities:
51
51
  adaptability: 0.4
52
52
 
53
53
  architect:
54
- path: chati.dev/agents/planning/architect.md
54
+ path: chati.dev/agents/plan/architect.md
55
55
  type: agent
56
56
  purpose: "Design technical architecture, make technology decisions, define system boundaries"
57
57
  keywords: [architecture, technology, design, patterns, boundaries]
@@ -59,7 +59,7 @@ entities:
59
59
  adaptability: 0.3
60
60
 
61
61
  ux:
62
- path: chati.dev/agents/planning/ux.md
62
+ path: chati.dev/agents/plan/ux.md
63
63
  type: agent
64
64
  purpose: "Design user experience, interaction flows, and interface structure"
65
65
  keywords: [ux, design, interaction, flows, interface, wireframes]
@@ -67,7 +67,7 @@ entities:
67
67
  adaptability: 0.5
68
68
 
69
69
  phases:
70
- path: chati.dev/agents/planning/phases.md
70
+ path: chati.dev/agents/plan/phases.md
71
71
  type: agent
72
72
  purpose: "Decompose PRD into development phases with MVP-first strategy"
73
73
  keywords: [phases, decomposition, mvp, planning, milestones]
@@ -75,7 +75,7 @@ entities:
75
75
  adaptability: 0.4
76
76
 
77
77
  tasks:
78
- path: chati.dev/agents/planning/tasks.md
78
+ path: chati.dev/agents/plan/tasks.md
79
79
  type: agent
80
80
  purpose: "Create executable tasks with acceptance criteria from phase definitions"
81
81
  keywords: [tasks, acceptance-criteria, executable, given-when-then]
@@ -155,6 +155,14 @@ entities:
155
155
  dependencies: []
156
156
  adaptability: 0.6
157
157
 
158
+ quick-brief:
159
+ path: chati.dev/templates/quick-brief-tmpl.yaml
160
+ type: template
161
+ purpose: "Condensed brief template for Quick Flow pipeline — single-pass extraction"
162
+ keywords: [quick, brief, template, fast-track, condensed]
163
+ dependencies: [brief]
164
+ adaptability: 0.6
165
+
158
166
  workflows:
159
167
  greenfield-fullstack:
160
168
  path: chati.dev/workflows/greenfield-fullstack.yaml
@@ -196,6 +204,14 @@ entities:
196
204
  dependencies: [orchestrator]
197
205
  adaptability: 0.5
198
206
 
207
+ quick-flow:
208
+ path: chati.dev/workflows/quick-flow.yaml
209
+ type: workflow
210
+ purpose: "Fast-track pipeline for simple tasks: bug fixes, small features, config changes. Skips full PLAN phase."
211
+ keywords: [quick, fast-track, bug-fix, hotfix, simple, condensed]
212
+ dependencies: [orchestrator, brief, dev, qa-implementation, devops]
213
+ adaptability: 0.4
214
+
199
215
  schemas:
200
216
  session:
201
217
  path: chati.dev/schemas/session.schema.json
@@ -333,11 +349,19 @@ entities:
333
349
  elicitation:
334
350
  path: chati.dev/patterns/elicitation.md
335
351
  type: framework
336
- purpose: "Elicitation patterns for requirements gathering"
352
+ purpose: "Elicitation patterns overview and quick reference"
337
353
  keywords: [elicitation, requirements, gathering, patterns, interview]
338
- dependencies: [brief]
354
+ dependencies: [brief, elicitation-library]
339
355
  adaptability: 0.6
340
356
 
357
+ elicitation-library:
358
+ path: chati.dev/patterns/elicitation-library.yaml
359
+ type: intelligence
360
+ purpose: "Comprehensive catalog of 24 elicitation methods with triggers, steps, agent mapping, and auto-selection rules"
361
+ keywords: [elicitation, methods, brain-dump, scamper, moscow, five-whys, delphi, pre-mortem, personas, journey-map, stakeholder-map]
362
+ dependencies: [brief]
363
+ adaptability: 0.5
364
+
341
365
  i18n:
342
366
  en:
343
367
  path: chati.dev/i18n/en.yaml
@@ -45,3 +45,17 @@ rules:
45
45
  - id: br-05
46
46
  text: "MUST validate that success metrics are measurable and specific"
47
47
  priority: normal
48
+
49
+ - id: br-06
50
+ text: >
51
+ MUST select elicitation methods from chati.dev/patterns/elicitation-library.yaml
52
+ based on project context (type, user level, complexity). Auto-selection rules
53
+ in the library determine primary and secondary methods.
54
+ priority: high
55
+
56
+ - id: br-07
57
+ text: >
58
+ MUST use at least 3 different elicitation methods across the 5 extraction phases.
59
+ Single-method extraction produces shallow requirements. Recommended: brain-dump +
60
+ five-whys + playback as minimum set.
61
+ priority: high
@@ -41,3 +41,19 @@ rules:
41
41
  - id: qai-backward
42
42
  text: "If spec/architecture issues found, trigger backward transition to planning mode."
43
43
  priority: high
44
+
45
+ - id: qai-adversarial
46
+ text: >
47
+ ADVERSARIAL REVIEW: Every QA pass MUST identify minimum 3 findings
48
+ (improvements, warnings, or suggestions). Zero findings is suspiciously
49
+ clean — trigger mandatory re-review with deeper analysis. This prevents
50
+ rubber-stamping. Findings can be any severity (low/info counts).
51
+ priority: critical
52
+
53
+ - id: qai-devil-advocate
54
+ text: >
55
+ DEVIL'S ADVOCATE: After initial review, assume the opposite conclusion
56
+ and actively search for evidence to support it. If initial pass says
57
+ APPROVED, spend one extra pass trying to find reasons to FAIL.
58
+ Document what you looked for and why it held up (or didn't).
59
+ priority: high