@geraldmaron/construct 1.2.1 → 1.2.2
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.
- package/README.md +6 -6
- package/bin/construct +41 -67
- package/commands/plan/decide.md +1 -1
- package/commands/remember/runbook.md +1 -1
- package/examples/README.md +1 -1
- package/examples/distribution/README.md +1 -1
- package/examples/distribution/sources/adr.md +2 -2
- package/examples/distribution/sources/deck-one-pager.md +1 -1
- package/examples/distribution/sources/prd-platform.md +1 -1
- package/examples/distribution/sources/research-brief.md +2 -2
- package/examples/distribution/sources/rfc-platform.md +1 -1
- package/examples/distribution/sources/runbook.md +2 -2
- package/examples/distribution/sources/strategy.md +1 -1
- package/lib/agent-instructions/inject.mjs +1 -1
- package/lib/artifact-type-from-path.mjs +9 -5
- package/lib/audit-specialists.mjs +1 -1
- package/lib/audit-trail.mjs +3 -3
- package/lib/auto-docs.mjs +10 -10
- package/lib/bootstrap/built-ins.mjs +3 -3
- package/lib/boundary.mjs +3 -2
- package/lib/brand-prose.mjs +1 -1
- package/lib/cache-governor.js +4 -4
- package/lib/certification/document-io-fixtures.mjs +1 -1
- package/lib/chat/config.mjs +2 -2
- package/lib/chat/desktop-binary.mjs +5 -3
- package/lib/cli-commands.mjs +3 -3
- package/lib/cli-service-inventory.mjs +1 -1
- package/lib/comment-lint.mjs +9 -5
- package/lib/config/alias.mjs +3 -2
- package/lib/config/intake-policy.mjs +8 -78
- package/lib/config/project-config.mjs +95 -5
- package/lib/config/schema.mjs +9 -19
- package/lib/config/xdg.mjs +63 -0
- package/lib/contracts/violation-log.mjs +2 -2
- package/lib/cost-ledger.mjs +4 -3
- package/lib/cost.mjs +3 -2
- package/lib/decisions/registry.mjs +3 -3
- package/lib/distill.mjs +2 -2
- package/lib/docs-verify.mjs +2 -0
- package/lib/doctor/audit.mjs +4 -3
- package/lib/doctor/cli.mjs +0 -1
- package/lib/doctor/index.mjs +4 -4
- package/lib/doctor/report.mjs +3 -3
- package/lib/doctor/watchers/bd-watch.mjs +5 -5
- package/lib/doctor/watchers/cost.mjs +4 -4
- package/lib/doctor/watchers/disk.mjs +4 -3
- package/lib/doctor/watchers/service-health.mjs +5 -5
- package/lib/document-export.mjs +1 -1
- package/lib/document-extract.mjs +3 -3
- package/lib/document-ingest.mjs +13 -3
- package/lib/efficiency.mjs +2 -1
- package/lib/embed/approval-queue.mjs +3 -2
- package/lib/embed/cli.mjs +7 -5
- package/lib/embed/config.mjs +6 -5
- package/lib/embed/daemon.mjs +6 -5
- package/lib/embed/inbox-live-watcher.mjs +1 -1
- package/lib/embed/inbox.mjs +52 -37
- package/lib/embed/intake-metrics.mjs +3 -2
- package/lib/embed/reconcile.mjs +1 -1
- package/lib/embed/semantic.mjs +3 -2
- package/lib/embed/supervision.mjs +4 -2
- package/lib/engine/registry.mjs +3 -3
- package/lib/env-config.mjs +34 -12
- package/lib/features.mjs +4 -3
- package/lib/health-check.mjs +7 -6
- package/lib/hook-health.mjs +5 -4
- package/lib/hooks/_lib/log.mjs +4 -3
- package/lib/hooks/_lib/output-mode.mjs +2 -1
- package/lib/hooks/agent-tracker.mjs +3 -4
- package/lib/hooks/audit-reads.mjs +2 -2
- package/lib/hooks/audit-trail.mjs +2 -2
- package/lib/hooks/bash-output-logger.mjs +3 -3
- package/lib/hooks/brand-prose-lint.mjs +1 -1
- package/lib/hooks/ci-status-check.mjs +3 -2
- package/lib/hooks/context-watch.mjs +2 -2
- package/lib/hooks/context-window-recovery.mjs +5 -5
- package/lib/hooks/dep-audit.mjs +2 -2
- package/lib/hooks/doc-coupling-check.mjs +3 -2
- package/lib/hooks/edit-accumulator.mjs +3 -2
- package/lib/hooks/edit-guard.mjs +3 -3
- package/lib/hooks/guard-bash.mjs +2 -2
- package/lib/hooks/model-fallback.mjs +2 -1
- package/lib/hooks/policy-engine.mjs +4 -3
- package/lib/hooks/pre-compact.mjs +7 -7
- package/lib/hooks/readme-age-check.mjs +2 -2
- package/lib/hooks/session-optimize.mjs +4 -3
- package/lib/hooks/session-start.mjs +6 -5
- package/lib/hooks/stop-notify.mjs +9 -8
- package/lib/hooks/stop-typecheck.mjs +4 -3
- package/lib/hooks/test-watch.mjs +2 -2
- package/lib/host-disposition.mjs +1 -1
- package/lib/ingest/provider-extract.mjs +2 -1
- package/lib/init/detect-existing-structure.mjs +2 -2
- package/lib/init/doc-lanes.mjs +3 -10
- package/lib/init-docs.mjs +12 -54
- package/lib/init-unified.mjs +35 -81
- package/lib/init.mjs +7 -5
- package/lib/install/desktop-binary-download.mjs +5 -2
- package/lib/intake/daemon.mjs +31 -8
- package/lib/intake/intake-config.mjs +5 -32
- package/lib/integrations/intake-integrations.mjs +8 -7
- package/lib/knowledge/rag.mjs +2 -2
- package/lib/knowledge/search.mjs +15 -15
- package/lib/maintenance/cleanup.mjs +14 -10
- package/lib/mcp/server.mjs +1 -1
- package/lib/mcp/tools/project.mjs +2 -1
- package/lib/model-cheapest-provider.mjs +4 -3
- package/lib/model-pricing.mjs +3 -2
- package/lib/model-router.mjs +4 -3
- package/lib/models/catalog.mjs +2 -1
- package/lib/models/execution-capability-profile.mjs +2 -1
- package/lib/models/provider-poll.mjs +2 -1
- package/lib/ollama-manager.mjs +0 -1
- package/lib/op-log.mjs +2 -1
- package/lib/opencode-runtime-plugin.mjs +3 -2
- package/lib/oracle/artifact-gate.mjs +3 -0
- package/lib/oracle/cli.mjs +2 -1
- package/lib/oracle/execute.mjs +3 -2
- package/lib/oracle/index.mjs +2 -1
- package/lib/oracle/read-model.mjs +3 -2
- package/lib/performance/generate.mjs +4 -3
- package/lib/platforms/capabilities.mjs +1 -1
- package/lib/plugin-registry.mjs +2 -1
- package/lib/profiles/lifecycle.mjs +3 -3
- package/lib/project-profile.mjs +2 -1
- package/lib/project-root.mjs +9 -7
- package/lib/provider-capabilities.js +4 -3
- package/lib/providers/auth-manager.mjs +2 -1
- package/lib/providers/copilot-auth.mjs +3 -2
- package/lib/providers/creds.mjs +3 -2
- package/lib/providers/registry.mjs +3 -3
- package/lib/providers/secret-resolver.mjs +3 -2
- package/lib/read-tracker-store.mjs +2 -1
- package/lib/reconcile/mcp-entry-reconcile.mjs +2 -2
- package/lib/reflect.mjs +2 -1
- package/lib/registry/generate-docs.mjs +2 -2
- package/lib/roles/approval-surface.mjs +5 -4
- package/lib/roles/event-bus.mjs +0 -1
- package/lib/roles/gateway.mjs +6 -2
- package/lib/rules-delivery.mjs +1 -1
- package/lib/runtime-pressure.mjs +5 -3
- package/lib/sandbox.mjs +3 -2
- package/lib/scheduler/solo.mjs +6 -4
- package/lib/server/auth.mjs +4 -3
- package/lib/server/index.mjs +24 -26
- package/lib/server/insights.mjs +5 -4
- package/lib/server/webhook.mjs +2 -1
- package/lib/service-manager.mjs +5 -3
- package/lib/setup.mjs +9 -8
- package/lib/status.mjs +6 -5
- package/lib/storage/embeddings-local.mjs +3 -2
- package/lib/storage/sync.mjs +2 -2
- package/lib/telemetry/client.mjs +0 -1
- package/lib/telemetry/intent-verifications.mjs +6 -6
- package/lib/telemetry/model-pricing-catalog.mjs +4 -3
- package/lib/telemetry/rule-calls.mjs +3 -3
- package/lib/telemetry/skill-calls.mjs +3 -3
- package/lib/template-registry.mjs +1 -0
- package/lib/templates/visual-requirements.mjs +1 -1
- package/lib/test-corpus-inventory.mjs +1 -1
- package/lib/uninstall/uninstall.mjs +12 -10
- package/package.json +3 -3
- package/platforms/claude/settings.template.json +43 -43
- package/rules/common/no-fabrication.md +1 -1
- package/rules/common/release-gates.md +1 -1
- package/rules/common/research.md +1 -1
- package/rules/common/review-before-change.md +1 -1
- package/scripts/sync-specialists.mjs +11 -8
- package/skills/docs/adr-workflow.md +3 -3
- package/skills/docs/init-docs.md +9 -9
- package/skills/docs/prd-workflow.md +5 -5
- package/skills/docs/product-intelligence-review.md +1 -1
- package/skills/docs/product-intelligence-workflow.md +2 -2
- package/skills/docs/product-signal-workflow.md +1 -1
- package/skills/docs/runbook-workflow.md +4 -4
- package/skills/exploration/unknown-codebase-onboarding.md +1 -1
- package/skills/operating/orchestration-reference.md +1 -1
- package/skills/routing.md +3 -3
- package/specialists/prompts/cx-architect.md +1 -1
- package/specialists/prompts/cx-docs-keeper.md +1 -1
- package/specialists/prompts/cx-researcher.md +1 -1
- package/specialists/prompts/cx-sre.md +1 -1
- package/specialists/role-manifests.json +6 -6
- package/templates/docs/README.md +125 -0
- package/templates/docs/construct_guide.md +3 -4
- package/templates/docs/persona-artifact.md +1 -1
- package/templates/docs/prds/README.md +25 -0
- package/templates/docs/prds/templates/_template.md +206 -0
- package/templates/docs/prds/templates/meta-prd.template.md +177 -0
- package/templates/docs/prds/templates/prd-business.template.md +61 -0
- package/templates/docs/prds/templates/prd-platform.template.md +81 -0
- package/templates/docs/prds/templates/prfaq.template.md +38 -0
- package/templates/docs/rfcs/README.md +22 -0
- package/templates/docs/rfcs/templates/_template.md +58 -0
- package/templates/docs/rfcs/templates/rfc-platform.template.md +72 -0
- package/templates/homebrew/construct.rb +1 -1
- package/templates/workflows/new-feature.yml +8 -8
- package/lib/intake/legacy-paths.mjs +0 -5
|
@@ -44,7 +44,7 @@ For artifacts that go through a review cycle (strategy, PRD, ADR, RFC), the fram
|
|
|
44
44
|
- Writing a new rule that paraphrases an existing one.
|
|
45
45
|
- Adding a new template alongside `templates/docs/strategy.md` because the existing one "needed a couple of tweaks."
|
|
46
46
|
- Drafting an ADR for a decision already captured in an existing ADR.
|
|
47
|
-
- Producing a recipe in `docs/cookbook/` for a workflow already documented in `docs/concepts/`.
|
|
47
|
+
- Producing a recipe in `docs/guides/cookbook/` for a workflow already documented in `docs/guides/concepts/`.
|
|
48
48
|
|
|
49
49
|
## Related
|
|
50
50
|
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
getOpenCodeMcpId,
|
|
56
56
|
} from "../lib/mcp-platform-config.mjs";
|
|
57
57
|
import { loadConstructEnv } from "../lib/env-config.mjs";
|
|
58
|
+
import { configDir } from "../lib/config/xdg.mjs";
|
|
58
59
|
import { inlineRoleAntiPatterns, PROMPT_WORD_CAP } from "../lib/role-preload.mjs";
|
|
59
60
|
import { inlineValidationContract } from "../lib/prompt-validation-contract.mjs";
|
|
60
61
|
import { loadManifest } from "../lib/roles/manifest.mjs";
|
|
@@ -852,7 +853,7 @@ ${buildPrompt(entry, allEntries, "claude")}
|
|
|
852
853
|
|
|
853
854
|
/**
|
|
854
855
|
* Rewrite the home-mode hook command pattern
|
|
855
|
-
* node "$HOME/.construct/lib/hooks/<name>.mjs"
|
|
856
|
+
* node "$HOME/.config/construct/lib/hooks/<name>.mjs"
|
|
856
857
|
* into the project-portable form
|
|
857
858
|
* node .construct/run.mjs hook <name>
|
|
858
859
|
* so the resulting settings.json works on any clone where the project ships
|
|
@@ -866,7 +867,7 @@ function makeHooksPortable(hooksJson) {
|
|
|
866
867
|
// Operate on the in-memory object so we don't fight JSON string escaping.
|
|
867
868
|
const replaceCommand = (cmd) => {
|
|
868
869
|
if (typeof cmd !== 'string') return cmd;
|
|
869
|
-
const m = cmd.match(/^node\s+"?\$HOME\/\.construct\/lib\/hooks\/([a-z0-9-]+)\.mjs"?\s*(.*)$/);
|
|
870
|
+
const m = cmd.match(/^node\s+"?\$HOME\/\.config\/construct\/lib\/hooks\/([a-z0-9-]+)\.mjs"?\s*(.*)$/);
|
|
870
871
|
if (!m) return cmd;
|
|
871
872
|
const [, name, rest] = m;
|
|
872
873
|
return `node .construct/run.mjs hook ${name}${rest ? ' ' + rest.trim() : ''}`;
|
|
@@ -1044,13 +1045,15 @@ ${personaList}
|
|
|
1044
1045
|
if (fs.existsSync(templatePath)) {
|
|
1045
1046
|
const template = JSON.parse(fs.readFileSync(templatePath, "utf8"));
|
|
1046
1047
|
if (template.hooks) {
|
|
1047
|
-
// Resolve $HOME/.construct to the real
|
|
1048
|
-
// symlink traversal inside Claude Code's hook
|
|
1049
|
-
|
|
1050
|
-
|
|
1048
|
+
// Resolve the $HOME/.config/construct token to the real config dir so
|
|
1049
|
+
// hook commands survive symlink traversal inside Claude Code's hook
|
|
1050
|
+
// runner environment, and honor a custom XDG_CONFIG_HOME at sync time.
|
|
1051
|
+
const configReal = (() => {
|
|
1052
|
+
const dir = configDir(home);
|
|
1053
|
+
try { return fs.realpathSync(dir); } catch { return dir; }
|
|
1051
1054
|
})();
|
|
1052
1055
|
const hookStr = JSON.stringify(filterGlobalClaudeHooks(template.hooks))
|
|
1053
|
-
.replace(/\$HOME\/\.construct/g,
|
|
1056
|
+
.replace(/\$HOME\/\.config\/construct/g, configReal.replace(/\\/g, "/"));
|
|
1054
1057
|
settings.hooks = JSON.parse(hookStr);
|
|
1055
1058
|
}
|
|
1056
1059
|
}
|
|
@@ -1445,7 +1448,7 @@ function syncCursor(targetDir = null, wants = true) {
|
|
|
1445
1448
|
|
|
1446
1449
|
// Glob-scoped language rules land as managed per-rule .mdc files only when
|
|
1447
1450
|
// the project's own files match their globs — Cursor's native auto-attach
|
|
1448
|
-
// convention. See docs/concepts/rules-delivery.md.
|
|
1451
|
+
// convention. See docs/guides/concepts/rules-delivery.md.
|
|
1449
1452
|
try {
|
|
1450
1453
|
emitCursorRules({ rulesDir: path.join(root, "rules"), targetDir, dryRun: DRY_RUN });
|
|
1451
1454
|
} catch (err) {
|
|
@@ -18,14 +18,14 @@ Use when: an architectural decision is made that affects the system structure, d
|
|
|
18
18
|
## Steps
|
|
19
19
|
|
|
20
20
|
1. **cx-architect** or **cx-engineer** identifies the decision
|
|
21
|
-
2. **Write to `docs/adr/ADR-{NNN}-{slug}.md`** using the template from `get_template("adr")`: resolves `.cx/templates/docs/adr.md` (override) then `templates/docs/adr.md` (shipped)
|
|
21
|
+
2. **Write to `docs/decisions/adr/ADR-{NNN}-{slug}.md`** using the template from `get_template("adr")`: resolves `.cx/templates/docs/adr.md` (override) then `templates/docs/adr.md` (shipped)
|
|
22
22
|
- NNN = next sequential number (check existing files)
|
|
23
23
|
3. **Also write a shorter entry to `.cx/decisions/`** for session context
|
|
24
24
|
4. **cx-docs-keeper** updates `.cx/context.md` Architecture Notes with a one-line summary and link
|
|
25
25
|
|
|
26
26
|
## File naming
|
|
27
|
-
- `docs/adr/ADR-001-use-postgres-over-mysql.md`
|
|
28
|
-
- `docs/adr/ADR-002-jwt-auth-strategy.md`
|
|
27
|
+
- `docs/decisions/adr/ADR-001-use-postgres-over-mysql.md`
|
|
28
|
+
- `docs/decisions/adr/ADR-002-jwt-auth-strategy.md`
|
|
29
29
|
|
|
30
30
|
## Cross-referencing
|
|
31
31
|
- If this ADR supersedes another: update the old ADR's status field
|
package/skills/docs/init-docs.md
CHANGED
|
@@ -54,7 +54,7 @@ When run interactively, `construct init --docs-preset=*` renders a keyboard-driv
|
|
|
54
54
|
- **Enter**: confirm and scaffold
|
|
55
55
|
- Follow-up choices use the same menu pattern instead of free-text answers
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
The single canonical drop zone for ingestable files is `inbox/` at the project root (ADR-0045 §C); `construct init` scaffolds it with a gitignored `inbox/.staging/` for atomic handoff. The `intake` docs lane (`docs/intake/`) is a separate, optional durable paper-trail lane for intake batch records — it is not a watched drop zone.
|
|
58
58
|
|
|
59
59
|
When run non-interactively (`--yes` or piped stdin), the lean default set is used unless `--docs=` is supplied. `--docs=lean|product|full` or `--docs=adrs,prds,rfcs` both work.
|
|
60
60
|
|
|
@@ -64,18 +64,18 @@ When run non-interactively (`--yes` or piped stdin), the lean default set is use
|
|
|
64
64
|
|
|
65
65
|
| Lane | Directory | What goes here |
|
|
66
66
|
|--------------|-----------------|----------------|
|
|
67
|
-
| adrs | `docs/adr/` | Architecture decisions that have already been made |
|
|
67
|
+
| adrs | `docs/decisions/adr/` | Architecture decisions that have already been made |
|
|
68
68
|
| briefs | `docs/briefs/` | Research, evidence, signals, one-pagers, customer profiles |
|
|
69
69
|
| changelogs | `docs/changelogs/` | User-facing release notes and version history entries |
|
|
70
70
|
| intake | `docs/intake/` | Intake batch records that explain what arrived, why it matters, and how it should be ingested |
|
|
71
|
-
| memos | `docs/memos/` | Decision memos and internal arguments for alignment |
|
|
72
|
-
| meetings | `docs/meetings/` | Meeting notes, minutes, standups, retros, agendas, and session summaries |
|
|
71
|
+
| memos | `docs/notes/memos/` | Decision memos and internal arguments for alignment |
|
|
72
|
+
| meetings | `docs/notes/meetings/` | Meeting notes, minutes, standups, retros, agendas, and session summaries |
|
|
73
73
|
| notes | `docs/notes/` | Working notes and lightweight durable context outside formal docs or meetings |
|
|
74
74
|
| onboarding | `docs/onboarding/` | Runnable setup guides and first-day workflows |
|
|
75
75
|
| postmortems | `docs/postmortems/` | Blameless incident reports with root cause and corrective actions |
|
|
76
|
-
| prds | `docs/prds/` | Product and capability requirement documents |
|
|
77
|
-
| rfcs | `docs/rfcs/` | Architecture and implementation proposals needing review |
|
|
78
|
-
| runbooks | `docs/runbooks/` | Operational procedures, diagnostics, escalation paths |
|
|
76
|
+
| prds | `templates/docs/prds/` | Product and capability requirement documents |
|
|
77
|
+
| rfcs | `templates/docs/rfcs/` | Architecture and implementation proposals needing review |
|
|
78
|
+
| runbooks | `docs/operations/runbooks/` | Operational procedures, diagnostics, escalation paths |
|
|
79
79
|
|
|
80
80
|
### Guidance: which lanes to suggest
|
|
81
81
|
|
|
@@ -152,7 +152,7 @@ Last updated: [date]
|
|
|
152
152
|
|
|
153
153
|
## Key decisions
|
|
154
154
|
|
|
155
|
-
Link to `docs/adr/` or the canonical project decision log used in this repo.
|
|
155
|
+
Link to `docs/decisions/adr/` or the canonical project decision log used in this repo.
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
---
|
|
@@ -188,7 +188,7 @@ Stack: [stack]
|
|
|
188
188
|
|
|
189
189
|
After completing the docs init:
|
|
190
190
|
- If the user has architecture questions → `@cx-explorer` or `@cx-docs-keeper` to explore and update `docs/architecture/`
|
|
191
|
-
- If the user wants to document a decision → record it in `docs/adr/` using the ADR template
|
|
191
|
+
- If the user wants to document a decision → record it in `docs/decisions/adr/` using the ADR template
|
|
192
192
|
- If the user wants to add API docs → `@cx-docs-keeper` to generate stubs from code
|
|
193
193
|
- If the user wants to file an incident report → use `docs/postmortems/` with the incident-report template
|
|
194
194
|
- If the user wants to document a release → use `docs/changelogs/` with the changelog-entry template
|
|
@@ -33,12 +33,12 @@ Style constraint: do not produce a wall of bullets. Use paragraphs for reasoning
|
|
|
33
33
|
|
|
34
34
|
| Template | Output path |
|
|
35
35
|
|---|---|
|
|
36
|
-
| `prd` | `docs/prd/{YYYY-MM-DD}-{slug}.md` |
|
|
36
|
+
| `prd` | `docs/specs/prd/{YYYY-MM-DD}-{slug}.md` |
|
|
37
37
|
| `prd-platform` | `docs/prd-platform/{YYYY-MM-DD}-{slug}.md` |
|
|
38
38
|
| `prd-business` | `docs/prd-business/{YYYY-MM-DD}-{slug}.md` |
|
|
39
39
|
| `meta-prd` | `docs/meta-prd/{YYYY-MM-DD}-{slug}.md` |
|
|
40
|
-
| `rfc` | `docs/rfc/{YYYY-MM-DD}-{slug}.md` |
|
|
41
|
-
| `rfc-platform` | `docs/rfc/{YYYY-MM-DD}-{slug}.md` |
|
|
40
|
+
| `rfc` | `docs/decisions/rfc/{YYYY-MM-DD}-{slug}.md` |
|
|
41
|
+
| `rfc-platform` | `docs/decisions/rfc/{YYYY-MM-DD}-{slug}.md` |
|
|
42
42
|
5. **cx-devil-advocate** runs the FMEA challenge pass (`roles/reviewer.devil-advocate`) on the draft; highest-RPN failure modes need a mitigation or explicit accept-with-rationale before ship. Their specialist id must appear in `.cx/agent-log.jsonl` (manifest `releaseGate.requiredReviewers` for PRD-family types).
|
|
43
43
|
6. **cx-docs-keeper** updates `.cx/context.md` with a link to the PRD
|
|
44
44
|
|
|
@@ -47,11 +47,11 @@ Run `construct artifact validate <path> --type=<type>` before marking the artifa
|
|
|
47
47
|
## File naming
|
|
48
48
|
- `docs/{template-type}/{YYYY-MM-DD}-{slug}.md`
|
|
49
49
|
- Examples:
|
|
50
|
-
- `docs/prd/2026-04-search-autocomplete.md`
|
|
50
|
+
- `docs/specs/prd/2026-04-search-autocomplete.md`
|
|
51
51
|
- `docs/prd-platform/2026-04-events-api-v2.md`
|
|
52
52
|
- `docs/prd-business/2026-04-enterprise-tier.md`
|
|
53
53
|
- `docs/meta-prd/2026-04-product-intelligence-workflow.md`
|
|
54
|
-
- `docs/rfc/2026-04-storage-backend-migration.md`
|
|
54
|
+
- `docs/decisions/rfc/2026-04-storage-backend-migration.md`
|
|
55
55
|
|
|
56
56
|
## PRD lifecycle
|
|
57
57
|
- Draft → stakeholder review → approved → link to implementation tasks
|
|
@@ -17,7 +17,7 @@ Score each dimension as pass, warning, or fail:
|
|
|
17
17
|
- Acceptance criteria: observable and pass/fail.
|
|
18
18
|
- Scope discipline: goals, non-goals, and tradeoffs are explicit.
|
|
19
19
|
- Approval safety: external writes and approved status are gated.
|
|
20
|
-
- Storage readiness: artifact path is under `.cx/knowledge/`, `docs/prd/`, or `docs/meta-prd/` so hybrid retrieval can index it.
|
|
20
|
+
- Storage readiness: artifact path is under `.cx/knowledge/`, `docs/specs/prd/`, or `docs/meta-prd/` so hybrid retrieval can index it.
|
|
21
21
|
- Readability: balanced paragraphs, tables, and bullets. Few em dashes.
|
|
22
22
|
|
|
23
23
|
## Output
|
|
@@ -54,9 +54,9 @@ Load the core product-manager role guidance and the selected overlay before draf
|
|
|
54
54
|
|
|
55
55
|
## Storage
|
|
56
56
|
|
|
57
|
-
Write working artifacts under `.cx/knowledge/` unless they are docs of record. Approved PRDs live in `docs/prd/`; approved Meta PRDs live in `docs/meta-prd/`.
|
|
57
|
+
Write working artifacts under `.cx/knowledge/` unless they are docs of record. Approved PRDs live in `docs/specs/prd/`; approved Meta PRDs live in `docs/meta-prd/`.
|
|
58
58
|
|
|
59
|
-
The hybrid storage layer indexes `.cx/knowledge/`, `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.
|
|
59
|
+
The hybrid storage layer indexes `.cx/knowledge/`, `docs/specs/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.
|
|
60
60
|
|
|
61
61
|
## Approval boundaries
|
|
62
62
|
|
|
@@ -57,7 +57,7 @@ After grouping evidence, check `.cx/knowledge/decisions/strategy/` for any decla
|
|
|
57
57
|
|---|---|
|
|
58
58
|
| Signal brief | `.cx/knowledge/internal/signals/` |
|
|
59
59
|
| Evidence brief | `.cx/knowledge/internal/evidence-briefs/` |
|
|
60
|
-
| PRD | `docs/prd/` |
|
|
60
|
+
| PRD | `docs/specs/prd/` |
|
|
61
61
|
| PRFAQ | `docs/prfaq/` |
|
|
62
62
|
| Meta PRD | `docs/meta-prd/` |
|
|
63
63
|
| Backlog proposal | pending approval gate: do not file until explicit user approval |
|
|
@@ -12,14 +12,14 @@ Use when: creating operational procedures for services, alerts, or recurring ope
|
|
|
12
12
|
## Steps
|
|
13
13
|
|
|
14
14
|
1. **cx-sre** or **cx-release-manager** identifies the need
|
|
15
|
-
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)
|
|
15
|
+
2. **Write to `docs/operations/runbooks/{service}-{operation}.md`** using the template from `get_template("runbook")`: resolves `.cx/templates/docs/runbook.md` (override) then `templates/docs/runbook.md` (shipped)
|
|
16
16
|
3. **Link from the relevant alert** or monitoring dashboard
|
|
17
17
|
4. **cx-docs-keeper** adds to `.cx/context.md` if it's a critical path runbook
|
|
18
18
|
|
|
19
19
|
## File naming
|
|
20
|
-
- `docs/runbooks/telemetry-restart.md`
|
|
21
|
-
- `docs/runbooks/db-migration.md`
|
|
22
|
-
- `docs/runbooks/incident-response.md`
|
|
20
|
+
- `docs/operations/runbooks/telemetry-restart.md`
|
|
21
|
+
- `docs/operations/runbooks/db-migration.md`
|
|
22
|
+
- `docs/operations/runbooks/incident-response.md`
|
|
23
23
|
|
|
24
24
|
## Review cadence
|
|
25
25
|
- Runbooks should be tested (table-top or live) at least quarterly
|
|
@@ -71,7 +71,7 @@ grep -r 'process\.env\.\|os\.environ\|getenv' --include='*.js' --include='*.py'
|
|
|
71
71
|
- Leaf nodes are safe to modify; hub changes have blast radius.
|
|
72
72
|
|
|
73
73
|
**Read the ADRs and postmortems:**
|
|
74
|
-
- Architecture decisions (`docs/adr/`, `decisions/`, `DECISIONS.md`) explain why the code is shaped the way it is.
|
|
74
|
+
- Architecture decisions (`docs/decisions/adr/`, `decisions/`, `DECISIONS.md`) explain why the code is shaped the way it is.
|
|
75
75
|
- Postmortems explain what has already broken and how the system defends against it. Don't break a defense you don't understand.
|
|
76
76
|
|
|
77
77
|
**Find the test coverage gaps:**
|
|
@@ -17,7 +17,7 @@ Construct is the underlying orchestration system for the **current project**. Tr
|
|
|
17
17
|
The two task-shaped surfaces are siblings, not duplicates:
|
|
18
18
|
|
|
19
19
|
- **`.cx/workflow.json`**: single project-wide workflow file. Holds the cross-cutting task ledger and intent / category metadata. Drives `workflow_status` and `project_context` MCP tools.
|
|
20
|
-
- **`.cx/task-graphs/<id>.json`**: per-incoming-signal plan generated by `construct graph from-intake <intake-id>`. One graph per triaged inbox file, one node per persona in the recommendedChain, evidence records gating `done`. See [Concepts → Intake and triage](/concepts/intake-and-triage).
|
|
20
|
+
- **`.cx/task-graphs/<id>.json`**: per-incoming-signal plan generated by `construct graph from-intake <intake-id>`. One graph per triaged inbox file, one node per persona in the recommendedChain, evidence records gating `done`. See [Concepts → Intake and triage](/guides/concepts/intake-and-triage).
|
|
21
21
|
|
|
22
22
|
A signal that becomes durable cross-session work crosses over: the graph nodes are executed, the resulting work is tracked in `.cx/workflow.json` and in beads. The intake queue and task graphs are how new signals enter the loop; the workflow ledger and beads are how durable work is carried.
|
|
23
23
|
|
package/skills/routing.md
CHANGED
|
@@ -126,11 +126,11 @@ Read the matching skill file before responding when the user's request matches t
|
|
|
126
126
|
| product intelligence, customer notes, field notes, product signals, customer profile, evidence brief, signal brief, backlog proposal | `skills/docs/product-intelligence-workflow.md` | Product Intelligence workflow: evidence to product artifacts |
|
|
127
127
|
| strategy, product strategy, strategic bet, non-bet, north star, time horizon, competitive positioning | `skills/docs/strategy-workflow.md` | Product strategy: read, update, and reason about the strategy store |
|
|
128
128
|
| ingest evidence, ingest customer notes, ingest Slack thread, ingest support ticket, normalize field notes | `skills/docs/evidence-ingest-workflow.md` | Evidence ingest workflow: raw source to .cx/knowledge/ |
|
|
129
|
-
| write a PRD, create requirements, spec out, requirements document, Meta PRD, platform PRD | `skills/docs/prd-workflow.md` | PRD workflow: requirements to docs/prd/ or docs/meta-prd/ |
|
|
129
|
+
| write a PRD, create requirements, spec out, requirements document, Meta PRD, platform PRD | `skills/docs/prd-workflow.md` | PRD workflow: requirements to docs/specs/prd/ or docs/meta-prd/ |
|
|
130
130
|
| write a PRFAQ, working backwards doc, press release FAQ | `skills/docs/prfaq-workflow.md` | PRFAQ workflow: launch narrative from PRD or evidence |
|
|
131
131
|
| create Jira proposal, update Linear, backlog proposal, issue proposal | `skills/docs/backlog-proposal-workflow.md` | Backlog proposal workflow: approval-gated issue tracker changes |
|
|
132
|
-
| record this decision, create an ADR, architecture decision | `skills/docs/adr-workflow.md` | ADR workflow: decision to docs/adr/ file |
|
|
133
|
-
| write a runbook, document this operation, operational procedure | `skills/docs/runbook-workflow.md` | Runbook workflow: operation to docs/runbooks/ file |
|
|
132
|
+
| record this decision, create an ADR, architecture decision | `skills/docs/adr-workflow.md` | ADR workflow: decision to docs/decisions/adr/ file |
|
|
133
|
+
| write a runbook, document this operation, operational procedure | `skills/docs/runbook-workflow.md` | Runbook workflow: operation to docs/operations/runbooks/ file |
|
|
134
134
|
| init project, new project setup, join project, set up doc structure | `skills/docs/init-project.md` | Project initialization via `construct init --docs-preset=*` |
|
|
135
135
|
|
|
136
136
|
## Routing Rules
|
|
@@ -61,7 +61,7 @@ DATA MODELS: schema with types, constraints, relationships, and migration plan
|
|
|
61
61
|
DEPENDENCY GRAPH: modules and their directions; flag cycles
|
|
62
62
|
TEST IMPACTS: what needs unit, integration, or E2E coverage
|
|
63
63
|
|
|
64
|
-
Decision persistence: ask cx-docs-keeper to create or update `docs/adr/ADR-{NNN}-{slug}.md` and `.cx/decisions/{date}-{slug}.md`. If workspace writes aren't available, include the full DECISION rationale inline for docs-keeper to persist.
|
|
64
|
+
Decision persistence: ask cx-docs-keeper to create or update `docs/decisions/adr/ADR-{NNN}-{slug}.md` and `.cx/decisions/{date}-{slug}.md`. If workspace writes aren't available, include the full DECISION rationale inline for docs-keeper to persist.
|
|
65
65
|
|
|
66
66
|
When producing an implementation plan, use the canonical task format:
|
|
67
67
|
`### T{N}: {title}` sections with **Owner**, **Phase**, **Files**, **Depends on**, **Read first**, **Do not change**, and **Acceptance criteria** fields. This keeps `plan.md` and tracker-linked task slices explicit and preserves the single-writer boundary for each file.
|
|
@@ -72,7 +72,7 @@ Memory write-back: after updating docs, call `create_entities` or `add_observati
|
|
|
72
72
|
|
|
73
73
|
Maintenance: keep `.cx/context.md` under 100 lines. Summarize and archive older entries. Check for documentation drift before work is declared complete.
|
|
74
74
|
|
|
75
|
-
Doc structure: skills at skills/docs/ define the workflow for each doc type. Product Intelligence working artifacts live under .cx/knowledge/. Research: .cx/research/{slug}.md. ADRs: docs/adr/ADR-{NNN}-{slug}.md. PRDs: docs/prd/{date}-{slug}.md. Meta PRDs: docs/meta-prd/{date}-{slug}.md. Runbooks: docs/runbooks/{service}-{operation}.md. Always use the matching template as the starting structure.
|
|
75
|
+
Doc structure: skills at skills/docs/ define the workflow for each doc type. Product Intelligence working artifacts live under .cx/knowledge/. Research: .cx/research/{slug}.md. ADRs: docs/decisions/adr/ADR-{NNN}-{slug}.md. PRDs: docs/specs/prd/{date}-{slug}.md. Meta PRDs: docs/meta-prd/{date}-{slug}.md. Runbooks: docs/operations/runbooks/{service}-{operation}.md. Always use the matching template as the starting structure.
|
|
76
76
|
|
|
77
77
|
## Document Quality Loop (Evaluator-Optimizer)
|
|
78
78
|
|
|
@@ -68,7 +68,7 @@ When querying search engines or paper indexes, always filter or sort by date: ne
|
|
|
68
68
|
|
|
69
69
|
### Step 4: Check internal evidence
|
|
70
70
|
|
|
71
|
-
Before going external, search: `.cx/research/`, `.cx/knowledge/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts. If a prior research brief exists for the topic, cite and extend it rather than redoing the search from scratch.
|
|
71
|
+
Before going external, search: `.cx/research/`, `.cx/knowledge/`, `docs/specs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts. If a prior research brief exists for the topic, cite and extend it rather than redoing the search from scratch.
|
|
72
72
|
|
|
73
73
|
### Step 5: Verify every URL
|
|
74
74
|
|
|
@@ -100,7 +100,7 @@ Every alert MUST include:
|
|
|
100
100
|
Alert: service_error_rate
|
|
101
101
|
Trigger: error_rate > 1% for 5m
|
|
102
102
|
Severity: critical
|
|
103
|
-
Runbook: docs/runbooks/service-error-rate.md
|
|
103
|
+
Runbook: docs/operations/runbooks/service-error-rate.md
|
|
104
104
|
Immediate Action: Check error logs, verify dependencies
|
|
105
105
|
Escalation: On-call SRE → Service owner → Incident commander
|
|
106
106
|
Rollback: If deployment-related, revert to last known good
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"events": ["push_gate.fail", "service.down", "mcp.unhealthy.persistent", "edit_loop.stuck"],
|
|
7
7
|
"severityImmediate": ["service.down"],
|
|
8
8
|
"fence": {
|
|
9
|
-
"allowedPaths": ["docs/runbooks/**", "docs/incidents/**", "docs/postmortems/**"],
|
|
9
|
+
"allowedPaths": ["docs/operations/runbooks/**", "docs/runbooks/**", "docs/operations/incidents/**", "docs/incidents/**", "docs/postmortems/**"],
|
|
10
10
|
"allowedBdLabels": ["incident", "sre", "reliability"],
|
|
11
11
|
"allowedCommands": ["bd create", "bd note", "bd update", "bd link", "bd label"],
|
|
12
12
|
"approvalRequired": ["commit", "push", "edit:lib/**", "edit:bin/**", "edit:specialists/**"]
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"events": ["handoff.received", "adr.requested", "arch.boundary.violated"],
|
|
87
87
|
"severityImmediate": [],
|
|
88
88
|
"fence": {
|
|
89
|
-
"allowedPaths": ["docs/adr/**", "docs/rfc/**", "docs/concepts/architecture.md", "docs/system-design/**"],
|
|
89
|
+
"allowedPaths": ["docs/decisions/adr/**", "docs/adr/**", "docs/decisions/rfc/**", "docs/rfc/**", "docs/guides/concepts/architecture.md", "docs/concepts/architecture.md", "docs/system-design/**"],
|
|
90
90
|
"allowedBdLabels": ["architecture", "adr", "rfc", "design"],
|
|
91
91
|
"allowedCommands": ["bd create", "bd note", "bd update", "bd label"],
|
|
92
92
|
"approvalRequired": ["commit", "push", "edit:lib/**", "edit:bin/**", "edit:specialists/**"]
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"events": ["handoff.received", "release.candidate", "version.bump.needed"],
|
|
113
113
|
"severityImmediate": [],
|
|
114
114
|
"fence": {
|
|
115
|
-
"allowedPaths": ["docs/releases/**", "CHANGELOG.md"],
|
|
115
|
+
"allowedPaths": ["docs/operations/releases/**", "docs/releases/**", "CHANGELOG.md"],
|
|
116
116
|
"allowedBdLabels": ["release", "version", "shipping"],
|
|
117
117
|
"allowedCommands": ["bd create", "bd note", "bd update", "bd label"],
|
|
118
118
|
"approvalRequired": ["commit", "push", "edit:package.json", "edit:lib/**", "edit:bin/**"]
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"events": ["handoff.received", "backlog.stale", "prd.requested"],
|
|
126
126
|
"severityImmediate": [],
|
|
127
127
|
"fence": {
|
|
128
|
-
"allowedPaths": ["docs/prd/**", "docs/meta-prd/**", "docs/prfaq/**", "docs/one-pager/**", ".cx/knowledge/**"],
|
|
128
|
+
"allowedPaths": ["docs/specs/prd/**", "docs/prd/**", "docs/meta-prd/**", "docs/prfaq/**", "docs/one-pager/**", ".cx/knowledge/**"],
|
|
129
129
|
"allowedBdLabels": ["product", "prd", "backlog", "feature"],
|
|
130
130
|
"allowedCommands": ["bd create", "bd note", "bd update", "bd label", "bd priority"],
|
|
131
131
|
"approvalRequired": ["commit", "push", "edit:lib/**", "edit:bin/**"]
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"events": ["handoff.received", "research.requested", "evidence.requested"],
|
|
198
198
|
"severityImmediate": [],
|
|
199
199
|
"fence": {
|
|
200
|
-
"allowedPaths": ["docs/research/**", ".cx/research/**", "docs/evidence-briefs/**", "docs/signal-briefs/**"],
|
|
200
|
+
"allowedPaths": ["docs/notes/research/**", "docs/research/**", ".cx/research/**", "docs/evidence-briefs/**", "docs/signal-briefs/**"],
|
|
201
201
|
"allowedBdLabels": ["research", "evidence", "investigation"],
|
|
202
202
|
"allowedCommands": ["bd create", "bd note", "bd update", "bd label"],
|
|
203
203
|
"approvalRequired": ["commit", "push", "edit:lib/**", "edit:bin/**"]
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"explorer": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/explorations/**", ".cx/explorations/**"], "allowedBdLabels": ["exploration", "spike"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["exploration"], "docTypes": ["memo"] }, "handoffCandidates": ["engineer", "architect", "researcher"], "killSwitchEnv": "CONSTRUCT_ROLE_EXPLORER" },
|
|
211
211
|
"operations": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/ops/**", "docs/operations/**"], "allowedBdLabels": ["ops", "operations"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["ops"], "docTypes": ["memo", "runbook"] }, "handoffCandidates": ["sre", "platform-engineer", "release-manager"], "killSwitchEnv": "CONSTRUCT_ROLE_OPERATIONS" },
|
|
212
212
|
"orchestrator": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/**", "plan.md", ".cx/context.md"], "allowedBdLabels": ["orchestration", "workflow", "dispatch"], "allowedCommands": ["bd create", "bd note", "bd update", "bd label", "bd link"], "approvalRequired": ["commit", "push", "edit:lib/**", "edit:bin/**", "edit:specialists/**"] }, "outputs": { "bdLabels": ["orchestration", "dispatch"], "docTypes": ["memo"] }, "handoffCandidates": ["product-manager", "architect", "engineer", "security", "qa", "sre"], "killSwitchEnv": "CONSTRUCT_ROLE_ORCHESTRATOR" },
|
|
213
|
-
"rd-lead": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/research/**", "docs/experiments/**", ".cx/experiments/**"], "allowedBdLabels": ["rd", "research", "experiment"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["rd"], "docTypes": ["memo", "research-brief"] }, "handoffCandidates": ["researcher", "architect", "ai-engineer"], "killSwitchEnv": "CONSTRUCT_ROLE_RD_LEAD" },
|
|
213
|
+
"rd-lead": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/notes/research/**", "docs/research/**", "docs/experiments/**", ".cx/experiments/**"], "allowedBdLabels": ["rd", "research", "experiment"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["rd"], "docTypes": ["memo", "research-brief"] }, "handoffCandidates": ["researcher", "architect", "ai-engineer"], "killSwitchEnv": "CONSTRUCT_ROLE_RD_LEAD" },
|
|
214
214
|
"legal-compliance": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/legal/**", "docs/compliance/**", "docs/security/**", ".cx/knowledge/**"], "allowedBdLabels": ["legal", "compliance", "privacy"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["legal", "compliance"], "docTypes": ["memo"] }, "handoffCandidates": ["security", "product-manager"], "killSwitchEnv": "CONSTRUCT_ROLE_LEGAL_COMPLIANCE" },
|
|
215
215
|
"devil-advocate": { "events": ["handoff.received"], "severityImmediate": [], "fence": { "allowedPaths": ["docs/critiques/**"], "allowedBdLabels": ["critique", "devil-advocate"], "allowedCommands": ["bd create", "bd note", "bd update"], "approvalRequired": ["commit", "push", "edit:**"] }, "outputs": { "bdLabels": ["critique"], "docTypes": ["memo"] }, "handoffCandidates": ["architect", "product-manager", "engineer"], "killSwitchEnv": "CONSTRUCT_ROLE_DEVIL_ADVOCATE" }
|
|
216
216
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Doc Templates & Role Anti-Patterns
|
|
2
|
+
|
|
3
|
+
See `../prompt-surfaces.md` for the canonical public-vs-internal prompt surface model. This document covers only templates and internal role overlays.
|
|
4
|
+
|
|
5
|
+
Construct specialists produce standard documents (PRDs, ADRs, runbooks, memos, etc.) from shared templates, and they self-check against shared role anti-patterns. Both can be overridden per-project.
|
|
6
|
+
|
|
7
|
+
## Templates
|
|
8
|
+
|
|
9
|
+
Shipped templates live in [`templates/docs/`](../../templates/docs/):
|
|
10
|
+
|
|
11
|
+
| Layer | Path | Purpose |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Specialist source | `templates/docs/{name}.md` | Canonical shape for `get_template()` MCP |
|
|
14
|
+
| Init lane starters | `docs/{lane}/templates/` | Copied into downstream projects by `construct init --docs-preset=*` |
|
|
15
|
+
| Project override | `.cx/templates/docs/{name}.md` | Per-project template override at fetch time |
|
|
16
|
+
|
|
17
|
+
Do not duplicate starters at `docs/{lane}/_template.md` — lane READMEs link only to `./templates/`.
|
|
18
|
+
|
|
19
|
+
| Template | Produced by | Purpose |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `prd.md` | cx-product-manager | Product requirements doc |
|
|
22
|
+
| `meta-prd.md` | cx-product-manager, cx-docs-keeper | Requirements for product operating systems, agent workflows, document standards, and evaluation loops |
|
|
23
|
+
| `prfaq.md` | cx-product-manager, cx-business-strategist | Working-backwards press release and FAQ |
|
|
24
|
+
| `evidence-brief.md` | cx-product-manager, cx-ux-researcher, cx-researcher | Product evidence synthesis before decisions |
|
|
25
|
+
| `signal-brief.md` | cx-product-manager, cx-researcher | Weak or emerging product signal preservation |
|
|
26
|
+
| `customer-profile.md` | cx-product-manager, cx-docs-keeper | Durable customer/account product memory |
|
|
27
|
+
| `product-intelligence-report.md` | cx-product-manager, cx-business-strategist | Cross-source product intelligence synthesis |
|
|
28
|
+
| `backlog-proposal.md` | cx-product-manager | Approval-gated external tracker proposal |
|
|
29
|
+
| `memo.md` | cx-business-strategist | Strategy memo (~1 page) |
|
|
30
|
+
| `one-pager.md` | cx-product-manager, cx-business-strategist | Executive one-pager |
|
|
31
|
+
| `adr.md` | cx-architect, cx-rd-lead | Architecture decision record |
|
|
32
|
+
| `research-brief.md` | cx-researcher, cx-ux-researcher, cx-explorer | Research findings |
|
|
33
|
+
| `runbook.md` | cx-sre, cx-operations | Operational runbook |
|
|
34
|
+
| `incident-report.md` | cx-sre, cx-operations, cx-release-manager | Post-mortem |
|
|
35
|
+
|
|
36
|
+
### How specialists use them
|
|
37
|
+
|
|
38
|
+
Each specialist prompt points to the template via an MCP call:
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
**Template**: call `get_template("prd")` when drafting a product PRD, or `get_template("meta-prd")` when drafting a Meta PRD, ...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The `get_template(name)` MCP tool (see [`lib/mcp/server.mjs`](../../lib/mcp/server.mjs)) resolves:
|
|
45
|
+
|
|
46
|
+
1. `.cx/templates/docs/{name}.md`: **project override** (preferred if present)
|
|
47
|
+
2. `templates/docs/{name}.md`: **shipped default** (fallback)
|
|
48
|
+
|
|
49
|
+
Use `list_templates` to see both shipped and overridden names.
|
|
50
|
+
|
|
51
|
+
### Overriding a template
|
|
52
|
+
|
|
53
|
+
Drop a file at `.cx/templates/docs/{name}.md` inside your project. That's it: next time a specialist drafts that doc type, they'll pick up your version. No sync, no restart.
|
|
54
|
+
|
|
55
|
+
Example: reshape the PRD to lead with success metrics:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
mkdir -p .cx/templates/docs
|
|
59
|
+
cp templates/docs/prd.md .cx/templates/docs/prd.md
|
|
60
|
+
# edit .cx/templates/docs/prd.md to your shape
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Ask Construct for a PRD; it'll follow the new shape.
|
|
64
|
+
|
|
65
|
+
## Role Anti-Patterns
|
|
66
|
+
|
|
67
|
+
Each specialist is cognitively rooted in a **role** (product-manager, engineer, architect, etc.) with a core set of failure modes to avoid. Flavored specialists extend the core with an overlay.
|
|
68
|
+
|
|
69
|
+
Core roles live in [`skills/roles/`](../../skills/roles/):
|
|
70
|
+
|
|
71
|
+
| Core role | Flavors | Applied to |
|
|
72
|
+
|---|---|---|
|
|
73
|
+
| `engineer` | `engineer.ai`, `engineer.data`, `engineer.platform` | cx-engineer, cx-ai-engineer, cx-data-engineer, cx-platform-engineer |
|
|
74
|
+
| `reviewer` | `reviewer.devil-advocate`, `reviewer.evaluator`, `reviewer.trace` | cx-reviewer, cx-devil-advocate, cx-evaluator, cx-trace-reviewer |
|
|
75
|
+
| `researcher` | `researcher.ux`, `researcher.explorer` | cx-researcher, cx-ux-researcher, cx-explorer |
|
|
76
|
+
| `operator` | `operator.sre`, `operator.release`, `operator.docs` | cx-sre, cx-release-manager, cx-operations, cx-docs-keeper |
|
|
77
|
+
| `product-manager` | `product-manager.product`, `product-manager.platform`, `product-manager.enterprise`, `product-manager.ai-product`, `product-manager.growth`, `product-manager.business-strategy` | cx-product-manager, cx-business-strategist |
|
|
78
|
+
| `designer` | `designer.accessibility` | cx-designer, cx-accessibility |
|
|
79
|
+
| `security` | `security.legal-compliance` | cx-security, cx-legal-compliance |
|
|
80
|
+
| `qa` | `qa.test-automation` | cx-qa, cx-test-automation |
|
|
81
|
+
| `architect` |: | cx-architect, cx-rd-lead |
|
|
82
|
+
| `debugger` |: | cx-debugger |
|
|
83
|
+
| `data-analyst` |: | cx-data-analyst |
|
|
84
|
+
| `orchestrator` |: | cx-orchestrator |
|
|
85
|
+
|
|
86
|
+
### How they're loaded
|
|
87
|
+
|
|
88
|
+
Unlike templates, role anti-patterns are **inlined at sync time** (not fetched at runtime). The specialist source prompt carries a marker:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
**Anti-patterns**: call `get_skill("roles/engineer.ai")` before drafting.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`construct sync` (via [`lib/role-preload.mjs`](../../lib/role-preload.mjs)) replaces that line with the full core role body + flavor overlay under `## Role anti-patterns`. The content is always present in the final platform prompt: no runtime dependency, no chance for the model to skip the pre-work.
|
|
95
|
+
|
|
96
|
+
### Editing or adding roles
|
|
97
|
+
|
|
98
|
+
- **Edit a role**: change the file under `skills/roles/`, then run `construct sync` to propagate to all platforms.
|
|
99
|
+
- **Add a flavor**: create `skills/roles/{core}.{flavor}.md` with YAML frontmatter:
|
|
100
|
+
```yaml
|
|
101
|
+
---
|
|
102
|
+
role: {core}.{flavor}
|
|
103
|
+
applies_to: [cx-...]
|
|
104
|
+
inherits: {core}
|
|
105
|
+
version: 1
|
|
106
|
+
---
|
|
107
|
+
```
|
|
108
|
+
Update the corresponding `cx-*.md` source prompt to reference the new flavor name, then `construct sync`.
|
|
109
|
+
- **No project-level override for roles** today: roles are platform-wide and curated. If you need per-project role overrides, open a request.
|
|
110
|
+
|
|
111
|
+
## Verification
|
|
112
|
+
|
|
113
|
+
After editing either surface, run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm test # tests/agent-prompts.test.mjs covers both
|
|
117
|
+
node scripts/sync-agents.mjs # regenerate platform adapters
|
|
118
|
+
construct doctor # health check
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Spot-check propagation:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
grep -l "## Role anti-patterns" ~/.claude/agents/cx-*.md
|
|
125
|
+
```
|
|
@@ -33,11 +33,10 @@ Generated tooling (`.construct/`, `.claude/`, `.cx/`, `plan.md`) is gitignored;
|
|
|
33
33
|
|
|
34
34
|
## Where to drop information you want Construct to use
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Two intake paths, ordered by formality:
|
|
37
37
|
|
|
38
|
-
1.
|
|
39
|
-
2. **`
|
|
40
|
-
3. **`AGENTS.md`**: for rules and conventions you want the agent to follow every time. "We prefer functional components. Don't introduce new dependencies without flagging." Read at session start.
|
|
38
|
+
1. **`inbox/`** — the single canonical drop zone. Drop a file here (URL, screenshot, paste, anything). The embed daemon watches the directory; when a file lands, it ingests it into the local knowledge base within a second or two and writes a triage packet to `.cx/intake/pending/` describing the new content, its classification (intake type, stage, owner persona, recommended chain), its suggested docs lane, and existing docs that overlap. The agent surfaces pending items at the next session start and you can ask it to process them. For large or slowly-written files, stage under `inbox/.staging/` and rename in so the watcher never sees a half-written file.
|
|
39
|
+
2. **`AGENTS.md`**: for rules and conventions you want the agent to follow every time. "We prefer functional components. Don't introduce new dependencies without flagging." Read at session start.
|
|
41
40
|
|
|
42
41
|
For URLs or quick notes, the easiest path is to drop a file into `~/Downloads` and run:
|
|
43
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# <Role display name>
|
|
2
2
|
|
|
3
|
-
> Anchor doc for the <role-id> persona. Methodology: `docs/concepts/persona-research.md`. This file is generated by `construct profile create` and is part of the discover + frame phases. The persona is not promotable until every section below is filled from evidence, not opinion.
|
|
3
|
+
> Anchor doc for the <role-id> persona. Methodology: `docs/guides/concepts/persona-research.md`. This file is generated by `construct profile create` and is part of the discover + frame phases. The persona is not promotable until every section below is filled from evidence, not opinion.
|
|
4
4
|
|
|
5
5
|
## Goals
|
|
6
6
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
cx_doc_id: 019ddb68-5aeb-7c30-9c7e-0d994ab6c06b
|
|
3
|
+
created_at: "2026-04-29T22:42:22.571Z"
|
|
4
|
+
updated_at: "2026-04-29T22:42:22.572Z"
|
|
5
|
+
generator: construct/init-docs
|
|
6
|
+
body_hash: "sha256:64607fda2fa55def5dd8af0e31f88cf190f68841da0223b45f0d36db83221669"
|
|
7
|
+
---
|
|
8
|
+
<!--
|
|
9
|
+
templates/docs/prds/README.md: lane guide for PRDs.
|
|
10
|
+
|
|
11
|
+
Generated from the Construct documentation lane templates. Keep this lane focused on one document
|
|
12
|
+
family. If it no longer has a distinct purpose, prune it or merge it elsewhere.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# PRDs
|
|
16
|
+
|
|
17
|
+
Product and capability requirement documents.
|
|
18
|
+
|
|
19
|
+
## Starter templates
|
|
20
|
+
|
|
21
|
+
- [_template.md](./templates/_template.md)
|
|
22
|
+
- [meta-prd.template.md](./templates/meta-prd.template.md)
|
|
23
|
+
- [prd-business.template.md](./templates/prd-business.template.md)
|
|
24
|
+
- [prd-platform.template.md](./templates/prd-platform.template.md)
|
|
25
|
+
- [prfaq.template.md](./templates/prfaq.template.md)
|