@geraldmaron/construct 1.0.0

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 (352) hide show
  1. package/.env.example +69 -0
  2. package/LICENSE +21 -0
  3. package/README.md +344 -0
  4. package/agents/prompts/cx-accessibility.md +29 -0
  5. package/agents/prompts/cx-ai-engineer.md +31 -0
  6. package/agents/prompts/cx-architect.md +40 -0
  7. package/agents/prompts/cx-business-strategist.md +25 -0
  8. package/agents/prompts/cx-data-analyst.md +30 -0
  9. package/agents/prompts/cx-data-engineer.md +32 -0
  10. package/agents/prompts/cx-debugger.md +27 -0
  11. package/agents/prompts/cx-designer.md +33 -0
  12. package/agents/prompts/cx-devil-advocate.md +36 -0
  13. package/agents/prompts/cx-docs-keeper.md +50 -0
  14. package/agents/prompts/cx-engineer.md +36 -0
  15. package/agents/prompts/cx-evaluator.md +26 -0
  16. package/agents/prompts/cx-explorer.md +38 -0
  17. package/agents/prompts/cx-legal-compliance.md +25 -0
  18. package/agents/prompts/cx-operations.md +28 -0
  19. package/agents/prompts/cx-orchestrator.md +30 -0
  20. package/agents/prompts/cx-platform-engineer.md +25 -0
  21. package/agents/prompts/cx-product-manager.md +30 -0
  22. package/agents/prompts/cx-qa.md +42 -0
  23. package/agents/prompts/cx-rd-lead.md +25 -0
  24. package/agents/prompts/cx-release-manager.md +31 -0
  25. package/agents/prompts/cx-researcher.md +31 -0
  26. package/agents/prompts/cx-reviewer.md +36 -0
  27. package/agents/prompts/cx-security.md +37 -0
  28. package/agents/prompts/cx-sre.md +26 -0
  29. package/agents/prompts/cx-test-automation.md +35 -0
  30. package/agents/prompts/cx-trace-reviewer.md +76 -0
  31. package/agents/prompts/cx-ux-researcher.md +30 -0
  32. package/agents/registry.json +879 -0
  33. package/agents/teams.json +94 -0
  34. package/bin/construct +613 -0
  35. package/commands/build/feature.md +21 -0
  36. package/commands/build/fix.md +20 -0
  37. package/commands/design/access.md +19 -0
  38. package/commands/design/flow.md +16 -0
  39. package/commands/design/ui.md +18 -0
  40. package/commands/measure/experiment.md +18 -0
  41. package/commands/measure/metrics.md +18 -0
  42. package/commands/measure/results.md +18 -0
  43. package/commands/plan/api.md +19 -0
  44. package/commands/plan/challenge.md +18 -0
  45. package/commands/plan/decide.md +20 -0
  46. package/commands/plan/feature.md +49 -0
  47. package/commands/plan/requirements.md +24 -0
  48. package/commands/remember/context.md +26 -0
  49. package/commands/remember/handoff.md +19 -0
  50. package/commands/remember/runbook.md +20 -0
  51. package/commands/review/code.md +21 -0
  52. package/commands/review/quality.md +19 -0
  53. package/commands/review/security.md +16 -0
  54. package/commands/ship/ready.md +19 -0
  55. package/commands/ship/release.md +19 -0
  56. package/commands/ship/status.md +18 -0
  57. package/commands/understand/docs.md +22 -0
  58. package/commands/understand/research.md +22 -0
  59. package/commands/understand/this.md +23 -0
  60. package/commands/understand/why.md +18 -0
  61. package/commands/work/clean.md +32 -0
  62. package/commands/work/drive.md +69 -0
  63. package/commands/work/optimize-prompts.md +46 -0
  64. package/commands/work/parallel-review.md +40 -0
  65. package/db/migrations/001_init.sql +38 -0
  66. package/langfuse/docker-compose.yml +82 -0
  67. package/lib/audit-skills.mjs +118 -0
  68. package/lib/auto-docs.mjs +293 -0
  69. package/lib/cli-commands.mjs +409 -0
  70. package/lib/codex-config.mjs +114 -0
  71. package/lib/comment-lint.mjs +191 -0
  72. package/lib/completions.mjs +170 -0
  73. package/lib/context-state.mjs +99 -0
  74. package/lib/cost.mjs +213 -0
  75. package/lib/distill.mjs +403 -0
  76. package/lib/efficiency.mjs +139 -0
  77. package/lib/env-config.mjs +53 -0
  78. package/lib/eval-harness.mjs +59 -0
  79. package/lib/features.mjs +209 -0
  80. package/lib/headhunt.mjs +597 -0
  81. package/lib/hooks/adaptive-lint.mjs +112 -0
  82. package/lib/hooks/agent-tracker.mjs +50 -0
  83. package/lib/hooks/bootstrap-guard.mjs +90 -0
  84. package/lib/hooks/comment-lint.mjs +26 -0
  85. package/lib/hooks/config-protection.mjs +52 -0
  86. package/lib/hooks/console-warn.mjs +43 -0
  87. package/lib/hooks/context-window-recovery.mjs +90 -0
  88. package/lib/hooks/continuation-enforcer.mjs +72 -0
  89. package/lib/hooks/dep-audit.mjs +155 -0
  90. package/lib/hooks/drive-guard.mjs +89 -0
  91. package/lib/hooks/edit-accumulator.mjs +36 -0
  92. package/lib/hooks/edit-error-recovery.mjs +46 -0
  93. package/lib/hooks/edit-guard.mjs +109 -0
  94. package/lib/hooks/env-check.mjs +80 -0
  95. package/lib/hooks/guard-bash.mjs +83 -0
  96. package/lib/hooks/mcp-audit.mjs +57 -0
  97. package/lib/hooks/mcp-health-check.mjs +51 -0
  98. package/lib/hooks/mcp-task-scope.mjs +47 -0
  99. package/lib/hooks/model-fallback.mjs +105 -0
  100. package/lib/hooks/pre-compact.mjs +212 -0
  101. package/lib/hooks/pre-push-gate.mjs +129 -0
  102. package/lib/hooks/read-tracker.mjs +129 -0
  103. package/lib/hooks/registry-sync.mjs +23 -0
  104. package/lib/hooks/scan-secrets.mjs +76 -0
  105. package/lib/hooks/session-start.mjs +95 -0
  106. package/lib/hooks/stop-notify.mjs +191 -0
  107. package/lib/hooks/stop-typecheck.mjs +83 -0
  108. package/lib/hooks/task-completed-guard.mjs +43 -0
  109. package/lib/hooks/teammate-idle-guard.mjs +54 -0
  110. package/lib/hooks/workflow-guard.mjs +62 -0
  111. package/lib/host-capabilities.mjs +123 -0
  112. package/lib/init-docs.mjs +382 -0
  113. package/lib/mcp/server.mjs +1123 -0
  114. package/lib/mcp-catalog.json +243 -0
  115. package/lib/mcp-manager.mjs +433 -0
  116. package/lib/mcp-platform-config.mjs +104 -0
  117. package/lib/model-router.mjs +810 -0
  118. package/lib/opencode-config.mjs +44 -0
  119. package/lib/opencode-runtime-plugin.mjs +909 -0
  120. package/lib/opencode-telemetry.mjs +433 -0
  121. package/lib/orchestration-policy.mjs +258 -0
  122. package/lib/prompt-composer.mjs +196 -0
  123. package/lib/prompt-metadata.mjs +68 -0
  124. package/lib/review.mjs +429 -0
  125. package/lib/role-preload.mjs +52 -0
  126. package/lib/schemas/decision.json +50 -0
  127. package/lib/schemas/implementation.json +51 -0
  128. package/lib/schemas/review-report.json +32 -0
  129. package/lib/schemas/test-report.json +43 -0
  130. package/lib/server/index.mjs +334 -0
  131. package/lib/server/static/app.js +841 -0
  132. package/lib/server/static/index.html +820 -0
  133. package/lib/service-manager.mjs +225 -0
  134. package/lib/setup.mjs +319 -0
  135. package/lib/status.mjs +707 -0
  136. package/lib/storage/backend.mjs +44 -0
  137. package/lib/storage/embeddings.mjs +70 -0
  138. package/lib/storage/hybrid-query.mjs +184 -0
  139. package/lib/storage/sql-store.mjs +55 -0
  140. package/lib/storage/state-source.mjs +101 -0
  141. package/lib/storage/sync.mjs +164 -0
  142. package/lib/storage/vector-store.mjs +59 -0
  143. package/lib/telemetry/backends/langfuse.mjs +58 -0
  144. package/lib/telemetry/backends/noop.mjs +16 -0
  145. package/lib/telemetry/langfuse-ingest.mjs +108 -0
  146. package/lib/telemetry/langfuse-model-sync.mjs +270 -0
  147. package/lib/telemetry/team-rollup.mjs +143 -0
  148. package/lib/toolkit-env.mjs +30 -0
  149. package/lib/validator.mjs +181 -0
  150. package/lib/workflow-state.mjs +794 -0
  151. package/package.json +53 -0
  152. package/personas/construct.md +94 -0
  153. package/platforms/claude/CLAUDE.md +30 -0
  154. package/platforms/claude/settings.template.json +472 -0
  155. package/platforms/opencode/config.template.json +65 -0
  156. package/platforms/opencode/plugins/construct-fallback.js +5 -0
  157. package/platforms/opencode/sync-config.mjs +69 -0
  158. package/rules/common/agents.md +55 -0
  159. package/rules/common/code-review.md +129 -0
  160. package/rules/common/coding-style.md +95 -0
  161. package/rules/common/comments.md +139 -0
  162. package/rules/common/cx-agent-routing.md +61 -0
  163. package/rules/common/cx-skill-routing.md +11 -0
  164. package/rules/common/development-workflow.md +49 -0
  165. package/rules/common/git-workflow.md +29 -0
  166. package/rules/common/hooks.md +35 -0
  167. package/rules/common/patterns.md +36 -0
  168. package/rules/common/performance.md +71 -0
  169. package/rules/common/security.md +34 -0
  170. package/rules/common/testing.md +62 -0
  171. package/rules/golang/coding-style.md +37 -0
  172. package/rules/golang/hooks.md +22 -0
  173. package/rules/golang/patterns.md +50 -0
  174. package/rules/golang/security.md +39 -0
  175. package/rules/golang/testing.md +36 -0
  176. package/rules/python/coding-style.md +47 -0
  177. package/rules/python/hooks.md +24 -0
  178. package/rules/python/patterns.md +44 -0
  179. package/rules/python/security.md +35 -0
  180. package/rules/python/testing.md +43 -0
  181. package/rules/swift/coding-style.md +52 -0
  182. package/rules/swift/hooks.md +25 -0
  183. package/rules/swift/patterns.md +71 -0
  184. package/rules/swift/security.md +38 -0
  185. package/rules/swift/testing.md +50 -0
  186. package/rules/typescript/coding-style.md +204 -0
  187. package/rules/typescript/hooks.md +27 -0
  188. package/rules/typescript/patterns.md +57 -0
  189. package/rules/typescript/security.md +33 -0
  190. package/rules/typescript/testing.md +23 -0
  191. package/rules/web/coding-style.md +101 -0
  192. package/rules/web/design-quality.md +68 -0
  193. package/rules/web/hooks.md +125 -0
  194. package/rules/web/patterns.md +84 -0
  195. package/rules/web/performance.md +69 -0
  196. package/rules/web/security.md +62 -0
  197. package/rules/web/testing.md +60 -0
  198. package/rules/zh/README.md +113 -0
  199. package/rules/zh/agents.md +55 -0
  200. package/rules/zh/code-review.md +129 -0
  201. package/rules/zh/coding-style.md +53 -0
  202. package/rules/zh/development-workflow.md +49 -0
  203. package/rules/zh/git-workflow.md +29 -0
  204. package/rules/zh/hooks.md +35 -0
  205. package/rules/zh/patterns.md +36 -0
  206. package/rules/zh/performance.md +60 -0
  207. package/rules/zh/security.md +34 -0
  208. package/rules/zh/testing.md +34 -0
  209. package/skills/ai/agent-dev.md +102 -0
  210. package/skills/ai/llm-security.md +105 -0
  211. package/skills/ai/ml-ops.md +169 -0
  212. package/skills/ai/orchestration-workflow.md +87 -0
  213. package/skills/ai/prompt-and-eval.md +114 -0
  214. package/skills/ai/prompt-optimizer.md +114 -0
  215. package/skills/ai/rag-system.md +104 -0
  216. package/skills/architecture/api-design.md +100 -0
  217. package/skills/architecture/caching.md +101 -0
  218. package/skills/architecture/cloud-native.md +97 -0
  219. package/skills/architecture/message-queue.md +100 -0
  220. package/skills/architecture/security-arch.md +105 -0
  221. package/skills/development/cpp.md +127 -0
  222. package/skills/development/go.md +129 -0
  223. package/skills/development/java.md +134 -0
  224. package/skills/development/kotlin.md +140 -0
  225. package/skills/development/mobile-crossplatform.md +144 -0
  226. package/skills/development/python.md +109 -0
  227. package/skills/development/rust.md +127 -0
  228. package/skills/development/shell.md +127 -0
  229. package/skills/development/swift.md +129 -0
  230. package/skills/development/typescript.md +129 -0
  231. package/skills/devops/ci-cd.md +108 -0
  232. package/skills/devops/containerization.md +106 -0
  233. package/skills/devops/cost-optimization.md +105 -0
  234. package/skills/devops/data-engineering.md +181 -0
  235. package/skills/devops/database.md +95 -0
  236. package/skills/devops/dependency-management.md +91 -0
  237. package/skills/devops/devsecops.md +96 -0
  238. package/skills/devops/git-workflow.md +100 -0
  239. package/skills/devops/incident-response.md +167 -0
  240. package/skills/devops/monorepo.md +87 -0
  241. package/skills/devops/observability.md +103 -0
  242. package/skills/devops/performance.md +104 -0
  243. package/skills/devops/testing.md +104 -0
  244. package/skills/docs/adr-workflow.md +32 -0
  245. package/skills/docs/backlog-proposal-workflow.md +19 -0
  246. package/skills/docs/customer-profile-workflow.md +22 -0
  247. package/skills/docs/evidence-ingest-workflow.md +23 -0
  248. package/skills/docs/init-docs.md +160 -0
  249. package/skills/docs/init-project.md +50 -0
  250. package/skills/docs/prd-workflow.md +57 -0
  251. package/skills/docs/prfaq-workflow.md +25 -0
  252. package/skills/docs/product-intelligence-review.md +22 -0
  253. package/skills/docs/product-intelligence-workflow.md +62 -0
  254. package/skills/docs/product-signal-workflow.md +27 -0
  255. package/skills/docs/research-workflow.md +28 -0
  256. package/skills/docs/runbook-workflow.md +24 -0
  257. package/skills/exploration/repo-map.md +297 -0
  258. package/skills/frameworks/django.md +159 -0
  259. package/skills/frameworks/nextjs.md +148 -0
  260. package/skills/frameworks/react.md +132 -0
  261. package/skills/frameworks/spring-boot.md +165 -0
  262. package/skills/frontend-design/accessibility.md +153 -0
  263. package/skills/frontend-design/component-patterns.md +111 -0
  264. package/skills/frontend-design/engineering.md +122 -0
  265. package/skills/frontend-design/state-management.md +118 -0
  266. package/skills/frontend-design/ui-aesthetics.md +102 -0
  267. package/skills/frontend-design/ux-principles.md +126 -0
  268. package/skills/quality-gates/review-work.md +90 -0
  269. package/skills/quality-gates/verify-change.md +94 -0
  270. package/skills/quality-gates/verify-module.md +96 -0
  271. package/skills/quality-gates/verify-quality.md +93 -0
  272. package/skills/quality-gates/verify-security.md +95 -0
  273. package/skills/roles/architect.ai-systems.md +37 -0
  274. package/skills/roles/architect.data.md +37 -0
  275. package/skills/roles/architect.enterprise.md +37 -0
  276. package/skills/roles/architect.integration.md +37 -0
  277. package/skills/roles/architect.md +68 -0
  278. package/skills/roles/architect.platform.md +37 -0
  279. package/skills/roles/data-analyst.experiment.md +37 -0
  280. package/skills/roles/data-analyst.md +68 -0
  281. package/skills/roles/data-analyst.product-intelligence.md +37 -0
  282. package/skills/roles/data-analyst.product.md +37 -0
  283. package/skills/roles/data-analyst.telemetry.md +37 -0
  284. package/skills/roles/data-engineer.pipeline.md +37 -0
  285. package/skills/roles/data-engineer.vector-retrieval.md +37 -0
  286. package/skills/roles/data-engineer.warehouse.md +37 -0
  287. package/skills/roles/debugger.md +68 -0
  288. package/skills/roles/designer.accessibility.md +43 -0
  289. package/skills/roles/designer.md +68 -0
  290. package/skills/roles/engineer.ai.md +49 -0
  291. package/skills/roles/engineer.data.md +49 -0
  292. package/skills/roles/engineer.md +85 -0
  293. package/skills/roles/engineer.platform.md +49 -0
  294. package/skills/roles/operator.docs.md +43 -0
  295. package/skills/roles/operator.md +68 -0
  296. package/skills/roles/operator.release.md +43 -0
  297. package/skills/roles/operator.sre.md +43 -0
  298. package/skills/roles/orchestrator.md +66 -0
  299. package/skills/roles/product-manager.ai-product.md +37 -0
  300. package/skills/roles/product-manager.business-strategy.md +43 -0
  301. package/skills/roles/product-manager.enterprise.md +37 -0
  302. package/skills/roles/product-manager.growth.md +37 -0
  303. package/skills/roles/product-manager.md +67 -0
  304. package/skills/roles/product-manager.platform.md +37 -0
  305. package/skills/roles/product-manager.product.md +37 -0
  306. package/skills/roles/qa.ai-eval.md +37 -0
  307. package/skills/roles/qa.api-contract.md +37 -0
  308. package/skills/roles/qa.data-pipeline.md +37 -0
  309. package/skills/roles/qa.md +68 -0
  310. package/skills/roles/qa.test-automation.md +49 -0
  311. package/skills/roles/qa.web-ui.md +37 -0
  312. package/skills/roles/researcher.explorer.md +43 -0
  313. package/skills/roles/researcher.md +68 -0
  314. package/skills/roles/researcher.ux.md +43 -0
  315. package/skills/roles/reviewer.devil-advocate.md +43 -0
  316. package/skills/roles/reviewer.evaluator.md +43 -0
  317. package/skills/roles/reviewer.md +68 -0
  318. package/skills/roles/reviewer.trace.md +43 -0
  319. package/skills/roles/security.ai.md +37 -0
  320. package/skills/roles/security.appsec.md +37 -0
  321. package/skills/roles/security.cloud.md +37 -0
  322. package/skills/roles/security.legal-compliance.md +49 -0
  323. package/skills/roles/security.md +68 -0
  324. package/skills/roles/security.privacy.md +37 -0
  325. package/skills/roles/security.supply-chain.md +37 -0
  326. package/skills/routing.md +139 -0
  327. package/skills/security/blue-team.md +83 -0
  328. package/skills/security/code-audit.md +94 -0
  329. package/skills/security/pentest.md +84 -0
  330. package/skills/security/red-team.md +81 -0
  331. package/skills/security/threat-intel.md +89 -0
  332. package/skills/security/vuln-research.md +87 -0
  333. package/skills/utility/clean-code.md +165 -0
  334. package/sync-agents.mjs +899 -0
  335. package/templates/docs/adr.md +27 -0
  336. package/templates/docs/backlog-proposal.md +26 -0
  337. package/templates/docs/customer-profile.md +34 -0
  338. package/templates/docs/evidence-brief.md +37 -0
  339. package/templates/docs/incident-report.md +46 -0
  340. package/templates/docs/memo.md +27 -0
  341. package/templates/docs/meta-prd.md +56 -0
  342. package/templates/docs/one-pager.md +24 -0
  343. package/templates/docs/prd-business.md +61 -0
  344. package/templates/docs/prd-platform.md +62 -0
  345. package/templates/docs/prd.md +47 -0
  346. package/templates/docs/prfaq.md +31 -0
  347. package/templates/docs/product-intelligence-report.md +31 -0
  348. package/templates/docs/research-brief.md +29 -0
  349. package/templates/docs/rfc-platform.md +60 -0
  350. package/templates/docs/rfc.md +46 -0
  351. package/templates/docs/runbook.md +33 -0
  352. package/templates/docs/signal-brief.md +25 -0
