@geraldmaron/construct 1.0.5 → 1.0.7

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 (268) hide show
  1. package/README.md +24 -18
  2. package/agents/contracts.json +617 -2
  3. package/agents/contracts.schema.json +83 -0
  4. package/agents/prompts/cx-accessibility.md +5 -3
  5. package/agents/prompts/cx-ai-engineer.md +9 -7
  6. package/agents/prompts/cx-architect.md +8 -6
  7. package/agents/prompts/cx-business-strategist.md +8 -6
  8. package/agents/prompts/cx-data-analyst.md +9 -7
  9. package/agents/prompts/cx-data-engineer.md +5 -3
  10. package/agents/prompts/cx-debugger.md +8 -6
  11. package/agents/prompts/cx-designer.md +7 -5
  12. package/agents/prompts/cx-devil-advocate.md +6 -4
  13. package/agents/prompts/cx-docs-keeper.md +7 -5
  14. package/agents/prompts/cx-engineer.md +7 -5
  15. package/agents/prompts/cx-evaluator.md +4 -2
  16. package/agents/prompts/cx-explorer.md +10 -8
  17. package/agents/prompts/cx-legal-compliance.md +4 -2
  18. package/agents/prompts/cx-operations.md +7 -5
  19. package/agents/prompts/cx-orchestrator.md +12 -10
  20. package/agents/prompts/cx-platform-engineer.md +7 -5
  21. package/agents/prompts/cx-product-manager.md +6 -4
  22. package/agents/prompts/cx-qa.md +10 -8
  23. package/agents/prompts/cx-rd-lead.md +11 -9
  24. package/agents/prompts/cx-release-manager.md +7 -5
  25. package/agents/prompts/cx-researcher.md +24 -22
  26. package/agents/prompts/cx-reviewer.md +9 -7
  27. package/agents/prompts/cx-security.md +12 -10
  28. package/agents/prompts/cx-sre.md +9 -7
  29. package/agents/prompts/cx-test-automation.md +5 -3
  30. package/agents/prompts/cx-trace-reviewer.md +10 -8
  31. package/agents/prompts/cx-ux-researcher.md +5 -3
  32. package/agents/registry.json +8 -3
  33. package/bin/construct +444 -53
  34. package/commands/build/feature.md +4 -4
  35. package/commands/build/fix.md +8 -8
  36. package/commands/design/access.md +3 -3
  37. package/commands/design/flow.md +3 -3
  38. package/commands/design/ui.md +4 -4
  39. package/commands/measure/experiment.md +5 -5
  40. package/commands/measure/metrics.md +3 -3
  41. package/commands/measure/results.md +4 -4
  42. package/commands/plan/api.md +3 -3
  43. package/commands/plan/challenge.md +3 -3
  44. package/commands/plan/decide.md +3 -3
  45. package/commands/plan/feature.md +7 -7
  46. package/commands/plan/requirements.md +3 -3
  47. package/commands/remember/context.md +5 -5
  48. package/commands/remember/handoff.md +3 -3
  49. package/commands/remember/runbook.md +3 -3
  50. package/commands/review/code.md +8 -8
  51. package/commands/review/quality.md +4 -4
  52. package/commands/review/security.md +3 -3
  53. package/commands/ship/ready.md +3 -3
  54. package/commands/ship/release.md +3 -3
  55. package/commands/ship/status.md +4 -4
  56. package/commands/understand/docs.md +3 -3
  57. package/commands/understand/this.md +4 -4
  58. package/commands/understand/why.md +8 -8
  59. package/commands/work/clean.md +14 -14
  60. package/commands/work/drive.md +10 -10
  61. package/commands/work/optimize-prompts.md +9 -9
  62. package/commands/work/parallel-review.md +8 -8
  63. package/db/schema/006_graph.sql +24 -0
  64. package/examples/provider-plugin/README.md +7 -7
  65. package/examples/seed-observations/README.md +6 -6
  66. package/examples/seed-observations/anti-patterns.md +14 -14
  67. package/examples/seed-observations/decisions.md +4 -4
  68. package/examples/seed-observations/patterns.md +14 -14
  69. package/lib/auto-docs.mjs +13 -8
  70. package/lib/boundary.mjs +126 -0
  71. package/lib/cache-strategy-google.js +26 -31
  72. package/lib/cli-commands.mjs +2 -2
  73. package/lib/comment-lint.mjs +134 -0
  74. package/lib/contracts/validate.mjs +323 -0
  75. package/lib/daemons/contract.mjs +210 -0
  76. package/lib/docs-verify.mjs +59 -6
  77. package/lib/doctor/cli.mjs +16 -1
  78. package/lib/doctor/index.mjs +3 -1
  79. package/lib/doctor/watchers/consistency.mjs +310 -0
  80. package/lib/doctor/watchers/mcp-protocol.mjs +232 -0
  81. package/lib/document-extract.mjs +211 -1
  82. package/lib/embed/cli.mjs +124 -3
  83. package/lib/embed/daemon.mjs +43 -4
  84. package/lib/embed/docs-lifecycle.mjs +1 -1
  85. package/lib/embed/inbox.mjs +2 -0
  86. package/lib/embed/scheduler.mjs +33 -5
  87. package/lib/evaluator-optimizer.mjs +2 -3
  88. package/lib/flavors/loader.mjs +1 -1
  89. package/lib/hooks/comment-lint.mjs +16 -0
  90. package/lib/hooks/mcp-audit.mjs +2 -1
  91. package/lib/hooks/proactive-activation.mjs +0 -14
  92. package/lib/hooks/rule-verifier.mjs +217 -0
  93. package/lib/hooks/session-optimize.mjs +2 -1
  94. package/lib/init-unified.mjs +55 -65
  95. package/lib/intake/classify.mjs +108 -24
  96. package/lib/intake/daemon.mjs +121 -0
  97. package/lib/intake/filesystem-queue.mjs +6 -1
  98. package/lib/intake/intake-config.mjs +2 -1
  99. package/lib/intake/prepare.mjs +0 -1
  100. package/lib/intake/session-prelude.mjs +7 -1
  101. package/lib/intake/traceability.mjs +90 -0
  102. package/lib/knowledge/graph.mjs +213 -0
  103. package/lib/knowledge/research-store.mjs +2 -0
  104. package/lib/maintenance/cleanup.mjs +315 -0
  105. package/lib/mcp/memory-bridge.mjs +276 -0
  106. package/lib/mcp/server.mjs +189 -1
  107. package/lib/mcp/tools/profile.mjs +270 -0
  108. package/lib/mcp/tools/workflow.mjs +25 -0
  109. package/lib/mcp-catalog.json +12 -8
  110. package/lib/mcp-platform-config.mjs +16 -8
  111. package/lib/migrations/index.mjs +106 -0
  112. package/lib/migrations/v1-baseline.mjs +33 -0
  113. package/lib/observation-store.mjs +9 -4
  114. package/lib/outcomes/record.mjs +2 -0
  115. package/lib/profiles/rebrand.mjs +46 -0
  116. package/lib/project-init-shared.mjs +12 -0
  117. package/lib/provider-capabilities.js +20 -7
  118. package/lib/providers/auth-manager.mjs +58 -17
  119. package/lib/reflect.mjs +49 -12
  120. package/lib/server/index.mjs +22 -28
  121. package/lib/session-store.mjs +6 -4
  122. package/lib/setup.mjs +14 -3
  123. package/lib/telemetry/client.mjs +5 -1
  124. package/lib/version.mjs +51 -0
  125. package/lib/worker/trace.mjs +5 -1
  126. package/package.json +4 -1
  127. package/personas/construct.md +3 -1
  128. package/platforms/claude/CLAUDE.md +6 -6
  129. package/rules/common/agents.md +2 -2
  130. package/rules/common/beads-hygiene.md +11 -11
  131. package/rules/common/code-review.md +1 -1
  132. package/rules/common/coding-style.md +1 -1
  133. package/rules/common/comments.md +8 -8
  134. package/rules/common/commit-approval.md +4 -4
  135. package/rules/common/cx-agent-routing.md +2 -2
  136. package/rules/common/cx-skill-routing.md +2 -2
  137. package/rules/common/development-workflow.md +3 -2
  138. package/rules/common/doc-ownership.md +2 -2
  139. package/rules/common/efficiency.md +3 -3
  140. package/rules/common/framing.md +1 -1
  141. package/rules/common/git-workflow.md +1 -1
  142. package/rules/common/no-fabrication.md +69 -0
  143. package/rules/common/patterns.md +1 -1
  144. package/rules/common/performance.md +1 -1
  145. package/rules/common/release-gates.md +7 -7
  146. package/rules/common/research.md +4 -4
  147. package/rules/common/review-before-change.md +58 -0
  148. package/rules/common/security.md +1 -1
  149. package/rules/common/skill-composition.md +8 -8
  150. package/rules/common/testing.md +1 -1
  151. package/rules/golang/coding-style.md +2 -2
  152. package/rules/golang/hooks.md +1 -1
  153. package/rules/golang/patterns.md +1 -1
  154. package/rules/golang/security.md +1 -1
  155. package/rules/golang/testing.md +1 -1
  156. package/rules/python/coding-style.md +1 -1
  157. package/rules/python/hooks.md +1 -1
  158. package/rules/python/patterns.md +1 -1
  159. package/rules/python/security.md +1 -1
  160. package/rules/python/testing.md +1 -1
  161. package/rules/swift/coding-style.md +3 -3
  162. package/rules/swift/hooks.md +2 -2
  163. package/rules/swift/patterns.md +2 -2
  164. package/rules/swift/security.md +4 -4
  165. package/rules/swift/testing.md +2 -2
  166. package/rules/typescript/coding-style.md +1 -1
  167. package/rules/typescript/hooks.md +1 -1
  168. package/rules/typescript/patterns.md +1 -1
  169. package/rules/typescript/security.md +1 -1
  170. package/rules/typescript/testing.md +1 -1
  171. package/rules/web/coding-style.md +1 -1
  172. package/rules/web/design-quality.md +1 -1
  173. package/rules/web/hooks.md +1 -1
  174. package/rules/web/patterns.md +1 -1
  175. package/rules/web/performance.md +1 -1
  176. package/rules/web/security.md +1 -1
  177. package/rules/web/testing.md +1 -1
  178. package/scripts/sync-agents.mjs +45 -14
  179. package/skills/ai/agent-dev.md +1 -1
  180. package/skills/ai/llm-security.md +1 -1
  181. package/skills/ai/ml-ops.md +6 -6
  182. package/skills/ai/orchestration-workflow.md +1 -1
  183. package/skills/ai/prompt-and-eval.md +1 -1
  184. package/skills/ai/prompt-optimizer.md +13 -13
  185. package/skills/ai/rag-system.md +1 -1
  186. package/skills/architecture/api-design.md +1 -1
  187. package/skills/architecture/caching.md +1 -1
  188. package/skills/architecture/cloud-native.md +1 -1
  189. package/skills/architecture/message-queue.md +1 -1
  190. package/skills/architecture/security-arch.md +1 -1
  191. package/skills/compliance/ai-disclosure.md +1 -1
  192. package/skills/compliance/data-privacy.md +1 -1
  193. package/skills/compliance/license-audit.md +2 -2
  194. package/skills/compliance/regulatory-review.md +1 -1
  195. package/skills/development/cpp.md +1 -1
  196. package/skills/development/go.md +1 -1
  197. package/skills/development/java.md +1 -1
  198. package/skills/development/kotlin.md +9 -9
  199. package/skills/development/mobile-crossplatform.md +13 -13
  200. package/skills/development/python.md +1 -1
  201. package/skills/development/rust.md +1 -1
  202. package/skills/development/shell.md +1 -1
  203. package/skills/development/swift.md +6 -6
  204. package/skills/development/typescript.md +1 -1
  205. package/skills/devops/ci-cd.md +5 -5
  206. package/skills/devops/containerization.md +9 -9
  207. package/skills/devops/cost-optimization.md +1 -1
  208. package/skills/devops/data-engineering.md +2 -2
  209. package/skills/devops/database.md +1 -1
  210. package/skills/devops/dependency-management.md +3 -3
  211. package/skills/devops/devsecops.md +1 -1
  212. package/skills/devops/git-workflow.md +1 -1
  213. package/skills/devops/incident-response.md +18 -18
  214. package/skills/devops/monorepo.md +5 -5
  215. package/skills/devops/observability.md +1 -1
  216. package/skills/devops/performance.md +1 -1
  217. package/skills/devops/testing.md +1 -1
  218. package/skills/docs/adr-workflow.md +2 -2
  219. package/skills/docs/backlog-proposal-workflow.md +1 -1
  220. package/skills/docs/customer-profile-workflow.md +1 -1
  221. package/skills/docs/document-ingest-workflow.md +1 -1
  222. package/skills/docs/evidence-ingest-workflow.md +1 -1
  223. package/skills/docs/init-docs.md +15 -15
  224. package/skills/docs/init-project.md +1 -1
  225. package/skills/docs/prd-workflow.md +3 -3
  226. package/skills/docs/prfaq-workflow.md +1 -1
  227. package/skills/docs/product-intelligence-review.md +1 -1
  228. package/skills/docs/product-intelligence-workflow.md +1 -1
  229. package/skills/docs/product-signal-workflow.md +9 -9
  230. package/skills/docs/research-workflow.md +10 -10
  231. package/skills/docs/runbook-workflow.md +2 -2
  232. package/skills/docs/strategy-workflow.md +3 -3
  233. package/skills/exploration/repo-map.md +11 -11
  234. package/skills/frameworks/django.md +15 -15
  235. package/skills/frameworks/nextjs.md +16 -16
  236. package/skills/frameworks/react.md +12 -12
  237. package/skills/frameworks/spring-boot.md +12 -12
  238. package/skills/frontend-design/accessibility.md +6 -6
  239. package/skills/frontend-design/component-patterns.md +1 -1
  240. package/skills/frontend-design/engineering.md +1 -1
  241. package/skills/frontend-design/state-management.md +1 -1
  242. package/skills/frontend-design/ui-aesthetics.md +1 -1
  243. package/skills/frontend-design/ux-principles.md +1 -1
  244. package/skills/operating/orchestration-reference.md +27 -27
  245. package/skills/quality-gates/review-work.md +3 -3
  246. package/skills/quality-gates/verify-change.md +1 -1
  247. package/skills/quality-gates/verify-module.md +1 -1
  248. package/skills/quality-gates/verify-quality.md +1 -1
  249. package/skills/quality-gates/verify-security.md +1 -1
  250. package/skills/routing.md +14 -14
  251. package/skills/security/blue-team.md +1 -1
  252. package/skills/security/code-audit.md +1 -1
  253. package/skills/security/pentest.md +1 -1
  254. package/skills/security/red-team.md +1 -1
  255. package/skills/security/threat-intel.md +1 -1
  256. package/skills/security/vuln-research.md +1 -1
  257. package/skills/utility/clean-code.md +2 -2
  258. package/templates/docs/changelog-entry.md +1 -1
  259. package/templates/docs/construct_guide.md +18 -18
  260. package/templates/docs/meta-prd.md +16 -16
  261. package/templates/docs/one-pager.md +1 -1
  262. package/templates/docs/prd-business.md +1 -1
  263. package/templates/docs/prd-platform.md +1 -1
  264. package/templates/docs/prd.md +17 -17
  265. package/templates/docs/research-brief.md +8 -8
  266. package/templates/docs/rfc.md +1 -1
  267. package/templates/docs/skill-artifact.md +1 -1
  268. package/templates/docs/strategy.md +1 -1
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/docs/research-workflow.md Research Workflow Use when: the user asks to research a topic, investigate a question, or gather e
2
+ skills/docs/research-workflow.md (Research Workflow) Use when: the user asks to research a topic, investigate a question, or gather e
3
3
 
