@geraldmaron/construct 1.0.5 → 1.0.6

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 (209) hide show
  1. package/README.md +8 -4
  2. package/agents/prompts/cx-accessibility.md +3 -3
  3. package/agents/prompts/cx-ai-engineer.md +7 -7
  4. package/agents/prompts/cx-architect.md +6 -6
  5. package/agents/prompts/cx-business-strategist.md +6 -6
  6. package/agents/prompts/cx-data-analyst.md +7 -7
  7. package/agents/prompts/cx-data-engineer.md +3 -3
  8. package/agents/prompts/cx-debugger.md +6 -6
  9. package/agents/prompts/cx-designer.md +5 -5
  10. package/agents/prompts/cx-devil-advocate.md +4 -4
  11. package/agents/prompts/cx-docs-keeper.md +5 -5
  12. package/agents/prompts/cx-engineer.md +5 -5
  13. package/agents/prompts/cx-evaluator.md +2 -2
  14. package/agents/prompts/cx-explorer.md +8 -8
  15. package/agents/prompts/cx-legal-compliance.md +2 -2
  16. package/agents/prompts/cx-operations.md +5 -5
  17. package/agents/prompts/cx-orchestrator.md +10 -10
  18. package/agents/prompts/cx-platform-engineer.md +5 -5
  19. package/agents/prompts/cx-product-manager.md +4 -4
  20. package/agents/prompts/cx-qa.md +8 -8
  21. package/agents/prompts/cx-rd-lead.md +9 -9
  22. package/agents/prompts/cx-release-manager.md +5 -5
  23. package/agents/prompts/cx-researcher.md +22 -22
  24. package/agents/prompts/cx-reviewer.md +7 -7
  25. package/agents/prompts/cx-security.md +10 -10
  26. package/agents/prompts/cx-sre.md +7 -7
  27. package/agents/prompts/cx-test-automation.md +3 -3
  28. package/agents/prompts/cx-trace-reviewer.md +8 -8
  29. package/agents/prompts/cx-ux-researcher.md +3 -3
  30. package/bin/construct +235 -21
  31. package/commands/build/feature.md +4 -4
  32. package/commands/build/fix.md +8 -8
  33. package/commands/design/access.md +3 -3
  34. package/commands/design/flow.md +3 -3
  35. package/commands/design/ui.md +4 -4
  36. package/commands/measure/experiment.md +5 -5
  37. package/commands/measure/metrics.md +3 -3
  38. package/commands/measure/results.md +4 -4
  39. package/commands/plan/api.md +3 -3
  40. package/commands/plan/challenge.md +3 -3
  41. package/commands/plan/decide.md +3 -3
  42. package/commands/plan/feature.md +7 -7
  43. package/commands/plan/requirements.md +3 -3
  44. package/commands/remember/context.md +5 -5
  45. package/commands/remember/handoff.md +3 -3
  46. package/commands/remember/runbook.md +3 -3
  47. package/commands/review/code.md +8 -8
  48. package/commands/review/quality.md +4 -4
  49. package/commands/review/security.md +3 -3
  50. package/commands/ship/ready.md +3 -3
  51. package/commands/ship/release.md +3 -3
  52. package/commands/ship/status.md +4 -4
  53. package/commands/understand/docs.md +3 -3
  54. package/commands/understand/this.md +4 -4
  55. package/commands/understand/why.md +8 -8
  56. package/commands/work/clean.md +14 -14
  57. package/commands/work/drive.md +10 -10
  58. package/commands/work/optimize-prompts.md +9 -9
  59. package/commands/work/parallel-review.md +8 -8
  60. package/db/schema/006_graph.sql +24 -0
  61. package/examples/provider-plugin/README.md +7 -7
  62. package/examples/seed-observations/README.md +6 -6
  63. package/examples/seed-observations/anti-patterns.md +14 -14
  64. package/examples/seed-observations/decisions.md +4 -4
  65. package/examples/seed-observations/patterns.md +14 -14
  66. package/lib/auto-docs.mjs +8 -3
  67. package/lib/cli-commands.mjs +2 -2
  68. package/lib/flavors/loader.mjs +1 -1
  69. package/lib/knowledge/graph.mjs +213 -0
  70. package/lib/mcp/server.mjs +187 -1
  71. package/lib/mcp/tools/profile.mjs +270 -0
  72. package/package.json +1 -1
  73. package/platforms/claude/CLAUDE.md +6 -6
  74. package/rules/common/agents.md +2 -2
  75. package/rules/common/beads-hygiene.md +11 -11
  76. package/rules/common/code-review.md +1 -1
  77. package/rules/common/coding-style.md +1 -1
  78. package/rules/common/comments.md +8 -8
  79. package/rules/common/commit-approval.md +4 -4
  80. package/rules/common/cx-agent-routing.md +2 -2
  81. package/rules/common/cx-skill-routing.md +2 -2
  82. package/rules/common/development-workflow.md +1 -1
  83. package/rules/common/doc-ownership.md +2 -2
  84. package/rules/common/efficiency.md +3 -3
  85. package/rules/common/framing.md +1 -1
  86. package/rules/common/git-workflow.md +1 -1
  87. package/rules/common/patterns.md +1 -1
  88. package/rules/common/performance.md +1 -1
  89. package/rules/common/release-gates.md +7 -7
  90. package/rules/common/research.md +4 -4
  91. package/rules/common/security.md +1 -1
  92. package/rules/common/skill-composition.md +8 -8
  93. package/rules/common/testing.md +1 -1
  94. package/rules/golang/coding-style.md +2 -2
  95. package/rules/golang/hooks.md +1 -1
  96. package/rules/golang/patterns.md +1 -1
  97. package/rules/golang/security.md +1 -1
  98. package/rules/golang/testing.md +1 -1
  99. package/rules/python/coding-style.md +1 -1
  100. package/rules/python/hooks.md +1 -1
  101. package/rules/python/patterns.md +1 -1
  102. package/rules/python/security.md +1 -1
  103. package/rules/python/testing.md +1 -1
  104. package/rules/swift/coding-style.md +3 -3
  105. package/rules/swift/hooks.md +2 -2
  106. package/rules/swift/patterns.md +2 -2
  107. package/rules/swift/security.md +4 -4
  108. package/rules/swift/testing.md +2 -2
  109. package/rules/typescript/coding-style.md +1 -1
  110. package/rules/typescript/hooks.md +1 -1
  111. package/rules/typescript/patterns.md +1 -1
  112. package/rules/typescript/security.md +1 -1
  113. package/rules/typescript/testing.md +1 -1
  114. package/rules/web/coding-style.md +1 -1
  115. package/rules/web/design-quality.md +1 -1
  116. package/rules/web/hooks.md +1 -1
  117. package/rules/web/patterns.md +1 -1
  118. package/rules/web/performance.md +1 -1
  119. package/rules/web/security.md +1 -1
  120. package/rules/web/testing.md +1 -1
  121. package/skills/ai/agent-dev.md +1 -1
  122. package/skills/ai/llm-security.md +1 -1
  123. package/skills/ai/ml-ops.md +6 -6
  124. package/skills/ai/orchestration-workflow.md +1 -1
  125. package/skills/ai/prompt-and-eval.md +1 -1
  126. package/skills/ai/prompt-optimizer.md +13 -13
  127. package/skills/ai/rag-system.md +1 -1
  128. package/skills/architecture/api-design.md +1 -1
  129. package/skills/architecture/caching.md +1 -1
  130. package/skills/architecture/cloud-native.md +1 -1
  131. package/skills/architecture/message-queue.md +1 -1
  132. package/skills/architecture/security-arch.md +1 -1
  133. package/skills/compliance/ai-disclosure.md +1 -1
  134. package/skills/compliance/data-privacy.md +1 -1
  135. package/skills/compliance/license-audit.md +2 -2
  136. package/skills/compliance/regulatory-review.md +1 -1
  137. package/skills/development/cpp.md +1 -1
  138. package/skills/development/go.md +1 -1
  139. package/skills/development/java.md +1 -1
  140. package/skills/development/kotlin.md +9 -9
  141. package/skills/development/mobile-crossplatform.md +13 -13
  142. package/skills/development/python.md +1 -1
  143. package/skills/development/rust.md +1 -1
  144. package/skills/development/shell.md +1 -1
  145. package/skills/development/swift.md +6 -6
  146. package/skills/development/typescript.md +1 -1
  147. package/skills/devops/ci-cd.md +5 -5
  148. package/skills/devops/containerization.md +9 -9
  149. package/skills/devops/cost-optimization.md +1 -1
  150. package/skills/devops/data-engineering.md +2 -2
  151. package/skills/devops/database.md +1 -1
  152. package/skills/devops/dependency-management.md +3 -3
  153. package/skills/devops/devsecops.md +1 -1
  154. package/skills/devops/git-workflow.md +1 -1
  155. package/skills/devops/incident-response.md +18 -18
  156. package/skills/devops/monorepo.md +5 -5
  157. package/skills/devops/observability.md +1 -1
  158. package/skills/devops/performance.md +1 -1
  159. package/skills/devops/testing.md +1 -1
  160. package/skills/docs/adr-workflow.md +2 -2
  161. package/skills/docs/backlog-proposal-workflow.md +1 -1
  162. package/skills/docs/customer-profile-workflow.md +1 -1
  163. package/skills/docs/document-ingest-workflow.md +1 -1
  164. package/skills/docs/evidence-ingest-workflow.md +1 -1
  165. package/skills/docs/init-docs.md +15 -15
  166. package/skills/docs/init-project.md +1 -1
  167. package/skills/docs/prd-workflow.md +3 -3
  168. package/skills/docs/prfaq-workflow.md +1 -1
  169. package/skills/docs/product-intelligence-review.md +1 -1
  170. package/skills/docs/product-intelligence-workflow.md +1 -1
  171. package/skills/docs/product-signal-workflow.md +9 -9
  172. package/skills/docs/research-workflow.md +10 -10
  173. package/skills/docs/runbook-workflow.md +2 -2
  174. package/skills/docs/strategy-workflow.md +3 -3
  175. package/skills/exploration/repo-map.md +11 -11
  176. package/skills/frameworks/django.md +15 -15
  177. package/skills/frameworks/nextjs.md +16 -16
  178. package/skills/frameworks/react.md +12 -12
  179. package/skills/frameworks/spring-boot.md +12 -12
  180. package/skills/frontend-design/accessibility.md +6 -6
  181. package/skills/frontend-design/component-patterns.md +1 -1
  182. package/skills/frontend-design/engineering.md +1 -1
  183. package/skills/frontend-design/state-management.md +1 -1
  184. package/skills/frontend-design/ui-aesthetics.md +1 -1
  185. package/skills/frontend-design/ux-principles.md +1 -1
  186. package/skills/operating/orchestration-reference.md +27 -27
  187. package/skills/quality-gates/review-work.md +3 -3
  188. package/skills/quality-gates/verify-change.md +1 -1
  189. package/skills/quality-gates/verify-module.md +1 -1
  190. package/skills/quality-gates/verify-quality.md +1 -1
  191. package/skills/quality-gates/verify-security.md +1 -1
  192. package/skills/routing.md +14 -14
  193. package/skills/security/blue-team.md +1 -1
  194. package/skills/security/code-audit.md +1 -1
  195. package/skills/security/pentest.md +1 -1
  196. package/skills/security/red-team.md +1 -1
  197. package/skills/security/threat-intel.md +1 -1
  198. package/skills/security/vuln-research.md +1 -1
  199. package/skills/utility/clean-code.md +2 -2
  200. package/templates/docs/changelog-entry.md +1 -1
  201. package/templates/docs/construct_guide.md +13 -13
  202. package/templates/docs/meta-prd.md +16 -16
  203. package/templates/docs/one-pager.md +1 -1
  204. package/templates/docs/prd-business.md +1 -1
  205. package/templates/docs/prd-platform.md +1 -1
  206. package/templates/docs/prd.md +17 -17
  207. package/templates/docs/research-brief.md +8 -8
  208. package/templates/docs/rfc.md +1 -1
  209. package/templates/docs/strategy.md +1 -1
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/common/security.md mandatory security checks and secret management.
2
+ rules/common/security.md: mandatory security checks and secret management.
3
3
 
