chati-dev 2.0.9 → 2.1.2

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 +167 -176
  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 +2 -2
  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
@@ -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
@@ -42,3 +42,19 @@ rules:
42
42
  - id: qap-strategy
43
43
  text: "Test strategy must include unit, integration, and E2E test categories."
44
44
  priority: normal
45
+
46
+ - id: qap-adversarial
47
+ text: >
48
+ ADVERSARIAL REVIEW: Every planning validation MUST identify minimum 3
49
+ findings (gaps, improvements, or suggestions). Zero findings is
50
+ suspiciously clean — re-analyze with deeper scrutiny across all
51
+ traceability chains. Findings can be any severity.
52
+ priority: critical
53
+
54
+ - id: qap-devil-advocate
55
+ text: >
56
+ DEVIL'S ADVOCATE: After traceability validation, assume the plan has
57
+ a hidden flaw and actively search for it. Challenge assumptions,
58
+ question requirement completeness, and look for scope gaps that
59
+ could surface during BUILD. Document the adversarial analysis.
60
+ priority: high
@@ -9,7 +9,7 @@ summary: >
9
9
  context brackets, memory governance, registry governance,
10
10
  session lock, model governance.
11
11
 
12
- articleCount: 16
12
+ articleCount: 17
13
13
 
14
14
  rules:
15
15
  - id: art-i
@@ -21,7 +21,7 @@ rules:
21
21
  priority: critical
22
22
 
23
23
  - id: art-iii
24
- text: "Memory and context must be managed through designated systems (PRISM, RECALL)."
24
+ text: "Memory and context must be managed through designated systems (PRISM)."
25
25
  priority: high
26
26
 
27
27
  - id: art-iv
@@ -75,3 +75,7 @@ rules:
75
75
  - id: art-xvi
76
76
  text: "Model governance: respect per-agent model assignments. No downgrade from assigned model."
77
77
  priority: high
78
+
79
+ - id: art-xvii
80
+ text: "Execution mode governance: autonomous requires gate >= 90%. Safety net with circuit breaker (3 failures)."
81
+ priority: critical
@@ -1,11 +1,9 @@
1
1
  # Brownfield Discovery Workflow Domain — PRISM L3
2
- # Discovery-only pipeline (no implementation)
2
+ # Standalone discovery pipeline (no implementation)
3
+ # Agent: brownfield-wu only (7 phases of analysis)
3
4
 
4
5
  steps:
5
6
  - brownfield-wu
6
- - brief
7
- - detail
8
- - architect
9
7
 
10
8
  rules:
11
9
  - id: disc-deep
@@ -14,3 +12,6 @@ rules:
14
12
  - id: disc-readonly
15
13
  text: "Discovery workflow does not modify project code."
16
14
  priority: high
15
+ - id: disc-standalone
16
+ text: "Brownfield discovery is a standalone workflow using only brownfield-wu across 7 analysis phases."
17
+ priority: normal
@@ -0,0 +1,23 @@
1
+ # Quick Flow Workflow Domain — PRISM L3
2
+ # Fast-track pipeline for simple tasks (bug fixes, small features, config changes)
3
+ # Skips full PLAN phase — goes from Brief directly to Dev
4
+
5
+ steps:
6
+ - brief
7
+ - dev
8
+ - qa-implementation
9
+ - devops
10
+
11
+ rules:
12
+ - id: qf-scope
13
+ text: "Quick Flow is only for low-complexity tasks. Escalate to full pipeline if scope grows."
14
+ priority: critical
15
+ - id: qf-quality
16
+ text: "QA-Implementation validation is mandatory even in Quick Flow. No quality shortcuts."
17
+ priority: critical
18
+ - id: qf-brief
19
+ text: "Brief runs in quick-extraction mode: single-pass, 2 rounds max."
20
+ priority: high
21
+ - id: qf-escalation
22
+ text: "If dev discovers unexpected complexity, pause and offer escalation to full pipeline."
23
+ priority: high
@@ -28,13 +28,25 @@ const MODE_SCOPES = {
28
28
  },
29
29
  };
30
30
 