4
4
  Use when: the user asks to research a topic, investigate a question, or gather evidence for a decision. ## Steps
5
5
  -->
@@ -11,9 +11,9 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
11
11
 
12
12
  ## Steps
13
13
 
14
- 1. **Clarify the question** one specific, falsifiable question the research must answer.
15
- 2. **Apply recency discipline** always search from the most recent year backward. For fast-moving domains (AI tools, security, market data), treat anything older than 12 months as presumptively stale unless a newer source confirms it is still accurate.
16
- 3. **Check internal evidence first** search `.cx/research/`, `.cx/knowledge/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts before going external.
14
+ 1. **Clarify the question**: one specific, falsifiable question the research must answer.
15
+ 2. **Apply recency discipline**: always search from the most recent year backward. For fast-moving domains (AI tools, security, market data), treat anything older than 12 months as presumptively stale unless a newer source confirms it is still accurate.
16
+ 3. **Check internal evidence first**: search `.cx/research/`, `.cx/knowledge/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts before going external.
17
17
  4. **Choose the research path and starting point** by domain:
18
18
 
19
19
  | Domain | Authoritative starting points |
@@ -28,10 +28,10 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
28
28
  5. **Use a source hierarchy**:
29
29
  - Primary: official docs, exact-version API references, standards, source code, peer-reviewed papers