@@ -0,0 +1,160 @@
1
+ <!--
2
+ skills/docs/init-docs.md — Skill: init-docs — Initialize Project Documentation Structure — `init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `
3
+
4
+ ## Trigger keywords `init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `documentation init`
5
+ -->
6
+ # Skill: init-docs — Initialize Project Documentation Structure
7
+
8
+ ## Trigger keywords
9
+ `init docs`, `create docs structure`, `set up documentation`, `docs scaffold`, `documentation init`
10
+
11
+ ## What this skill does
12
+
13
+ When invoked, gather the user's intent and create a tailored documentation directory structure. The structure serves as both human reference and **required operational project state** — all LLMs working in this project, including Construct, should read these docs to understand purpose, decisions, constraints, and active reality before acting.
14
+
15
+ ---
16
+
17
+ ## Step 1 — Gather intent (ask these questions)
18
+
19
+ Ask the user **all at once** (single message, not one at a time):
20
+
21
+ 1. **What is this project?** A brief description (one sentence is fine)
22
+ 2. **What doc types will you have?** Examples: architecture decisions, API reference, runbooks, user guides, changelogs, onboarding guides, RFCs, design docs, data models, deployment guides
23
+ 3. **Who is the audience?** Engineers, external users, both, or internal team only
24
+ 4. **Tech stack?** (affects whether API reference sections are needed)
25
+ 5. **Monorepo or single-service?** Affects directory depth
26
+
27
+ ---
28
+
29
+ ## Step 2 — Generate the structure
30
+
31
+ Based on answers, create the `docs/` directory and appropriate subdirectories. Use this as a base — add or remove sections based on the user's answers:
32
+
33
+ ### Core structure (always include)
34
+
35
+ ```
36
+ docs/
37
+ ├── README.md # Required docs contract and navigation index
38
+ └── architecture.md # Canonical architecture and invariants
39
+
40
+ .cx/
41
+ ├── context.md # Human-readable resumable context
42
+ ├── context.json # Machine-readable resumable context
43
+ └── workflow.json # Canonical workflow/task state
44
+ ```
45
+
46
+ ### Add based on doc types mentioned
47
+
48
+ | Doc type mentioned | Create |
49
+ |-------------------|--------|
50
+ | Architecture / design | `docs/architecture/` with `overview.md` skeleton |
51
+ | API reference | `docs/api/` with `README.md` skeleton |
52
+ | Runbooks / ops | `docs/runbooks/` with `README.md` + `incident-response.md` skeleton |
53
+ | Onboarding | `docs/onboarding/` with `README.md` + `local-setup.md` skeleton |
54
+ | Changelog / releases | `docs/releases/` with `README.md` if the user explicitly wants public release history |
55
+ | RFCs | `docs/rfcs/` with `README.md` + `0001-template.md` |
56
+ | Data models | `docs/data-models/` with `README.md` skeleton |
57
+ | User guides | `docs/guides/` with `README.md` skeleton |
58
+ | Deployment | `docs/deployment/` with `README.md` + `environments.md` |
59
+
60
+ ---
61
+
62
+ ## Step 3 — Make the core docs explicit project state
63
+
64
+ The required core documents are the operational state surface for the repo. All LLMs working here should read and maintain them:
65
+
66
+ - `.cx/context.md`
67
+ - `.cx/context.json`
68
+ - `.cx/workflow.json`
69
+ - `docs/README.md`
70
+ - `docs/architecture.md`
71
+
72
+ Fill these in based on the user's answers and the actual repo shape. Treat them as required maintenance targets, not decorative docs.
73
+
74
+ ---
75
+
76
+ ## Step 4 — Create skeleton files
77
+
78
+ Each created file should have a minimal, useful skeleton — not just a title. Skeletons should include:
79
+ - A one-line description of what goes in this file
80
+ - Section headings relevant to the doc type
81
+ - A note at the top that the file is required project state and all LLMs should keep it current.
82
+
83
+ ### `docs/README.md` skeleton
84
+
85
+ ```markdown
86
+ # [Project Name] — Documentation
87
+
88
+ > Required project state. All LLMs working in this repo, including Construct, should keep this file updated.
89
+
90
+ ## What's here
91
+
92
+ | Directory | Contents |
93
+ |-----------|----------|
94
+ [fill based on created subdirs]
95
+
96
+ ## Ownership
97
+
98
+ Maintained by: [team/person or Construct]
99
+ Last updated: [date]
100
+ ```
101
+
102
+ ### `docs/architecture/overview.md` skeleton (if architecture dir created)
103
+
104
+ ```markdown
105
+ # Architecture Overview
106
+
107
+ > Required project state. All LLMs working in this repo, including Construct, should keep this file updated.
108
+
109
+ ## System overview
110
+
111
+ [Describe the system in 2-3 sentences]
112
+
113
+ ## Key components
114
+
115
+ [List main components and their responsibilities]
116
+
117
+ ## Data flow
118
+
119
+ [Describe how data moves through the system]
120
+
121
+ ## Key decisions
122
+
123
+ Link to `.cx/decisions/` or the canonical project decision log used in this repo.
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Step 5 — Tell the repo how upkeep works
129
+
130
+ After creating the files, instruct the user:
131
+
132
+ > After init, all LLMs working in this repo should read `.cx/context.md`, `.cx/context.json`, `.cx/workflow.json`, `docs/README.md`, and `docs/architecture.md` as project state. When work changes project reality, update the affected file before calling the work done.
133
+
134
+ Also create or update `.cx/context.md` with a summary of what was just set up:
135
+
136
+ ```markdown
137
+ # Project Context
138
+
139
+ Updated: [date]
140
+
141
+ ## Documentation structure initialized
142
+
143
+ Created docs/ with: [list created dirs]
144
+ Core docs: .cx/context.md, .cx/context.json, .cx/workflow.json, docs/README.md, docs/architecture.md
145
+ Project type: [type]
146
+ Stack: [stack]
147
+
148
+ ## What agents should know
149
+
150
+ [Fill with any key constraints, active work, or decisions the user mentioned]
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Routing
156
+
157
+ After completing the docs init:
158
+ - If the user has architecture questions → `@cx-explorer` or `@cx-docs-keeper` to explore and update `docs/architecture/`
159
+ - If the user wants to document a decision → record it in `.cx/decisions/` or the repo's canonical decision log
160
+ - If the user wants to add API docs → `@cx-docs-keeper` to generate stubs from code
@@ -0,0 +1,50 @@
1
+ <!--
2
+ skills/docs/init-project.md — Project Initialization — Use when: starting work on a new project or joining an existing one without doc
3
+
4
+ Use when: starting work on a new project or joining an existing one without doc structure. ## Command
5
+ -->
6
+ # Project Initialization
7
+
8
+ Use when: starting work on a new project or joining an existing one without doc structure.
9
+
10
+ ## Command
11
+ ```bash
12
+ construct init-docs [path] # defaults to current directory
13
+ ```
14
+
15
+ ## What it creates
16
+ ```
17
+ .cx/ ← agent session memory and decisions
18
+ context.md
19
+ context.json
20
+ workflow.json
21
+ decisions/
22
+ research/
23
+ reviews/
24
+ docs/ ← human-readable project documentation
25
+ README.md
26
+ architecture.md
27
+ runbooks/
28
+ ```
29
+
30
+ ## After init
31
+ 1. Treat `.cx/context.md`, `.cx/context.json`, `.cx/workflow.json`, `docs/README.md`, and `docs/architecture.md` as required project state.
32
+ 2. Read them at the start of every meaningful session.
33
+ 3. Update them whenever work changes active reality: decisions, workflow phase, architecture assumptions, or documentation contract.
34
+ 4. Run `construct serve` to see the project in the dashboard.
35
+
36
+ ## For cx-docs-keeper
37
+ At session start, check the core docs set. If missing, suggest running `construct init-docs`.
38
+ At session end, update the affected core docs so the next LLM session inherits current project reality.
39
+
40
+ ## For all LLMs working in the repo
41
+
42
+ These files are not optional documentation. They are the repo's shared operating state:
43
+
44
+ - `.cx/context.md`
45
+ - `.cx/context.json`
46
+ - `.cx/workflow.json`
47
+ - `docs/README.md`
48
+ - `docs/architecture.md`
49
+
50
+ If your work changes project reality, update the affected file before calling the task done.
@@ -0,0 +1,57 @@
1
+ <!--
2
+ skills/docs/prd-workflow.md — Workflow for producing a PRD and connecting it to workflow task packets.
3
+
4
+ Guides cx-product-manager through requirements gathering, user research, and writing a PRD
5
+ to docs/prd/. Once approved, the PRD feeds /plan feature to create bead packets in
6
+ .cx/workflow.json — closing the loop from discovery to execution.
7
+ -->
8
+ # PRD Workflow
9
+
10
+ Use when: the user asks to create a PRD, platform spec, business case, RFC, or requirements document.
11
+
12
+ Choose the document type before drafting:
13
+
14
+ | Template | Use when |
15
+ |---|---|
16
+ | `prd` | Customer-facing product capabilities, user workflows, end-user requirements |
17
+ | `prd-platform` | Internal platform, APIs, SDKs, developer tooling, operational infrastructure, shared services |
18
+ | `prd-business` | Strategic bets, market positioning, business model changes, make-vs-buy, pricing strategy |
19
+ | `meta-prd` | Requirements about the product operating system itself: agent workflows, evidence pipelines, templates, evaluation loops, governance |
20
+ | `rfc` | Technical or architectural proposals that need structured review before implementation — no contract changes |
21
+ | `rfc-platform` | Proposals that change an external contract: API, SDK, schema, event payload, permission model, protocol |
22
+
23
+ Style constraint: do not produce a wall of bullets. Use paragraphs for reasoning and narrative, tables for comparison, and bullets only where scanability helps. Keep em dashes rare.
24
+
25
+ ## Steps
26
+
27
+ 1. **cx-product-manager** produces the requirements package
28
+ 2. **cx-ux-researcher** grounds requirements in user behavior (invoke in parallel for new features)
29
+ 3. **cx-researcher** fills any evidence gaps
30
+ 4. **Write to the appropriate `docs/` subdirectory** using the selected template. Each `get_template()` call resolves `.cx/templates/docs/` first, then the Construct default.
31
+
32
+ | Template | Output path |
33
+ |---|---|
34
+ | `prd` | `docs/prd/{YYYY-MM-DD}-{slug}.md` |
35
+ | `prd-platform` | `docs/prd-platform/{YYYY-MM-DD}-{slug}.md` |
36
+ | `prd-business` | `docs/prd-business/{YYYY-MM-DD}-{slug}.md` |
37
+ | `meta-prd` | `docs/meta-prd/{YYYY-MM-DD}-{slug}.md` |
38
+ | `rfc` | `docs/rfc/{YYYY-MM-DD}-{slug}.md` |
39
+ | `rfc-platform` | `docs/rfc/{YYYY-MM-DD}-{slug}.md` |
40
+ 5. **cx-docs-keeper** updates `.cx/context.md` with a link to the PRD
41
+
42
+ ## File naming
43
+ - `docs/{template-type}/{YYYY-MM-DD}-{slug}.md`
44
+ - Examples:
45
+ - `docs/prd/2026-04-search-autocomplete.md`
46
+ - `docs/prd-platform/2026-04-events-api-v2.md`
47
+ - `docs/prd-business/2026-04-enterprise-tier.md`
48
+ - `docs/meta-prd/2026-04-product-intelligence-workflow.md`
49
+ - `docs/rfc/2026-04-storage-backend-migration.md`
50
+
51
+ ## PRD lifecycle
52
+ - Draft → stakeholder review → approved → link to implementation tasks
53
+ - Once shipped, update status field to `shipped` and add a link to the implementation
54
+
55
+ ## After approval → beads
56
+
57
+ Once the PRD is approved, run `/plan feature {feature-slug}` to produce a structured implementation plan and import it as workflow task packets (beads) into `.cx/workflow.json`. Link the resulting `.cx/plans/` file back in the PRD as the implementation reference.
@@ -0,0 +1,25 @@
1
+ <!--
2
+ skills/docs/prfaq-workflow.md — Working-backwards PRFAQ generation from PRDs or evidence.
3
+ -->
4
+ # PRFAQ Workflow
5
+
6
+ Use when: the user asks for a PRFAQ, working-backwards doc, launch narrative, or FAQ grounded in product evidence.
7
+
8
+ ## Modes
9
+
10
+ - **From PRD**: load the PRD, related evidence brief, customer profiles, and linked docs.
11
+ - **From evidence**: gather evidence first. If evidence is below threshold, write a signal brief instead.
12
+
13
+ ## Steps
14
+
15
+ 1. Load `get_template("prfaq")`.
16
+ 2. Identify PM flavor and product area.
17
+ 3. Draft problem statement from evidence, not positioning.
18
+ 4. Write the press release in shipped-state language.
19
+ 5. Write external FAQ for customers and internal FAQ for engineering, sales, support, security, finance, and leadership.
20
+ 6. Include unknowns as `TBD` with what would resolve them.
21
+ 7. Save to `.cx/product-intel/prfaqs/` until approved.
22
+
23
+ ## Approval
24
+
25
+ Stop before marking a PRFAQ approved or publishing it as a document of record.
@@ -0,0 +1,22 @@
1
+ <!--
2
+ skills/docs/product-intelligence-review.md — Evaluate Product Intelligence artifacts before they become docs of record.
3
+ -->
4
+ # Product Intelligence Review
5
+
6
+ Use when: reviewing PRDs, Meta PRDs, PRFAQs, evidence briefs, signal briefs, customer profiles, or backlog proposals.
7
+
8
+ ## Rubric
9
+
10
+ Score each dimension as pass, warning, or fail:
11
+
12
+ - Evidence grounding: claims cite source material or state evidence gaps.
13
+ - PM flavor fit: platform, product, enterprise, ai-product, or growth concerns are handled when relevant.
14
+ - Acceptance criteria: observable and pass/fail.
15
+ - Scope discipline: goals, non-goals, and tradeoffs are explicit.
16
+ - Approval safety: external writes and approved status are gated.
17
+ - Storage readiness: artifact path is under `.cx/product-intel/`, `docs/prd/`, or `docs/meta-prd/` so hybrid retrieval can index it.
18
+ - Readability: balanced paragraphs, tables, and bullets. Few em dashes.
19
+
20
+ ## Output
21
+
22
+ Return findings first, ordered by severity. Include concrete fixes and cite section names or file paths.
@@ -0,0 +1,62 @@
1
+ <!--
2
+ skills/docs/product-intelligence-workflow.md — Native Construct workflow for product evidence, synthesis, and product docs.
3
+
4
+ Use this to move from raw product evidence to PRDs, Meta PRDs, PRFAQs, signal briefs,
5
+ customer profiles, and backlog proposals without creating a separate sidecar system.
6
+ -->
7
+ # Product Intelligence Workflow
8
+
9
+ Use when: the request involves customer evidence, PM synthesis, product requirements, PRDs, PRFAQs, customer profiles, product signals, or backlog proposals.
10
+
11
+ ## Operating model
12
+
13
+ Product Intelligence is a Construct-native loop:
14
+
15
+ 1. Capture evidence into `.cx/product-intel/sources/` or link existing sources.
16
+ 2. Normalize evidence into field notes, customer profiles, and evidence briefs.
17
+ 3. Synthesize themes, asks, pain points, product areas, and confidence.
18
+ 4. Select the PM flavor: product, platform, enterprise, ai-product, or growth.
19
+ 5. Select the artifact: signal brief, evidence brief, PRD, Meta PRD, PRFAQ, product intelligence report, or backlog proposal.
20
+ 6. Gate external writes and approved-doc status through the primary persona.
21
+ 7. Sync searchable artifacts through the hybrid file/Postgres/vector storage path.
22
+
23
+ ## PM flavor selection
24
+
25
+ - **product**: user workflow, adoption, JTBD, UX surface, success metrics.
26
+ - **platform**: APIs, SDKs, integrations, admin controls, compatibility, migration, operational burden.
27
+ - **enterprise**: buyer/admin/evaluator split, compliance, security review, procurement, rollout controls.
28
+ - **ai-product**: model behavior, evals, human review, traceability, trust and correction.
29
+ - **growth**: activation, conversion, packaging, pricing assumptions, lifecycle metrics.
30
+
31
+ Load the core product-manager role guidance and the selected overlay before drafting.
32
+
33
+ ## Artifact selection
34
+
35
+ - Use `signal-brief` when evidence is real but below the PRD threshold.
36
+ - Use `evidence-brief` before committing requirements.
37
+ - Use `customer-profile` for durable account memory.
38
+ - Use `prd` for customer-facing product capabilities.
39
+ - Use `meta-prd` for product operating systems, agent workflows, templates, governance, and evaluation loops.
40
+ - Use `prfaq` for working-backwards launch narrative and FAQ.
41
+ - Use `backlog-proposal` before creating or updating external issues.
42
+ - Use `product-intelligence-report` for cross-source synthesis.
43
+
44
+ ## Storage
45
+
46
+ Write working artifacts under `.cx/product-intel/` unless they are docs of record. Approved PRDs live in `docs/prd/`; approved Meta PRDs live in `docs/meta-prd/`.
47
+
48
+ The hybrid storage layer indexes `.cx/product-intel/`, `docs/prd/`, and `docs/meta-prd/`. When Postgres is configured, `construct storage sync` can persist these artifacts into shared SQL rows. The vector layer scores the same documents for local, remote, or file-backed semantic retrieval.
49
+
50
+ ## Approval boundaries
51
+
52
+ Stop and ask the primary persona before:
53
+
54
+ - writing to Jira, Linear, GitHub Issues, or another external tracker
55
+ - marking a PRD, Meta PRD, or PRFAQ approved
56
+ - promoting a weak signal into committed requirements
57
+ - deleting or rewriting customer profile history
58
+ - importing product docs into implementation tasks
59
+
60
+ ## Quality bar
61
+
62
+ Product Intelligence output must cite evidence, distinguish observation from inference, name confidence, and avoid a wall of bullets. Keep em dashes rare. Use paragraphs for reasoning, tables for comparisons, and bullets for scanability.
@@ -0,0 +1,27 @@
1
+ <!--
2
+ skills/docs/product-signal-workflow.md — Synthesize product signals from evidence.
3
+ -->
4
+ # Product Signal Workflow
5
+
6
+ Use when: the user asks what customers are asking for, what themes are emerging, whether evidence is strong enough, or what should become a PRD.
7
+
8
+ ## Steps
9
+
10
+ 1. Gather relevant evidence briefs, customer profiles, notes, tickets, research, and product docs.
11
+ 2. Group evidence into themes, asks, pain points, affected personas, product areas, and counter-signals.
12
+ 3. Assign confidence: high, medium, or low.
13
+ 4. Choose the next artifact:
14
+ - signal brief for weak or early evidence
15
+ - evidence brief for decision-ready synthesis
16
+ - PRD or PRFAQ for strong customer-facing product demand
17
+ - Meta PRD for operating-system or process changes
18
+ - backlog proposal for tracker changes after approval
19
+ 5. Store synthesis in `.cx/product-intel/signals/` or `.cx/product-intel/evidence-briefs/`.
20
+
21
+ ## Evidence threshold
22
+
23
+ Default threshold for PRD-ready evidence: at least two independent customers, three independent mentions, one severe enterprise blocker, or a clear strategic mandate with named risk. If the threshold is not met, write a signal brief instead of inventing requirements.
24
+
25
+ ## Quality bar
26
+
27
+ Separate asks from requirements. Separate observation from inference. Name what evidence would change the recommendation.
@@ -0,0 +1,28 @@
1
+ <!--
2
+ skills/docs/research-workflow.md — Research Workflow — Use when: the user asks to research a topic, investigate a question, or gather e
3
+
4
+ Use when: the user asks to research a topic, investigate a question, or gather evidence for a decision. ## Steps
5
+ -->
6
+ # Research Workflow
7
+
8
+ Use when: the user asks to research a topic, investigate a question, or gather evidence for a decision.
9
+
10
+ ## Steps
11
+
12
+ 1. **Clarify the question** — one specific question the research must answer
13
+ 2. **Run cx-researcher or cx-docs-researcher** — use the appropriate agent:
14
+ - Library/API/framework questions → cx-docs-researcher
15
+ - Market, competitive, general evidence → cx-researcher
16
+ 3. **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)
17
+ 4. **Write to `.cx/research/{topic-slug}.md`** — cx-docs-keeper owns this
18
+ 5. **Reference the research doc** in the requesting agent's output (link by path)
19
+
20
+ ## File naming
21
+ - Topic slug: lowercase, hyphens, no spaces — e.g., `firebase-auth-v9-migration.md`
22
+ - Date prefix for time-sensitive research: `2026-04-langfuse-v2-vs-v3.md`
23
+
24
+ ## When research feeds a decision
25
+ → Also create `.cx/decisions/ADR-{NNN}-{slug}.md` referencing the research doc
26
+
27
+ ## When research feeds a PRD
28
+ → Reference it in the PRD's References section
@@ -0,0 +1,24 @@
1
+ <!--
2
+ skills/docs/runbook-workflow.md — Runbook Workflow — Use when: creating operational procedures for services, alerts, or recurring ope
3
+
4
+ Use when: creating operational procedures for services, alerts, or recurring operations. ## Steps
5
+ -->
6
+ # Runbook Workflow
7
+
8
+ Use when: creating operational procedures for services, alerts, or recurring operations.
9
+
10
+ ## Steps
11
+
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)
14
+ 3. **Link from the relevant alert** or monitoring dashboard
15
+ 4. **cx-docs-keeper** adds to `.cx/context.md` if it's a critical path runbook
16
+
17
+ ## File naming
18
+ - `docs/runbooks/langfuse-restart.md`
19
+ - `docs/runbooks/db-migration.md`
20
+ - `docs/runbooks/incident-response.md`
21
+
22
+ ## Review cadence
23
+ - Runbooks should be tested (table-top or live) at least quarterly
24
+ - Update `Last updated` field after each use or review