31
+ // Maps session states to governance modes (Article XI)
32
+ const STATE_TO_GOVERNANCE_MODE = {
33
+ discover: 'planning',
34
+ plan: 'planning',
35
+ planning: 'planning',
36
+ build: 'build',
37
+ validate: 'build',
38
+ deploy: 'deploy',
39
+ completed: 'deploy',
40
+ };
41
+
31
42
  function getCurrentMode(projectDir) {
32
43
  const sessionPath = join(projectDir, '.chati', 'session.yaml');
33
44
  if (!existsSync(sessionPath)) return 'planning'; // Default to most restrictive
34
45
 
35
46
  const raw = readFileSync(sessionPath, 'utf-8');
36
47
  const match = raw.match(/^\s*mode:\s*(.+)$/m);
37
- return match ? match[1].trim().replace(/^["']|["']$/g, '') : 'planning';
48
+ const state = match ? match[1].trim().replace(/^["']|["']$/g, '') : 'discover';
49
+ return STATE_TO_GOVERNANCE_MODE[state] || 'planning';
38
50
  }
39
51
 
40
52
  function isPathAllowed(filePath, projectDir, mode) {
@@ -83,7 +95,7 @@ async function main() {
83
95
  }
84
96
  }
85
97
 
86
- export { getCurrentMode, isPathAllowed, MODE_SCOPES };
98
+ export { getCurrentMode, isPathAllowed, MODE_SCOPES, STATE_TO_GOVERNANCE_MODE };
87
99
 
88
100
  // Only run main when executed directly (not imported by tests)
89
101
  import { fileURLToPath } from 'url';
@@ -93,4 +93,8 @@ async function main() {
93
93
 
94
94
  export { AGENT_MODELS, UPGRADE_CONDITIONS, getCurrentAgent };
95
95
 
96
- main();
96
+ // Only run main when executed directly (not imported by tests)
97
+ import { fileURLToPath } from 'url';
98
+ if (process.argv[1] === fileURLToPath(import.meta.url)) {
99
+ main();
100
+ }
@@ -27,7 +27,7 @@ function readSessionState(projectDir) {
27
27
  };
28
28
 
29
29
  return {
30
- mode: extract('mode') || 'planning',
30
+ mode: extract('mode') || 'discover',
31
31
  currentAgent: extract('current_agent') || null,
32
32
  workflow: extract('workflow') || null,
33
33
  pipelinePosition: extract('pipeline_position') || null,
@@ -21,7 +21,7 @@ function extractDigest(projectDir) {
21
21
 
22
22
  return {
23
23
  timestamp: new Date().toISOString(),
24
- mode: extract('mode') || 'planning',
24
+ mode: extract('mode') || 'discover',
25
25
  currentAgent: extract('current_agent') || 'none',
26
26
  pipelinePosition: extract('pipeline_position') || 'unknown',
27
27
  workflow: extract('workflow') || 'unknown',
@@ -57,4 +57,8 @@ async function main() {
57
57
  }
58
58
  }
59
59
 
60
- main();
60
+ // Only run main when executed directly (not imported by tests)
61
+ import { fileURLToPath } from 'url';
62
+ if (process.argv[1] === fileURLToPath(import.meta.url)) {
63
+ main();
64
+ }
@@ -16,6 +16,17 @@
16
16
  ]
17
17
  }
18
18
  ],
19
+ "PreCompact": [
20
+ {
21
+ "matcher": ".*",
22
+ "hooks": [
23
+ {
24
+ "type": "command",
25
+ "command": "node chati.dev/hooks/session-digest.js"
26
+ }
27
+ ]
28
+ }
29
+ ],
19
30
  "PreToolUse": [
20
31
  {
21
32
  "matcher": "Read",
@@ -16,9 +16,9 @@ installer:
16
16
  ides_label: "IDEs"
17
17
  mcps_label: "MCPs"
18
18
  will_install: "Will install:"
19
- agents_count: "13 agent definitions (PLANNING, BUILD, DEPLOY phases)"
20
- workflows_count: "5 workflow blueprints"
21
- templates_count: "5 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate)"
19
+ agents_count: "13 agent definitions (DISCOVER, PLAN, BUILD, DEPLOY phases)"
20
+ workflows_count: "6 workflow blueprints"
21
+ templates_count: "6 templates (PRD, Brownfield PRD, Architecture, Task, QA Gate, Quick Brief)"
22
22
  constitution: "Constitution (17 Articles + Preamble)"
23
23
  session_mgmt: "Session management system"
24
24
  quality_gates: "Quality gates (4-tier validation)"
@@ -16,9 +16,9 @@ installer:
16
16
  ides_label: "IDEs"
17
17
  mcps_label: "MCPs"
18
18
  will_install: "Se instalara:"
19
- agents_count: "13 definiciones de agentes (fases PLANNING, BUILD, DEPLOY)"
20
- workflows_count: "5 blueprints de workflow"
21
- templates_count: "5 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate)"
19
+ agents_count: "13 definiciones de agentes (fases DISCOVER, PLAN, BUILD, DEPLOY)"
20
+ workflows_count: "6 blueprints de workflow"
21
+ templates_count: "6 templates (PRD, PRD Brownfield, Arquitectura, Task, QA Gate, Quick Brief)"
22
22
  constitution: "Constitucion (17 Articulos + Preambulo)"
23
23
  session_mgmt: "Sistema de gestion de sesion"
24
24
  quality_gates: "Quality gates (validacion en 4 capas)"