30
30
  - Secondary: changelogs, migration guides, maintainer issue comments, release notes
31
- - Tertiary: blogs/forums/Q&A only to locate primaries never cite tertiary alone for a load-bearing claim
32
- 6. **Verify every URL** fetch each URL cited and confirm it resolves and matches the cited claim. Mark unconfirmed URLs as `[unverified]`.
33
- 7. **Structure findings** using the template from `get_template("research-brief")` resolves `.cx/templates/docs/research-brief.md` (override) then `templates/docs/research-brief.md` (shipped)
34
- 8. **Write to `.cx/research/{topic-slug}.md`** cx-docs-keeper owns this
31
+ - Tertiary: blogs/forums/Q&A only to locate primaries: never cite tertiary alone for a load-bearing claim
32
+ 6. **Verify every URL**: fetch each URL cited and confirm it resolves and matches the cited claim. Mark unconfirmed URLs as `[unverified]`.
33
+ 7. **Structure findings** using the template from `get_template("research-brief")`: resolves `.cx/templates/docs/research-brief.md` (override) then `templates/docs/research-brief.md` (shipped)
34
+ 8. **Write to `.cx/research/{topic-slug}.md`**: cx-docs-keeper owns this
35
35
  9. **Reference the research doc** in the requesting agent's output (link by path)
36
36
 
37
37
  ## Verification bar
@@ -39,13 +39,13 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
39
39
  - Every load-bearing claim must cite a verified source path, URL, or document reference.
40
40
  - Record publication date, version, or access date for each source. If no date is available, state `[undated]` and treat confidence as `low`.
41
41
  - Fetch and confirm every URL before including it in a committed document.
42
- - Separate observation from inference label each finding's confidence as `high`, `medium`, or `low`.
42
+ - Separate observation from inference: label each finding's confidence as `high`, `medium`, or `low`.
43
43
  - Name contradictions and unresolved gaps.
44
44
  - Prefer two independent sources per load-bearing claim unless one authoritative primary source is sufficient.
45
45
  - State the strongest counter-evidence when one exists.
46
46
 
47
47
  ## File naming
48
- - Topic slug: lowercase, hyphens, no spaces e.g., `firebase-auth-v9-migration.md`
48
+ - Topic slug: lowercase, hyphens, no spaces: e.g., `firebase-auth-v9-migration.md`
49
49
  - Date prefix for time-sensitive research: `2026-04-release-comparison.md`
50
50
 
51
51
  ## When research feeds a decision
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/docs/runbook-workflow.md Runbook Workflow Use when: creating operational procedures for services, alerts, or recurring ope
2
+ skills/docs/runbook-workflow.md (Runbook Workflow) Use when: creating operational procedures for services, alerts, or recurring ope
3
3
 
4
4
  Use when: creating operational procedures for services, alerts, or recurring operations. ## Steps
5
5
  -->
@@ -10,7 +10,7 @@ Use when: creating operational procedures for services, alerts, or recurring ope
10
10
  ## Steps
11
11
 
12
12
  1. **cx-sre** or **cx-release-manager** identifies the need
13
- 2. **Write to `docs/runbooks/{service}-{operation}.md`** using the template from `get_template("runbook")` resolves `.cx/templates/docs/runbook.md` (override) then `templates/docs/runbook.md` (shipped)
13
+ 2. **Write to `docs/runbooks/{service}-{operation}.md`** using the template from `get_template("runbook")`: resolves `.cx/templates/docs/runbook.md` (override) then `templates/docs/runbook.md` (shipped)
14
14
  3. **Link from the relevant alert** or monitoring dashboard