4
4
  Defines pre-commit security checklist, secret management rules,
5
5
  and response protocol for discovered vulnerabilities.
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/common/skill-composition.md how specialist prompts compose with skill files.
2
+ rules/common/skill-composition.md: how specialist prompts compose with skill files.
3
3
 
4
4
  Defines the default boundary between what lives in the agent's base prompt and
5
5
  what is fetched via `get_skill` at runtime. Aims to keep prompts lean while
@@ -17,13 +17,13 @@ Every specialist prompt carries a marker:
17
17
  **Role guidance**: call `get_skill("roles/NAME")` before drafting.
18
18
  ```
19
19
 
20
- When the agent begins substantive work in its domain, it calls `get_skill("roles/NAME")` via the construct-mcp server. The skill body is returned for that turn only no permanent prompt budget is consumed.
20
+ When the agent begins substantive work in its domain, it calls `get_skill("roles/NAME")` via the construct-mcp server. The skill body is returned for that turn only: no permanent prompt budget is consumed.
21
21
 
22
22
  All hosts Construct supports (Claude Code, OpenCode, Codex, Copilot) have `get_skill` available through the construct-mcp server, so the runtime call is reliable.
23
23
 
24
24
  ## Why on-demand is the default
25
25
 
26
- Inlining every role skill at sync time used to consume ~1000–2000 words of prompt budget per specialist, regardless of whether the skill content was relevant to the current task. That budget is fixed it reduces the window available for actual context.
26
+ Inlining every role skill at sync time used to consume ~1000–2000 words of prompt budget per specialist, regardless of whether the skill content was relevant to the current task. That budget is fixed: it reduces the window available for actual context.
27
27
 
28
28
  On-demand loading means:
29
29
 
@@ -40,20 +40,20 @@ Set `preloadRoleGuidance: true` on a registry entry only when:
40
40
  - The role content is so load-bearing that every single turn needs it
41
41
  - The agent's model is weak at tool-calling discipline and skips the `get_skill` call in practice
42
42
 
43
- This should be rare. If you find yourself preloading most agents, revisit the reasoning the default exists because the cost is real.
43
+ This should be rare. If you find yourself preloading most agents, revisit the reasoning: the default exists because the cost is real.
44
44
 
45
45
  ## Skill array vs. role guidance
46
46
 
47
47
  Two different mechanisms for two different purposes:
48
48
 
49
- - **Registry `skills: [...]` array** declarative metadata listing which skills the agent is *entitled* to call. Not inlined into the prompt. Used by `list_skills`, routing heuristics, and audit tooling. Add skills here liberally.
50
- - **Role guidance directive** the single `**Role guidance**: call get_skill("roles/NAME")` line in the prompt. Points the agent at its role file and (by default) tells it to load on demand. Exactly one per agent.
49
+ - **Registry `skills: [...]` array**: declarative metadata listing which skills the agent is *entitled* to call. Not inlined into the prompt. Used by `list_skills`, routing heuristics, and audit tooling. Add skills here liberally.
50
+ - **Role guidance directive**: the single `**Role guidance**: call get_skill("roles/NAME")` line in the prompt. Points the agent at its role file and (by default) tells it to load on demand. Exactly one per agent.
51
51
 
52
52
  ## Contributor guidance
53
53
 
54
54
  When adding or editing a specialist:
55
55
 
56
- 1. Keep the base prompt short role, perspective, productive tension, handoff contract. Under 400 words is normal.
56
+ 1. Keep the base prompt short: role, perspective, productive tension, handoff contract. Under 400 words is normal.
57
57
  2. Put domain depth into `skills/roles/NAME.md` and optional flavor overlays like `skills/roles/NAME.FLAVOR.md`.
58
58
  3. Leave the role-guidance directive in place. Do not manually inline role content into the prompt body.
59
59
  4. Only add `preloadRoleGuidance: true` with a written reason in the registry description.
@@ -64,4 +64,4 @@ Do not:
64
64
 
65
65
  - Paste role-skill content directly into the prompt body "to be safe"
66
66
  - Add `preloadRoleGuidance: true` to push a prompt under the cap without fixing the underlying bloat
67
- - Split a role skill into many tiny files to dodge the cap keep the cohesive unit, load it on demand instead
67
+ - Split a role skill into many tiny files to dodge the cap: keep the cohesive unit, load it on demand instead
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/common/testing.md test coverage requirements and TDD workflow.
2
+ rules/common/testing.md: test coverage requirements and TDD workflow.
3
3
 
4
4
  Defines minimum 80% coverage, TDD red-green-refactor cycle,
5
5
  AAA test structure, and descriptive naming conventions.
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/golang/coding-style.md <one-line purpose>
2
+ rules/golang/coding-style.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -15,7 +15,7 @@ paths:
15
15
 
16
16
  ## Formatting
17
17
 
18
- - **gofmt** and **goimports** are mandatory no style debates
18
+ - **gofmt** and **goimports** are mandatory: no style debates
19
19
 
20
20
  ## Design Principles
21
21
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/golang/hooks.md <one-line purpose>
2
+ rules/golang/hooks.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/golang/patterns.md <one-line purpose>
2
+ rules/golang/patterns.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/golang/security.md <one-line purpose>
2
+ rules/golang/security.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/golang/testing.md <one-line purpose>
2
+ rules/golang/testing.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/python/coding-style.md <one-line purpose>
2
+ rules/python/coding-style.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/python/hooks.md <one-line purpose>
2
+ rules/python/hooks.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/python/patterns.md <one-line purpose>
2
+ rules/python/patterns.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/python/security.md <one-line purpose>
2
+ rules/python/security.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/python/testing.md <one-line purpose>
2
+ rules/python/testing.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/swift/coding-style.md <one-line purpose>
2
+ rules/swift/coding-style.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -19,14 +19,14 @@ paths:
19
19
 
20
20
  ## Immutability
21
21
 
22
- - Prefer `let` over `var` define everything as `let` and only change to `var` if the compiler requires it
22
+ - Prefer `let` over `var`: define everything as `let` and only change to `var` if the compiler requires it
23
23
  - Use `struct` with value semantics by default; use `class` only when identity or reference semantics are needed
24
24
 
25
25
  ## Naming
26
26
 
27
27
  Follow [Apple API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/):
28
28
 
29
- - Clarity at the point of use omit needless words
29
+ - Clarity at the point of use: omit needless words
30
30
  - Name methods and properties for their roles, not their types
31
31
  - Use `static let` for constants over global constants
32
32
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/swift/hooks.md <one-line purpose>
2
+ rules/swift/hooks.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -18,4 +18,4 @@ paths:
18
18
 
19
19
  ## Warning
20
20
 
21
- Flag `print()` statements use `os.Logger` or structured logging instead for production code.
21
+ Flag `print()` statements: use `os.Logger` or structured logging instead for production code.
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/swift/patterns.md <one-line purpose>
2
+ rules/swift/patterns.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -53,7 +53,7 @@ actor Cache<Key: Hashable & Sendable, Value: Sendable> {
53
53
 
54
54
  ## Dependency Injection
55
55
 
56
- Inject protocols with default parameters production uses defaults, tests inject mocks:
56
+ Inject protocols with default parameters: production uses defaults, tests inject mocks:
57
57
 
58
58
  ```swift
