@geraldmaron/construct 1.0.14 → 1.0.16

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 (275) hide show
  1. package/README.md +21 -2
  2. package/bin/construct +146 -83
  3. package/commands/build/feature.md +0 -6
  4. package/commands/build/fix.md +0 -6
  5. package/commands/design/access.md +0 -6
  6. package/commands/design/flow.md +0 -6
  7. package/commands/design/ui.md +0 -6
  8. package/commands/measure/experiment.md +0 -6
  9. package/commands/measure/metrics.md +0 -6
  10. package/commands/measure/results.md +0 -6
  11. package/commands/plan/api.md +0 -6
  12. package/commands/plan/challenge.md +0 -6
  13. package/commands/plan/decide.md +0 -6
  14. package/commands/plan/feature.md +0 -7
  15. package/commands/plan/requirements.md +0 -6
  16. package/commands/remember/context.md +0 -6
  17. package/commands/remember/handoff.md +0 -6
  18. package/commands/remember/runbook.md +0 -6
  19. package/commands/review/code.md +0 -6
  20. package/commands/review/quality.md +0 -6
  21. package/commands/review/security.md +0 -6
  22. package/commands/ship/ready.md +0 -6
  23. package/commands/ship/release.md +0 -6
  24. package/commands/ship/status.md +0 -6
  25. package/commands/understand/docs.md +0 -6
  26. package/commands/understand/research.md +0 -6
  27. package/commands/understand/this.md +0 -6
  28. package/commands/understand/why.md +0 -6
  29. package/commands/work/clean.md +0 -6
  30. package/commands/work/drive.md +0 -6
  31. package/commands/work/optimize-prompts.md +0 -6
  32. package/commands/work/parallel-review.md +0 -6
  33. package/db/schema/010_cx_scores.sql +51 -0
  34. package/lib/beads-client.mjs +19 -1
  35. package/lib/cli-commands.mjs +280 -146
  36. package/lib/comment-lint.mjs +5 -1
  37. package/lib/context-state.mjs +15 -3
  38. package/lib/contracts/validate.mjs +72 -18
  39. package/lib/contracts/violation-log.mjs +169 -0
  40. package/lib/document-extract/docling-client.mjs +114 -0
  41. package/lib/document-extract/docling-sidecar.py +122 -0
  42. package/lib/document-extract/whisper-client.mjs +79 -0
  43. package/lib/document-extract.mjs +73 -8
  44. package/lib/document-ingest.mjs +26 -4
  45. package/lib/embed/daemon.mjs +6 -1
  46. package/lib/flavors/loader.mjs +1 -1
  47. package/lib/handoffs/contract.mjs +2 -2
  48. package/lib/hooks/session-start.mjs +1 -1
  49. package/lib/hooks/stop-notify.mjs +7 -0
  50. package/lib/ingest/chunker.mjs +94 -0
  51. package/lib/ingest/pipeline.mjs +53 -0
  52. package/lib/ingest/store.mjs +82 -0
  53. package/lib/install/first-invocation.mjs +5 -1
  54. package/lib/intake/prepare.mjs +22 -4
  55. package/lib/integrations/intake-integrations.mjs +28 -2
  56. package/lib/knowledge/search.mjs +12 -0
  57. package/lib/mcp/server.mjs +142 -1
  58. package/lib/mcp/tools/skills.mjs +6 -3
  59. package/lib/mcp/tools/telemetry.mjs +30 -0
  60. package/lib/mcp/tools/workflow.mjs +6 -2
  61. package/lib/observation-store.mjs +14 -5
  62. package/lib/ollama-manager.mjs +32 -28
  63. package/lib/orchestration-policy.mjs +15 -0
  64. package/lib/prompt-composer.js +11 -1
  65. package/lib/roles/gateway.mjs +30 -1
  66. package/lib/runtime/uv-bootstrap.mjs +129 -0
  67. package/lib/runtime/whisper-bootstrap.mjs +102 -0
  68. package/lib/scheduler/index.mjs +24 -4
  69. package/lib/server/index.mjs +22 -1
  70. package/lib/server/insights.mjs +12 -0
  71. package/lib/server/static/index.html +1 -1
  72. package/lib/setup.mjs +54 -9
  73. package/lib/specialists/postconditions.mjs +1 -1
  74. package/lib/sync/skill-frontmatter.mjs +113 -21
  75. package/lib/tracking-surfaces.mjs +2 -0
  76. package/lib/update.mjs +31 -3
  77. package/lib/upgrade.mjs +31 -4
  78. package/lib/validators/skills.mjs +86 -54
  79. package/package.json +5 -5
  80. package/personas/construct.md +6 -7
  81. package/platforms/claude/CLAUDE.md +43 -15
  82. package/platforms/claude/settings.template.json +1 -1
  83. package/rules/common/beads-hygiene.md +3 -9
  84. package/rules/common/code-review.md +3 -6
  85. package/rules/common/coding-style.md +3 -6
  86. package/rules/common/comments.md +3 -7
  87. package/rules/common/commit-approval.md +3 -6
  88. package/rules/common/cx-agent-routing.md +3 -7
  89. package/rules/common/cx-skill-routing.md +3 -3
  90. package/rules/common/doc-ownership.md +3 -8
  91. package/rules/common/efficiency.md +3 -8
  92. package/rules/common/framing.md +3 -8
  93. package/rules/common/git-workflow.md +3 -5
  94. package/rules/common/no-fabrication.md +4 -12
  95. package/rules/common/patterns.md +3 -5
  96. package/rules/common/release-gates.md +3 -8
  97. package/rules/common/research.md +3 -8
  98. package/rules/common/review-before-change.md +3 -9
  99. package/rules/common/security.md +3 -6
  100. package/rules/common/skill-composition.md +3 -7
  101. package/rules/common/testing.md +3 -6
  102. package/rules/golang/coding-style.md +1 -5
  103. package/rules/golang/hooks.md +1 -5
  104. package/rules/golang/patterns.md +1 -5
  105. package/rules/golang/security.md +1 -5
  106. package/rules/golang/testing.md +1 -5
  107. package/rules/python/coding-style.md +1 -5
  108. package/rules/python/hooks.md +1 -5
  109. package/rules/python/patterns.md +1 -5
  110. package/rules/python/security.md +1 -5
  111. package/rules/python/testing.md +1 -5
  112. package/rules/swift/coding-style.md +1 -5
  113. package/rules/swift/hooks.md +1 -5
  114. package/rules/swift/patterns.md +1 -5
  115. package/rules/swift/security.md +1 -5
  116. package/rules/swift/testing.md +1 -5
  117. package/rules/typescript/coding-style.md +1 -5
  118. package/rules/typescript/hooks.md +1 -5
  119. package/rules/typescript/patterns.md +1 -5
  120. package/rules/typescript/security.md +1 -5
  121. package/rules/typescript/testing.md +1 -5
  122. package/rules/web/coding-style.md +3 -5
  123. package/rules/web/design-quality.md +3 -5
  124. package/rules/web/hooks.md +3 -5
  125. package/rules/web/patterns.md +3 -5
  126. package/rules/web/performance.md +3 -5
  127. package/rules/web/security.md +3 -5
  128. package/rules/web/testing.md +3 -5
  129. package/scripts/sync-specialists.mjs +20 -2
  130. package/skills/ai/agent-dev.md +4 -5
  131. package/skills/ai/llm-security.md +4 -5
  132. package/skills/ai/ml-ops.md +4 -5
  133. package/skills/ai/orchestration-workflow.md +4 -5
  134. package/skills/ai/prompt-and-eval.md +4 -5
  135. package/skills/ai/prompt-optimizer.md +4 -6
  136. package/skills/ai/rag-system.md +4 -5
  137. package/skills/architecture/api-design.md +4 -5
  138. package/skills/architecture/caching.md +4 -5
  139. package/skills/architecture/cloud-native.md +4 -5
  140. package/skills/architecture/message-queue.md +4 -5
  141. package/skills/architecture/security-arch.md +4 -5
  142. package/skills/compliance/ai-disclosure.md +4 -5
  143. package/skills/compliance/data-privacy.md +4 -5
  144. package/skills/compliance/license-audit.md +4 -5
  145. package/skills/compliance/regulatory-review.md +4 -5
  146. package/skills/development/cpp.md +4 -5
  147. package/skills/development/go.md +4 -5
  148. package/skills/development/java.md +4 -5
  149. package/skills/development/kotlin.md +4 -5
  150. package/skills/development/mobile-crossplatform.md +4 -5
  151. package/skills/development/python.md +4 -5
  152. package/skills/development/rust.md +4 -5
  153. package/skills/development/shell.md +4 -5
  154. package/skills/development/swift.md +4 -5
  155. package/skills/development/typescript.md +4 -5
  156. package/skills/devops/ci-cd.md +4 -5
  157. package/skills/devops/containerization.md +4 -5
  158. package/skills/devops/cost-optimization.md +4 -5
  159. package/skills/devops/data-engineering.md +4 -5
  160. package/skills/devops/database.md +4 -5
  161. package/skills/devops/dependency-management.md +4 -5
  162. package/skills/devops/devsecops.md +4 -5
  163. package/skills/devops/git-workflow.md +4 -5
  164. package/skills/devops/incident-response.md +4 -5
  165. package/skills/devops/monorepo.md +4 -5
  166. package/skills/devops/observability.md +4 -5
  167. package/skills/devops/performance.md +4 -5
  168. package/skills/devops/testing.md +4 -5
  169. package/skills/docs/adr-workflow.md +4 -7
  170. package/skills/docs/backlog-proposal-workflow.md +4 -3
  171. package/skills/docs/customer-profile-workflow.md +4 -3
  172. package/skills/docs/document-ingest-workflow.md +4 -3
  173. package/skills/docs/evidence-ingest-workflow.md +4 -3
  174. package/skills/docs/init-docs.md +4 -5
  175. package/skills/docs/init-project.md +4 -5
  176. package/skills/docs/prd-workflow.md +4 -7
  177. package/skills/docs/prfaq-workflow.md +4 -3
  178. package/skills/docs/product-intelligence-review.md +4 -3
  179. package/skills/docs/product-intelligence-workflow.md +4 -6
  180. package/skills/docs/product-signal-workflow.md +4 -5
  181. package/skills/docs/research-workflow.md +4 -5
  182. package/skills/docs/runbook-workflow.md +4 -5
  183. package/skills/docs/strategy-workflow.md +4 -5
  184. package/skills/exploration/dependency-graph-reading.md +4 -7
  185. package/skills/exploration/repo-map.md +4 -5
  186. package/skills/exploration/tracer-bullet-method.md +4 -7
  187. package/skills/exploration/unknown-codebase-onboarding.md +4 -7
  188. package/skills/frameworks/django.md +4 -5
  189. package/skills/frameworks/nextjs.md +4 -5
  190. package/skills/frameworks/react.md +4 -5
  191. package/skills/frameworks/spring-boot.md +4 -5
  192. package/skills/frontend-design/accessibility.md +4 -5
  193. package/skills/frontend-design/component-patterns.md +4 -5
  194. package/skills/frontend-design/engineering.md +4 -5
  195. package/skills/frontend-design/state-management.md +4 -5
  196. package/skills/frontend-design/ui-aesthetics.md +4 -5
  197. package/skills/frontend-design/ux-principles.md +4 -5
  198. package/skills/operating/change-management.md +4 -8
  199. package/skills/operating/incident-response.md +4 -8
  200. package/skills/operating/oncall-rotation.md +4 -7
  201. package/skills/operating/orchestration-reference.md +4 -10
  202. package/skills/quality-gates/review-work.md +4 -5
  203. package/skills/quality-gates/verify-change.md +4 -5
  204. package/skills/quality-gates/verify-module.md +4 -5
  205. package/skills/quality-gates/verify-quality.md +4 -5
  206. package/skills/quality-gates/verify-security.md +4 -5
  207. package/skills/roles/architect.ai-systems.md +6 -9
  208. package/skills/roles/architect.data.md +6 -9
  209. package/skills/roles/architect.enterprise.md +6 -9
  210. package/skills/roles/architect.integration.md +6 -9
  211. package/skills/roles/architect.md +7 -14
  212. package/skills/roles/architect.platform.md +6 -9
  213. package/skills/roles/data-analyst.experiment.md +6 -9
  214. package/skills/roles/data-analyst.md +6 -9
  215. package/skills/roles/data-analyst.product-intelligence.md +7 -9
  216. package/skills/roles/data-analyst.product.md +6 -9
  217. package/skills/roles/data-analyst.telemetry.md +7 -9
  218. package/skills/roles/data-engineer.pipeline.md +6 -9
  219. package/skills/roles/data-engineer.vector-retrieval.md +7 -9
  220. package/skills/roles/data-engineer.warehouse.md +6 -9
  221. package/skills/roles/debugger.md +6 -9
  222. package/skills/roles/designer.accessibility.md +6 -9
  223. package/skills/roles/designer.md +7 -9
  224. package/skills/roles/engineer.ai.md +6 -9
  225. package/skills/roles/engineer.data.md +6 -9
  226. package/skills/roles/engineer.md +9 -9
  227. package/skills/roles/engineer.platform.md +6 -9
  228. package/skills/roles/operator.docs.md +6 -9
  229. package/skills/roles/operator.md +9 -9
  230. package/skills/roles/operator.release.md +6 -9
  231. package/skills/roles/operator.sre.md +6 -9
  232. package/skills/roles/orchestrator.md +6 -9
  233. package/skills/roles/product-manager.ai-product.md +6 -9
  234. package/skills/roles/product-manager.business-strategy.md +6 -9
  235. package/skills/roles/product-manager.enterprise.md +6 -9
  236. package/skills/roles/product-manager.growth.md +7 -9
  237. package/skills/roles/product-manager.md +7 -9
  238. package/skills/roles/product-manager.platform.md +6 -9
  239. package/skills/roles/product-manager.product.md +6 -9
  240. package/skills/roles/qa.ai-eval.md +8 -9
  241. package/skills/roles/qa.api-contract.md +7 -9
  242. package/skills/roles/qa.data-pipeline.md +7 -9
  243. package/skills/roles/qa.md +7 -9
  244. package/skills/roles/qa.test-automation.md +6 -9
  245. package/skills/roles/qa.web-ui.md +7 -9
  246. package/skills/roles/researcher.explorer.md +6 -9
  247. package/skills/roles/researcher.md +8 -9
  248. package/skills/roles/researcher.ux.md +6 -9
  249. package/skills/roles/reviewer.devil-advocate.md +6 -9
  250. package/skills/roles/reviewer.evaluator.md +6 -9
  251. package/skills/roles/reviewer.md +9 -9
  252. package/skills/roles/reviewer.trace.md +6 -9
  253. package/skills/roles/security.ai.md +7 -9
  254. package/skills/roles/security.appsec.md +6 -9
  255. package/skills/roles/security.cloud.md +6 -9
  256. package/skills/roles/security.legal-compliance.md +6 -9
  257. package/skills/roles/security.md +7 -9
  258. package/skills/roles/security.privacy.md +7 -9
  259. package/skills/roles/security.supply-chain.md +7 -9
  260. package/skills/security/blue-team.md +4 -5
  261. package/skills/security/code-audit.md +4 -5
  262. package/skills/security/pentest.md +4 -5
  263. package/skills/security/red-team.md +4 -5
  264. package/skills/security/threat-intel.md +4 -5
  265. package/skills/security/vuln-research.md +4 -5
  266. package/skills/strategy/competitive-landscape.md +4 -8
  267. package/skills/strategy/market-research-methods.md +4 -8
  268. package/skills/strategy/narrative-arc.md +4 -8
  269. package/skills/strategy/pricing-positioning.md +4 -8
  270. package/skills/utility/clean-code.md +4 -5
  271. package/specialists/policy-inventory.json +14 -0
  272. package/lib/specialist-contracts-enforce.mjs +0 -172
  273. package/rules/common/agents.md +0 -28
  274. package/rules/common/development-workflow.md +0 -32
  275. package/rules/common/performance.md +0 -55
