@geraldmaron/construct 1.0.4 → 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 (293) hide show
  1. package/README.md +57 -44
  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 +470 -4
  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/research.md +5 -3
  55. package/commands/understand/this.md +4 -4
  56. package/commands/understand/why.md +8 -8
  57. package/commands/work/clean.md +14 -14
  58. package/commands/work/drive.md +10 -10
  59. package/commands/work/optimize-prompts.md +9 -9
  60. package/commands/work/parallel-review.md +8 -8
  61. package/db/schema/006_graph.sql +24 -0
  62. package/examples/provider-plugin/README.md +7 -7
  63. package/examples/seed-observations/README.md +6 -6
  64. package/examples/seed-observations/anti-patterns.md +14 -14
  65. package/examples/seed-observations/decisions.md +4 -4
  66. package/examples/seed-observations/patterns.md +14 -14
  67. package/lib/auto-docs.mjs +10 -5
  68. package/lib/cli-commands.mjs +45 -1
  69. package/lib/comment-lint.mjs +7 -1
  70. package/lib/config/schema.mjs +3 -0
  71. package/lib/flavors/loader.mjs +136 -0
  72. package/lib/hooks/agent-tracker.mjs +22 -3
  73. package/lib/hooks/pre-push-gate.mjs +14 -1
  74. package/lib/hooks/session-optimize.mjs +3 -2
  75. package/lib/hooks/session-reflect.mjs +68 -0
  76. package/lib/init-unified.mjs +25 -2
  77. package/lib/intake/classify.mjs +61 -183
  78. package/lib/intake/prepare.mjs +7 -0
  79. package/lib/intake/tables/creative.mjs +94 -0
  80. package/lib/intake/tables/operations.mjs +85 -0
  81. package/lib/intake/tables/research.mjs +85 -0
  82. package/lib/intake/tables/rnd.mjs +175 -0
  83. package/lib/knowledge/graph.mjs +213 -0
  84. package/lib/knowledge/research-store.mjs +109 -0
  85. package/lib/mcp/server.mjs +187 -1
  86. package/lib/mcp/tools/profile.mjs +270 -0
  87. package/lib/observation-store.mjs +19 -0
  88. package/lib/outcomes/aggregate.mjs +104 -0
  89. package/lib/outcomes/record.mjs +115 -0
  90. package/lib/parity.mjs +6 -9
  91. package/lib/profiles/lifecycle.mjs +388 -0
  92. package/lib/profiles/loader.mjs +123 -0
  93. package/lib/profiles/validate-custom.mjs +114 -0
  94. package/lib/reflect/extractor.mjs +193 -0
  95. package/lib/reflect.mjs +89 -2
  96. package/lib/sandbox.mjs +102 -0
  97. package/package.json +6 -1
  98. package/personas/construct.md +20 -20
  99. package/platforms/claude/CLAUDE.md +6 -6
  100. package/platforms/claude/settings.template.json +13 -0
  101. package/rules/common/agents.md +2 -2
  102. package/rules/common/beads-hygiene.md +11 -11
  103. package/rules/common/code-review.md +1 -1
  104. package/rules/common/coding-style.md +1 -1
  105. package/rules/common/comments.md +8 -8
  106. package/rules/common/commit-approval.md +4 -4
  107. package/rules/common/cx-agent-routing.md +2 -2
  108. package/rules/common/cx-skill-routing.md +2 -2
  109. package/rules/common/development-workflow.md +1 -1
  110. package/rules/common/doc-ownership.md +2 -2
  111. package/rules/common/efficiency.md +3 -3
  112. package/rules/common/framing.md +1 -1
  113. package/rules/common/git-workflow.md +1 -1
  114. package/rules/common/patterns.md +1 -1
  115. package/rules/common/performance.md +1 -1
  116. package/rules/common/release-gates.md +7 -7
  117. package/rules/common/research.md +4 -4
  118. package/rules/common/security.md +1 -1
  119. package/rules/common/skill-composition.md +8 -8
  120. package/rules/common/testing.md +1 -1
  121. package/rules/golang/coding-style.md +2 -2
  122. package/rules/golang/hooks.md +1 -1
  123. package/rules/golang/patterns.md +1 -1
  124. package/rules/golang/security.md +1 -1
  125. package/rules/golang/testing.md +1 -1
  126. package/rules/python/coding-style.md +1 -1
  127. package/rules/python/hooks.md +1 -1
  128. package/rules/python/patterns.md +1 -1
  129. package/rules/python/security.md +1 -1
  130. package/rules/python/testing.md +1 -1
  131. package/rules/swift/coding-style.md +3 -3
  132. package/rules/swift/hooks.md +2 -2
  133. package/rules/swift/patterns.md +2 -2
  134. package/rules/swift/security.md +4 -4
  135. package/rules/swift/testing.md +2 -2
  136. package/rules/typescript/coding-style.md +1 -1
  137. package/rules/typescript/hooks.md +1 -1
  138. package/rules/typescript/patterns.md +1 -1
  139. package/rules/typescript/security.md +1 -1
  140. package/rules/typescript/testing.md +1 -1
  141. package/rules/web/coding-style.md +1 -1
  142. package/rules/web/design-quality.md +1 -1
  143. package/rules/web/hooks.md +1 -1
  144. package/rules/web/patterns.md +1 -1
  145. package/rules/web/performance.md +1 -1
  146. package/rules/web/security.md +1 -1
  147. package/rules/web/testing.md +1 -1
  148. package/scripts/sync-agents.mjs +11 -0
  149. package/skills/ai/agent-dev.md +1 -1
  150. package/skills/ai/llm-security.md +1 -1
  151. package/skills/ai/ml-ops.md +6 -6
  152. package/skills/ai/orchestration-workflow.md +1 -1
  153. package/skills/ai/prompt-and-eval.md +1 -1
  154. package/skills/ai/prompt-optimizer.md +13 -13
  155. package/skills/ai/rag-system.md +1 -1
  156. package/skills/architecture/api-design.md +1 -1
  157. package/skills/architecture/caching.md +1 -1
  158. package/skills/architecture/cloud-native.md +1 -1
  159. package/skills/architecture/message-queue.md +1 -1
  160. package/skills/architecture/security-arch.md +1 -1
  161. package/skills/compliance/ai-disclosure.md +1 -1
  162. package/skills/compliance/data-privacy.md +1 -1
  163. package/skills/compliance/license-audit.md +2 -2
  164. package/skills/compliance/regulatory-review.md +1 -1
  165. package/skills/development/cpp.md +1 -1
  166. package/skills/development/go.md +1 -1
  167. package/skills/development/java.md +1 -1
  168. package/skills/development/kotlin.md +9 -9
  169. package/skills/development/mobile-crossplatform.md +13 -13
  170. package/skills/development/python.md +1 -1
  171. package/skills/development/rust.md +1 -1
  172. package/skills/development/shell.md +1 -1
  173. package/skills/development/swift.md +6 -6
  174. package/skills/development/typescript.md +1 -1
  175. package/skills/devops/ci-cd.md +5 -5
  176. package/skills/devops/containerization.md +9 -9
  177. package/skills/devops/cost-optimization.md +1 -1
  178. package/skills/devops/data-engineering.md +2 -2
  179. package/skills/devops/database.md +1 -1
  180. package/skills/devops/dependency-management.md +3 -3
  181. package/skills/devops/devsecops.md +1 -1
  182. package/skills/devops/git-workflow.md +1 -1
  183. package/skills/devops/incident-response.md +18 -18
  184. package/skills/devops/monorepo.md +5 -5
  185. package/skills/devops/observability.md +1 -1
  186. package/skills/devops/performance.md +1 -1
  187. package/skills/devops/testing.md +1 -1
  188. package/skills/docs/adr-workflow.md +2 -2
  189. package/skills/docs/backlog-proposal-workflow.md +1 -1
  190. package/skills/docs/customer-profile-workflow.md +1 -1
  191. package/skills/docs/document-ingest-workflow.md +1 -1
  192. package/skills/docs/evidence-ingest-workflow.md +1 -1
  193. package/skills/docs/init-docs.md +15 -15
  194. package/skills/docs/init-project.md +1 -1
  195. package/skills/docs/prd-workflow.md +3 -3
  196. package/skills/docs/prfaq-workflow.md +1 -1
  197. package/skills/docs/product-intelligence-review.md +1 -1
  198. package/skills/docs/product-intelligence-workflow.md +1 -1
  199. package/skills/docs/product-signal-workflow.md +9 -9
  200. package/skills/docs/research-workflow.md +10 -10
  201. package/skills/docs/runbook-workflow.md +2 -2
  202. package/skills/docs/strategy-workflow.md +3 -3
  203. package/skills/exploration/repo-map.md +11 -11
  204. package/skills/frameworks/django.md +15 -15
  205. package/skills/frameworks/nextjs.md +16 -16
  206. package/skills/frameworks/react.md +12 -12
  207. package/skills/frameworks/spring-boot.md +12 -12
  208. package/skills/frontend-design/accessibility.md +6 -6
  209. package/skills/frontend-design/component-patterns.md +1 -1
  210. package/skills/frontend-design/engineering.md +1 -1
  211. package/skills/frontend-design/state-management.md +1 -1
  212. package/skills/frontend-design/ui-aesthetics.md +1 -1
  213. package/skills/frontend-design/ux-principles.md +1 -1
  214. package/skills/operating/orchestration-reference.md +27 -27
  215. package/skills/quality-gates/review-work.md +3 -3
  216. package/skills/quality-gates/verify-change.md +1 -1
  217. package/skills/quality-gates/verify-module.md +1 -1
  218. package/skills/quality-gates/verify-quality.md +1 -1
  219. package/skills/quality-gates/verify-security.md +1 -1
  220. package/skills/roles/architect.ai-systems.md +4 -2
  221. package/skills/roles/architect.data.md +4 -2
  222. package/skills/roles/architect.enterprise.md +4 -2
  223. package/skills/roles/architect.integration.md +4 -2
  224. package/skills/roles/architect.md +7 -5
  225. package/skills/roles/architect.platform.md +4 -2
  226. package/skills/roles/data-analyst.experiment.md +4 -2
  227. package/skills/roles/data-analyst.md +9 -7
  228. package/skills/roles/data-analyst.product-intelligence.md +4 -2
  229. package/skills/roles/data-analyst.product.md +4 -2
  230. package/skills/roles/data-analyst.telemetry.md +4 -2
  231. package/skills/roles/data-engineer.pipeline.md +4 -2
  232. package/skills/roles/data-engineer.vector-retrieval.md +4 -2
  233. package/skills/roles/data-engineer.warehouse.md +4 -2
  234. package/skills/roles/debugger.md +7 -5
  235. package/skills/roles/designer.accessibility.md +4 -2
  236. package/skills/roles/designer.md +10 -8
  237. package/skills/roles/engineer.ai.md +4 -2
  238. package/skills/roles/engineer.data.md +5 -3
  239. package/skills/roles/engineer.md +14 -12
  240. package/skills/roles/engineer.platform.md +5 -3
  241. package/skills/roles/operator.docs.md +6 -4
  242. package/skills/roles/operator.md +6 -4
  243. package/skills/roles/operator.release.md +4 -2
  244. package/skills/roles/operator.sre.md +5 -3
  245. package/skills/roles/orchestrator.md +5 -3
  246. package/skills/roles/product-manager.ai-product.md +4 -2
  247. package/skills/roles/product-manager.business-strategy.md +4 -2
  248. package/skills/roles/product-manager.enterprise.md +4 -2
  249. package/skills/roles/product-manager.growth.md +4 -2
  250. package/skills/roles/product-manager.md +6 -4
  251. package/skills/roles/product-manager.platform.md +4 -2
  252. package/skills/roles/product-manager.product.md +4 -2
  253. package/skills/roles/qa.ai-eval.md +4 -2
  254. package/skills/roles/qa.api-contract.md +4 -2
  255. package/skills/roles/qa.data-pipeline.md +4 -2
  256. package/skills/roles/qa.md +7 -5
  257. package/skills/roles/qa.test-automation.md +5 -3
  258. package/skills/roles/qa.web-ui.md +4 -2
  259. package/skills/roles/researcher.explorer.md +4 -2
  260. package/skills/roles/researcher.md +11 -9
  261. package/skills/roles/researcher.ux.md +4 -2
  262. package/skills/roles/reviewer.devil-advocate.md +4 -2
  263. package/skills/roles/reviewer.evaluator.md +4 -2
  264. package/skills/roles/reviewer.md +14 -12
  265. package/skills/roles/reviewer.trace.md +4 -2
  266. package/skills/roles/security.ai.md +4 -2
  267. package/skills/roles/security.appsec.md +4 -2
  268. package/skills/roles/security.cloud.md +4 -2
  269. package/skills/roles/security.legal-compliance.md +4 -2
  270. package/skills/roles/security.md +7 -5
  271. package/skills/roles/security.privacy.md +4 -2
  272. package/skills/roles/security.supply-chain.md +4 -2
  273. package/skills/routing.md +14 -14
  274. package/skills/security/blue-team.md +1 -1
  275. package/skills/security/code-audit.md +1 -1
  276. package/skills/security/pentest.md +1 -1
  277. package/skills/security/red-team.md +1 -1
  278. package/skills/security/threat-intel.md +1 -1
  279. package/skills/security/vuln-research.md +1 -1
  280. package/skills/utility/clean-code.md +2 -2
  281. package/templates/docs/changelog-entry.md +1 -1
  282. package/templates/docs/construct_guide.md +13 -13
  283. package/templates/docs/meta-prd.md +16 -16
  284. package/templates/docs/one-pager.md +1 -1
  285. package/templates/docs/persona-artifact.md +36 -0
  286. package/templates/docs/prd-business.md +1 -1
  287. package/templates/docs/prd-platform.md +1 -1
  288. package/templates/docs/prd.md +17 -17
  289. package/templates/docs/research-brief.md +8 -8
  290. package/templates/docs/research-finding.md +26 -0
  291. package/templates/docs/rfc.md +1 -1
  292. package/templates/docs/skill-artifact.md +27 -0
  293. package/templates/docs/strategy.md +1 -1