59
59
  struct UserService {
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/swift/security.md <one-line purpose>
2
+ rules/swift/security.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -14,9 +14,9 @@ paths:
14
14
 
15
15
  ## Secret Management
16
16
 
17
- - Use **Keychain Services** for sensitive data (tokens, passwords, keys) never `UserDefaults`
17
+ - Use **Keychain Services** for sensitive data (tokens, passwords, keys): never `UserDefaults`
18
18
  - Use environment variables or `.xcconfig` files for build-time secrets
19
- - Never hardcode secrets in source decompilation tools extract them trivially
19
+ - Never hardcode secrets in source: decompilation tools extract them trivially
20
20
 
21
21
  ```swift
22
22
  let apiKey = ProcessInfo.processInfo.environment["API_KEY"]
@@ -27,7 +27,7 @@ guard let apiKey, !apiKey.isEmpty else {
27
27
 
28
28
  ## Transport Security
29
29
 
30
- - App Transport Security (ATS) is enforced by default do not disable it
30
+ - App Transport Security (ATS) is enforced by default: do not disable it
31
31
  - Use certificate pinning for critical endpoints
32
32
  - Validate all server certificates
33
33
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/swift/testing.md <one-line purpose>
2
+ rules/swift/testing.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -27,7 +27,7 @@ func userCreationValidatesEmail() throws {
27
27
 
28
28
  ## Test Isolation
29
29
 
30
- Each test gets a fresh instance set up in `init`, tear down in `deinit`. No shared mutable state between tests.
30
+ Each test gets a fresh instance: set up in `init`, tear down in `deinit`. No shared mutable state between tests.
31
31
 
32
32
  ## Parameterized Tests
33
33
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/typescript/coding-style.md <one-line purpose>
2
+ rules/typescript/coding-style.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/typescript/hooks.md <one-line purpose>
2
+ rules/typescript/hooks.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/typescript/patterns.md <one-line purpose>
2
+ rules/typescript/patterns.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/typescript/security.md <one-line purpose>
2
+ rules/typescript/security.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/typescript/testing.md <one-line purpose>
2
+ rules/typescript/testing.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/coding-style.md <one-line purpose>
2
+ rules/web/coding-style.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/design-quality.md <one-line purpose>
2
+ rules/web/design-quality.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/hooks.md <one-line purpose>
2
+ rules/web/hooks.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/patterns.md <one-line purpose>
2
+ rules/web/patterns.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/performance.md <one-line purpose>
2
+ rules/web/performance.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/security.md <one-line purpose>
2
+ rules/web/security.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- rules/web/testing.md <one-line purpose>
2
+ rules/web/testing.md: <one-line purpose>
3
3
 
4
4
  <2–6 line summary.>
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/agent-dev.md AI Agent Development Use this skill when building AI agents, tool-use systems, or multi-agent workflo
2
+ skills/ai/agent-dev.md (AI Agent Development) Use this skill when building AI agents, tool-use systems, or multi-agent workflo
3
3
 
4
4
  Use this skill when building AI agents, tool-use systems, or multi-agent workflows. ## Agent Architecture
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/llm-security.md LLM Security Use this skill when securing LLM-powered applications against prompt injection,
2
+ skills/ai/llm-security.md (LLM Security) Use this skill when securing LLM-powered applications against prompt injection,
3
3
 
4
4
  Use this skill when securing LLM-powered applications against prompt injection, data leakage, and misuse. ## Prompt Injection
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/ml-ops.md ML Operations (MLOps) ```
2
+ skills/ai/ml-ops.md (ML Operations (MLOps)) ```
3
3
 
4
4
  ## The MLOps Lifecycle ```
5
5
  -->
@@ -86,7 +86,7 @@ Central store for model versions and deployment state:
86
86
 
87
87
  | Stage | Meaning |
88
88
  |---|---|
89
- | Staging | Candidate passes evaluation, not yet in production |
89
+ | Staging | Candidate: passes evaluation, not yet in production |
90
90
  | Production | Currently serving |
91
91
  | Archived | Superseded |
92
92
 
@@ -117,7 +117,7 @@ async def predict(req: PredictRequest) -> PredictResponse:
117
117
 
118
118
  ### A/B testing / Shadow mode
119
119
 
120
- - **Shadow mode**: new model receives traffic and logs predictions but does not serve users validate before switching
120
+ - **Shadow mode**: new model receives traffic and logs predictions but does not serve users: validate before switching
121
121
  - **A/B test**: split traffic (e.g., 10% new model) and measure business metrics, not just accuracy
122
122
  - Use a feature flag system to control routing
123
123
 
@@ -162,8 +162,8 @@ Trigger retraining when:
162
162
 
163
163
  ## Common Pitfalls
164
164
 
165
- - **Training-serving skew**: feature engineering in training differs from serving solve with a shared feature pipeline
166
- - **Data leakage**: future information in training features inflates metrics use strict temporal splits
165
+ - **Training-serving skew**: feature engineering in training differs from serving: solve with a shared feature pipeline
166
+ - **Data leakage**: future information in training features inflates metrics: use strict temporal splits
167
167
  - **Model staleness without detection**: set up drift monitoring day 1, not after the model degrades
168
168
  - **No rollback plan**: always keep N-1 model version in registry and test rollback procedure
169
- - **GPU waste**: jobs that could run on CPU scheduled on GPU profile resource usage
169
+ - **GPU waste**: jobs that could run on CPU scheduled on GPU: profile resource usage
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/orchestration-workflow.md Construct Orchestration Workflow Use this skill when the request involves agent orchestration, phase transitions,
2
+ skills/ai/orchestration-workflow.md (Construct Orchestration Workflow) Use this skill when the request involves agent orchestration, phase transitions,
3
3
 
4
4
  Use this skill when the request involves agent orchestration, phase transitions, task keys, handoff quality, workflow state, or project alignment. ## Core Model
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/prompt-and-eval.md Prompt Engineering and Evaluation Use this skill when designing prompts, evaluating model performance, or optimizi
2
+ skills/ai/prompt-and-eval.md (Prompt Engineering and Evaluation) Use this skill when designing prompts, evaluating model performance, or optimizi
3
3
 
4
4
  Use this skill when designing prompts, evaluating model performance, or optimizing LLM behavior. ## Prompt Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/prompt-optimizer.md Closed-loop prompt auto-optimization guide.
2
+ skills/ai/prompt-optimizer.md: Closed-loop prompt auto-optimization guide.
3
3
 
4
4
  Uses telemetry traces and quality scores as the feedback signal, Claude as the optimizer,
5
5
  and the agent registry + construct sync as the deployment layer.
@@ -24,15 +24,15 @@ construct optimize --list
24
24
  construct optimize cx-debugger --threshold=0.65 --days=14 --min-traces=15
25
25
  ```
26
26
 
27
- The optimizer requires Python 3.12+ (`pip3` must be available). It will auto-install `dspy-ai` and `requests` on first run. Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in `.env`. DSPy uses the same LLM key Construct uses no separate setup.
27
+ The optimizer requires Python 3.12+ (`pip3` must be available). It will auto-install `dspy-ai` and `requests` on first run. Set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` in `.env`. DSPy uses the same LLM key Construct uses: no separate setup.
28
28
 
29
29
  ## When to run
30
30
 
31
31
  - Triggered by `/work:optimize-prompts` (manual) or the scheduled task `prompt-optimization-weekly`
32
32
  - Automatically suggested when `cx-trace-reviewer` finds an agent with median quality score below 0.65 over the past 7 days
33
- - Never run optimization on prompts with fewer than 20 scored traces insufficient signal
33
+ - Never run optimization on prompts with fewer than 20 scored traces: insufficient signal
34
34
 
35
- ## Step 1 Gather signal
35
+ ## Step 1: Gather signal
36
36
 
37
37
  Retrieve the current production prompt for the target agent from `agents/registry.json` (or the corresponding `promptFile` if using extracted prompts).
38
38
 
@@ -50,7 +50,7 @@ GET {CONSTRUCT_TELEMETRY_URL}/api/public/scores?traceId={id}&name=quality
50
50
 
51
51
  Filter to scores where `value < 0.7`. For each low-scoring trace, extract: the prompt used, the user input, the model output, the quality score, and any human comments.
52
52
 
53
- ## Step 2 Diagnose failure patterns
53
+ ## Step 2: Diagnose failure patterns
54
54
 
55
55
  Analyze the low-scoring traces as a batch. Identify recurring failure modes. Common patterns:
56
56
 
@@ -65,16 +65,16 @@ Analyze the low-scoring traces as a batch. Identify recurring failure modes. Com
65
65
 
66
66
  Write a failure summary: top 3 patterns with supporting trace count and representative examples.
67
67
 
68
- ## Step 3 Generate improved prompt
68
+ ## Step 3: Generate improved prompt
69
69
 
70
70
  Write an improved prompt that directly addresses the diagnosed failures. Rules:
71
71
 
72
- 1. **Keep what works** compare high-scoring traces (>0.8) to low-scoring ones. Only change what's associated with failures.
73
- 2. **Surgical edits, not rewrites** changing everything risks breaking current strengths. Identify the specific clauses that correlate with failures.
74
- 3. **Be explicit, not vague** if the failure is "too verbose", add a concrete rule ("respond in under 150 words for questions that fit on one line") not a general note ("be concise").
75
- 4. **Add a self-check instruction** append a brief checklist the agent runs before responding, derived from the top failure patterns.
72
+ 1. **Keep what works**: compare high-scoring traces (>0.8) to low-scoring ones. Only change what's associated with failures.
73
+ 2. **Surgical edits, not rewrites**: changing everything risks breaking current strengths. Identify the specific clauses that correlate with failures.
74
+ 3. **Be explicit, not vague**: if the failure is "too verbose", add a concrete rule ("respond in under 150 words for questions that fit on one line") not a general note ("be concise").
75
+ 4. **Add a self-check instruction**: append a brief checklist the agent runs before responding, derived from the top failure patterns.
76
76
 
77
- ## Step 4 Push to staging
77
+ ## Step 4: Push to staging
78
78
 
79
79
  Update the agent's prompt in `agents/registry.json` (or the corresponding `promptFile`) with a staging marker comment. Tag the version by writing to `.cx/decisions/prompt-staging-{agent}-{date}.md`.
80
80
 
@@ -82,7 +82,7 @@ Log the candidate prompt as a span attribute on a test run batch using `cx_trace
82
82
 
83
83
  Do not overwrite the production prompt in the registry until promotion is confirmed.
84
84
 
85
- ## Step 5 Monitor staging
85
+ ## Step 5: Monitor staging
86
86
 
87
87
  After at least 20 scored traces on the staging version:
88
88
  - Compare median quality score: staging vs production
@@ -91,7 +91,7 @@ After at least 20 scored traces on the staging version:
91
91
 
92
92
  To promote: update the agent registry with the accepted prompt and run `construct sync`.
93
93
 
94
- ## Step 6 Document the optimization
94
+ ## Step 6: Document the optimization
95
95
 
96
96
  Write to `.cx/decisions/` with:
97
97
  - Which agent was optimized
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/ai/rag-system.md RAG System Design Use this skill when building retrieval-augmented generation pipelines, vector se
2
+ skills/ai/rag-system.md (RAG System Design) Use this skill when building retrieval-augmented generation pipelines, vector se
3
3
 
4
4
  Use this skill when building retrieval-augmented generation pipelines, vector search, or knowledge-grounded AI systems. ## Document Processing
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/architecture/api-design.md API Design Use this skill when designing REST, GraphQL, or gRPC APIs.
2
+ skills/architecture/api-design.md (API Design) Use this skill when designing REST, GraphQL, or gRPC APIs.
3
3
 
4
4
  Use this skill when designing REST, GraphQL, or gRPC APIs. ## REST Design Principles
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/architecture/caching.md Caching Use this skill when designing caching strategies for applications, APIs, or infr
2
+ skills/architecture/caching.md (Caching) Use this skill when designing caching strategies for applications, APIs, or infr
3
3
 
4
4
  Use this skill when designing caching strategies for applications, APIs, or infrastructure. ## Cache Layers
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/architecture/cloud-native.md Cloud-Native Architecture Use this skill when designing containerized, orchestrated, or microservice-based
2
+ skills/architecture/cloud-native.md (Cloud-Native Architecture) Use this skill when designing containerized, orchestrated, or microservice-based
3
3
 
4
4
  Use this skill when designing containerized, orchestrated, or microservice-based systems. ## Container Best Practices
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/architecture/message-queue.md Message Queues and Event-Driven Architecture Use this skill when designing asynchronous communication, event-driven systems,
2
+ skills/architecture/message-queue.md (Message Queues and Event-Driven Architecture) Use this skill when designing asynchronous communication, event-driven systems,
3
3
 
4
4
  Use this skill when designing asynchronous communication, event-driven systems, or message-based integrations. ## When to Use Message Queues
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/architecture/security-arch.md Security Architecture Use this skill when designing authentication, authorization, network security, o
2
+ skills/architecture/security-arch.md (Security Architecture) Use this skill when designing authentication, authorization, network security, o
3
3
 
4
4
  Use this skill when designing authentication, authorization, network security, or zero-trust architectures. ## Zero Trust Principles
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/compliance/ai-disclosure.md AI Disclosure AI transparency, disclosure, and regulatory compliance.
2
+ skills/compliance/ai-disclosure.md (AI Disclosure) AI transparency, disclosure, and regulatory compliance.
3
3
 
4
4
  Use this skill when reviewing AI features for disclosure requirements, transparency obligations, or emerging AI regulation compliance.
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/compliance/data-privacy.md Data Privacy GDPR, CCPA, and data protection compliance patterns.
2
+ skills/compliance/data-privacy.md (Data Privacy) GDPR, CCPA, and data protection compliance patterns.
3
3
 
4
4
  Use this skill when reviewing data collection, storage, processing, or retention for privacy regulation compliance.
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/compliance/license-audit.md License Audit Dependency license review and open-source compliance.
2
+ skills/compliance/license-audit.md (License Audit) Dependency license review and open-source compliance.
3
3
 
4
4
  Use this skill when auditing dependency licenses, evaluating OSS compliance risk, or preparing license inventories for legal review.
5
5
  -->
@@ -24,7 +24,7 @@ Use this skill when auditing dependency licenses, evaluating OSS compliance risk
24
24
  3. Map each dependency to its SPDX license identifier
25
25
  4. Flag any dependency without a clear license file as unknown-risk
26
26
  5. Check for license changes between pinned versions and latest
27
- 6. Look past layer one transitive copyleft taints the whole tree
27
+ 6. Look past layer one: transitive copyleft taints the whole tree
28
28
 
29
29
  ## Red Flags
30
30
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/compliance/regulatory-review.md Regulatory Review Pre-ship compliance review checklist and process.
2
+ skills/compliance/regulatory-review.md (Regulatory Review) Pre-ship compliance review checklist and process.
3
3
 
4
4
  Use this skill when conducting a compliance review before shipping features that handle user data, financial transactions, AI decisions, or regulated content.
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/cpp.md C/C++ Best Practices Use this skill when writing, reviewing, or debugging C or C++ code.
2
+ skills/development/cpp.md (C/C++ Best Practices) Use this skill when writing, reviewing, or debugging C or C++ code.
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging C or C++ code. ## Project Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/go.md Go Best Practices Use this skill when writing, reviewing, or debugging Go code.
2
+ skills/development/go.md (Go Best Practices) Use this skill when writing, reviewing, or debugging Go code.
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging Go code. ## Project Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/java.md Java Best Practices Use this skill when writing, reviewing, or debugging Java or Kotlin code on the
2
+ skills/development/java.md (Java Best Practices) Use this skill when writing, reviewing, or debugging Java or Kotlin code on the
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging Java or Kotlin code on the JVM. ## Project Structure
5
5
  -->