chati-dev 1.3.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +7 -6
  2. package/framework/agents/build/dev.md +343 -0
  3. package/framework/agents/clarity/architect.md +113 -0
  4. package/framework/agents/clarity/brief.md +183 -0
  5. package/framework/agents/clarity/brownfield-wu.md +182 -0
  6. package/framework/agents/clarity/detail.md +111 -0
  7. package/framework/agents/clarity/greenfield-wu.md +154 -0
  8. package/framework/agents/clarity/phases.md +1 -0
  9. package/framework/agents/clarity/tasks.md +1 -0
  10. package/framework/agents/clarity/ux.md +113 -0
  11. package/framework/agents/deploy/devops.md +1 -0
  12. package/framework/agents/quality/qa-implementation.md +1 -0
  13. package/framework/agents/quality/qa-planning.md +1 -0
  14. package/framework/config.yaml +3 -3
  15. package/framework/constitution.md +58 -1
  16. package/framework/context/governance.md +37 -0
  17. package/framework/context/protocols.md +34 -0
  18. package/framework/context/quality.md +27 -0
  19. package/framework/context/root.md +24 -0
  20. package/framework/data/entity-registry.yaml +1 -1
  21. package/framework/domains/agents/architect.yaml +51 -0
  22. package/framework/domains/agents/brief.yaml +47 -0
  23. package/framework/domains/agents/brownfield-wu.yaml +49 -0
  24. package/framework/domains/agents/detail.yaml +47 -0
  25. package/framework/domains/agents/dev.yaml +49 -0
  26. package/framework/domains/agents/devops.yaml +43 -0
  27. package/framework/domains/agents/greenfield-wu.yaml +47 -0
  28. package/framework/domains/agents/orchestrator.yaml +49 -0
  29. package/framework/domains/agents/phases.yaml +47 -0
  30. package/framework/domains/agents/qa-implementation.yaml +43 -0
  31. package/framework/domains/agents/qa-planning.yaml +44 -0
  32. package/framework/domains/agents/tasks.yaml +48 -0
  33. package/framework/domains/agents/ux.yaml +50 -0
  34. package/framework/domains/constitution.yaml +77 -0
  35. package/framework/domains/global.yaml +64 -0
  36. package/framework/domains/workflows/brownfield-discovery.yaml +16 -0
  37. package/framework/domains/workflows/brownfield-fullstack.yaml +26 -0
  38. package/framework/domains/workflows/brownfield-service.yaml +22 -0
  39. package/framework/domains/workflows/brownfield-ui.yaml +22 -0
  40. package/framework/domains/workflows/greenfield-fullstack.yaml +26 -0
  41. package/framework/hooks/constitution-guard.js +101 -0
  42. package/framework/hooks/mode-governance.js +92 -0
  43. package/framework/hooks/model-governance.js +76 -0
  44. package/framework/hooks/prism-engine.js +89 -0
  45. package/framework/hooks/session-digest.js +60 -0
  46. package/framework/hooks/settings.json +44 -0
  47. package/framework/i18n/en.yaml +3 -3
  48. package/framework/i18n/es.yaml +3 -3
  49. package/framework/i18n/fr.yaml +3 -3
  50. package/framework/i18n/pt.yaml +3 -3
  51. package/framework/intelligence/context-engine.md +2 -2
  52. package/framework/intelligence/decision-engine.md +1 -1
  53. package/framework/migrations/v1.4-to-v2.0.yaml +167 -0
  54. package/framework/migrations/v2.0-to-v2.0.1.yaml +132 -0
  55. package/framework/orchestrator/chati.md +350 -7
  56. package/framework/schemas/session.schema.json +15 -0
  57. package/framework/tasks/architect-api-design.md +63 -0
  58. package/framework/tasks/architect-consolidate.md +47 -0
  59. package/framework/tasks/architect-db-design.md +73 -0
  60. package/framework/tasks/architect-design.md +95 -0
  61. package/framework/tasks/architect-security-review.md +62 -0
  62. package/framework/tasks/architect-stack-selection.md +53 -0
  63. package/framework/tasks/brief-consolidate.md +249 -0
  64. package/framework/tasks/brief-constraint-identify.md +277 -0
  65. package/framework/tasks/brief-extract-requirements.md +339 -0
  66. package/framework/tasks/brief-stakeholder-map.md +176 -0
  67. package/framework/tasks/brief-validate-completeness.md +121 -0
  68. package/framework/tasks/brownfield-wu-architecture-map.md +394 -0
  69. package/framework/tasks/brownfield-wu-deep-discovery.md +312 -0
  70. package/framework/tasks/brownfield-wu-dependency-scan.md +359 -0
  71. package/framework/tasks/brownfield-wu-migration-plan.md +483 -0
  72. package/framework/tasks/brownfield-wu-report.md +325 -0
  73. package/framework/tasks/brownfield-wu-risk-assess.md +424 -0
  74. package/framework/tasks/detail-acceptance-criteria.md +372 -0
  75. package/framework/tasks/detail-consolidate.md +138 -0
  76. package/framework/tasks/detail-edge-case-analysis.md +300 -0
  77. package/framework/tasks/detail-expand-prd.md +389 -0
  78. package/framework/tasks/detail-nfr-extraction.md +223 -0
  79. package/framework/tasks/dev-code-review.md +404 -0
  80. package/framework/tasks/dev-consolidate.md +543 -0
  81. package/framework/tasks/dev-debug.md +322 -0
  82. package/framework/tasks/dev-implement.md +252 -0
  83. package/framework/tasks/dev-iterate.md +411 -0
  84. package/framework/tasks/dev-pr-prepare.md +497 -0
  85. package/framework/tasks/dev-refactor.md +342 -0
  86. package/framework/tasks/dev-test-write.md +306 -0
  87. package/framework/tasks/devops-ci-setup.md +412 -0
  88. package/framework/tasks/devops-consolidate.md +712 -0
  89. package/framework/tasks/devops-deploy-config.md +598 -0
  90. package/framework/tasks/devops-monitoring-setup.md +658 -0
  91. package/framework/tasks/devops-release-prepare.md +673 -0
  92. package/framework/tasks/greenfield-wu-analyze-empty.md +169 -0
  93. package/framework/tasks/greenfield-wu-report.md +266 -0
  94. package/framework/tasks/greenfield-wu-scaffold-detection.md +203 -0
  95. package/framework/tasks/greenfield-wu-tech-stack-assess.md +255 -0
  96. package/framework/tasks/orchestrator-deviation.md +260 -0
  97. package/framework/tasks/orchestrator-escalate.md +276 -0
  98. package/framework/tasks/orchestrator-handoff.md +243 -0
  99. package/framework/tasks/orchestrator-health.md +372 -0
  100. package/framework/tasks/orchestrator-mode-switch.md +262 -0
  101. package/framework/tasks/orchestrator-resume.md +189 -0
  102. package/framework/tasks/orchestrator-route.md +169 -0
  103. package/framework/tasks/orchestrator-spawn-terminal.md +358 -0
  104. package/framework/tasks/orchestrator-status.md +260 -0
  105. package/framework/tasks/orchestrator-suggest-mode.md +372 -0
  106. package/framework/tasks/phases-breakdown.md +91 -0
  107. package/framework/tasks/phases-dependency-mapping.md +67 -0
  108. package/framework/tasks/phases-mvp-scoping.md +94 -0
  109. package/framework/tasks/qa-impl-consolidate.md +522 -0
  110. package/framework/tasks/qa-impl-performance-test.md +487 -0
  111. package/framework/tasks/qa-impl-regression-check.md +413 -0
  112. package/framework/tasks/qa-impl-sast-scan.md +402 -0
  113. package/framework/tasks/qa-impl-test-execute.md +344 -0
  114. package/framework/tasks/qa-impl-verdict.md +339 -0
  115. package/framework/tasks/qa-planning-consolidate.md +309 -0
  116. package/framework/tasks/qa-planning-coverage-plan.md +338 -0
  117. package/framework/tasks/qa-planning-gate-define.md +339 -0
  118. package/framework/tasks/qa-planning-risk-matrix.md +631 -0
  119. package/framework/tasks/qa-planning-test-strategy.md +217 -0
  120. package/framework/tasks/tasks-acceptance-write.md +75 -0
  121. package/framework/tasks/tasks-consolidate.md +57 -0
  122. package/framework/tasks/tasks-decompose.md +80 -0
  123. package/framework/tasks/tasks-estimate.md +66 -0
  124. package/framework/tasks/ux-a11y-check.md +49 -0
  125. package/framework/tasks/ux-component-map.md +55 -0
  126. package/framework/tasks/ux-consolidate.md +46 -0
  127. package/framework/tasks/ux-user-flow.md +46 -0
  128. package/framework/tasks/ux-wireframe.md +76 -0
  129. package/package.json +1 -1
  130. package/scripts/bundle-framework.js +2 -0
  131. package/scripts/changelog-generator.js +222 -0
  132. package/scripts/codebase-mapper.js +728 -0
  133. package/scripts/commit-message-generator.js +167 -0
  134. package/scripts/coverage-analyzer.js +260 -0
  135. package/scripts/dependency-analyzer.js +280 -0
  136. package/scripts/framework-analyzer.js +308 -0
  137. package/scripts/generate-constitution-domain.js +253 -0
  138. package/scripts/health-check.js +481 -0
  139. package/scripts/ide-sync.js +327 -0
  140. package/scripts/performance-analyzer.js +325 -0
  141. package/scripts/plan-tracker.js +278 -0
  142. package/scripts/populate-entity-registry.js +481 -0
  143. package/scripts/pr-review.js +317 -0
  144. package/scripts/rollback-manager.js +310 -0
  145. package/scripts/stuck-detector.js +343 -0
  146. package/scripts/test-quality-assessment.js +257 -0
  147. package/scripts/validate-agents.js +367 -0
  148. package/scripts/validate-tasks.js +465 -0
  149. package/src/autonomy/autonomous-gate.js +293 -0
  150. package/src/autonomy/index.js +51 -0
  151. package/src/autonomy/mode-manager.js +225 -0
  152. package/src/autonomy/mode-suggester.js +283 -0
  153. package/src/autonomy/progress-reporter.js +268 -0
  154. package/src/autonomy/safety-net.js +320 -0
  155. package/src/context/bracket-tracker.js +79 -0
  156. package/src/context/domain-loader.js +107 -0
  157. package/src/context/engine.js +144 -0
  158. package/src/context/formatter.js +184 -0
  159. package/src/context/index.js +4 -0
  160. package/src/context/layers/l0-constitution.js +28 -0
  161. package/src/context/layers/l1-global.js +37 -0
  162. package/src/context/layers/l2-agent.js +39 -0
  163. package/src/context/layers/l3-workflow.js +42 -0
  164. package/src/context/layers/l4-task.js +24 -0
  165. package/src/decision/analyzer.js +167 -0
  166. package/src/decision/engine.js +270 -0
  167. package/src/decision/index.js +38 -0
  168. package/src/decision/registry-healer.js +450 -0
  169. package/src/decision/registry-updater.js +330 -0
  170. package/src/gates/circuit-breaker.js +119 -0
  171. package/src/gates/g1-planning-complete.js +153 -0
  172. package/src/gates/g2-qa-planning.js +153 -0
  173. package/src/gates/g3-implementation.js +188 -0
  174. package/src/gates/g4-qa-implementation.js +207 -0
  175. package/src/gates/g5-deploy-ready.js +180 -0
  176. package/src/gates/gate-base.js +144 -0
  177. package/src/gates/index.js +46 -0
  178. package/src/installer/brownfield-upgrader.js +249 -0
  179. package/src/installer/core.js +55 -3
  180. package/src/installer/file-hasher.js +51 -0
  181. package/src/installer/manifest.js +117 -0
  182. package/src/installer/templates.js +17 -15
  183. package/src/installer/transaction.js +229 -0
  184. package/src/installer/validator.js +18 -1
  185. package/src/intelligence/registry-manager.js +2 -2
  186. package/src/memory/agent-memory.js +255 -0
  187. package/src/memory/gotchas-injector.js +72 -0
  188. package/src/memory/gotchas.js +361 -0
  189. package/src/memory/index.js +35 -0
  190. package/src/memory/search.js +233 -0
  191. package/src/memory/session-digest.js +239 -0
  192. package/src/merger/env-merger.js +112 -0
  193. package/src/merger/index.js +56 -0
  194. package/src/merger/replace-merger.js +51 -0
  195. package/src/merger/yaml-merger.js +127 -0
  196. package/src/orchestrator/agent-selector.js +285 -0
  197. package/src/orchestrator/deviation-handler.js +350 -0
  198. package/src/orchestrator/handoff-engine.js +271 -0
  199. package/src/orchestrator/index.js +67 -0
  200. package/src/orchestrator/intent-classifier.js +264 -0
  201. package/src/orchestrator/pipeline-manager.js +492 -0
  202. package/src/orchestrator/pipeline-state.js +223 -0
  203. package/src/orchestrator/session-manager.js +409 -0
  204. package/src/tasks/executor.js +195 -0
  205. package/src/tasks/handoff.js +226 -0
  206. package/src/tasks/index.js +4 -0
  207. package/src/tasks/loader.js +210 -0
  208. package/src/tasks/router.js +182 -0
  209. package/src/terminal/collector.js +216 -0
  210. package/src/terminal/index.js +30 -0
  211. package/src/terminal/isolation.js +129 -0
  212. package/src/terminal/monitor.js +277 -0
  213. package/src/terminal/spawner.js +269 -0
  214. package/src/upgrade/checker.js +1 -1
  215. package/src/wizard/i18n.js +3 -3