@@ -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
  -->
@@ -38,6 +38,7 @@ import {
38
38
  } from "../lib/mcp-platform-config.mjs";
39
39
  import { loadConstructEnv } from "../lib/env-config.mjs";
40
40
  import { inlineRoleAntiPatterns, PROMPT_WORD_CAP } from "../lib/role-preload.mjs";
41
+ import { resolveActiveProfile } from "../lib/profiles/loader.mjs";
41
42
  import { resolveTiersForPrimary } from "../lib/model-router.mjs";
42
43
  import { stampFrontmatter } from "../lib/doc-stamp.mjs";
43
44
 
@@ -499,7 +500,17 @@ function buildEntries() {
499
500
  });
500
501
  }
501
502
 
503
+ // Filter agents by the active profile's role set. RND lists every specialist
504
+ // so behavior is unchanged for the default; non-RND profiles emit only the
505
+ // specialists they declare. Profiles whose role list is empty (legacy/test)
506
+ // fall through to no filter so callers don't get a silent empty registry.
507
+ const activeProfile = resolveActiveProfile(process.cwd());
508
+ const profileRoles = Array.isArray(activeProfile?.roles) && activeProfile.roles.length > 0
509
+ ? new Set(activeProfile.roles)
510
+ : null;
511
+
502
512
  for (const agent of registry.agents ?? []) {
513
+ if (profileRoles && !profileRoles.has(agent.name)) continue;
503
514
  entries.push({
504
515
  ...agent,
505
516
  isPersona: false,
@@ -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
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/kotlin.md Kotlin / Android Development | Scope | Use when |
2
+ skills/development/kotlin.md (Kotlin / Android Development) | Scope | Use when |
3
3
 
4
4
  ## Coroutines & Flows ### Coroutine scope discipline
5
5
  -->
@@ -14,7 +14,7 @@ skills/development/kotlin.md — Kotlin / Android Development — | Scope | Use
14
14
  | `viewModelScope` | ViewModel-bound work; auto-cancelled on clear |
15
15
  | `lifecycleScope` | Fragment/Activity-bound; cancelled on destroy |
16
16
  | `rememberCoroutineScope()` | Compose-scoped; cancelled on composition exit |
17
- | `GlobalScope` | Never uncontrolled lifetime |
17
+ | `GlobalScope` | Never: uncontrolled lifetime |
18
18
 
19
19
  ```kotlin
20
20
  class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
@@ -31,7 +31,7 @@ class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
31
31
 
32
32
  ### Flow operators
33
33
 
34
- - `stateIn(scope, SharingStarted.WhileSubscribed(5_000), initial)` converts cold flow to hot StateFlow for UI consumption
34
+ - `stateIn(scope, SharingStarted.WhileSubscribed(5_000), initial)`: converts cold flow to hot StateFlow for UI consumption
35
35
  - `map`, `filter`, `distinctUntilChanged`, `debounce` for transform chains
36
36
  - `combine` for merging multiple flows
37
37
  - Use `flowOn(Dispatchers.IO)` for upstream CPU/IO work; do not switch dispatchers in the collector
@@ -43,7 +43,7 @@ class ItemViewModel(private val repo: ItemRepository) : ViewModel() {
43
43
  | `Dispatchers.Main` | UI updates |
44
44
  | `Dispatchers.IO` | Network, disk, database |
45
45
  | `Dispatchers.Default` | CPU-intensive work |
46
- | `Dispatchers.Unconfined` | Rarely only in tests |
46
+ | `Dispatchers.Unconfined` | Rarely: only in tests |
47
47
 
48
48
  ## Jetpack Compose
49
49
 
@@ -69,7 +69,7 @@ fun ItemList(items: List<Item>, onDelete: (Item) -> Unit) { ... }
69
69
 
70
70
  - `remember` expensive computations with stable keys
71
71
  - `key(id) { ... }` in lazy lists to preserve item identity
72
- - Avoid unstable lambdas use `remember { { ... } }` or stable function references
72
+ - Avoid unstable lambdas: use `remember { { ... } }` or stable function references
73
73
  - Enable Compose compiler metrics to detect recomposition hot spots
74
74
  - Prefer `LazyColumn` over `Column` for variable-length lists
75
75
 
@@ -134,7 +134,7 @@ Scoping: `@Singleton` for app-scoped, `@ActivityRetainedScoped` for ViewModel-li
134
134
 
135
135
  ## Common Pitfalls
136
136
 
137
- - `collect` in `Fragment.onViewCreated` without `repeatOnLifecycle(STARTED)` causes collection after view destruction
138
- - `StateFlow.value` reads in tests without collecting use `turbine` or `runTest { first() }`
139
- - Leaking `Activity` context into long-lived objects use `applicationContext`
140
- - `LazyColumn` with `items(list)` where `list` is `State<List<...>>` causing full recomposition use `key` param
137
+ - `collect` in `Fragment.onViewCreated` without `repeatOnLifecycle(STARTED)`: causes collection after view destruction
138
+ - `StateFlow.value` reads in tests without collecting: use `turbine` or `runTest { first() }`
139
+ - Leaking `Activity` context into long-lived objects: use `applicationContext`
140
+ - `LazyColumn` with `items(list)` where `list` is `State<List<...>>` causing full recomposition: use `key` param
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/mobile-crossplatform.md Mobile Cross-Platform Development Before choosing a framework, answer:
2
+ skills/development/mobile-crossplatform.md (Mobile Cross-Platform Development) Before choosing a framework, answer:
3
3
 
4
4
  ## Decision Framework: Native vs Cross-Platform Before choosing a framework, answer:
5
5
  -->
@@ -13,11 +13,11 @@ Before choosing a framework, answer:
13
13
  |---|---|---|
14
14
  | Platform-specific APIs needed (ARKit, Health, NFC)? | Yes | No |
15
15
  | Animation fidelity is a differentiator? | Yes | Partial |
16
- | Single team, both platforms? | | Yes |
16
+ | Single team, both platforms? |: | Yes |
17
17
  | Heavy use of platform OS widgets? | Yes | No |
18
- | App is primarily data-display / CRUD? | | Yes |
19
- | Existing web team? | | React Native |
20
- | Existing Kotlin/Swift team? | Native | |
18
+ | App is primarily data-display / CRUD? |: | Yes |
19
+ | Existing web team? |: | React Native |
20
+ | Existing Kotlin/Swift team? | Native |: |
21
21
 
22
22
  ---
23
23
 
@@ -42,7 +42,7 @@ Future<List<Item>> items(ItemsRef ref) async {
42
42
 
43
43
  ### Performance
44
44
 
45
- - `const` constructors everywhere possible eliminates widget rebuilds
45
+ - `const` constructors everywhere possible: eliminates widget rebuilds
46
46
  - `RepaintBoundary` around independently-animated subtrees
47
47
  - Profile with Flutter DevTools → CPU flame chart + widget rebuild tracker
48
48
  - `ListView.builder` for lazy lists; never `ListView(children: [...])` for long lists
@@ -78,8 +78,8 @@ testWidgets('shows items on load', (tester) async {
78
78
  ### New Architecture (React Native 0.74+)
79
79
 
80
80
  Enable the New Architecture by default on new projects. Key changes:
81
- - JSI replaces the async bridge sync native calls
82
- - Fabric replaces the native renderer concurrent React features work correctly
81
+ - JSI replaces the async bridge: sync native calls
82
+ - Fabric replaces the native renderer: concurrent React features work correctly
83
83
  - TurboModules replace native modules
84
84
 
85
85
  ### State & logic sharing with web
@@ -130,11 +130,11 @@ export default function ItemScreen() { ... }
130
130
 
131
131
  ## Common Pitfalls (both frameworks)
132
132
 
133
- - **Deep linking not tested until late** set up universal links / app links in week 1
134
- - **Push notifications complexity** Expo Notifications or Firebase Cloud Messaging; plan for permission states
135
- - **Over-the-air update strategy** define what can be OTA vs what requires App Store review
136
- - **Platform capability divergence** features available on iOS 17+ may be absent on Android 12; maintain a capability matrix
137
- - **Code signing automation** `fastlane match` (iOS) and keystore management (Android) require upfront investment; do it early
133
+ - **Deep linking not tested until late**: set up universal links / app links in week 1
134
+ - **Push notifications complexity**: Expo Notifications or Firebase Cloud Messaging; plan for permission states
135
+ - **Over-the-air update strategy**: define what can be OTA vs what requires App Store review
136
+ - **Platform capability divergence**: features available on iOS 17+ may be absent on Android 12; maintain a capability matrix
137
+ - **Code signing automation**: `fastlane match` (iOS) and keystore management (Android) require upfront investment; do it early
138
138
 
139
139
  ## When to go native anyway
140
140
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/python.md Python Best Practices Use this skill when writing, reviewing, or debugging Python code.
2
+ skills/development/python.md (Python Best Practices) Use this skill when writing, reviewing, or debugging Python code.
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging Python code. ## Project Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/rust.md Rust Best Practices Use this skill when writing, reviewing, or debugging Rust code.
2
+ skills/development/rust.md (Rust Best Practices) Use this skill when writing, reviewing, or debugging Rust code.
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging Rust code. ## Project Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/shell.md Shell Scripting Best Practices Use this skill when writing, reviewing, or debugging Bash, Zsh, or POSIX shell s
2
+ skills/development/shell.md (Shell Scripting Best Practices) Use this skill when writing, reviewing, or debugging Bash, Zsh, or POSIX shell s
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging Bash, Zsh, or POSIX shell scripts. ## Script Header
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/swift.md Swift / iOS Development Swift 6 enforces data-race safety at compile time. Annotate isolation boundary e
2
+ skills/development/swift.md (Swift / iOS Development) Swift 6 enforces data-race safety at compile time. Annotate isolation boundary e
3
3
 
4
4
  ## Concurrency (Swift 6 Strict Concurrency) Swift 6 enforces data-race safety at compile time. Annotate isolation boundary explicitly:
5
5
  -->
@@ -26,7 +26,7 @@ Key rules:
26
26
  - `Sendable` conformance on types crossing isolation boundaries
27
27
  - Prefer `async/await` over completion handlers; avoid mixing the two
28
28
 
29
- Common pitfall: `Task { }` inherits the actor context of its caller do not assume it runs on a background thread.
29
+ Common pitfall: `Task { }` inherits the actor context of its caller: do not assume it runs on a background thread.
30
30
 
31
31
  ## SwiftUI Patterns
32
32
 
@@ -80,7 +80,7 @@ func testFetchReturnsItems() async throws {
80
80
 
81
81
  ### UI tests
82
82
 
83
- Prefer `XCUITest` for critical flows only it is slow and flaky. Supplement with snapshot tests (`swift-snapshot-testing`) for visual regression.
83
+ Prefer `XCUITest` for critical flows only: it is slow and flaky. Supplement with snapshot tests (`swift-snapshot-testing`) for visual regression.
84
84
 
85
85
  ### Test doubles
86
86
 
@@ -119,11 +119,11 @@ View → ViewModel (@MainActor) → Repository (actor) → Network/DB
119
119
 
120
120
  ### The Composable Architecture (TCA)
121
121
 
122
- Use TCA when state fan-out is complex or testability of reducers is a priority. Adds boilerplate evaluate against team familiarity.
122
+ Use TCA when state fan-out is complex or testability of reducers is a priority. Adds boilerplate: evaluate against team familiarity.
123
123
 
124
124
  ## Common Pitfalls
125
125
 
126
- - Do not call `@MainActor` methods from synchronous non-main contexts use `Task { @MainActor in ... }`
126
+ - Do not call `@MainActor` methods from synchronous non-main contexts: use `Task { @MainActor in ... }`
127
127
  - Avoid `DispatchQueue.main.async` in new code; use `await MainActor.run { }` instead
128
- - `@StateObject` vs `@ObservedObject` confusion causes double-initialization bugs `@StateObject` only at the owner
128
+ - `@StateObject` vs `@ObservedObject` confusion causes double-initialization bugs: `@StateObject` only at the owner
129
129
  - `List` with large datasets: use `lazy` loading or pagination; do not load everything into `@State`
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/development/typescript.md TypeScript Best Practices Use this skill when writing, reviewing, or debugging TypeScript or JavaScript co
2
+ skills/development/typescript.md (TypeScript Best Practices) Use this skill when writing, reviewing, or debugging TypeScript or JavaScript co
3
3
 
4
4
  Use this skill when writing, reviewing, or debugging TypeScript or JavaScript code. ## Project Structure
5
5
  -->
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/devops/ci-cd.md CI/CD Use this skill when designing, debugging, or optimizing CI/CD pipelines.
2
+ skills/devops/ci-cd.md (CI/CD) Use this skill when designing, debugging, or optimizing CI/CD pipelines.
3
3
 
4
4
  Use this skill when designing, debugging, or optimizing CI/CD pipelines. ## Pipeline Stages
5
5
  -->
@@ -11,12 +11,12 @@ Use this skill when designing, debugging, or optimizing CI/CD pipelines.
11
11
 
12
12
  | Stage | Purpose | Tools | Failure Policy |
13
13
  |---|---|---|---|
14
- | Build | Compile, lint, typecheck | tsc, eslint, cargo check, go vet | Fail fast block all downstream stages |
14
+ | Build | Compile, lint, typecheck | tsc, eslint, cargo check, go vet | Fail fast: block all downstream stages |
15
15
  | Test | Unit → integration → e2e | Jest, Pytest, go test, Playwright | Fail on any; parallelize within stage |
16
16
  | Security Scan | SAST, dep audit, secrets detection | Semgrep, CodeQL, Trivy, gitleaks | Block on CRITICAL/HIGH; warn on MEDIUM |
17
17
  | Deploy | Promote artifact through environments | GitHub Actions, ArgoCD, Helm | Gate on all prior stages passing |
18
18
 
19
- Always run lint and typecheck before tests they are faster and catch more errors per second of CI time.
19
+ Always run lint and typecheck before tests: they are faster and catch more errors per second of CI time.
20
20
 
21
21
  ## GitHub Actions
22
22
 
@@ -94,14 +94,14 @@ Never auto-deploy to production without a passing security scan and at least one
94
94
 
95
95
  - Store secrets in the platform's encrypted secret store (GitHub Actions Secrets, GitLab CI Variables).
96
96
  - Never hardcode secrets in workflow files or Dockerfiles.
97
- - Mask secrets in logs CI platforms do this automatically for registered secrets; verify it works before relying on it.
97
+ - Mask secrets in logs: CI platforms do this automatically for registered secrets; verify it works before relying on it.
98
98
  - Rotate any secret immediately after a potential exposure; treat "may have leaked" the same as "did leak".
99
99
  - Use OIDC-based short-lived tokens (GitHub OIDC → AWS/GCP/Azure) over long-lived service account keys wherever the cloud provider supports it.
100
100
 
101
101
  ## Speed Optimization
102
102
 
103
103
  - Cache dependency layers keyed to lock file hash; a clean install on every run is a CI antipattern.
104
- - Run lint and typecheck first they fail fast and cost less than a full test suite.
104
+ - Run lint and typecheck first: they fail fast and cost less than a full test suite.
105
105
  - Split slow test suites across workers using matrix or `--shard` flags (Vitest, Jest, Playwright all support sharding).
106
106
  - Parallelize independent test files; do not serialize unit tests.
107
107
  - In monorepos, run only affected packages: `turbo run test --filter=[HEAD^1]` or `nx affected --target=test`.