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,339 @@
1
+ ---
2
+ id: qa-planning-gate-define
3
+ agent: qa-planning
4
+ trigger: qa-planning-test-strategy
5
+ phase: clarity
6
+ requires_input: false
7
+ parallelizable: false
8
+ outputs: [quality-gates.yaml]
9
+ handoff_to: qa-planning-coverage-plan
10
+ autonomous_gate: false
11
+ criteria:
12
+ - Quality gates defined for all pipeline stages
13
+ - Thresholds established with clear pass/fail criteria
14
+ - Gate enforcement mechanisms specified
15
+ ---
16
+
17
+ # Quality Gate Definition
18
+
19
+ ## Purpose
20
+ Define quality gates and enforcement thresholds for each stage of the chati.dev pipeline, ensuring consistent quality standards from development through deployment.
21
+
22
+ ## Prerequisites
23
+ - test-strategy.yaml completed with testing approach
24
+ - Phase plan showing pipeline stages (clarity → build → validate → deploy)
25
+ - Understanding of mode governance rules from constitution
26
+ - Risk matrix inputs (will be formalized in later task)
27
+
28
+ ## Steps
29
+
30
+ 1. **Review Pipeline Architecture**
31
+ - Identify all pipeline stages: clarity (8 agents), build (dev + qa-impl), validate (qa-impl verdict), deploy (devops)
32
+ - Map agent handoff points where quality checks occur
33
+ - Note autonomous transition triggers (qa-planning → dev at 95%, qa-impl verdict → devops on PASS)
34
+ - Identify backward transition scenarios (build → clarity when spec issues found)
35
+
36
+ 2. **Define Pre-Commit Gates**
37
+ - **Unit Test Pass Rate**: 100% (all unit tests must pass)
38
+ - **Code Coverage**: Minimum 70% overall, 80% for new code
39
+ - **Linting**: Zero errors, warnings under threshold (10 max)
40
+ - **Type Safety**: Zero TypeScript errors
41
+ - **Enforcement**: Git pre-commit hooks
42
+ - **Bypass**: Not allowed (ensures baseline quality)
43
+
44
+ 3. **Define Clarity Phase Gates**
45
+ - **Agent Completion**: All 8 clarity agents must complete (greenfield-wu/brownfield-wu → brief → detail → architect → ux → phases → tasks → qa-planning)
46
+ - **Specification Completeness**: 100% of required sections filled
47
+ - **QA Planning Score**: >= 95% for autonomous transition to build phase
48
+ - **Manual Override**: Available if score 90-94% with justification
49
+ - **Enforcement**: Orchestrator validation before mode transition
50
+
51
+ 4. **Define Build Phase Gates**
52
+ - **Implementation Complete**: All tasks marked done in session.yaml
53
+ - **Test Execution**: All unit + integration tests passing
54
+ - **SAST Clean**: Zero critical vulnerabilities, high vulnerabilities < 3
55
+ - **No Regressions**: All regression checks passing vs baseline
56
+ - **Performance**: Benchmarks within 10% of targets
57
+ - **Enforcement**: qa-implementation agent validation
58
+
59
+ 5. **Define Validate Phase Gates**
60
+ - **QA Verdict**: PASS required for deployment
61
+ - **Manual Testing**: All critical paths verified
62
+ - **Documentation**: README, API docs, migration guides complete
63
+ - **Backward Compatibility**: Upgrade path validated
64
+ - **Enforcement**: qa-impl-verdict task with autonomous gate
65
+
66
+ 6. **Define Deploy Phase Gates**
67
+ - **Package Integrity**: npm audit clean, no missing dependencies
68
+ - **Version Compliance**: Semantic versioning followed
69
+ - **Release Notes**: Complete with breaking changes documented
70
+ - **Rollback Plan**: Tested and verified
71
+ - **Enforcement**: devops agent validation
72
+
73
+ 7. **Establish Threshold Levels**
74
+ - **BLOCKER**: Must fix immediately, blocks all progress (test failures, critical vulnerabilities)
75
+ - **CRITICAL**: Must fix before merge/release (high vulnerabilities, major regressions)
76
+ - **MAJOR**: Should fix in current sprint (moderate issues, technical debt)
77
+ - **MINOR**: Can defer to backlog (low priority issues, enhancements)
78
+
79
+ 8. **Define Gate Enforcement Mechanisms**
80
+ - **Automated**: CI/CD pipeline checks, pre-commit hooks
81
+ - **Agent-Enforced**: Orchestrator mode governance, qa-planning consolidation score
82
+ - **Manual**: Human review for override decisions, complex risk assessment
83
+ - **Audit Trail**: All gate passes/failures logged in session.yaml mode_transitions
84
+
85
+ 9. **Create Gate Bypass Procedures**
86
+ - **Deviation Protocol**: Orchestrator-managed with user confirmation
87
+ - **Documentation Required**: Reason, risk assessment, mitigation plan
88
+ - **Approval Level**: User approval for mode transitions, team lead for deploy gates
89
+ - **Temporal Limits**: Bypass expires after 24 hours, requires renewal
90
+
91
+ 10. **Map Gates to Risk Levels**
92
+ - **Critical Risk Areas**: Stricter gates (state management → 100% test coverage, zero errors)
93
+ - **High Risk Areas**: Standard gates (agent logic → 80% coverage, < 3 warnings)
94
+ - **Medium Risk Areas**: Relaxed gates (UI/formatting → 70% coverage)
95
+ - **Low Risk Areas**: Minimal gates (documentation → linting only)
96
+
97
+ 11. **Define Monitoring and Metrics**
98
+ - **Gate Pass Rate**: Track percentage of clean gate passes
99
+ - **Bypass Frequency**: Monitor override usage patterns
100
+ - **Time in Gate**: Measure delay caused by gate failures
101
+ - **Trend Analysis**: Track improvement/degradation over sprints
102
+
103
+ 12. **Compile Quality Gates Document**
104
+ - Structure gates by pipeline stage
105
+ - Include enforcement mechanisms and thresholds
106
+ - Document bypass procedures
107
+ - Map to mode governance rules
108
+
109
+ ## Decision Points
110
+
111
+ - **Threshold Strictness**: For new projects (greenfield), gates can be stricter (80% coverage baseline). For existing codebases (brownfield), gates may need gradual tightening (70% → 75% → 80% over releases).
112
+
113
+ - **Autonomous Transition Score**: The 95% threshold for qa-planning → dev transition is constitutional. If project risk profile suggests adjustment, flag for deviation protocol review.
114
+
115
+ - **SAST Severity Tolerance**: Zero critical vulnerabilities is standard. If legacy dependencies have unavoidable high-severity issues, document exceptions explicitly.
116
+
117
+ ## Error Handling
118
+
119
+ **Conflicting Gate Requirements**
120
+ - If test coverage gates conflict with timeline constraints, document trade-off
121
+ - Propose phased gate implementation (strict for new code, gradual for legacy)
122
+ - Escalate to orchestrator if unresolvable
123
+
124
+ **Unmeasurable Metrics**
125
+ - If a proposed gate lacks tooling for measurement (e.g., "code readability"), convert to measurable proxy (e.g., "cyclomatic complexity < 10")
126
+ - Document limitation and suggest manual review cadence
127
+
128
+ **Tool Integration Failures**
129
+ - If CI/CD pipeline cannot enforce a gate automatically, define manual checklist
130
+ - Flag for devops agent to implement automation in future sprint
131
+ - Ensure interim manual process is documented
132
+
133
+ ## Output Format
134
+
135
+ ```yaml
136
+ # quality-gates.yaml
137
+ version: 1.0.0
138
+ created: YYYY-MM-DD
139
+ agent: qa-planning
140
+
141
+ pipeline_stages:
142
+ pre_commit:
143
+ gates:
144
+ - name: Unit Tests
145
+ threshold: 100% pass rate
146
+ enforcement: git pre-commit hook
147
+ bypass: not_allowed
148
+
149
+ - name: Code Coverage
150
+ threshold: 70% overall, 80% new code
151
+ enforcement: coverage tool (c8)
152
+ bypass: not_allowed
153
+
154
+ - name: Linting
155
+ threshold: 0 errors, max 10 warnings
156
+ enforcement: eslint pre-commit
157
+ bypass: not_allowed
158
+
159
+ - name: Type Safety
160
+ threshold: 0 TypeScript errors
161
+ enforcement: tsc --noEmit
162
+ bypass: not_allowed
163
+
164
+ clarity:
165
+ gates:
166
+ - name: Agent Completion
167
+ threshold: 8/8 agents complete
168
+ enforcement: orchestrator validation
169
+ bypass: deviation_protocol
170
+
171
+ - name: Specification Completeness
172
+ threshold: 100% required sections
173
+ enforcement: agent self-validation
174
+ bypass: manual_review
175
+
176
+ - name: QA Planning Score
177
+ threshold: ">= 95% for autonomous transition"
178
+ enforcement: qa-planning-consolidate
179
+ bypass: manual_approval_90_94_percent
180
+ autonomous_gate: true
181
+
182
+ build:
183
+ gates:
184
+ - name: Implementation Complete
185
+ threshold: All tasks done
186
+ enforcement: session.yaml validation
187
+ bypass: deviation_protocol
188
+
189
+ - name: Test Suite
190
+ threshold: 100% pass rate
191
+ enforcement: CI pipeline
192
+ bypass: not_allowed
193
+
194
+ - name: SAST
195
+ threshold: 0 critical, < 3 high severity
196
+ enforcement: eslint-plugin-security
197
+ bypass: documented_exception
198
+
199
+ - name: Regressions
200
+ threshold: 0 new regressions
201
+ enforcement: regression test suite
202
+ bypass: risk_assessment
203
+
204
+ - name: Performance
205
+ threshold: Within 10% of baseline
206
+ enforcement: benchmark suite
207
+ bypass: justified_trade_off
208
+
209
+ validate:
210
+ gates:
211
+ - name: QA Verdict
212
+ threshold: PASS status
213
+ enforcement: qa-impl-verdict
214
+ bypass: not_allowed
215
+ autonomous_gate: true
216
+
217
+ - name: Manual Testing
218
+ threshold: All critical paths verified
219
+ enforcement: qa-impl checklist
220
+ bypass: risk_accepted
221
+
222
+ - name: Documentation
223
+ threshold: Complete and accurate
224
+ enforcement: manual review
225
+ bypass: defer_to_post_release
226
+
227
+ deploy:
228
+ gates:
229
+ - name: Package Integrity
230
+ threshold: npm audit clean
231
+ enforcement: npm audit
232
+ bypass: documented_exception
233
+
234
+ - name: Version Compliance
235
+ threshold: semver rules followed
236
+ enforcement: automated check
237
+ bypass: not_allowed
238
+
239
+ - name: Release Notes
240
+ threshold: Complete with breaking changes
241
+ enforcement: manual review
242
+ bypass: not_allowed
243
+
244
+ severity_levels:
245
+ BLOCKER:
246
+ description: Blocks all progress
247
+ examples: [test failures, critical vulnerabilities, build breakage]
248
+ resolution_time: immediate
249
+
250
+ CRITICAL:
251
+ description: Blocks merge/release
252
+ examples: [high vulnerabilities, major regressions, data loss risks]
253
+ resolution_time: same day
254
+
255
+ MAJOR:
256
+ description: Fix in current sprint
257
+ examples: [moderate issues, technical debt, performance degradation]
258
+ resolution_time: within sprint
259
+
260
+ MINOR:
261
+ description: Backlog eligible
262
+ examples: [low priority issues, enhancements, cosmetic fixes]
263
+ resolution_time: next sprint or later
264
+
265
+ bypass_procedures:
266
+ deviation_protocol:
267
+ trigger: orchestrator
268
+ requires: user confirmation
269
+ documentation: [reason, risk assessment, mitigation plan]
270
+ audit: logged in session.yaml mode_transitions
271
+ expiration: 24 hours
272
+
273
+ manual_approval:
274
+ trigger: agent or developer
275
+ requires: team lead approval
276
+ documentation: [justification, alternative validation]
277
+ audit: logged in gate override log
278
+
279
+ documented_exception:
280
+ trigger: persistent issue
281
+ requires: exception record in exceptions.yaml
282
+ documentation: [issue details, why unfixable, risk acceptance]
283
+ review_cadence: quarterly
284
+
285
+ enforcement:
286
+ automated:
287
+ - Git pre-commit hooks
288
+ - CI/CD pipeline checks
289
+ - Coverage threshold enforcement
290
+
291
+ agent_enforced:
292
+ - Orchestrator mode governance
293
+ - qa-planning consolidation score
294
+ - qa-impl verdict gate
295
+
296
+ manual:
297
+ - Override decision review
298
+ - Complex risk assessment
299
+ - Deployment approval
300
+
301
+ metrics:
302
+ gate_pass_rate:
303
+ target: ">= 90%"
304
+ measurement: successful gates / total gate checks
305
+
306
+ bypass_frequency:
307
+ target: "< 5% of gate checks"
308
+ measurement: bypass approvals / total gate checks
309
+
310
+ time_in_gate:
311
+ target: "< 4 hours average"
312
+ measurement: time from failure to resolution
313
+
314
+ trend:
315
+ measurement: monthly comparison
316
+ alert_threshold: 10% degradation
317
+
318
+ risk_mapping:
319
+ critical:
320
+ areas: [state management, mode governance, file operations]
321
+ gates: [100% coverage, 0 errors, full integration tests]
322
+
323
+ high:
324
+ areas: [agent logic, handoff validation, MCP integration]
325
+ gates: [80% coverage, "< 3 warnings", contract tests]
326
+
327
+ medium:
328
+ areas: [i18n, CLI parsing, error messages]
329
+ gates: [70% coverage, standard linting]
330
+
331
+ low:
332
+ areas: [documentation, formatting, comments]
333
+ gates: [linting only]
334
+
335
+ next_steps:
336
+ - Create detailed coverage plan per module
337
+ - Build risk matrix mapping features to risk levels
338
+ - Validate gate thresholds against project timeline
339
+ ```