@geraldmaron/construct 1.0.6 → 1.0.8

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 (218) hide show
  1. package/README.md +39 -34
  2. package/bin/construct +1403 -96
  3. package/commands/build/feature.md +1 -1
  4. package/commands/build/fix.md +1 -1
  5. package/commands/design/access.md +1 -1
  6. package/commands/design/flow.md +1 -1
  7. package/commands/design/ui.md +1 -1
  8. package/commands/measure/experiment.md +1 -1
  9. package/commands/measure/metrics.md +1 -1
  10. package/commands/measure/results.md +1 -1
  11. package/commands/plan/api.md +1 -1
  12. package/commands/plan/challenge.md +1 -1
  13. package/commands/plan/decide.md +1 -1
  14. package/commands/plan/feature.md +1 -1
  15. package/commands/plan/requirements.md +1 -1
  16. package/commands/remember/context.md +1 -1
  17. package/commands/remember/handoff.md +1 -1
  18. package/commands/remember/runbook.md +1 -1
  19. package/commands/review/code.md +1 -1
  20. package/commands/review/quality.md +1 -1
  21. package/commands/review/security.md +1 -1
  22. package/commands/ship/ready.md +1 -1
  23. package/commands/ship/release.md +1 -1
  24. package/commands/ship/status.md +1 -1
  25. package/commands/understand/docs.md +1 -1
  26. package/commands/understand/this.md +1 -1
  27. package/commands/understand/why.md +1 -1
  28. package/commands/work/clean.md +1 -1
  29. package/commands/work/drive.md +1 -1
  30. package/commands/work/optimize-prompts.md +2 -2
  31. package/commands/work/parallel-review.md +1 -1
  32. package/db/schema/007_tags.sql +30 -0
  33. package/db/schema/008_skill_usage.sql +24 -0
  34. package/db/schema/009_scheduler.sql +14 -0
  35. package/examples/internal/roles/architect/bad/clever-plan-without-contracts.md +1 -1
  36. package/examples/internal/roles/architect/golden/explicit-tradeoff-before-plan.md +1 -1
  37. package/examples/internal/roles/engineer/bad/speculative-abstraction.md +1 -1
  38. package/examples/internal/roles/engineer/golden/read-before-write.md +1 -1
  39. package/examples/internal/roles/qa/bad/coverage-theater.md +1 -1
  40. package/examples/internal/roles/qa/golden/regression-gate.md +1 -1
  41. package/examples/seed-observations/decisions.md +1 -1
  42. package/lib/audit-skills.mjs +3 -3
  43. package/lib/auto-docs.mjs +8 -8
  44. package/lib/boundary.mjs +126 -0
  45. package/lib/cache-strategy-google.js +26 -31
  46. package/lib/cli-commands.mjs +276 -122
  47. package/lib/comment-lint.mjs +139 -1
  48. package/lib/completions.mjs +1 -1
  49. package/lib/config/schema.mjs +15 -1
  50. package/lib/contracts/validate.mjs +371 -0
  51. package/lib/daemons/contract.mjs +210 -0
  52. package/lib/distill.mjs +22 -4
  53. package/lib/doc-stamp.mjs +48 -0
  54. package/lib/docs-verify.mjs +59 -6
  55. package/lib/doctor/cli.mjs +16 -1
  56. package/lib/doctor/index.mjs +3 -1
  57. package/lib/doctor/watchers/consistency.mjs +360 -0
  58. package/lib/doctor/watchers/mcp-protocol.mjs +232 -0
  59. package/lib/document-extract.mjs +420 -17
  60. package/lib/document-ingest.mjs +2 -0
  61. package/lib/embed/cli.mjs +124 -3
  62. package/lib/embed/daemon.mjs +43 -4
  63. package/lib/embed/docs-lifecycle.mjs +1 -1
  64. package/lib/embed/inbox.mjs +50 -3
  65. package/lib/embed/role-framing.mjs +3 -3
  66. package/lib/embed/scheduler.mjs +33 -5
  67. package/lib/env-config.mjs +9 -3
  68. package/lib/evaluator-optimizer.mjs +2 -3
  69. package/lib/extractors/calendar.mjs +173 -0
  70. package/lib/extractors/shared/drop-info.mjs +22 -0
  71. package/lib/extractors/transcript.mjs +0 -0
  72. package/lib/gates-audit.mjs +8 -2
  73. package/lib/git-hooks/prepare-commit-msg +1 -1
  74. package/lib/headhunt.mjs +2 -2
  75. package/lib/hooks/agent-tracker.mjs +6 -11
  76. package/lib/hooks/comment-lint.mjs +16 -0
  77. package/lib/hooks/guard-bash.mjs +35 -14
  78. package/lib/hooks/mcp-audit.mjs +14 -1
  79. package/lib/hooks/pre-compact.mjs +92 -5
  80. package/lib/hooks/pre-push-gate.mjs +41 -8
  81. package/lib/hooks/proactive-activation.mjs +0 -14
  82. package/lib/hooks/registry-sync.mjs +2 -2
  83. package/lib/hooks/rule-verifier.mjs +217 -0
  84. package/lib/hooks/session-optimize.mjs +2 -1
  85. package/lib/hooks/stop-notify.mjs +7 -6
  86. package/lib/host-capabilities.mjs +10 -1
  87. package/lib/hygiene/scan.mjs +141 -0
  88. package/lib/init-unified.mjs +73 -65
  89. package/lib/install/stage-project.mjs +4 -4
  90. package/lib/intake/classify.mjs +309 -58
  91. package/lib/intake/daemon.mjs +121 -0
  92. package/lib/intake/filesystem-queue.mjs +31 -6
  93. package/lib/intake/intake-config.mjs +2 -1
  94. package/lib/intake/postgres-queue.mjs +45 -3
  95. package/lib/intake/prepare.mjs +3 -1
  96. package/lib/intake/quarantine.mjs +205 -0
  97. package/lib/intake/session-prelude.mjs +7 -1
  98. package/lib/intake/traceability.mjs +90 -0
  99. package/lib/knowledge/postgres-search.mjs +132 -0
  100. package/lib/knowledge/research-store.mjs +2 -0
  101. package/lib/knowledge/search.mjs +14 -4
  102. package/lib/maintenance/cleanup.mjs +315 -0
  103. package/lib/mcp/memory-bridge.mjs +276 -0
  104. package/lib/mcp/server.mjs +11 -3
  105. package/lib/mcp/tools/skills.mjs +32 -11
  106. package/lib/mcp/tools/workflow.mjs +25 -0
  107. package/lib/mcp-catalog.json +12 -8
  108. package/lib/mcp-platform-config.mjs +16 -8
  109. package/lib/migrations/index.mjs +106 -0
  110. package/lib/migrations/v1-baseline.mjs +33 -0
  111. package/lib/model-registry.mjs +1 -1
  112. package/lib/observation-store.mjs +9 -4
  113. package/lib/opencode-runtime-plugin.mjs +1 -1
  114. package/lib/orchestration-policy.mjs +4 -4
  115. package/lib/outcomes/record.mjs +2 -0
  116. package/lib/overrides/resolver.mjs +3 -3
  117. package/lib/parity.mjs +4 -4
  118. package/lib/policy/engine.mjs +2 -2
  119. package/lib/profiles/lifecycle.mjs +1 -1
  120. package/lib/profiles/rebrand.mjs +46 -0
  121. package/lib/project-init-shared.mjs +12 -0
  122. package/lib/prompt-metadata.mjs +4 -4
  123. package/lib/provider-capabilities.js +20 -7
  124. package/lib/providers/auth-manager.mjs +58 -17
  125. package/lib/providers/circuit-breaker.mjs +14 -0
  126. package/lib/providers/contract.mjs +67 -3
  127. package/lib/providers/creds.mjs +219 -0
  128. package/lib/providers/scaffold.mjs +107 -0
  129. package/lib/reflect.mjs +49 -12
  130. package/lib/role-preload.mjs +5 -0
  131. package/lib/roles/catalog.mjs +1 -1
  132. package/lib/roles/manifest.mjs +2 -2
  133. package/lib/scheduler/index.mjs +112 -0
  134. package/lib/scheduler/solo.mjs +183 -0
  135. package/lib/server/index.mjs +29 -29
  136. package/lib/server/insights.mjs +14 -12
  137. package/lib/server/langfuse-login.mjs +58 -0
  138. package/lib/server/static/assets/index-ab25c707.js +1 -1
  139. package/lib/session-store.mjs +6 -4
  140. package/lib/setup.mjs +14 -3
  141. package/lib/{agent-contracts-enforce.mjs → specialist-contracts-enforce.mjs} +4 -4
  142. package/lib/{agent-contracts.mjs → specialist-contracts.mjs} +9 -8
  143. package/lib/{agents → specialists}/postconditions.mjs +3 -3
  144. package/lib/{agents → specialists}/schema.mjs +6 -6
  145. package/lib/status.mjs +13 -11
  146. package/lib/storage/backup.mjs +2 -2
  147. package/lib/tags/lifecycle.mjs +278 -0
  148. package/lib/tags/vocabulary.mjs +140 -0
  149. package/lib/telemetry/client.mjs +5 -1
  150. package/lib/telemetry/otel-tracer.mjs +184 -0
  151. package/lib/telemetry/skill-calls.mjs +73 -12
  152. package/lib/uninstall/uninstall.mjs +1 -1
  153. package/lib/update.mjs +1 -1
  154. package/lib/validator.mjs +57 -56
  155. package/lib/version.mjs +51 -0
  156. package/lib/worker/trace.mjs +5 -1
  157. package/lib/workflows/instantiate.mjs +320 -0
  158. package/package.json +16 -3
  159. package/personas/construct.md +5 -3
  160. package/platforms/claude/CLAUDE.md +1 -1
  161. package/rules/common/development-workflow.md +2 -1
  162. package/rules/common/no-fabrication.md +69 -0
  163. package/rules/common/review-before-change.md +58 -0
  164. package/scripts/{sync-agents.mjs → sync-specialists.mjs} +171 -68
  165. package/skills/ai/prompt-optimizer.md +3 -3
  166. package/skills/exploration/dependency-graph-reading.md +98 -0
  167. package/skills/exploration/tracer-bullet-method.md +71 -0
  168. package/skills/exploration/unknown-codebase-onboarding.md +91 -0
  169. package/skills/operating/change-management.md +91 -0
  170. package/skills/operating/incident-response.md +75 -0
  171. package/skills/operating/oncall-rotation.md +95 -0
  172. package/skills/operating/orchestration-reference.md +2 -2
  173. package/skills/strategy/competitive-landscape.md +75 -0
  174. package/skills/strategy/market-research-methods.md +87 -0
  175. package/skills/strategy/narrative-arc.md +77 -0
  176. package/skills/strategy/pricing-positioning.md +94 -0
  177. package/specialists/contracts.json +1002 -0
  178. package/specialists/contracts.schema.json +83 -0
  179. package/specialists/policy-inventory.json +160 -0
  180. package/{agents → specialists}/prompts/cx-accessibility.md +3 -1
  181. package/{agents → specialists}/prompts/cx-ai-engineer.md +3 -1
  182. package/{agents → specialists}/prompts/cx-architect.md +3 -1
  183. package/{agents → specialists}/prompts/cx-business-strategist.md +3 -1
  184. package/{agents → specialists}/prompts/cx-data-analyst.md +3 -1
  185. package/{agents → specialists}/prompts/cx-data-engineer.md +3 -1
  186. package/{agents → specialists}/prompts/cx-debugger.md +3 -1
  187. package/{agents → specialists}/prompts/cx-designer.md +3 -1
  188. package/{agents → specialists}/prompts/cx-devil-advocate.md +3 -1
  189. package/{agents → specialists}/prompts/cx-docs-keeper.md +4 -2
  190. package/{agents → specialists}/prompts/cx-engineer.md +4 -2
  191. package/{agents → specialists}/prompts/cx-evaluator.md +3 -1
  192. package/{agents → specialists}/prompts/cx-explorer.md +3 -1
  193. package/{agents → specialists}/prompts/cx-legal-compliance.md +3 -1
  194. package/{agents → specialists}/prompts/cx-operations.md +3 -1
  195. package/{agents → specialists}/prompts/cx-orchestrator.md +4 -2
  196. package/{agents → specialists}/prompts/cx-platform-engineer.md +3 -1
  197. package/{agents → specialists}/prompts/cx-product-manager.md +3 -1
  198. package/{agents → specialists}/prompts/cx-qa.md +3 -1
  199. package/{agents → specialists}/prompts/cx-rd-lead.md +3 -1
  200. package/{agents → specialists}/prompts/cx-release-manager.md +3 -1
  201. package/{agents → specialists}/prompts/cx-researcher.md +3 -1
  202. package/{agents → specialists}/prompts/cx-reviewer.md +4 -2
  203. package/{agents → specialists}/prompts/cx-security.md +3 -1
  204. package/{agents → specialists}/prompts/cx-sre.md +4 -2
  205. package/{agents → specialists}/prompts/cx-test-automation.md +3 -1
  206. package/{agents → specialists}/prompts/cx-trace-reviewer.md +5 -3
  207. package/{agents → specialists}/prompts/cx-ux-researcher.md +3 -1
  208. package/{agents → specialists}/registry.json +651 -418
  209. package/{agents → specialists}/role-manifests.json +8 -8
  210. package/templates/docs/construct_guide.md +6 -6
  211. package/templates/docs/skill-artifact.md +1 -1
  212. package/templates/provider-scaffold/health.test.mjs +30 -0
  213. package/templates/provider-scaffold/index.mjs +48 -0
  214. package/templates/workflows/cross-team-handoff.yml +85 -0
  215. package/templates/workflows/engineering-onboarding.yml +77 -0
  216. package/templates/workflows/new-feature.yml +53 -0
  217. package/agents/contracts.json +0 -387
  218. /package/{agents → specialists}/teams.json +0 -0