15
15
  4. **cx-docs-keeper** adds to `.cx/context.md` if it's a critical path runbook
16
16
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/docs/strategy-workflow.md Read, update, and reason about the product strategy.
2
+ skills/docs/strategy-workflow.md: Read, update, and reason about the product strategy.
3
3
  Canonical store: ~/.cx/strategy.md (user-global) or .cx/strategy.md (project-local, committed).
4
4
  Template: templates/docs/strategy.md.
5
5
  -->
@@ -32,5 +32,5 @@ Given a product signal or PRD, check:
32
32
 
33
33
  | Scope | Path | Committed? |
34
34
  |---|---|---|
35
- | User-global | `~/.cx/strategy.md` | No local only |
36
- | Project-local | `.cx/strategy.md` | Yes source of truth for this repo |
35
+ | User-global | `~/.cx/strategy.md` | No: local only |
36
+ | Project-local | `.cx/strategy.md` | Yes: source of truth for this repo |
@@ -1,9 +1,9 @@
1
1
  <!--
2
- skills/exploration/repo-map.md Repo Exploration Codebase Mapping Playbook Use this skill when entering an unfamiliar codebase, doing deep investigation wo
2
+ skills/exploration/repo-map.md (Repo Exploration) Codebase Mapping Playbook: Use this skill when entering an unfamiliar codebase, doing deep investigation wo
3
3
 
4
4
  Use this skill when entering an unfamiliar codebase, doing deep investigation work, or producing a `.cx/codebase-map.md` artifact for future sessions. Agents: `
5
5
  -->
6
- # Repo Exploration Codebase Mapping Playbook
6
+ # Repo Exploration: Codebase Mapping Playbook
7
7
 
8
8
  Use this skill when entering an unfamiliar codebase, doing deep investigation work, or producing a `.cx/codebase-map.md` artifact for future sessions.
9
9
 
@@ -51,14 +51,14 @@ find . -maxdepth 2 -type d \
51
51
  ```
52
52
 
53
53
  Classify each top-level directory as one of:
54
- - **entry** main executables, CLIs, servers (cmd/, bin/, app/, main.*)
55
- - **lib** shared library code (lib/, pkg/, src/, internal/)
56
- - **ui** frontend/views (web/, frontend/, views/, components/)
57
- - **config** configuration, env templates (.env.example, config/, etc/)
58
- - **infra** deployment, CI/CD, Docker (deploy/, k8s/, .github/, terraform/)
59
- - **test** test-only code (test/, tests/, __tests__/, spec/)
60
- - **docs** documentation (docs/, .cx/)
61
- - **generated** auto-generated, do not read (dist/, build/, .next/, vendor/)
54
+ - **entry**: main executables, CLIs, servers (cmd/, bin/, app/, main.*)
55
+ - **lib**: shared library code (lib/, pkg/, src/, internal/)
56
+ - **ui**: frontend/views (web/, frontend/, views/, components/)
57
+ - **config**: configuration, env templates (.env.example, config/, etc/)
58
+ - **infra**: deployment, CI/CD, Docker (deploy/, k8s/, .github/, terraform/)
59
+ - **test**: test-only code (test/, tests/, __tests__/, spec/)
60
+ - **docs**: documentation (docs/, .cx/)
61
+ - **generated**: auto-generated, do not read (dist/, build/, .next/, vendor/)
62
62
 
63
63
  ### 2b. Entry points
64
64
 
@@ -254,7 +254,7 @@ If you're about to {do Y}, start with: {file or path}
254
254
 
255
255
  ---
256
256
 
257
- ## Quick Reference Useful One-Liners
257
+ ## Quick Reference: Useful One-Liners
258
258
 
259
259
  ```bash
260
260
  # File count by extension
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frameworks/django.md Django ```
2
+ skills/frameworks/django.md (Django) ```
3
3
 
4
4
  ## Project Structure ```
5
5
  -->
@@ -37,10 +37,10 @@ Keep apps small and feature-bounded. Do not put everything in one app.
37
37
 
38
38
  ### Field choices
39
39
 
40
- - `CharField` / `TextField` strings; always set `blank=False` unless optional
41
- - `UUIDField(default=uuid.uuid4, primary_key=True)` preferred over auto-increment for external-facing IDs
42
- - `JSONField` use sparingly; prefer normalized columns for queryable data
43
- - `select_related` for FK, `prefetch_related` for M2M avoid N+1 queries
40
+ - `CharField` / `TextField`: strings; always set `blank=False` unless optional
41
+ - `UUIDField(default=uuid.uuid4, primary_key=True)`: preferred over auto-increment for external-facing IDs
42
+ - `JSONField`: use sparingly; prefer normalized columns for queryable data
43
+ - `select_related` for FK, `prefetch_related` for M2M: avoid N+1 queries
44
44
 
45
45
  ### Migrations
46
46
 
@@ -115,13 +115,13 @@ class ItemSerializer(serializers.ModelSerializer):
115
115
 
116
116
  ## Security
117
117
 
118
- - `SECRET_KEY` from env never commit
118
+ - `SECRET_KEY` from env: never commit
119
119
  - `ALLOWED_HOSTS` locked down in production
120
120
  - `DEBUG = False` in production (template errors expose internals)
121
121
  - CSRF: enabled by default for form views; DRF uses `SessionAuthentication` + CSRF for browser clients
122
122
  - `django-environ` or `python-decouple` for settings from environment variables
123
123
  - Content security policy: `django-csp` middleware
124
- - SQL: always use ORM or parameterized `raw()` never string-format user input into queries
124
+ - SQL: always use ORM or parameterized `raw()`: never string-format user input into queries
125
125
 
126
126
  ## Testing
127
127
 
@@ -137,8 +137,8 @@ class ItemAPITest(APITestCase):
137
137
  self.assertEqual(Item.objects.count(), 1)