package/README.md CHANGED
@@ -85,6 +85,12 @@ Anything dropped into `.cx/inbox/` (a bug report, a customer comment, a competit
85
85
 
86
86
  Each signal gets a primary owner and a recommended handoff chain. Inspect with `construct intake list` and `construct intake show <id>`. Generate a task graph with `construct graph from-intake <id>`. The classifier runs in the daemon and is deterministic. The agent in your editor does the actual analysis. [Intake and triage](https://geraldmaron.github.io/construct/concepts/intake-and-triage).
87
87
 
88
+ ### Document ingestion fidelity
89
+
90
+ `construct ingest <file>` extracts text from PDF, DOCX, XLSX, PPTX, HTML, plain text, email, and audio/video. High-fidelity extraction is the default and routes through a [docling](https://github.com/docling-project/docling) Python sidecar (MIT, IBM, donated to LF AI & Data) provisioned via [`uv`](https://github.com/astral-sh/uv); audio and video route through [`whisper.cpp`](https://github.com/ggml-org/whisper.cpp) (Metal-accelerated on macOS).
91
+
92
+ First run downloads `uv` and creates `.cx/runtime/docling/.venv` (~1.5 GB including PyTorch). Audio requires a system `whisper-cli` binary — `brew install whisper-cpp` on macOS. Pass `--strict` to fail on any extraction info loss; pass `--legacy-extractor` to use the pre-docling regex path. Any silent drops (image-heavy PDFs, scanned pages with low OCR yield) are surfaced as `droppedInfo` in the CLI output.
93
+
88
94
  ## Hard gates
89
95
 
90
96
  Every code mutation runs through enforcement. No secrets committed, tests green, docs current, comments lint-clean, CI passes. Gates live in three places: write-time, commit-time, CI safety net. They can only be bypassed with explicit env vars so every exception leaves an audit trail. [Gates and enforcement](https://geraldmaron.github.io/construct/concepts/gates-and-enforcement).
@@ -109,8 +115,8 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
109
115
  | `construct dev` | Start services for development |
110
116
  | `construct docs` | Documentation commands |
111
117
  | `construct doctor` | Check installation health |
112
- | `construct init` | Initialize project and start services |
113
- | `construct install` | Machine setup: install Docker, cm, and bootstrap config |
118
+ | `construct init` | Project setup (once per repo): scaffold .cx/, AGENTS.md, plan.md, adapters |
119
+ | `construct install` | Machine setup (once per machine): Docker, cm/cass, config, embeddings |
114
120
  | `construct intake` | View and process the active profile's intake queue (queue label varies by profile) |
115
121
  | `construct profile` | Manage the active org profile and its lifecycle (draft, promote, archive, health) |
116
122
  | `construct recommendations` | View and manage artifact recommendations |
@@ -123,11 +129,13 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
123
129
 
124
130
  | Command | What it does |
125
131
  |---|---|
132
+ | `construct ask` | One-shot ask against the active knowledge index |
126
133
  | `construct bootstrap` | Import seed observation corpus into local memory store for cold-start acceleration |
127
134
  | `construct customer` | Manage customer profiles for product intelligence |
128
135
  | `construct distill` | Distill documents with query-focused chunking |
129
136
  | `construct drop` | Ingest file from Downloads/Desktop |
130
137
  | `construct graph` | Task graph management |
138
+ | `construct handoffs` | List and inspect session handoff files in .cx/handoffs/ |
131
139
  | `construct headhunt` | Create domain expertise overlays |
132
140
  | `construct infer` | Infer schema from documents |
133
141
  | `construct ingest` | Convert documents to indexed markdown |
@@ -168,11 +176,14 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
168
176
  | `construct efficiency` | Show read efficiency, repeated files, and context-budget guidance |
169
177
  | `construct eval-datasets` | Sync scored Langfuse traces into eval datasets for prompt regression testing |
170
178
  | `construct evals` | Show evaluator catalog for prompt and agent experiments |
179
+ | `construct feedback:history` | Show recorded outcome ratings |
180
+ | `construct feedback:record` | Record an outcome rating for a recent specialist invocation |
171
181
  | `construct llm-judge` | Run LLM-as-a-judge evaluations on unscored traces for continuous quality feedback |
172
182
  | `construct optimize` | Prompt optimization using Langfuse trace quality scores |
173
183
  | `construct review` | Generate agent performance review from Langfuse trace backend |
174
184
  | `construct telemetry` | Query telemetry traces and latency data |
175
185
  | `construct telemetry-backfill` | Backfill sparse traces with observations (trace backend) |
186
+ | `construct telemetry-setup` | Configure Langfuse credentials and trace export |
176
187
 
177
188
  ### Diagnostics
178
189
 
@@ -181,6 +192,11 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
181
192
  | `construct audit` | Audit Construct internals and review the mutation trail |
182
193
  | `construct cleanup` | Release dev-agent memory pressure by cleaning stale helper and bridge processes |
183
194
  | `construct doc` | Verify or inspect auditability stamps on Construct-generated markdown files |
195
+ | `construct docs:check` | Check for missing how-to guides (alias for `docs check`) |
196
+ | `construct docs:reconcile` | Reconcile docs against the registry |
197
+ | `construct docs:site` | Manage the docs static site build |
198
+ | `construct docs:update` | Regenerate AUTO-managed doc regions (alias for `docs update`) |
199
+ | `construct docs:verify` | Validate documentation quality (alias for `docs verify`) |
184
200
 
185
201
  ### Advanced
186
202
 
@@ -189,6 +205,7 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
189
205
  | `construct auth:status` | Check auth status |
190
206
  | `construct backup` | System backups |
191
207
  | `construct beads` | Task queue management |
208
+ | `construct beads:stats` | Show beads counters and drift summary |
192
209
  | `construct ci` | Local CI mirror: run CI jobs locally or view recent run status |
193
210
  | `construct completions` | Shell completion scripts |
194
211
  | `construct config` | Deployment mode configuration |
@@ -200,6 +217,8 @@ The embed daemon writes its supervisor stdout log to `~/.cx/runtime/embed-daemon
200
217
  | `construct policy` | Show active policy gates with enforcement details |
201
218
  | `construct provider` | Provider management |
202
219
  | `construct role` | Role framework management |
220
+ | `construct roles:list` | List installed role contracts |
221
+ | `construct roles:set` | Activate a role contract |
203
222
  | `construct scheduler` | Manage scheduled background jobs (tag-mining, doc-hygiene, skill-rollup) |
204
223
  | `construct skills` | Skill relevance detection |
205
224
  | `construct uninstall` | Remove Construct state |
package/bin/construct CHANGED
@@ -12,7 +12,7 @@ import os from 'node:os';
12
12
  import path from 'node:path';
13
13
  import { spawnSync } from 'node:child_process';
14
14
 
15
- import { CLI_COMMANDS, CLI_COMMANDS_BY_CATEGORY, CATEGORY_ORDER } from '../lib/cli-commands.mjs';
15
+ import { CLI_COMMANDS, CLI_COMMANDS_BY_CATEGORY, CATEGORY_ORDER, formatCommandHelp, isInternalCommand } from '../lib/cli-commands.mjs';
16
16
  import { buildStatus, formatStatusReport } from '../lib/status.mjs';
17
17
  import { validateRegistry } from '../lib/validator.mjs';
18
18
  import { readCurrentModels, readOpenRouterApiKeyFromOpenCodeConfig, applyToEnv, resetEnv, setTierModel, setModelWithTierInference } from '../lib/model-router.mjs';
@@ -104,73 +104,63 @@ function iconColumn(emoji) {
104
104
  return emoji + trailingSpaces;
105
105
  }
106
106
 
107
- function usage() {
108
- const showAll = restArgsCache.includes('--all') || restArgsCache.includes('-a');
109
- const commands = showAll ? CLI_COMMANDS : CLI_COMMANDS.filter(c => c.core);
110
-
107
+ function usage(opts = {}) {
108
+ const showAll = opts.all ?? (restArgsCache.includes('--all') || restArgsCache.includes('-a'));
109
+ // Always filter out internal commands; users can still run them directly,
110
+ // but --all is for "everything humans use" not "every handler in the map".
111
+ const visible = CLI_COMMANDS.filter((c) => !c.internal);
112
+ const commands = showAll ? visible : visible.filter((c) => c.core);
113
+
111
114
  if (showAll) {
112
115
  println(`${COLORS.bold}construct${COLORS.reset} — AI agent harness (all commands)`);
113
116
  } else {
114
117
  println(`${COLORS.bold}construct${COLORS.reset} — AI agent harness`);
115
- println(`${COLORS.dim}Tip: Run ${COLORS.reset}construct --all${COLORS.dim} to see all commands${COLORS.reset}`);
118
+ println(`${COLORS.dim}Tip: Run ${COLORS.reset}construct --all${COLORS.dim} to see all commands · ${COLORS.reset}construct <cmd> --help${COLORS.dim} for details${COLORS.reset}`);
116
119
  }
117
-
120
+
118
121
  println(`\n${COLORS.dim}Usage:${COLORS.reset} construct <command> [options]\n`);
119
-
122
+
120
123
  for (const category of CATEGORY_ORDER) {
121
- const categoryCommands = commands.filter(c => c.category === category);
124
+ const categoryCommands = commands.filter((c) => c.category === category);
122
125
  if (!categoryCommands.length) continue;
123
126
  println(`${COLORS.bold}${category}${COLORS.reset}`);
124
127
  for (const command of categoryCommands) {
125
- println(` ${iconColumn(command.emoji)}${command.name.padEnd(14)} ${command.description}`);
128
+ const emoji = command.emoji ?? ' ';
129
+ println(` ${iconColumn(emoji)}${command.name.padEnd(14)} ${command.description}`);
126
130
  }
127
131
  println('');
128
132
  }
129
133
  }
130
134
 
131
- /** Show interactive context-aware menu when construct is run without arguments. */
135
+ // Bare-command landing show the same core-command listing as `construct
136
+ // --help`, prefixed with a context line so users know where they are, and
137
+ // suffixed with the one next-step suggestion that applies to their state.
138
+
132
139
  async function showInteractiveMenu() {
133
- const { loadProjectConfig } = await import('../lib/config/project-config.mjs');
134
140
  const { existsSync } = await import('node:fs');
135
141
  const { join } = await import('node:path');
136
-
142
+
137
143
  const projectRoot = process.cwd();
138
144
  const isConstructProject = existsSync(join(projectRoot, 'construct.config.json')) ||
139
145
  existsSync(join(projectRoot, '.cx'));
140
-
141
- println(`${COLORS.bold}construct${COLORS.reset} — AI agent harness`);
142
- println('');
143
-
146
+
144
147
  if (isConstructProject) {
145
148
  const projectName = process.env.CX_PROJECT_NAME || path.basename(projectRoot);
146
149
  println(`${COLORS.dim}Project:${COLORS.reset} ${projectName}`);
147
150
  println('');
148
151
  }
149
-
150
- println(`${COLORS.bold}Core Commands:${COLORS.reset}`);
151
- println(` ${COLORS.green}🚀 dev${COLORS.reset} Start services for development`);
152
- println(` ${COLORS.green}⏹ stop${COLORS.reset} Stop all running services`);
153
- println(` ${COLORS.green}📡 status${COLORS.reset} Show system health and credentials`);
154
- println(` ${COLORS.green}🏗️ init${COLORS.reset} Initialize project and start services`);
155
- println(` ${COLORS.green}🔄 sync${COLORS.reset} Sync agent adapters to AI tools`);
156
- println('');
157
- println(`${COLORS.dim}Run 'construct <command> --help' for command details${COLORS.reset}`);
158
- println(`${COLORS.dim}Run 'construct --all' to see all commands${COLORS.reset}`);
159
- println('');
160
-
161
- // Show context-aware suggestions
152
+
153
+ usage({ all: false });
154
+
162
155
  if (isConstructProject) {
163
156
  const { readDashboardState } = await import('../lib/service-manager.mjs');
164
157
  const dashboard = readDashboardState(HOME);
165
-
166
158
  if (!dashboard) {
167
- println(`${COLORS.yellow}💡 Services not running. Start with:${COLORS.reset}`);
168
- println(` ${COLORS.green}construct dev${COLORS.reset}`);
159
+ println(`${COLORS.yellow}💡 Services not running. Start with:${COLORS.reset} ${COLORS.green}construct dev${COLORS.reset}`);
169
160
  println('');
170
161
  }
171
162
  } else {
172
- println(`${COLORS.yellow}💡 Not a Construct project. Initialize with:${COLORS.reset}`);
173
- println(` ${COLORS.green}construct init${COLORS.reset}`);
163
+ println(`${COLORS.yellow}💡 Not a Construct project. Initialize with:${COLORS.reset} ${COLORS.green}construct init${COLORS.reset}`);
174
164
  println('');
175
165
  }
176
166
  }
@@ -506,35 +496,12 @@ async function cmdDoctor() {
506
496
  );
507
497
  }
508
498
 
509
- // Pre-push bypass frequency. Every honored CONSTRUCT_SKIP_PREPUSH /
510
- // CONSTRUCT_ALLOW_CLAUDE_PUSH / CONSTRUCT_SKIP_PR_LINT writes a JSONL
511
- // entry to ~/.construct/audit/prepush-bypass.log. Surfacing frequent
512
- // usage here is the early warning that the gate is the wrong shape —
513
- // the alternative is letting the bypass quietly become the default.
514
-
515
- const bypassLogPath = path.join(userHome, '.construct', 'audit', 'prepush-bypass.log');
516
- if (fs.existsSync(bypassLogPath)) {
517
- try {
518
- const cutoff = Date.now() - 7 * 24 * 60 * 60 * 1000;
519
- const recent = fs.readFileSync(bypassLogPath, 'utf8')
520
- .split('\n')
521
- .filter(Boolean)
522
- .map((line) => { try { return JSON.parse(line); } catch { return null; } })
523
- .filter((e) => e && Date.parse(e.ts) >= cutoff);
524
- const BYPASS_WARN_THRESHOLD = Number(process.env.CONSTRUCT_DOCTOR_BYPASS_WARN) || 3;
525
- if (recent.length >= BYPASS_WARN_THRESHOLD) {
526
- add(
527
- `Pre-push bypasses in last 7 days: ${recent.length} (gate may be wrong-sized — see ${bypassLogPath})`,
528
- false,
529
- true,
530
- );
531
- } else {
532
- add(`Pre-push bypasses in last 7 days: ${recent.length}`, true);
533
- }
534
- } catch { /* audit log read is best-effort */ }
535
- } else {
536
- add('Pre-push bypass log not present (no bypasses honored yet)', true);
537
- }
499
+ // (Pre-push bypass doctor check removed in v1.0.16.) v1.0.15 deleted the
500
+ // entire skip-var infrastructure (CONSTRUCT_SKIP_PREPUSH, _COMMENT_LINT,
501
+ // _PR_LINT, _DOCS, CONSTRUCT_ALLOW_CLAUDE_PUSH). There is no longer any
502
+ // writer to ~/.construct/audit/prepush-bypass.log, so any historical
503
+ // entries are stale and the warning surfaced forever. The file itself
504
+ // is harmless — next cleanup tick may sweep it.
538
505
 
539
506
  // Embed daemon log size. The daemon's own scheduler rotates every
540
507
  // minute at 50MB, but a freshly-upgraded install with a 34GB legacy
@@ -671,16 +638,12 @@ async function cmdDoctor() {
671
638
  path.join(process.env.APPDATA ?? path.join(HOME, 'AppData', 'Roaming'), 'Code - Insiders'),
672
639
  ];
673
640
  if (vscodeAppSupportRoots.some((r) => fs.existsSync(r))) {
674
- // VS Code is installed but has no settings.json the user needs to create
675
- // one manually or run `construct sync` after VS Code sync support lands.
641
+ // VS Code installed check settings.json presence as a green/info signal.
642
+ // Absence is not a doctor finding VS Code adapter support hasn't landed
643
+ // yet, so "create one or wait for support" isn't actionable. The line is
644
+ // suppressed entirely when missing; doctor surfaces facts, not roadmap.
676
645
  const vscodeSettingsOk = vscodeSettingsPaths.some((candidate) => fs.existsSync(candidate));
677
- add(
678
- vscodeSettingsOk
679
- ? 'VS Code settings file'
680
- : 'VS Code settings missing — create settings.json or wait for `construct sync` VS Code support',
681
- vscodeSettingsOk,
682
- true,
683
- );
646
+ if (vscodeSettingsOk) add('VS Code settings file', true, true);
684
647
  }
685
648
  add('User config ready', fs.existsSync(getUserEnvPath(HOME)) || fs.existsSync(path.join(HOME, '.construct')), true);
686
649
  add('skills/ directory', fs.existsSync(path.join(ROOT_DIR, 'skills')));
@@ -917,11 +880,15 @@ async function cmdDoctor() {
917
880
  }
918
881
 
919
882
  try {
920
- const { recentViolations } = await import('../lib/specialist-contracts-enforce.mjs');
883
+ const { recentViolations, violationLogPath } = await import('../lib/contracts/violation-log.mjs');
921
884
  const violations = recentViolations({ windowMs: 24 * 60 * 60 * 1000 });
885
+ // Path is project-scoped (.cx/contract-violations.jsonl in cwd when
886
+ // inside a project, ~/.cx/ otherwise). Print the resolved one so
887
+ // users find the real file, not a stale ~/.cx/ reference.
888
+ const violationPath = violationLogPath();
922
889
  const label = violations.length === 0
923
890
  ? 'Contract violations (none in last 24h)'
924
- : `Contract violations (${violations.length} in last 24h — see ~/.cx/contract-violations.jsonl)`;
891
+ : `Contract violations (${violations.length} in last 24h — see ${violationPath})`;
925
892
  add(label, violations.length === 0, true);
926
893
  } catch {
927
894
  add('Contract violations', false, true);
@@ -1598,12 +1565,12 @@ async function cmdHandoffs(args) {
1598
1565
  }
1599
1566
 
1600
1567
  if (sub === 'validate') {
1601
- const { parseHandoffFile, validateHandoff } = await import('../lib/handoffs/contract.mjs');
1568
+ const { parseHandoffFile, validateHandoffFile } = await import('../lib/handoffs/contract.mjs');
1602
1569
  if (summary.state === 'empty') { info('No handoffs to validate.'); return; }
1603
1570
  let hasErrors = false;
1604
1571
  for (const f of summary.files) {
1605
1572
  const parsed = parseHandoffFile(f.path);
1606
- const { valid, errors } = validateHandoff(parsed);
1573
+ const { valid, errors } = validateHandoffFile(parsed);
1607
1574
  if (valid) {
1608
1575
  println(`✓ ${f.filename}`);
1609
1576
  } else {
@@ -2456,9 +2423,49 @@ async function cmdSkillsUsage(sub, args) {
2456
2423
  }
2457
2424
 
2458
2425
  if (sub === 'correlate-quality') {
2459
- println('Quality correlation requires Postgres (CONSTRUCT_DB_URL).');
2460
- println('Local JSONL does not carry cx_score data.');
2461
- println('Run with Postgres configured for full correlation output.');
2426
+ // Queries the construct_skill_quality_correlation view (db/schema/010_cx_scores.sql)
2427
+ // which aggregates cx_score values by session_id × skill_id over the past 90 days.
2428
+ // Falls back to a clear "no data" message when the DB is unreachable or the
2429
+ // view is empty rather than printing an empty table.
2430
+
2431
+ const sqlClient = createSqlClient(process.env);
2432
+ if (!sqlClient) {
2433
+ println('Quality correlation requires Postgres (DATABASE_URL or CONSTRUCT_DB_URL).');
2434
+ println('Local JSONL does not carry cx_score data.');
2435
+ println('Run with Postgres configured for full correlation output.');
2436
+ return;
2437
+ }
2438
+ try {
2439
+ const rows = await sqlClient`
2440
+ select skill_id, sessions, score_count, mean_score, median_score, p10_score, p90_score, last_scored_at
2441
+ from construct_skill_quality_correlation
2442
+ order by sessions desc, mean_score desc nulls last
2443
+ limit 50
2444
+ `;
2445
+ if (!rows || rows.length === 0) {
2446
+ println('No correlation data yet. The view aggregates cx_score values from the past 90 days against');
2447
+ println('skill invocations from the same sessions. Once cxScore() runs in a session that also invoked');
2448
+ println('a skill, rows appear here. Verify scoring with: construct telemetry query latency --limit=5');
2449
+ return;
2450
+ }
2451
+ const w = Math.max(15, ...rows.map((r) => String(r.skill_id || '').length));
2452
+ println(`${'skill_id'.padEnd(w)} sessions scores mean median p10 p90 last_scored_at`);
2453
+ println('-'.repeat(w + 70));
2454
+ for (const r of rows) {
2455
+ const pad = (v, n) => String(v ?? '').padStart(n);
2456
+ println(
2457
+ `${String(r.skill_id || '').padEnd(w)} ${pad(r.sessions, 8)} ${pad(r.score_count, 6)} ` +
2458
+ `${pad(r.mean_score, 5)} ${pad(r.median_score, 6)} ${pad(r.p10_score, 5)} ${pad(r.p90_score, 5)} ` +
2459
+ `${r.last_scored_at ? new Date(r.last_scored_at).toISOString().slice(0, 19) : ''}`,
2460
+ );
2461
+ }
2462
+ } catch (err) {
2463
+ errorln(`Quality correlation query failed: ${err.message}`);
2464
+ errorln('If the construct_skill_quality_correlation view is missing, apply db/schema/010_cx_scores.sql.');
2465
+ process.exit(1);
2466
+ } finally {
2467
+ await closeSqlClient(sqlClient);
2468
+ }
2462
2469
  return;
2463
2470
  }
2464
2471
 
@@ -2594,14 +2601,18 @@ async function cmdIntakeMetrics() {
2594
2601
  }
2595
2602
 
2596
2603
  async function cmdIntakeIntegrate(id, args, cwd) {
2597
- if (!id) { errorln('Usage: construct intake integrate <id> <github|jira|confluence>'); process.exit(1); }
2604
+ if (!id) { errorln('Usage: construct intake integrate <id> <github|jira|confluence> [--publish-issues]'); process.exit(1); }
2598
2605
 
2599
2606
  const system = args[0];
2600
2607
  if (!system || !['github', 'jira', 'confluence'].includes(system)) {
2601
- errorln('Usage: construct intake integrate <id> <github|jira|confluence>');
2608
+ errorln('Usage: construct intake integrate <id> <github|jira|confluence> [--publish-issues]');
2602
2609
  errorln('Available systems: github, jira, confluence');
2603
2610
  process.exit(1);
2604
2611
  }
2612
+ // --publish-issues unlocks the demo-source gate (CONSTRUCT_DEMO env or
2613
+ // packet sourcePath under tests/fixtures/ or .cx/intake/demo/). Required
2614
+ // before any demo/fixture intake can publish a real external ticket.
2615
+ const publishDemo = args.includes('--publish-issues');
2605
2616
 
2606
2617
  const { createIntakeQueue } = await import('../lib/intake/queue.mjs');
2607
2618
  const queue = createIntakeQueue(cwd, process.env);
@@ -2613,10 +2624,13 @@ async function cmdIntakeIntegrate(id, args, cwd) {
2613
2624
  if (system === 'github') {
2614
2625
  const { createGitHubIssue, tagIntakeWithExternalRef } = await import('../lib/integrations/intake-integrations.mjs');
2615
2626
  info(`Creating GitHub issue from intake ${id}...`);
2616
- result = await createGitHubIssue(entry);
2627
+ result = await createGitHubIssue(entry, { publishDemo });
2617
2628
  if (result.ok) {
2618
2629
  ok(`GitHub issue created: ${result.externalUrl}`);
2619
2630
  tagIntakeWithExternalRef(cwd, id, 'github', result.externalUrl, result.externalId);
2631
+ } else if (result.skipped === 'demo-source') {
2632
+ warn(`Skipped: ${result.error}`);
2633
+ process.exit(0);
2620
2634
  } else {
2621
2635
  errorln(`Failed: ${result.error}`);
2622
2636
  process.exit(1);
@@ -5850,6 +5864,13 @@ if (command === '--help' || command === '-h' || command === 'help') {
5850
5864
  process.exit(0);
5851
5865
  }
5852
5866
 
5867
+ // --all / -a as a standalone flag — equivalent to `help --all`. Without
5868
+ // this, `construct --all` (which the help footer advertises) 404s.
5869
+ if (command === '--all' || command === '-a') {
5870
+ usage({ all: true });
5871
+ process.exit(0);
5872
+ }
5873
+
5853
5874
  // Version flags → print version and exit
5854
5875
  if (command === '--version' || command === '-V') {
5855
5876
  const pkg = JSON.parse(fs.readFileSync(path.join(ROOT_DIR, 'package.json'), 'utf8'));
@@ -5860,11 +5881,53 @@ if (command === '--version' || command === '-V') {
5860
5881
  const handler = handlers.get(command);
5861
5882
  if (!handler) {
5862
5883
  errorln(`Unknown command: ${command}`);
5884
+ // Three-tier suggestion: prefix match → substring match → Levenshtein
5885
+ // distance ≤ 2. Catches single-letter typos, missing-letter typos, and
5886
+ // transpositions ('sycn' → 'sync') without dragging in a full fuzzy lib.
5887
+ const known = CLI_COMMANDS.filter((c) => !c.internal).map((c) => c.name);
5888
+ const editDistance = (a, b) => {
5889
+ if (a === b) return 0;
5890
+ if (!a.length || !b.length) return Math.max(a.length, b.length);
5891
+ const row = Array(b.length + 1).fill(0).map((_, i) => i);
5892
+ for (let i = 1; i <= a.length; i++) {
5893
+ let prev = i;
5894
+ for (let j = 1; j <= b.length; j++) {
5895
+ const cur = a[i - 1] === b[j - 1]
5896
+ ? row[j - 1]
5897
+ : 1 + Math.min(row[j - 1], row[j], prev);
5898
+ row[j - 1] = prev;
5899
+ prev = cur;
5900
+ }
5901
+ row[b.length] = prev;
5902
+ }
5903
+ return row[b.length];
5904
+ };
5905
+ let suggestion = known.find((n) => n.startsWith(command)) ||
5906
+ known.find((n) => n.includes(command));
5907
+ if (!suggestion) {
5908
+ let bestDist = 3;
5909
+ for (const name of known) {
5910
+ const d = editDistance(command, name);
5911
+ if (d < bestDist) { bestDist = d; suggestion = name; }
5912
+ }
5913
+ }
5914
+ if (suggestion) errorln(`Did you mean: construct ${suggestion}?`);
5863
5915
  println('');
5864
5916
  println(`${COLORS.dim}Run 'construct --help' for available commands${COLORS.reset}`);
5865
5917
  process.exit(1);
5866
5918
  }
5867
5919
 
5920
+ // Per-command --help / -h intercept. Critical safety: without this guard,
5921
+ // commands like `dev`, `stop`, `init`, `uninstall` silently ignore --help
5922
+ // and execute (running `construct stop --help` actually stops services).
5923
+ // Every command — including internal ones — gets the same shape via
5924
+ // formatCommandHelp(); per-command handlers no longer need to opt in.
5925
+
5926
+ if (rest.includes('--help') || rest.includes('-h')) {
5927
+ process.stdout.write(formatCommandHelp(command, { colors: true }));
5928
+ process.exit(0);
5929
+ }
5930
+
5868
5931
  // Self-maintenance on version change. Skipped for high-frequency hook calls
5869
5932
  // (the harness invokes `construct hook <name>` many times per session and
5870
5933
  // must stay fast). When the installed version differs from the stamp at
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/build/feature.md (Build a feature) implement it end to end, tested and ready to ship
3
-
4
- Build a feature: implement it end to end, tested and ready to ship
5
- -->
6
1
  ---
7
2
  description: "Build a feature: implement it end to end, tested and ready to ship"
8
3
  ---
9
-
10
4
  You are Construct. Build the following: $ARGUMENTS
11
5
 
12
6
  Before writing a line:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/build/fix.md (Fix something broken) reproduce, find the root cause, apply the smallest safe change
3
-
4
- Fix something broken: reproduce, find the root cause, apply the smallest safe change
5
- -->
6
1
  ---
7
2
  description: "Fix something broken: reproduce, find the root cause, apply the smallest safe change"
8
3
  ---
9
-
10
4
  You are Construct.
11
5
 
12
6
  Debugging protocol for: $ARGUMENTS
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/design/access.md (Accessibility audit) WCAG 2.1 AA, keyboard, screen readers, contrast, motion
3
-
4
- Accessibility audit: WCAG 2.1 AA, keyboard, screen readers, contrast, motion
5
- -->
6
1
  ---
7
2
  description: "Accessibility audit: WCAG 2.1 AA, keyboard, screen readers, contrast, motion"
8
3
  ---
9
-
10
4
  You are Construct. Audit: $ARGUMENTS
11
5
 
12
6
  WCAG 2.1 AA baseline:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/design/flow.md (Map the user flow) entry to success, friction points, jobs-to-be-done
3
-
4
- Map the user flow: entry to success, friction points, jobs-to-be-done
5
- -->
6
1
  ---
7
2
  description: "Map the user flow: entry to success, friction points, jobs-to-be-done"
8
3
  ---
9
-
10
4
  You are Construct. Map the user flow for: $ARGUMENTS
11
5
 
12
6
  Produce:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/design/ui.md (Design or review UI) visual hierarchy, states, interaction model, accessibility baseline
3
-
4
- Design or review UI: visual hierarchy, states, interaction model, accessibility baseline
5
- -->
6
1
  ---
7
2
  description: "Design or review UI: visual hierarchy, states, interaction model, accessibility baseline"
8
3
  ---
9
-
10
4
  You are Construct. Design or review the UI for: $ARGUMENTS
11
5
 
12
6
  Every meaningful UI surface needs:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/measure/experiment.md (Design an experiment) hypothesis, test, evidence threshold, go/no-go decision
3
-
4
- Design an experiment: hypothesis, test, evidence threshold, go/no-go decision
5
- -->
6
1
  ---
7
2
  description: "Design an experiment: hypothesis, test, evidence threshold, go/no-go decision"
8
3
  ---
9
-
10
4
  You are Construct. Design an experiment for: $ARGUMENTS
11
5
 
12
6
  Produce:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/measure/metrics.md (Define metrics) what to measure, baselines, success thresholds, instrumentation needed
3
-
4
- Define metrics: what to measure, baselines, success thresholds, instrumentation needed
5
- -->
6
1
  ---
7
2
  description: "Define metrics: what to measure, baselines, success thresholds, instrumentation needed"
8
3
  ---
9
-
10
4
  You are Construct. Define metrics for: $ARGUMENTS
11
5
 
12
6
  For each metric:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/measure/results.md (Analyze results) interpret data, separate signal from noise, produce a recommendation
3
-
4
- Analyze results: interpret data, separate signal from noise, produce a recommendation
5
- -->
6
1
  ---
7
2
  description: "Analyze results: interpret data, separate signal from noise, produce a recommendation"
8
3
  ---
9
-
10
4
  You are Construct. Analyze: $ARGUMENTS
11
5
 
12
6
  For each finding:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/plan/api.md (Design an API) contracts, endpoints, error model, data schema
3
-
4
- Design an API: contracts, endpoints, error model, data schema
5
- -->
6
1
  ---
7
2
  description: "Design an API: contracts, endpoints, error model, data schema"
8
3
  ---
9
-
10
4
  You are Construct. Design the API for: $ARGUMENTS
11
5
 
12
6
  Produce:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/plan/challenge.md (Challenge a plan) stress-test assumptions, surface failure modes and risks
3
-
4
- Challenge a plan: stress-test assumptions, surface failure modes and risks
5
- -->
6
1
  ---
7
2
  description: "Challenge a plan: stress-test assumptions, surface failure modes and risks"
8
3
  ---
9
-
10
4
  You are Construct. Challenge the following: $ARGUMENTS
11
5
 
12
6
  Challenge in severity order:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/plan/decide.md (Record a decision) context, options considered, consequences, what it locks in
3
-
4
- Record a decision: context, options considered, consequences, what it locks in
5
- -->
6
1
  ---
7
2
  description: "Record a decision: context, options considered, consequences, what it locks in"
8
3
  ---
9
-
10
4
  You are Construct. Document the decision about: $ARGUMENTS
11
5
 
12
6
  ADR format:
@@ -1,13 +1,6 @@
1
- <!--
2
- commands/plan/feature.md: Plan a feature and turn it into a tracker-linked implementation plan
3
-
4
- Produces a structured spec using the canonical Construct plan format, saves it
5
- to .cx/plans/ as a durable planning artifact linked to the active tracker slice.
6
- -->
7
1
  ---
8
2
  description: "Plan a feature: produce a structured spec and link it to the active tracker-backed plan"
9
3
  ---
10
-
11
4
  You are Construct. Plan the following: $ARGUMENTS
12
5
 
13
6
  Use the code-backed orchestration policy for routing/escalation decisions; this prompt only defines the plan artifact shape.
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/plan/requirements.md (Define requirements) what needs to be true for this to be done
3
-
4
- Define requirements: what needs to be true for this to be done
5
- -->
6
1
  ---
7
2
  description: "Define requirements: what needs to be true for this to be done"
8
3
  ---
9
-
10
4
  You are Construct. Define requirements for: $ARGUMENTS
11
5
 
12
6
  Produce:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/remember/context.md (Save project context) update .cx/context.md so the next session picks up where this one left off
3
-
4
- Save project context: update .cx/context.md so the next session picks up where this one left off
5
- -->
6
1
  ---
7
2
  description: "Save project context: update .cx/context.md so the next session picks up where this one left off"
8
3
  ---
9
-
10
4
  You are Construct. Save context for: $ARGUMENTS
11
5
 
12
6
  Update `.cx/context.json` as canonical state and refresh `.cx/context.md` as the readable mirror:
@@ -1,12 +1,6 @@
1
- <!--
2
- commands/remember/handoff.md (Write a handoff) transfer context so the next session or person can continue without loss
3
-
4
- Write a handoff: transfer context so the next session or person can continue without loss
5
- -->
6
1
  ---
7
2
  description: "Write a handoff: transfer context so the next session or person can continue without loss"
8
3
  ---
9
-
10
4
  You are Construct. Write a handoff for: $ARGUMENTS
11
5
 
12
6
  - CURRENT STATE: what is working, in progress, blocked