@@ -1,387 +0,0 @@
1
- {
2
- "$schema": "./contracts.schema.json",
3
- "version": 1,
4
- "description": "Explicit service contracts between Construct agents. Each contract binds a producer→consumer pair to a typed handoff: what artifact, what preconditions, what postconditions, what the terminal state looks like. Consolidates doc ownership, routing map, output schemas, and framing/research/quality gates into one machine-readable source of truth.",
5
- "terminalStates": ["DONE", "BLOCKED", "NEEDS_MAIN_INPUT"],
6
- "severities": {
7
- "blocking": ["BLOCKED_CONTRACT", "CRITICAL"],
8
- "warning": ["HIGH", "APPROVED_WITH_WARNINGS"],
9
- "info": ["MEDIUM", "LOW"]
10
- },
11
- "contracts": [
12
- {
13
- "id": "user-to-construct",
14
- "producer": "user",
15
- "consumer": "construct",
16
- "trigger": { "always": true },
17
- "input": {
18
- "shape": "natural-language-request",
19
- "mustContain": ["goal"]
20
- },
21
- "output": {
22
- "shape": "routed-plan",
23
- "mustContain": ["track", "specialists", "dispatchPlan"]
24
- },
25
- "preconditions": [
26
- "Session bootstrap completed: project_context and memory_search called, plus relevant repo docs read as needed"
27
- ],
28
- "postconditions": [
29
- "Intent classified; work category tagged",
30
- "Route decision surfaced as a single-sentence plan"
31
- ]
32
- },
33
- {
34
- "id": "construct-to-orchestrator",
35
- "producer": "construct",
36
- "consumer": "cx-orchestrator",
37
- "trigger": { "track": "orchestrated" },
38
- "input": {
39
- "shape": "task-packet",
40
- "mustContain": ["goal", "intent", "workCategory", "riskFlags", "acceptanceCriteria"]
41
- },
42
- "output": {
43
- "schema": "lib/schemas/decision.json",
44
- "type": "decision"
45
- },
46
- "preconditions": [
47
- "framingChallenge gate honored if required",
48
- "externalResearch gate honored if required",
49
- "docAuthoring.owner present if authoring a typed document"
50
- ],
51
- "postconditions": [
52
- "Dispatch plan emitted with specialists in sequence",
53
- "Parallel work marked with [parallel: ...] tags"
54
- ]
55
- },
56
- {
57
- "id": "researcher-to-architect",
58
- "producer": "cx-researcher",
59
- "consumer": "cx-architect",
60
- "trigger": { "externalResearch.required": true, "riskFlags": ["architecture"] },
61
- "input": {
62
- "shape": "research-brief",
63
- "mustContain": ["question", "method", "sources", "findings", "confidence"]
64
- },
65
- "output": {
66
- "schema": "lib/schemas/decision.json",
67
- "type": "decision"
68
- },
69
- "preconditions": [
70
- "≥2 independent primary sources cited per load-bearing claim",
71
- "Source classes tagged (internal/primary/secondary/tertiary)"
72
- ],
73
- "postconditions": [
74
- "Architect's ADR cites the primary sources provided",
75
- "Any conflicting evidence surfaced, not suppressed"
76
- ]
77
- },
78
- {
79
- "id": "researcher-to-product-manager",
80
- "producer": "cx-researcher",
81
- "consumer": "cx-product-manager",
82
- "trigger": { "docAuthoring.docType": ["prd", "meta-prd", "prfaq", "one-pager"] },
83
- "input": {
84
- "shape": "evidence-brief",
85
- "mustContain": ["question", "findings", "sources", "confidence", "openQuestions"]
86
- },
87
- "output": {
88
- "shape": "prd-handoff",
89
- "mustContain": ["problem", "users", "functionalRequirements", "acceptanceCriteria"]
90
- },
91
- "preconditions": [
92
- "Evidence threshold stated and met for each requirement"
93
- ],
94
- "postconditions": [
95
- "PRD Problem section does not reference ticket IDs, roadmap items, or artifact filenames",
96
- "Every functional requirement traces to observed user evidence"
97
- ]
98
- },
99
- {
100
- "id": "product-manager-to-architect",
101
- "producer": "cx-product-manager",
102
- "consumer": "cx-architect",
103
- "trigger": { "docAuthoring.docType": ["prd", "meta-prd", "adr", "rfc"] },
104
- "input": {
105
- "shape": "prd-handoff",
106
- "mustContain": ["problem", "functionalRequirements", "nonFunctionalRequirements", "acceptanceCriteria", "constraints"]
107
- },
108
- "output": {
109
- "schema": "lib/schemas/decision.json",
110
- "type": "decision"
111
- },
112
- "preconditions": [
113
- "cx-devil-advocate framing challenge logged if riskFlags.architecture"
114
- ],
115
- "postconditions": [
116
- "ADR Problem section traces to PRD Problem, not to tickets",
117
- "ADR Rejected alternatives section present with ≥2 alternatives and specific rejection reasons",
118
- "Reversibility section states whether one-way or two-way door"
119
- ]
120
- },
121
- {
122
- "id": "architect-to-devil-advocate",
123
- "producer": "cx-architect",
124
- "consumer": "cx-devil-advocate",
125
- "trigger": { "framingChallenge.required": true },
126
- "input": {
127
- "shape": "framing-proposal",
128
- "mustContain": ["problemStatement", "proposedApproach", "assumptions"]
129
- },
130
- "output": {
131
- "shape": "challenge-report",
132
- "mustContain": ["verdict", "counterevidence", "reframingProposals"]
133
- },
134
- "preconditions": [
135
- "Problem statement stated independent of tickets/transcripts"
136
- ],
137
- "postconditions": [
138
- "If verdict is BLOCKED, architect revises framing before proceeding",
139
- "Challenge checkpoint logged to audit trail"
140
- ]
141
- },
142
- {
143
- "id": "architect-to-engineer",
144
- "producer": "cx-architect",
145
- "consumer": "cx-engineer",
146
- "trigger": { "intent": ["implementation", "fix"] },
147
- "input": {
148
- "schema": "lib/schemas/decision.json",
149
- "mustContain": ["goal", "approach", "tasks", "acceptanceCriteria"]
150
- },
151
- "output": {
152
- "schema": "lib/schemas/implementation.json",
153
- "type": "implementation"
154
- },
155
- "preconditions": [
156
- "ADR approved (or fast-track noted); no pending CRITICAL review findings",
157
- "Task packet contains readFirst and doNotChange lists"
158
- ],
159
- "postconditions": [
160
- "Implementation cites the ADR tasks it completed",
161
- "filesChanged matches tasks in the ADR",
162
- "verificationChecklist evaluated before DONE"
163
- ]
164
- },
165
- {
166
- "id": "architect-to-ai-engineer",
167
- "producer": "cx-architect",
168
- "consumer": "cx-ai-engineer",
169
- "trigger": { "riskFlags": ["ai"], "intent": ["implementation"] },
170
- "input": {
171
- "schema": "lib/schemas/decision.json",
172
- "mustContain": ["goal", "approach", "evalCriteria"]
173
- },
174
- "output": {
175
- "schema": "lib/schemas/implementation.json",
176
- "type": "implementation"
177
- },
178
- "preconditions": [
179
- "Eval set defined with failure cases before prompt/model changes ship"
180
- ],
181
- "postconditions": [
182
- "Eval verdict from cx-evaluator before DONE"
183
- ]
184
- },
185
- {
186
- "id": "engineer-to-reviewer",
187
- "producer": "cx-engineer",
188
- "consumer": "cx-reviewer",
189
- "trigger": { "always": true },
190
- "input": {
191
- "schema": "lib/schemas/implementation.json",
192
- "mustContain": ["filesChanged", "verificationChecklist"]
193
- },
194
- "output": {
195
- "schema": "lib/schemas/review-report.json",
196
- "type": "review-report",
197
- "mustContain": ["verdict"],
198
- "mustContainOneOf": [["findings", "noIssuesFoundAt"]],
199
- "mustMatchEnum": {
200
- "verdict": ["APPROVED", "APPROVED_WITH_WARNINGS", "BLOCKED"]
201
- }
202
- },
203
- "preconditions": [
204
- "Engineer status is not BLOCKED",
205
- "Tests compiled; static analysis run"
206
- ],
207
- "postconditions": [
208
- "Verdict in {APPROVED, APPROVED_WITH_WARNINGS, BLOCKED}",
209
- "BLOCKED verdict stops downstream work until addressed",
210
- "CRITICAL findings prevent release",
211
- "Either findings is non-empty or noIssuesFoundAt enumerates the inspected paths — prevents silent rubber-stamp reviews"
212
- ]
213
- },
214
- {
215
- "id": "engineer-to-qa",
216
- "producer": "cx-engineer",
217
- "consumer": "cx-qa",
218
- "trigger": { "always": true },
219
- "input": {
220
- "schema": "lib/schemas/implementation.json",
221
- "mustContain": ["filesChanged", "tests"]
222
- },
223
- "output": {
224
- "schema": "lib/schemas/test-report.json",
225
- "type": "test-report"
226
- },
227
- "preconditions": [
228
- "Test plan exists or is derivable from acceptance criteria"
229
- ],
230
- "postconditions": [
231
- "Verdict in {PASS, FAIL}",
232
- "Coverage meets project threshold",
233
- "FAIL blocks DONE in workflow"
234
- ]
235
- },
236
- {
237
- "id": "reviewer-to-security",
238
- "producer": "cx-reviewer",
239
- "consumer": "cx-security",
240
- "trigger": { "riskFlags": ["security"] },
241
- "input": {
242
- "schema": "lib/schemas/review-report.json",
243
- "mustContain": ["target", "findings"]
244
- },
245
- "output": {
246
- "schema": "lib/schemas/review-report.json",
247
- "type": "review-report",
248
- "specialization": "security",
249
- "mustContain": ["threatModelUpdatedAt", "contractStart"]
250
- },
251
- "preconditions": [
252
- "Scope tagged as auth/secrets/payments/user-data"
253
- ],
254
- "postconditions": [
255
- "Attacker-perspective findings logged",
256
- "Threat model updated if architecture surface changed",
257
- "threatModelUpdatedAt >= contractStart — prevents post-hoc threat models written after the architecture has shipped"
258
- ]
259
- },
260
- {
261
- "id": "qa-to-release-manager",
262
- "producer": "cx-qa",
263
- "consumer": "cx-release-manager",
264
- "trigger": { "intent": ["implementation"], "workCategory": "deep" },
265
- "input": {
266
- "schema": "lib/schemas/test-report.json",
267
- "mustContain": ["verdict", "passed", "failed", "coverage"]
268
- },
269
- "output": {
270
- "shape": "release-decision",
271
- "mustContain": ["decision", "rolloutPlan", "rollbackPlan"]
272
- },
273
- "preconditions": [
274
- "All upstream verdicts APPROVED; QA verdict PASS"
275
- ],
276
- "postconditions": [
277
- "Rollback plan tested, not just described",
278
- "Rollout plan has concrete checkpoint signals"
279
- ]
280
- },
281
- {
282
- "id": "sre-to-release-manager",
283
- "producer": "cx-sre",
284
- "consumer": "cx-release-manager",
285
- "trigger": { "riskFlags": ["dataIntegrity"], "intent": ["implementation"] },
286
- "input": {
287
- "shape": "sre-readiness",
288
- "mustContain": ["slos", "runbooks", "alerts", "dashboards"]
289
- },
290
- "output": {
291
- "shape": "release-decision",
292
- "mustContain": ["decision", "rollbackPlan"]
293
- },
294
- "preconditions": [
295
- "Runbook exists for the new code path; rollback procedure verified"
296
- ],
297
- "postconditions": [
298
- "On-call briefed; alert thresholds set"
299
- ]
300
- },
301
- {
302
- "id": "any-to-docs-keeper",
303
- "producer": "*",
304
- "consumer": "cx-docs-keeper",
305
- "trigger": { "postConsumer": true, "changedCoreDocs": true },
306
- "input": {
307
- "shape": "doc-delta",
308
- "mustContain": ["filesChanged", "decision"]
309
- },
310
- "output": {
311
- "shape": "doc-sync",
312
- "mustContain": ["updatedDocs", "crossReferencesAdded", "crossDocCoherenceCheckRan", "coherenceDiff"]
313
- },
314
- "preconditions": [
315
- "Implementation or decision is marked DONE"
316
- ],
317
- "postconditions": [
318
- "Cross-doc coherence preserved (PRD ↔ ADR ↔ code)",
319
- "AUTO-managed regions regenerated via construct sync",
320
- "crossDocCoherenceCheckRan=true with a named coherenceDiff — prevents stale-doc PRs that claim 'docs updated' without a real diff"
321
- ]
322
- },
323
- {
324
- "id": "any-to-debugger",
325
- "producer": "*",
326
- "consumer": "cx-debugger",
327
- "trigger": { "intent": "investigation", "category": "bug" },
328
- "input": {
329
- "shape": "bug-signal",
330
- "mustContain": ["symptoms", "scope"]
331
- },
332
- "output": {
333
- "shape": "root-cause-report",
334
- "mustContain": ["rootCause", "rootCauseConfirmedVia", "fix"],
335
- "mustMatchEnum": {
336
- "rootCauseConfirmedVia": ["reproduction", "trace", "test"]
337
- }
338
- },
339
- "preconditions": [
340
- "Bug reproduced or trace captured before proposing a fix"
341
- ],
342
- "postconditions": [
343
- "rootCauseConfirmedVia in {reproduction, trace, test} — prevents symptom-only fixes that don't address the actual cause"
344
- ]
345
- },
346
- {
347
- "id": "any-to-designer",
348
- "producer": "*",
349
- "consumer": "cx-designer",
350
- "trigger": { "riskFlags": ["ui", "accessibility"] },
351
- "input": {
352
- "shape": "design-brief",
353
- "mustContain": ["surface", "users", "context"]
354
- },
355
- "output": {
356
- "shape": "design-deliverable",
357
- "mustContain": ["deliverable", "accessibilityCheckRan"]
358
- },
359
- "preconditions": [
360
- "Affected surface scoped"
361
- ],
362
- "postconditions": [
363
- "accessibilityCheckRan=true — prevents post-hoc a11y fixes by forcing a pre-ship check on every design deliverable"
364
- ]
365
- },
366
- {
367
- "id": "any-to-sre-incident",
368
- "producer": "*",
369
- "consumer": "cx-sre",
370
- "trigger": { "intent": "investigation", "category": "incident" },
371
- "input": {
372
- "shape": "incident-signal",
373
- "mustContain": ["symptoms", "scope", "firstObserved"]
374
- },
375
- "output": {
376
- "shape": "incident-report",
377
- "mustContain": ["rootCause", "timeline", "remediation", "preventions"]
378
- },
379
- "preconditions": [
380
- "Blast radius assessed before remediation"
381
- ],
382
- "postconditions": [
383
- "Blameless postmortem; no tickets in Problem statement"
384
- ]
385
- }
386
- ]
387
- }
File without changes