138
138
  ```
139
139
 
140
- - Use `APITestCase` (DRF) for API tests wraps each test in a transaction that rolls back
141
- - `factory_boy` for fixtures more maintainable than raw `create()`
140
+ - Use `APITestCase` (DRF) for API tests: wraps each test in a transaction that rolls back
141
+ - `factory_boy` for fixtures: more maintainable than raw `create()`
142
142
  - `pytest-django` with `@pytest.mark.django_db` for pytest-style tests
143
143
  - `django-silk` or `django-debug-toolbar` for query profiling in development
144
144
 
@@ -146,14 +146,14 @@ class ItemAPITest(APITestCase):
146
146
 
147
147
  - Database: add `db_index=True` for filtered columns; `select_related`/`prefetch_related` to eliminate N+1
148
148
  - Caching: `django.core.cache` with Redis backend (`django-redis`)
149
- - Async views: `async def` views supported in Django 4.1+ use for I/O-bound operations with `asyncio`
149
+ - Async views: `async def` views supported in Django 4.1+: use for I/O-bound operations with `asyncio`
150
150
  - Task queues: `Celery` + Redis/RabbitMQ for background jobs; `django-celery-beat` for scheduling
151
151
  - `gunicorn` + `uvicorn` workers for async support in production
152
152
 
153
153
  ## Common Pitfalls
154
154
 
155
- - `objects.all()` in views without pagination always use `Paginator` or DRF `pagination_class`
156
- - Accessing related objects in a loop without `select_related` profile with `django-debug-toolbar`
157
- - `settings.DEBUG` checks in production-like environments use environment-specific settings modules
158
- - File uploads to local storage in production use `django-storages` with S3/GCS
159
- - Signals for business logic prefer explicit service functions; signals are invisible and hard to test
155
+ - `objects.all()` in views without pagination: always use `Paginator` or DRF `pagination_class`
156
+ - Accessing related objects in a loop without `select_related`: profile with `django-debug-toolbar`
157
+ - `settings.DEBUG` checks in production-like environments: use environment-specific settings modules
158
+ - File uploads to local storage in production: use `django-storages` with S3/GCS
159
+ - Signals for business logic: prefer explicit service functions; signals are invisible and hard to test
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frameworks/nextjs.md Next.js (App Router) ```
2
+ skills/frameworks/nextjs.md (Next.js (App Router)) ```
3
3
 
4
4
  ## App Router Mental Model ```
5
5
  -->
@@ -46,9 +46,9 @@ Caching behaviors:
46
46
 
47
47
  | Option | Behavior |
48
48
  |---|---|
49
- | `cache: 'force-cache'` | Static cache forever (default) |
50
- | `next: { revalidate: N }` | ISR revalidate after N seconds |
51
- | `cache: 'no-store'` | Dynamic always fresh |
49
+ | `cache: 'force-cache'` | Static: cache forever (default) |
50
+ | `next: { revalidate: N }` | ISR: revalidate after N seconds |
51
+ | `cache: 'no-store'` | Dynamic: always fresh |
52
52
  | `next: { tags: ['items'] }` | Tag for on-demand revalidation |
53
53
 
54
54
  ### On-demand revalidation