@@ -0,0 +1,67 @@
1
+ ---
2
+ id: phases-dependency-mapping
3
+ agent: phases
4
+ trigger: phases-breakdown
5
+ phase: clarity
6
+ requires_input: false
7
+ parallelizable: false
8
+ outputs: [dependency-map.yaml]
9
+ handoff_to: phases-mvp-scoping
10
+ autonomous_gate: true
11
+ criteria:
12
+ - Dependencies between phases mapped
13
+ - Blockers identified
14
+ - Critical path documented
15
+ ---
16
+ # Map Dependencies Between Phases
17
+
18
+ ## Purpose
19
+ Identify dependencies between features and phases to ensure proper sequencing.
20
+
21
+ ## Steps
22
+
23
+ ### 1. Analyze Feature Dependencies
24
+ - Comments depend on Posts (can't comment without posts)
25
+ - Admin moderation depends on Posts and Users
26
+ - Advanced search depends on basic search
27
+
28
+ ### 2. Identify Technical Dependencies
29
+ - Database schema must be established before features using it
30
+ - Authentication must work before protected features
31
+ - API must be complete before frontend can consume it
32
+
33
+ ### 3. Create Dependency Graph
34
+ Visual representation of what depends on what.
35
+
36
+ ### 4. Identify Critical Path
37
+ Longest sequence of dependent tasks that determines minimum project duration.
38
+
39
+ ### 5. Flag Potential Blockers
40
+ External dependencies (WordPress API), third-party services, approvals.
41
+
42
+ ## Output Format
43
+ ```yaml
44
+ # dependency-map.yaml
45
+ feature_dependencies:
46
+ - feature: FR-003 (Create posts)
47
+ depends_on: [FR-001 (Register), FR-002 (Login)]
48
+ reason: Must be authenticated to create posts
49
+ - feature: FR-008 (Comments)
50
+ depends_on: [FR-003 (Posts), FR-001 (Users)]
51
+ reason: Comments are on posts, by users
52
+ technical_dependencies:
53
+ - component: PostService
54
+ depends_on: [AuthService, Database schema]
55
+ - component: Frontend
56
+ depends_on: [API complete, authentication working]
57
+ critical_path:
58
+ - Database schema design
59
+ - Authentication implementation
60
+ - Post CRUD implementation
61
+ - Frontend implementation
62
+ - Testing and deployment
63
+ estimated_critical_path_duration: 10 weeks
64
+ blockers:
65
+ - WordPress API access (must get API key)
66
+ - Supabase account setup (must provision)
67
+ ```
@@ -0,0 +1,94 @@
1
+ ---
2
+ id: phases-mvp-scoping
3
+ agent: phases
4
+ trigger: phases-dependency-mapping
5
+ phase: clarity
6
+ requires_input: false
7
+ parallelizable: false
8
+ outputs: [mvp-scope.yaml]
9
+ handoff_to: tasks
10
+ autonomous_gate: true
11
+ criteria:
12
+ - MVP scope clearly defined with cut line
13
+ - Justification provided for inclusions/exclusions
14
+ - MVP delivers user value
15
+ ---
16
+ # Define MVP Scope and Cut Line
17
+
18
+ ## Purpose
19
+ Precisely define what is in and out of MVP, with clear justification.
20
+
21
+ ## Steps
22
+
23
+ ### 1. Review Phase 1 Features
24
+ Ensure MVP includes minimum features to deliver value.
25
+
26
+ ### 2. Apply MVP Criteria
27
+ Feature is MVP if:
28
+ - Required for core user journey (register → create post → view post)
29
+ - Blocks other features
30
+ - Critical for launch (authentication, security)
31
+
32
+ Feature is NOT MVP if:
33
+ - Nice-to-have enhancement
34
+ - Can be added later without refactoring
35
+ - Low user impact
36
+
37
+ ### 3. Define Cut Line
38
+ Explicit list of included vs excluded features.
39
+
40
+ ### 4. Justify Exclusions
41
+ Why each excluded feature is not MVP.
42
+
43
+ ### 5. Validate MVP Delivers Value
44
+ Can user accomplish meaningful tasks with MVP alone?
45
+
46
+ ## Output Format
47
+ ```yaml
48
+ # mvp-scope.yaml
49
+ mvp_definition: |
50
+ Minimum set of features that allow users to register, create and publish
51
+ blog posts, search for posts, and view posts. WordPress integration included
52
+ to show existing content alongside new posts.
53
+
54
+ included_in_mvp:
55
+ - FR-001: User registration
56
+ justification: Must have accounts to create posts
57
+ - FR-002: User login
58
+ justification: Must authenticate to create posts
59
+ - FR-003: Create posts
60
+ justification: Core value proposition
61
+ - FR-004: Edit/delete posts
62
+ justification: Users need to fix mistakes
63
+ - FR-005: Search posts
64
+ justification: Discoverability is critical
65
+ - FR-006: View posts
66
+ justification: Can't have blog without reading posts
67
+ - FR-007: WordPress integration
68
+ justification: Business requirement to show existing content
69
+
70
+ excluded_from_mvp:
71
+ - FR-008: Comments
72
+ justification: Engagement feature, not required for core journey. Can add in phase 2 without major refactoring.
73
+ - FR-009: Admin moderation
74
+ justification: Low initial traffic means manual moderation acceptable. Can add when needed.
75
+ - FR-010: User profiles
76
+ justification: Nice-to-have, not required to publish posts.
77
+ - FR-011: Analytics
78
+ justification: Can add tracking later, doesn't block launch.
79
+ - Social sharing
80
+ justification: Growth feature, not required for MVP.
81
+
82
+ mvp_user_value: |
83
+ With MVP, users can:
84
+ 1. Create an account
85
+ 2. Write and publish blog posts with rich content and images
86
+ 3. Edit their posts after publishing
87
+ 4. Search for posts by keyword or tag
88
+ 5. Read posts from new platform and existing WordPress blog
89
+
90
+ This delivers core blogging functionality and replaces existing WordPress
91
+ admin interface with modern, faster experience.
92
+
93
+ next_phase: tasks
94
+ ```
@@ -0,0 +1,522 @@
1
+ ---
2
+ id: qa-impl-consolidate
3
+ agent: qa-implementation
4
+ trigger: qa-impl-verdict
5
+ phase: validate
6
+ requires_input: false
7
+ parallelizable: false
8
+ outputs: [qa-implementation-report.yaml]
9
+ handoff_to: devops
10
+ autonomous_gate: true
11
+ criteria:
12
+ - Final QA implementation report compiled
13
+ - All QA artifacts archived
14
+ - Handoff prepared for deployment or remediation
15
+ ---
16
+
17
+ # QA Implementation Consolidation
18
+
19
+ ## Purpose
20
+ Compile the final QA implementation report synthesizing all testing, analysis, and verdict results, prepare artifacts for archival, and execute handoff to the appropriate next agent (devops on PASS, dev on FAIL).
21
+
22
+ ## Prerequisites
23
+ - test-results.yaml (test execution)
24
+ - sast-report.yaml (security analysis)
25
+ - regression-report.yaml (regression testing)
26
+ - performance-report.yaml (benchmarking)
27
+ - qa-verdict.yaml (final verdict)
28
+
29
+ ## Steps
30
+
31
+ 1. **Load and Validate All QA Artifacts**
32
+ - Read all five prerequisite YAML files
33
+ - Validate schema compliance and completeness
34
+ - Ensure verdict is consistent with gate results
35
+ - Flag any inconsistencies for investigation
36
+
37
+ 2. **Compile Executive Summary**
38
+ - Extract verdict (PASS, FAIL, CONDITIONAL) and overall score
39
+ - Summarize key metrics: pass rate, coverage, vulnerabilities, regressions, performance
40
+ - Highlight strengths and concerns
41
+ - Provide deployment recommendation
42
+
43
+ 3. **Aggregate Test Results**
44
+ - Total tests: unit + integration + e2e
45
+ - Pass rate across all test types
46
+ - Coverage by module and overall
47
+ - List any test quality issues (flaky, skipped, long-running)
48
+
49
+ 4. **Aggregate Security Findings**
50
+ - Total SAST findings by severity (critical, high, medium, low)
51
+ - Dependency vulnerabilities
52
+ - Accepted exceptions with justifications
53
+ - Remediation status
54
+
55
+ 5. **Aggregate Regression Results**
56
+ - True regressions by severity
57
+ - Intentional changes documented
58
+ - Baseline update status
59
+ - Smoke test results
60
+
61
+ 6. **Aggregate Performance Results**
62
+ - Key metrics: CLI startup, agent execution, file operations, memory
63
+ - Comparison to baseline and thresholds
64
+ - Performance improvements and degradations
65
+ - Bottlenecks identified
66
+
67
+ 7. **Compile Metrics and Trends**
68
+ - QA implementation score breakdown by gate
69
+ - Historical comparison (if previous releases available)
70
+ - Velocity metrics: tests added, bugs found, time spent
71
+ - Quality trend: improving, stable, degrading
72
+
73
+ 8. **Document Remediation History (if FAIL verdict)**
74
+ - List of issues found in initial QA run
75
+ - Fixes applied by dev agent
76
+ - Re-testing results
77
+ - Number of QA cycles required to achieve verdict
78
+
79
+ 9. **Prepare Artifacts for Archival**
80
+ - Collect all QA YAML reports in .chati/qa-reports/[version]/
81
+ - Save raw test outputs, SAST logs, benchmark results
82
+ - Generate HTML reports for human review (coverage, SAST)
83
+ - Timestamp all artifacts
84
+
85
+ 10. **Update Baselines**
86
+ - If verdict is PASS, update test baseline, performance baseline
87
+ - Archive old baselines with version tags
88
+ - Document baseline changes in CHANGELOG
89
+ - Commit baselines to version control (if appropriate)
90
+
91
+ 11. **Generate Handoff Package**
92
+ - **For PASS verdict**: Create deployment checklist for devops
93
+ - **For FAIL verdict**: Create remediation plan for dev
94
+ - **For CONDITIONAL verdict**: Create decision framework for stakeholder
95
+ - Include quick-reference guide to QA reports
96
+
97
+ 12. **Execute Handoff**
98
+ - Update session.yaml with QA implementation completion
99
+ - Log handoff decision (to devops, dev, or orchestrator)
100
+ - If autonomous gate (PASS verdict), trigger next agent automatically
101
+ - If manual approval needed, prompt orchestrator
102
+
103
+ ## Decision Points
104
+
105
+ - **Baseline Update Timing**: If verdict is PASS, update baselines immediately. If verdict is CONDITIONAL, defer baseline update until deployment decision is made. If verdict is FAIL, do not update baselines.
106
+
107
+ - **Archival Scope**: Decide whether to archive raw outputs (test logs, SAST JSON) or only summary reports. Recommend: Archive both for audit trail, compress raw outputs to save space.
108
+
109
+ - **Handoff Destination**: If verdict is PASS and autonomous gate is active, handoff to devops automatically. If verdict is FAIL, handoff to dev. If verdict is CONDITIONAL, handoff to orchestrator for user decision.
110
+
111
+ ## Error Handling
112
+
113
+ **Missing QA Artifact**
114
+ - If any prerequisite YAML is missing, cannot consolidate
115
+ - Log error with specific missing file
116
+ - Status = INCOMPLETE
117
+ - Escalate to orchestrator for resolution
118
+
119
+ **Inconsistent Verdict**
120
+ - If qa-verdict.yaml says PASS but reports contain failures, investigate
121
+ - Trust individual gate reports over verdict
122
+ - Recalculate verdict based on gate results
123
+ - Log discrepancy and corrected verdict
124
+ - Escalate for manual review
125
+
126
+ **Archival Failure**
127
+ - If artifact archival fails (disk full, permission error), log error
128
+ - Proceed with consolidation and handoff
129
+ - Flag archival failure in report
130
+ - Recommend manual archival before deployment
131
+
132
+ **Autonomous Handoff Failure**
133
+ - If autonomous gate should trigger but handoff fails, log error
134
+ - Do not proceed automatically
135
+ - Escalate to orchestrator for manual handoff
136
+ - Document failure in session.yaml
137
+
138
+ ## Output Format
139
+
140
+ ```yaml
141
+ # qa-implementation-report.yaml
142
+ version: 1.0.0
143
+ created: YYYY-MM-DD
144
+ agent: qa-implementation
145
+ phase: validate
146
+
147
+ executive_summary:
148
+ verdict: PASS # PASS, FAIL, CONDITIONAL
149
+ overall_score: 96 / 100
150
+ confidence: high
151
+ deployment_recommendation: APPROVED
152
+
153
+ key_metrics:
154
+ tests:
155
+ total: 247
156
+ passed: 247
157
+ pass_rate: 100%
158
+ coverage: 76.3%
159
+
160
+ security:
161
+ critical_vulnerabilities: 0
162
+ high_vulnerabilities: 0
163
+ medium_vulnerabilities: 6
164
+ low_vulnerabilities: 10
165
+
166
+ regressions:
167
+ true_regressions: 0
168
+ intentional_changes: 4
169
+
170
+ performance:
171
+ overall_delta: -5.2% # negative = improvement
172
+ within_thresholds: true
173
+
174
+ strengths:
175
+ - All 247 tests passing with no failures
176
+ - Zero critical or high security vulnerabilities
177
+ - Zero functional regressions detected
178
+ - Overall performance improved by 5.2%
179
+ - Code coverage exceeds target (76.3% vs 75%)
180
+
181
+ concerns: []
182
+
183
+ minor_issues:
184
+ - CLI module coverage 2% below target (68% vs 70%)
185
+ - YAML parsing 20% slower (justified by security fix)
186
+ - Consistency validation 12.5% slower (justified by reliability)
187
+
188
+ test_results:
189
+ summary:
190
+ total_tests: 247
191
+ passed: 247
192
+ failed: 0
193
+ skipped: 0
194
+ pass_rate: 100%
195
+ execution_time: 42.3s
196
+
197
+ by_type:
198
+ unit:
199
+ total: 198
200
+ passed: 198
201
+ pass_rate: 100%
202
+ execution_time: 18.7s
203
+
204
+ integration:
205
+ total: 49
206
+ passed: 49
207
+ pass_rate: 100%
208
+ execution_time: 23.6s
209
+
210
+ coverage:
211
+ overall: 76.3%
212
+ target: 75%
213
+ status: PASS
214
+ by_module:
215
+ orchestrator: 87% (target 85%) PASS
216
+ state_management: 91% (target 90%) PASS
217
+ agents: 78% (target 75%) PASS
218
+ file_operations: 80% (target 80%) PASS
219
+ validators: 92% (target 90%) PASS
220
+ cli: 68% (target 70%) CONDITIONAL
221
+ i18n: 62% (target 60%) PASS
222
+
223
+ test_quality:
224
+ flaky_tests: 0
225
+ skipped_tests: 0
226
+ long_running_tests: 0
227
+ no_assertions: 0
228
+
229
+ source: test-results.yaml
230
+
231
+ security_analysis:
232
+ summary:
233
+ critical: 0
234
+ high: 0
235
+ medium: 6
236
+ low: 10
237
+ false_positives: 2
238
+ accepted_exceptions: 1
239
+
240
+ gate_status: PASS # 0 critical, 0 high
241
+
242
+ dependency_vulnerabilities:
243
+ critical: 0
244
+ high: 0
245
+ medium: 0 # yaml upgraded to 2.3.4
246
+ low: 4
247
+
248
+ remediation_complete: true
249
+ details: "All high-severity vulnerabilities remediated (path traversal, command injection)"
250
+
251
+ source: sast-report.yaml
252
+
253
+ regression_analysis:
254
+ summary:
255
+ true_regressions: 0
256
+ intentional_changes: 4
257
+ non_deterministic: 1
258
+
259
+ gate_status: PASS
260
+
261
+ intentional_changes:
262
+ - Enhanced error messages with recovery actions
263
+ - Added --verbose flag to CLI
264
+ - State schema updated to v2.0
265
+ - Default language changed to English
266
+
267
+ smoke_tests:
268
+ installer_workflow: PASS
269
+ agent_handoff: PASS
270
+ mode_transitions: PASS
271
+ upgrade_path: PASS
272
+
273
+ baseline_updated: true
274
+
275
+ source: regression-report.yaml
276
+
277
+ performance_benchmarks:
278
+ summary:
279
+ overall_delta: -5.2% # negative = faster
280
+ within_thresholds: true
281
+
282
+ gate_status: PASS
283
+
284
+ key_metrics:
285
+ cli_startup:
286
+ current: 265ms
287
+ baseline: 280ms
288
+ delta: -5.4%
289
+ threshold: 500ms
290
+ status: PASS
291
+
292
+ agent_execution:
293
+ current_mean: 2.15s
294
+ baseline_mean: 2.31s
295
+ delta: -6.9%
296
+ threshold: 2s (acceptable threshold)
297
+ status: ACCEPTABLE
298
+
299
+ memory_peak:
300
+ current: 148MB
301
+ baseline: 142MB
302
+ delta: +4.2%
303
+ threshold: 300MB
304
+ status: PASS
305
+
306
+ accepted_trade_offs:
307
+ - YAML parsing 20% slower (security fix priority)
308
+ - Consistency validation 12.5% slower (reliability priority)
309
+
310
+ baseline_updated: true
311
+
312
+ source: performance-report.yaml
313
+
314
+ verdict_details:
315
+ verdict: PASS
316
+ overall_score: 96 / 100
317
+ threshold_for_pass: 95
318
+
319
+ gate_results:
320
+ test_results: PASS (24/25)
321
+ sast: PASS (25/25)
322
+ regressions: PASS (24/25)
323
+ performance: PASS (23/25)
324
+
325
+ autonomous_gate: true
326
+ manual_override: false
327
+
328
+ source: qa-verdict.yaml
329
+
330
+ metrics_and_trends:
331
+ qa_implementation_score: 96
332
+ qa_planning_score: 96
333
+ combined_qa_score: 96
334
+
335
+ historical_comparison:
336
+ previous_release: null # first release
337
+ score_trend: baseline_established
338
+
339
+ velocity:
340
+ tests_added: 247
341
+ bugs_found: 15 # initial QA run
342
+ bugs_fixed: 15
343
+ qa_cycles: 2 # initial run + remediation + rerun
344
+ total_qa_time: 12 hours
345
+
346
+ quality_trend: stable # baseline established
347
+
348
+ remediation_history:
349
+ initial_qa_run:
350
+ date: YYYY-MM-DD
351
+ status: FAIL
352
+ blocking_issues:
353
+ - 12 test failures (state management, file operations, CLI)
354
+ - 2 high SAST vulnerabilities (path traversal, command injection)
355
+ - Coverage gap in file_operations (-7%)
356
+
357
+ dev_remediation:
358
+ date: YYYY-MM-DD
359
+ fixes_applied:
360
+ - Fixed state management lock acquisition
361
+ - Added permission checks in file operations
362
+ - Added 10-12 tests for file_operations coverage
363
+ - Fixed path traversal vulnerability
364
+ - Fixed command injection vulnerability
365
+ - Upgraded yaml package for security
366
+
367
+ retest_qa_run:
368
+ date: YYYY-MM-DD
369
+ status: PASS
370
+ result: All issues resolved, quality gates passed
371
+
372
+ cycles_required: 2
373
+ time_to_resolution: 8 hours
374
+
375
+ artifacts:
376
+ qa_reports:
377
+ - test-results.yaml
378
+ - sast-report.yaml
379
+ - regression-report.yaml
380
+ - performance-report.yaml
381
+ - qa-verdict.yaml
382
+ - qa-implementation-report.yaml
383
+
384
+ raw_outputs:
385
+ - test-results/unit-output.log
386
+ - test-results/integration-output.log
387
+ - sast-results/eslint-output.json
388
+ - sast-results/npm-audit.json
389
+ - coverage/index.html
390
+
391
+ archived_to: .chati/qa-reports/1.0.0/
392
+ timestamp: YYYY-MM-DDTHH:MM:SSZ
393
+
394
+ baselines_updated:
395
+ test_baseline:
396
+ file: .chati/test-baseline.yaml
397
+ version: 1.0.0
398
+ status: established # or updated
399
+
400
+ performance_baseline:
401
+ file: .chati/performance-baseline.yaml
402
+ version: 1.0.0
403
+ status: established
404
+
405
+ committed_to_vcs: false # baselines in .gitignore
406
+
407
+ deployment_readiness:
408
+ status: READY
409
+ prerequisites_met:
410
+ - All tests passing: true
411
+ - No critical vulnerabilities: true
412
+ - No regressions: true
413
+ - Performance acceptable: true
414
+ - Documentation complete: true
415
+ - Baselines updated: true
416
+ - QA reports archived: true
417
+
418
+ deployment_checklist:
419
+ - Run final pre-deployment smoke test
420
+ - Verify package.json version matches release
421
+ - Verify CHANGELOG updated
422
+ - Verify migration guides complete (if breaking changes)
423
+ - Tag release in git
424
+ - Publish to npm
425
+ - Update documentation site
426
+ - Announce release
427
+
428
+ rollback_plan:
429
+ available: true
430
+ tested: true
431
+ procedure: "npx chati-dev upgrade rollback --to=1.0.0"
432
+
433
+ post_deployment_monitoring:
434
+ - Monitor error rates in production (if telemetry available)
435
+ - Track user feedback on GitHub issues
436
+ - Monitor performance metrics (CLI startup, agent execution)
437
+ - Watch for edge cases not covered in tests
438
+
439
+ handoff:
440
+ to: devops
441
+ autonomous: true
442
+ reason: "PASS verdict with score 96% >= 95%, autonomous gate allows transition"
443
+
444
+ handoff_package:
445
+ - Deployment checklist (see deployment_readiness)
446
+ - QA reports for audit (archived in .chati/qa-reports/1.0.0/)
447
+ - Rollback plan tested and verified
448
+ - Post-deployment monitoring recommendations
449
+
450
+ quick_reference:
451
+ - Verdict: PASS
452
+ - Score: 96/100
453
+ - Tests: 247/247 passing
454
+ - Security: 0 critical, 0 high vulnerabilities
455
+ - Regressions: 0 true regressions
456
+ - Performance: All metrics within thresholds
457
+ - Ready for deployment: YES
458
+
459
+ recommendations:
460
+ immediate:
461
+ - Proceed to devops agent for deployment
462
+ - Execute deployment checklist
463
+ - Monitor production after deployment
464
+
465
+ short_term:
466
+ - Collect user feedback on new features
467
+ - Monitor performance metrics in production
468
+ - Address minor issues in backlog (CLI coverage 2% gap)
469
+
470
+ long_term:
471
+ - Evaluate alternative YAML parser for performance
472
+ - Review quality gates based on production data
473
+ - Expand test coverage for edge cases discovered in production
474
+
475
+ session_update:
476
+ agent: qa-implementation
477
+ status: completed
478
+ verdict: PASS
479
+ score: 96
480
+ next_agent: devops
481
+ autonomous_transition: approved
482
+ timestamp: YYYY-MM-DDTHH:MM:SSZ
483
+
484
+ audit_trail:
485
+ qa_planning:
486
+ agent: qa-planning
487
+ score: 96
488
+ status: completed
489
+ date: YYYY-MM-DD
490
+
491
+ qa_implementation:
492
+ agent: qa-implementation
493
+ score: 96
494
+ status: completed
495
+ date: YYYY-MM-DD
496
+ cycles: 2
497
+
498
+ combined_qa_score: 96
499
+ verdict: PASS
500
+ autonomous_gates_passed: 2
501
+ manual_overrides: 0
502
+ deviation_protocol_invoked: 0
503
+
504
+ next_steps:
505
+ - devops: Begin deployment preparation
506
+ - Archive QA reports for audit trail
507
+ - Update project documentation with release notes
508
+ - Prepare for production monitoring
509
+
510
+ conclusion:
511
+ status: QA APPROVED
512
+ quality_level: EXCELLENT
513
+ deployment_ready: true
514
+ confidence: HIGH
515
+
516
+ final_statement: |
517
+ All QA implementation activities completed successfully. The system has passed
518
+ all quality gates with a score of 96/100. Zero test failures, zero critical
519
+ vulnerabilities, zero regressions, and improved performance. The system is
520
+ ready for deployment to production. Devops agent is cleared to proceed with
521
+ deployment preparation and release.
522
+ ```