@@ -91,15 +91,15 @@ export async function createItem(formData: FormData) {
91
91
  </form>
92
92
  ```
93
93
 
94
- Validate Server Action inputs they are network endpoints.
94
+ Validate Server Action inputs: they are network endpoints.
95
95
 
96
96
  ## Rendering Strategies
97
97
 
98
98
  | Strategy | When |
99
99
  |---|---|
100
- | Static (SSG) | Marketing pages, docs no user-specific data |
101
- | ISR | Listings, product pages stale-ok, periodic refresh |
102
- | Dynamic (SSR) | Dashboards, auth-gated pages always fresh |
100
+ | Static (SSG) | Marketing pages, docs: no user-specific data |
101
+ | ISR | Listings, product pages: stale-ok, periodic refresh |
102
+ | Dynamic (SSR) | Dashboards, auth-gated pages: always fresh |
103
103
  | Client | Highly interactive UIs, real-time, after-hydration only |
104
104
 
105
105
  Prefer static/ISR by default; reach for dynamic only when the data must be per-request.
@@ -129,20 +129,20 @@ export function middleware(req: NextRequest) {
129
129
  export const config = { matcher: ['/dashboard/:path*'] };
130
130
  ```
131
131
 
132
- Middleware runs on the Edge Runtime no Node.js APIs. Keep it fast; no DB calls.
132
+ Middleware runs on the Edge Runtime: no Node.js APIs. Keep it fast; no DB calls.
133
133
 
134
134
  ## Performance
135
135
 
136
136
  - Enable Partial Prerendering (PPR) in Next.js 15 for shell + streaming content
137
- - Use `next/image` for all images automatic WebP, lazy loading, CLS prevention
138
- - Use `next/font` for self-hosted fonts eliminates FOUT and external requests
137
+ - Use `next/image` for all images: automatic WebP, lazy loading, CLS prevention
138
+ - Use `next/font` for self-hosted fonts: eliminates FOUT and external requests
139
139
  - Bundle analysis: `ANALYZE=true next build`
140
140
  - Streaming: wrap slow data-dependent sections in `<Suspense>`
141
141
 
142
142
  ## Common Pitfalls
143
143
 
144
- - Importing client-only code (browser APIs, hooks) in Server Components add `'use client'`
145
- - Large `layout.tsx` re-renders use `memo` on stable child subtrees
146
- - Fetching the same data in multiple components hoist to the nearest shared ancestor Server Component (fetch is deduplicated within a request)
147
- - Dynamic routes missing `generateStaticParams` for static builds causes runtime 404
148
- - Server Actions called without input validation treat as untrusted user input
144
+ - Importing client-only code (browser APIs, hooks) in Server Components: add `'use client'`
145
+ - Large `layout.tsx` re-renders: use `memo` on stable child subtrees
146
+ - Fetching the same data in multiple components: hoist to the nearest shared ancestor Server Component (fetch is deduplicated within a request)
147
+ - Dynamic routes missing `generateStaticParams` for static builds: causes runtime 404
148
+ - Server Actions called without input validation: treat as untrusted user input
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frameworks/react.md React By default, components are **Server Components** they run on the server, have
2
+ skills/frameworks/react.md (React) By default, components are **Server Components**: they run on the server, have
3
3
 
4
4
  ## Component Design ### Server vs Client Components (React 19 / Next.js App Router)
5
5
  -->
@@ -9,7 +9,7 @@ skills/frameworks/react.md — React — By default, components are **Server Com
9
9
 
10
10
  ### Server vs Client Components (React 19 / Next.js App Router)
11
11
 
12
- By default, components are **Server Components** they run on the server, have no state, and can fetch data directly. Add `'use client'` only when you need interactivity, browser APIs, or hooks.
12
+ By default, components are **Server Components**: they run on the server, have no state, and can fetch data directly. Add `'use client'` only when you need interactivity, browser APIs, or hooks.
13
13
 
14
14
  ```tsx
15
15
  // Server Component — no directive needed
@@ -53,7 +53,7 @@ See decision matrix:
53
53
  | URL state | `useSearchParams` / router |
54
54
  | Component-local state | `useState` / `useReducer` |
55
55
 
56
- Do not put server data in a client store TanStack Query is the cache. Derive don't duplicate.
56
+ Do not put server data in a client store: TanStack Query is the cache. Derive don't duplicate.
57
57
 
58
58
  ## Performance
59
59
 
@@ -95,8 +95,8 @@ export function useItems() {
95
95
 
96
96
  ### Controlled vs uncontrolled
97
97
 
98
- - Controlled: React owns value via `state` use for forms with validation, derived fields
99
- - Uncontrolled: DOM owns value via `ref` use for file inputs and simple browser-owned fields
98
+ - Controlled: React owns value via `state`: use for forms with validation, derived fields
99
+ - Uncontrolled: DOM owns value via `ref`: use for file inputs and simple browser-owned fields
100
100
 
101
101
  ## Testing
102
102
 
@@ -113,20 +113,20 @@ test('submits search query', async () => {
113
113
  });
114
114
  ```
115
115
 
116
- - Use `@testing-library/react` test behavior, not implementation
117
- - `userEvent` over `fireEvent` simulates real user interactions
116
+ - Use `@testing-library/react`: test behavior, not implementation
117
+ - `userEvent` over `fireEvent`: simulates real user interactions
118
118
  - Mock at the network boundary (`msw`) not the component boundary
119
119
 
120
120
  ## Tooling
121
121
 
122
122
  - **Vite** for non-Next apps; fast HMR, native ESM
123
123
  - **Biome** for lint + format in a single fast tool (replaces ESLint + Prettier)
124
- - **TypeScript strict mode** enables `noUncheckedIndexedAccess`, `strictNullChecks`, etc.
124
+ - **TypeScript strict mode**: enables `noUncheckedIndexedAccess`, `strictNullChecks`, etc.
125
125
  - React DevTools Profiler for recomposition analysis
126
126
 
127
127
  ## Common Pitfalls
128
128
 
129
- - Stale closures in `useEffect` include all reactive values in the dependency array or use `useEffectEvent` (React 19)
130
- - `useEffect` for data fetching use TanStack Query instead
131
- - Direct DOM mutation inside render causes tearing with concurrent mode
132
- - Key prop as array index breaks reconciliation on reorder/insert
129
+ - Stale closures in `useEffect`: include all reactive values in the dependency array or use `useEffectEvent` (React 19)
130
+ - `useEffect` for data fetching: use TanStack Query instead
131
+ - Direct DOM mutation inside render: causes tearing with concurrent mode
132
+ - Key prop as array index: breaks reconciliation on reorder/insert
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frameworks/spring-boot.md Spring Boot ```
2
+ skills/frameworks/spring-boot.md (Spring Boot) ```
3
3
 
4
4
  ## Project Structure ```
5
5
  -->
@@ -80,9 +80,9 @@ interface ItemRepository : JpaRepository<Item, UUID> {
80
80
  }
81
81
  ```
82
82
 
83
- - Default `FetchType.LAZY` for associations never `EAGER`
83
+ - Default `FetchType.LAZY` for associations: never `EAGER`
84
84
  - Use `JOIN FETCH` in queries when you need the association
85
- - Enable `spring.jpa.open-in-view=false` prevents lazy-loading in the web layer
85
+ - Enable `spring.jpa.open-in-view=false`: prevents lazy-loading in the web layer
86
86
  - Use Flyway or Liquibase for schema migrations; never `ddl-auto=update` in production
87
87
 
88
88
  ## Transactions
@@ -101,8 +101,8 @@ class ItemService(private val repo: ItemRepository) {
101
101
  ```
102
102
 
103
103
  - `@Transactional` on service layer, not repository or controller
104
- - `readOnly = true` as class-level default; override on writes signals no dirty-check needed
105
- - Do not call `@Transactional` methods via `this` Spring proxy won't intercept it
104
+ - `readOnly = true` as class-level default; override on writes: signals no dirty-check needed
105
+ - Do not call `@Transactional` methods via `this`: Spring proxy won't intercept it
106
106
 
107
107
  ## Security (Spring Security 6)
108
108
 
@@ -145,12 +145,12 @@ class ItemControllerIT(@Autowired val restTemplate: TestRestTemplate) {
145
145
 
146
146
  - `@WebMvcTest` for controller-only tests (fast, no DB)
147
147
  - `@DataJpaTest` for repository tests against a real embedded or Testcontainers DB
148
- - `@SpringBootTest` for integration tests use Testcontainers for realistic DB
148
+ - `@SpringBootTest` for integration tests: use Testcontainers for realistic DB
149
149
  - `MockMvc` + `@AutoConfigureMockMvc` for HTTP-layer testing without a real port
150
150
 
151
151
  ## Performance
152
152
 
153
- - Connection pool: `HikariCP` (default) tune `maximumPoolSize` based on load testing
153
+ - Connection pool: `HikariCP` (default): tune `maximumPoolSize` based on load testing
154
154
  - N+1 queries: use `JOIN FETCH` or `@EntityGraph`; verify with `spring.jpa.show-sql=true` in dev
155
155
  - Caching: `@Cacheable` + Spring Cache with Redis (`spring-boot-starter-data-redis`)
156
156
  - Async: `@EnableAsync` + `@Async` on service methods for fire-and-forget; use `CompletableFuture<T>` return type
@@ -158,8 +158,8 @@ class ItemControllerIT(@Autowired val restTemplate: TestRestTemplate) {
158
158
 
159
159
  ## Common Pitfalls
160
160
 
161
- - `LazyInitializationException` after transaction closes resolve with `JOIN FETCH` or DTO projection
162
- - `@Transactional` on private methods Spring AOP proxy can't intercept; move to public
163
- - Bean cycle injection restructure or use `@Lazy`
164
- - Returning JPA entities directly from controllers exposes internal model; always map to DTOs
165
- - `findAll()` without pagination on large tables always use `Pageable`
161
+ - `LazyInitializationException` after transaction closes: resolve with `JOIN FETCH` or DTO projection
162
+ - `@Transactional` on private methods: Spring AOP proxy can't intercept; move to public
163
+ - Bean cycle injection: restructure or use `@Lazy`
164
+ - Returning JPA entities directly from controllers: exposes internal model; always map to DTOs
165
+ - `findAll()` without pagination on large tables: always use `Pageable`
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/accessibility.md Accessibility (WCAG 2.2 / Inclusive Design) Target **WCAG 2.1 AA** as the minimum for any public-facing product. WCAG 2.2 AA
2
+ skills/frontend-design/accessibility.md (Accessibility (WCAG 2.2 / Inclusive Design)) Target **WCAG 2.1 AA** as the minimum for any public-facing product. WCAG 2.2 AA
3
3
 
4
4
  ## Compliance Baseline Target **WCAG 2.1 AA** as the minimum for any public-facing product. WCAG 2.2 AA is the current standard (published October 2023) and req
5
5
  -->
@@ -25,7 +25,7 @@ ARIA augments semantics it can't add natively; it cannot fix broken semantics.
25
25
 
26
26
  ## ARIA Rules
27
27
 
28
- 1. If a native HTML element provides the required semantics, use it do not add ARIA to a `<div>` when `<button>` exists.
28
+ 1. If a native HTML element provides the required semantics, use it: do not add ARIA to a `<div>` when `<button>` exists.
29
29
  2. Do not change native semantics: `<h2 role="button">` is invalid.
30
30
  3. All interactive ARIA widgets must be keyboard-operable.
31
31
  4. Do not hide focusable elements with `aria-hidden="true"`.
@@ -84,11 +84,11 @@ function trapFocus(modal: HTMLElement) {
84
84
  |---|---|---|
85
85
  | Normal text (< 18pt / 14pt bold) | 4.5:1 | 7:1 |
86
86
  | Large text (≥ 18pt / 14pt bold) | 3:1 | 4.5:1 |
87
- | UI components / graphical objects | 3:1 | |
87
+ | UI components / graphical objects | 3:1 |: |
88
88
 
89
89
  Tools: Figma Contrast plugin, axe DevTools, APCA calculator for sophisticated use cases.
90
90
 
91
- Do not convey information by color alone add shape, pattern, or text.
91
+ Do not convey information by color alone: add shape, pattern, or text.
92
92
 
93
93
  ## Motion
94
94
 
@@ -136,11 +136,11 @@ if (!prefersReduced) gsap.to(el, { y: -20, duration: 0.3 });
136
136
 
137
137
  ## Testing Checklist
138
138
 
139
- - [ ] Run `axe` or `Lighthouse Accessibility` fix all violations
139
+ - [ ] Run `axe` or `Lighthouse Accessibility`: fix all violations
140
140
  - [ ] Navigate entire flow with keyboard only
141
141
  - [ ] Test with VoiceOver (macOS/iOS) or NVDA/JAWS (Windows)
142
142
  - [ ] Verify color contrast meets 4.5:1 for body text
143
- - [ ] Test with browser zoom at 200% no horizontal scroll, no content loss
143
+ - [ ] Test with browser zoom at 200%: no horizontal scroll, no content loss
144
144
  - [ ] Test with `prefers-reduced-motion: reduce` enabled
145
145
  - [ ] All form errors are announced by screen reader
146
146
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/component-patterns.md Component Patterns Use this skill when designing component architecture, building design systems, o
2
+ skills/frontend-design/component-patterns.md (Component Patterns) Use this skill when designing component architecture, building design systems, o
3
3
 
4
4
  Use this skill when designing component architecture, building design systems, or structuring reusable UI. ## Component Hierarchy
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/engineering.md Frontend Engineering Use this skill when working on build tooling, bundling, rendering strategies, or
2
+ skills/frontend-design/engineering.md (Frontend Engineering) Use this skill when working on build tooling, bundling, rendering strategies, or
3
3
 
4
4
  Use this skill when working on build tooling, bundling, rendering strategies, or frontend infrastructure. ## Build Tools
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/state-management.md Frontend State Management Use this skill when choosing state management tools, structuring application sta
2
+ skills/frontend-design/state-management.md (Frontend State Management) Use this skill when choosing state management tools, structuring application sta
3
3
 
4
4
  Use this skill when choosing state management tools, structuring application state, or debugging state issues. ## State Categories
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/ui-aesthetics.md UI Aesthetics Use this skill when making visual design decisions: color, typography, layout, s
2
+ skills/frontend-design/ui-aesthetics.md (UI Aesthetics) Use this skill when making visual design decisions: color, typography, layout, s
3
3
 
4
4
  Use this skill when making visual design decisions: color, typography, layout, spacing, and visual hierarchy. ## Color
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/frontend-design/ux-principles.md UX Principles Use this skill when designing user flows, evaluating usability, or planning info
2
+ skills/frontend-design/ux-principles.md (UX Principles) Use this skill when designing user flows, evaluating usability, or planning info
3
3
 
4
4
  Use this skill when designing user flows, evaluating usability, or planning information architecture. ## Core Heuristics
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/operating/orchestration-reference.md detailed orchestration reference loaded on demand.
2
+ skills/operating/orchestration-reference.md: detailed orchestration reference loaded on demand.
3
3
 
4
4
  Holds the execution contract, handoff template, intent and work-category
5
5
  classification, parallel dispatch, horizontal routing, and efficiency
@@ -12,7 +12,7 @@ stay in sharedGuidance so they load every turn.
12
12
 
13
13
  Loaded on demand via `get_skill("operating/orchestration-reference")`.
14
14
 
15
- This is the detailed reference for Construct's orchestration contract. The short essentials (session resumption, loop guard, terminal states, tool naming, observability) live in the per-agent prompt. Everything below is situational load it when you hit a case it addresses.
15
+ This is the detailed reference for Construct's orchestration contract. The short essentials (session resumption, loop guard, terminal states, tool naming, observability) live in the per-agent prompt. Everything below is situational: load it when you hit a case it addresses.
16
16
 
17
17
  ## System model
18
18
 
@@ -20,14 +20,14 @@ Construct is the underlying orchestration system for the **current project**. Tr
20
20
 
21
21
  The two task-shaped surfaces are siblings, not duplicates:
22
22
 
23
- - **`.cx/workflow.json`** single project-wide workflow file. Holds the cross-cutting task ledger and intent / category metadata. Drives `workflow_status` and `project_context` MCP tools.
24
- - **`.cx/task-graphs/<id>.json`** per-incoming-signal plan generated by `construct graph from-intake <intake-id>`. One graph per triaged inbox file, one node per persona in the recommendedChain, evidence records gating `done`. See [Concepts → Intake and triage](/concepts/intake-and-triage).
23
+ - **`.cx/workflow.json`**: single project-wide workflow file. Holds the cross-cutting task ledger and intent / category metadata. Drives `workflow_status` and `project_context` MCP tools.
24
+ - **`.cx/task-graphs/<id>.json`**: per-incoming-signal plan generated by `construct graph from-intake <intake-id>`. One graph per triaged inbox file, one node per persona in the recommendedChain, evidence records gating `done`. See [Concepts → Intake and triage](/concepts/intake-and-triage).
25
25
 
26
26
  A signal that becomes durable cross-session work crosses over: the graph nodes are executed, the resulting work is tracked in `.cx/workflow.json` and in beads. The intake queue and task graphs are how new signals enter the loop; the workflow ledger and beads are how durable work is carried.
27
27
 
28
28
  ## Perspective architecture
29
29
 
30
- Each specialist carries a distinct cognitive profile shaped by professional prior, characteristic suspicion, and productive tension with adjacent roles. When you dispatch specialists, you are not delegating tasks you are assembling perspectives. The value is not parallelism; it is forcing the same problem through genuinely different cognitive lenses in sequence. A plan challenged by cx-devil-advocate and reviewed by cx-reviewer is not slower it is more likely to survive contact with reality.
30
+ Each specialist carries a distinct cognitive profile shaped by professional prior, characteristic suspicion, and productive tension with adjacent roles. When you dispatch specialists, you are not delegating tasks (you are assembling perspectives. The value is not parallelism; it is forcing the same problem through genuinely different cognitive lenses in sequence. A plan challenged by cx-devil-advocate and reviewed by cx-reviewer is not slower) it is more likely to survive contact with reality.
31
31
 
32
32
  ## Execution contract
33
33
 
@@ -35,11 +35,11 @@ For every non-trivial task: classify intent, create or update `.cx/workflow.json
35
35
 
36
36
  ### Intent classes
37
37
 
38
- - `research` read-only investigation
39
- - `implementation` code changes
40
- - `investigation` debugging, tracing
41
- - `evaluation` quality gates, review
42
- - `fix` bug repair
38
+ - `research`: read-only investigation
39
+ - `implementation`: code changes
40
+ - `investigation`: debugging, tracing
41
+ - `evaluation`: quality gates, review
42
+ - `fix`: bug repair
43
43
 
44
44
  Tag every workflow task with its intent class. Let intent drive agent selection and depth of work.
45
45
 
@@ -69,24 +69,24 @@ Do not duplicate skill internals inside agent prompts. Reference the relevant sk
69
69
 
70
70
  Every producer→consumer pair has an explicit contract in `agents/contracts.json`, loaded via `lib/agent-contracts.mjs`. Specialists call the MCP tool `agent_contract` at the start of a handoff to see:
71
71
 
72
- - `input.mustContain` fields the packet must carry
73
- - `input.schema` JSON schema (when applicable) from `lib/schemas/`
74
- - `preconditions` what must be true before work starts
75
- - `output.schema` / `output.shape` expected return shape
76
- - `postconditions` what must be true before marking DONE
72
+ - `input.mustContain`: fields the packet must carry
73
+ - `input.schema`: JSON schema (when applicable) from `lib/schemas/`
74
+ - `preconditions`: what must be true before work starts
75
+ - `output.schema` / `output.shape`: expected return shape
76
+ - `postconditions`: what must be true before marking DONE
77
77
 
78
78
  Examples of contracts (full list in `agents/contracts.json`):
79
79
 
80
- - `researcher-to-architect` research brief with ≥2 primary sources → decision
81
- - `product-manager-to-architect` PRD handoff → decision with Rejected alternatives
82
- - `architect-to-devil-advocate` framing proposal → challenge report (blocks if framing is weak)
83
- - `architect-to-engineer` decision → implementation
84
- - `engineer-to-reviewer` implementation → review verdict
85
- - `engineer-to-qa` implementation → test report
86
- - `reviewer-to-security` review with auth/secrets scope → specialized security review
87
- - `any-to-docs-keeper` any DONE mutation that changed core docs → doc sync
80
+ - `researcher-to-architect`: research brief with ≥2 primary sources → decision
81
+ - `product-manager-to-architect`: PRD handoff → decision with Rejected alternatives
82
+ - `architect-to-devil-advocate`: framing proposal → challenge report (blocks if framing is weak)
83
+ - `architect-to-engineer`: decision → implementation
84
+ - `engineer-to-reviewer`: implementation → review verdict
85
+ - `engineer-to-qa`: implementation → test report
86
+ - `reviewer-to-security`: review with auth/secrets scope → specialized security review
87
+ - `any-to-docs-keeper`: any DONE mutation that changed core docs → doc sync
88
88
 
89
- `routeRequest` returns a `contractChain` that enumerates which of these fire for a given request. Honor the chain missing a contract stage is the signal a handoff is incomplete.
89
+ `routeRequest` returns a `contractChain` that enumerates which of these fire for a given request. Honor the chain: missing a contract stage is the signal a handoff is incomplete.
90
90
 
91
91
  ## Legacy handoff contract (fallback)
92
92
 
@@ -120,7 +120,7 @@ When your output directly feeds another specialist (e.g. security findings → c
120
120
  These are enforced by hooks, not advisory:
121
121
 
122
122
  - `context-watch` hook (UserPromptSubmit) injects compaction guidance at ~60% / ~80% of the context window.
123
- - `repeated-read-guard` hook (PreToolUse on Read) blocks broad re-reads of files already read twice in this session steers to Grep or offset+limit.
123
+ - `repeated-read-guard` hook (PreToolUse on Read) blocks broad re-reads of files already read twice in this session: steers to Grep or offset+limit.
124
124
  - `bash-output-logger` hook (PostToolUse on Bash) persists outputs >4KB to `~/.cx/bash-logs/` and tells the model to grep the log rather than re-run.
125
125
 
126
126
  Advisory companions:
@@ -136,11 +136,11 @@ If you reason about the same decision across two consecutive turns without a new
136
136
 
137
137
  ## Speculation rule
138
138
 
139
- When choosing between named options (SDK vs SDK, library vs library, pattern vs pattern), the answer comes from `context7_query-docs`, `WebFetch`, the user, or an explicit default never from internal reasoning rounds alone.
139
+ When choosing between named options (SDK vs SDK, library vs library, pattern vs pattern), the answer comes from `context7_query-docs`, `WebFetch`, the user, or an explicit default: never from internal reasoning rounds alone.
140
140
 
141
141
  ## Dispatch-first test
142
142
 
143
- If work touches 3+ files across 2+ modules, or introduces a new contract/dependency/SDK, the persona must not produce the implementation plan itself dispatch cx-architect. In-persona implementation planning for complex work is the primary failure mode this rule exists to prevent.
143
+ If work touches 3+ files across 2+ modules, or introduces a new contract/dependency/SDK, the persona must not produce the implementation plan itself: dispatch cx-architect. In-persona implementation planning for complex work is the primary failure mode this rule exists to prevent.
144
144
 
145
145
  ## Executive communication
146
146
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/quality-gates/review-work.md Parallel Adversarial Review Use this methodology when a change needs rigorous pre-merge validation. Five ind
2
+ skills/quality-gates/review-work.md (Parallel Adversarial Review) Use this methodology when a change needs rigorous pre-merge validation. Five ind
3
3
 
4
4
  Use this methodology when a change needs rigorous pre-merge validation. Five independent review roles run concurrently. All must pass. ## When to use
5
5
  -->
@@ -46,13 +46,13 @@ Use this methodology when a change needs rigorous pre-merge validation. Five ind
46
46
 
47
47
  ### 5. Quality (cx-accessibility for UI; cx-trace-reviewer for non-UI)
48
48
 
49
- **UI changes cx-accessibility:**
49
+ **UI changes: cx-accessibility:**
50
50
  - Keyboard navigation
51
51
  - Screen reader compatibility
52
52
  - Color contrast and focus visibility
53
53
  - Reduced motion support
54
54
 
55
- **Non-UI changes cx-trace-reviewer:**
55
+ **Non-UI changes: cx-trace-reviewer:**
56
56
  - N+1 queries or unbounded loops
57
57
  - Memory or connection leaks
58
58
  - Missing caching for expensive operations
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/quality-gates/verify-change.md Verify Change Use this skill to analyze the impact of code changes and verify documentation an
2
+ skills/quality-gates/verify-change.md (Verify Change) Use this skill to analyze the impact of code changes and verify documentation an
3
3
 
4
4
  Use this skill to analyze the impact of code changes and verify documentation and tests are in sync. ## Change Inventory
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/quality-gates/verify-module.md Verify Module Use this skill to check that a module or package is structurally complete and re
2
+ skills/quality-gates/verify-module.md (Verify Module) Use this skill to check that a module or package is structurally complete and re
3
3
 
4
4
  Use this skill to check that a module or package is structurally complete and ready for use. ## Exports
5
5
  -->