@geraldmaron/construct 1.2.0 → 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.
Files changed (214) hide show
  1. package/README.md +8 -7
  2. package/bin/construct +206 -62
  3. package/commands/plan/decide.md +1 -1
  4. package/commands/remember/runbook.md +1 -1
  5. package/examples/README.md +1 -1
  6. package/examples/distribution/README.md +1 -1
  7. package/examples/distribution/sources/adr.md +2 -2
  8. package/examples/distribution/sources/deck-one-pager.md +1 -1
  9. package/examples/distribution/sources/prd-platform.md +1 -1
  10. package/examples/distribution/sources/research-brief.md +2 -2
  11. package/examples/distribution/sources/rfc-platform.md +1 -1
  12. package/examples/distribution/sources/runbook.md +2 -2
  13. package/examples/distribution/sources/strategy.md +1 -1
  14. package/lib/agent-instructions/inject.mjs +1 -1
  15. package/lib/artifact-manifest.mjs +150 -4
  16. package/lib/artifact-type-from-path.mjs +9 -5
  17. package/lib/artifact-workflow.mjs +252 -0
  18. package/lib/audit-specialists.mjs +1 -1
  19. package/lib/audit-trail.mjs +3 -3
  20. package/lib/auto-docs.mjs +13 -11
  21. package/lib/bootstrap/built-ins.mjs +3 -3
  22. package/lib/boundary.mjs +3 -2
  23. package/lib/brand-prose.mjs +1 -1
  24. package/lib/cache-governor.js +4 -4
  25. package/lib/certification/document-io-fixtures.mjs +1 -1
  26. package/lib/chat/config.mjs +2 -2
  27. package/lib/chat/desktop-binary.mjs +5 -3
  28. package/lib/chat/present.mjs +1 -0
  29. package/lib/cli-commands.mjs +23 -6
  30. package/lib/cli-service-inventory.mjs +42 -0
  31. package/lib/comment-lint.mjs +9 -5
  32. package/lib/config/alias.mjs +3 -2
  33. package/lib/config/intake-policy.mjs +139 -0
  34. package/lib/config/project-config.mjs +106 -7
  35. package/lib/config/schema.mjs +45 -6
  36. package/lib/config/source-targets.mjs +311 -0
  37. package/lib/config/xdg.mjs +63 -0
  38. package/lib/contracts/violation-log.mjs +2 -2
  39. package/lib/cost-ledger.mjs +4 -3
  40. package/lib/cost.mjs +3 -2
  41. package/lib/decisions/registry.mjs +3 -3
  42. package/lib/distill.mjs +2 -2
  43. package/lib/docs-verify.mjs +2 -0
  44. package/lib/doctor/audit.mjs +4 -3
  45. package/lib/doctor/cli.mjs +0 -1
  46. package/lib/doctor/index.mjs +4 -4
  47. package/lib/doctor/report.mjs +3 -3
  48. package/lib/doctor/source-checkout.mjs +16 -0
  49. package/lib/doctor/watchers/bd-watch.mjs +5 -5
  50. package/lib/doctor/watchers/cost.mjs +4 -4
  51. package/lib/doctor/watchers/disk.mjs +4 -3
  52. package/lib/doctor/watchers/service-health.mjs +5 -5
  53. package/lib/document-export.mjs +39 -17
  54. package/lib/document-extract.mjs +3 -3
  55. package/lib/document-ingest.mjs +13 -3
  56. package/lib/efficiency.mjs +2 -1
  57. package/lib/embed/approval-queue.mjs +3 -2
  58. package/lib/embed/auto-sources.mjs +44 -0
  59. package/lib/embed/cli.mjs +9 -6
  60. package/lib/embed/config.mjs +6 -5
  61. package/lib/embed/daemon.mjs +6 -5
  62. package/lib/embed/demand-fetch.mjs +50 -19
  63. package/lib/embed/inbox-live-watcher.mjs +1 -1
  64. package/lib/embed/inbox.mjs +52 -41
  65. package/lib/embed/intake-metrics.mjs +3 -2
  66. package/lib/embed/reconcile.mjs +1 -1
  67. package/lib/embed/semantic.mjs +3 -2
  68. package/lib/embed/supervision.mjs +4 -2
  69. package/lib/embed/worker.mjs +2 -1
  70. package/lib/embedded-contract/index.mjs +11 -0
  71. package/lib/engine/registry.mjs +3 -3
  72. package/lib/env-config.mjs +34 -12
  73. package/lib/export-branding.mjs +32 -0
  74. package/lib/features.mjs +4 -3
  75. package/lib/health-check.mjs +7 -6
  76. package/lib/hook-health.mjs +5 -4
  77. package/lib/hooks/_lib/log.mjs +4 -3
  78. package/lib/hooks/_lib/output-mode.mjs +2 -1
  79. package/lib/hooks/agent-tracker.mjs +3 -4
  80. package/lib/hooks/audit-reads.mjs +2 -2
  81. package/lib/hooks/audit-trail.mjs +2 -2
  82. package/lib/hooks/bash-output-logger.mjs +3 -3
  83. package/lib/hooks/brand-prose-lint.mjs +1 -1
  84. package/lib/hooks/ci-status-check.mjs +3 -2
  85. package/lib/hooks/context-watch.mjs +2 -2
  86. package/lib/hooks/context-window-recovery.mjs +5 -5
  87. package/lib/hooks/dep-audit.mjs +2 -2
  88. package/lib/hooks/doc-coupling-check.mjs +3 -2
  89. package/lib/hooks/edit-accumulator.mjs +3 -2
  90. package/lib/hooks/edit-guard.mjs +3 -3
  91. package/lib/hooks/guard-bash.mjs +2 -2
  92. package/lib/hooks/model-fallback.mjs +2 -1
  93. package/lib/hooks/policy-engine.mjs +4 -3
  94. package/lib/hooks/pre-compact.mjs +7 -7
  95. package/lib/hooks/readme-age-check.mjs +2 -2
  96. package/lib/hooks/session-optimize.mjs +4 -3
  97. package/lib/hooks/session-start.mjs +20 -16
  98. package/lib/hooks/stop-notify.mjs +9 -8
  99. package/lib/hooks/stop-typecheck.mjs +4 -3
  100. package/lib/hooks/test-watch.mjs +2 -2
  101. package/lib/host-disposition.mjs +1 -1
  102. package/lib/ingest/provider-extract.mjs +2 -1
  103. package/lib/init/detect-existing-structure.mjs +2 -2
  104. package/lib/init/doc-lanes.mjs +3 -10
  105. package/lib/init-docs.mjs +12 -54
  106. package/lib/init-unified.mjs +47 -92
  107. package/lib/init.mjs +7 -5
  108. package/lib/install/desktop-binary-download.mjs +5 -2
  109. package/lib/intake/constants.mjs +29 -0
  110. package/lib/intake/daemon.mjs +31 -8
  111. package/lib/intake/intake-config.mjs +32 -112
  112. package/lib/integrations/intake-integrations.mjs +8 -7
  113. package/lib/knowledge/rag.mjs +2 -2
  114. package/lib/knowledge/search.mjs +15 -15
  115. package/lib/maintenance/cleanup.mjs +14 -10
  116. package/lib/mcp/server.mjs +20 -2
  117. package/lib/mcp/tools/embedded-contract.mjs +14 -0
  118. package/lib/mcp/tools/project.mjs +2 -1
  119. package/lib/model-cheapest-provider.mjs +4 -3
  120. package/lib/model-pricing.mjs +3 -2
  121. package/lib/model-router.mjs +4 -3
  122. package/lib/models/catalog.mjs +2 -1
  123. package/lib/models/execution-capability-profile.mjs +2 -1
  124. package/lib/models/provider-poll.mjs +2 -1
  125. package/lib/ollama-manager.mjs +0 -1
  126. package/lib/op-log.mjs +2 -1
  127. package/lib/opencode-runtime-plugin.mjs +3 -2
  128. package/lib/oracle/artifact-gate.mjs +3 -0
  129. package/lib/oracle/cli.mjs +2 -1
  130. package/lib/oracle/execute.mjs +3 -2
  131. package/lib/oracle/index.mjs +2 -1
  132. package/lib/oracle/read-model.mjs +3 -2
  133. package/lib/performance/generate.mjs +4 -3
  134. package/lib/platforms/capabilities.mjs +1 -1
  135. package/lib/playwright-demo.mjs +2 -0
  136. package/lib/plugin-registry.mjs +2 -1
  137. package/lib/profiles/lifecycle.mjs +3 -3
  138. package/lib/project-profile.mjs +2 -1
  139. package/lib/project-root.mjs +9 -7
  140. package/lib/provider-capabilities.js +4 -3
  141. package/lib/providers/auth-manager.mjs +2 -1
  142. package/lib/providers/copilot-auth.mjs +3 -2
  143. package/lib/providers/creds.mjs +3 -2
  144. package/lib/providers/registry.mjs +3 -3
  145. package/lib/providers/secret-resolver.mjs +3 -2
  146. package/lib/read-tracker-store.mjs +2 -1
  147. package/lib/reconcile/mcp-entry-reconcile.mjs +2 -2
  148. package/lib/reflect.mjs +2 -1
  149. package/lib/registry/generate-docs.mjs +2 -2
  150. package/lib/roles/approval-surface.mjs +5 -4
  151. package/lib/roles/event-bus.mjs +0 -1
  152. package/lib/roles/gateway.mjs +6 -2
  153. package/lib/rules-delivery.mjs +1 -1
  154. package/lib/runtime-pressure.mjs +5 -3
  155. package/lib/sandbox.mjs +3 -2
  156. package/lib/scheduler/solo.mjs +6 -4
  157. package/lib/server/auth.mjs +4 -3
  158. package/lib/server/index.mjs +53 -26
  159. package/lib/server/insights.mjs +5 -4
  160. package/lib/server/rate-limit.mjs +5 -3
  161. package/lib/server/webhook.mjs +5 -3
  162. package/lib/service-manager.mjs +5 -3
  163. package/lib/setup.mjs +9 -8
  164. package/lib/status.mjs +6 -5
  165. package/lib/storage/embeddings-local.mjs +3 -2
  166. package/lib/storage/sync.mjs +2 -2
  167. package/lib/telemetry/client.mjs +0 -1
  168. package/lib/telemetry/intent-verifications.mjs +6 -6
  169. package/lib/telemetry/model-pricing-catalog.mjs +4 -3
  170. package/lib/telemetry/rule-calls.mjs +3 -3
  171. package/lib/telemetry/skill-calls.mjs +3 -3
  172. package/lib/template-registry.mjs +1 -0
  173. package/lib/templates/visual-requirements.mjs +1 -1
  174. package/lib/test-corpus-inventory.mjs +1 -1
  175. package/lib/uninstall/uninstall.mjs +12 -10
  176. package/package.json +3 -3
  177. package/platforms/claude/settings.template.json +43 -43
  178. package/rules/common/no-fabrication.md +1 -1
  179. package/rules/common/release-gates.md +1 -1
  180. package/rules/common/research.md +1 -1
  181. package/rules/common/review-before-change.md +1 -1
  182. package/scripts/sync-specialists.mjs +11 -8
  183. package/skills/docs/adr-workflow.md +3 -3
  184. package/skills/docs/init-docs.md +9 -9
  185. package/skills/docs/prd-workflow.md +5 -5
  186. package/skills/docs/product-intelligence-review.md +1 -1
  187. package/skills/docs/product-intelligence-workflow.md +2 -2
  188. package/skills/docs/product-signal-workflow.md +1 -1
  189. package/skills/docs/runbook-workflow.md +4 -4
  190. package/skills/exploration/unknown-codebase-onboarding.md +1 -1
  191. package/skills/operating/orchestration-reference.md +1 -1
  192. package/skills/routing.md +3 -3
  193. package/specialists/artifact-manifest.json +11 -2
  194. package/specialists/artifact-manifest.schema.json +31 -1
  195. package/specialists/prompts/cx-architect.md +1 -1
  196. package/specialists/prompts/cx-docs-keeper.md +1 -1
  197. package/specialists/prompts/cx-researcher.md +1 -1
  198. package/specialists/prompts/cx-sre.md +1 -1
  199. package/specialists/role-manifests.json +6 -6
  200. package/templates/distribution/construct-reference.docx +0 -0
  201. package/templates/docs/README.md +125 -0
  202. package/templates/docs/construct_guide.md +3 -4
  203. package/templates/docs/persona-artifact.md +1 -1
  204. package/templates/docs/prds/README.md +25 -0
  205. package/templates/docs/prds/templates/_template.md +206 -0
  206. package/templates/docs/prds/templates/meta-prd.template.md +177 -0
  207. package/templates/docs/prds/templates/prd-business.template.md +61 -0
  208. package/templates/docs/prds/templates/prd-platform.template.md +81 -0
  209. package/templates/docs/prds/templates/prfaq.template.md +38 -0
  210. package/templates/docs/rfcs/README.md +22 -0
  211. package/templates/docs/rfcs/templates/_template.md +58 -0
  212. package/templates/docs/rfcs/templates/rfc-platform.template.md +72 -0
  213. package/templates/homebrew/construct.rb +1 -1
  214. package/templates/workflows/new-feature.yml +8 -8
@@ -0,0 +1,177 @@
1
+ # Meta PRD: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Owner**: {name}
5
+ - **Status**: draft | in-review | approved | shipped | deprecated
6
+
7
+ <!--
8
+ Use this when the subject is the product operating system itself: an agent workflow,
9
+ document standard, evidence pipeline, evaluation loop, template family, governance
10
+ process, or internal product intelligence capability.
11
+
12
+ A normal PRD defines what a product capability must do for users. A Meta PRD defines
13
+ how the organization decides, documents, validates, and improves the product work.
14
+
15
+ Write with a balance of structured paragraphs, compact tables, and selective bullets.
16
+ Avoid a wall of bullets. Keep em dashes rare; prefer commas, periods, or parentheses.
17
+ -->
18
+
19
+ ## Summary
20
+ <!--
21
+ One paragraph (3-5 sentences). What product practice or operating system is
22
+ being defined or changed, who runs it, and what becomes different about how
23
+ the org decides, documents, or evaluates work once this ships.
24
+ -->
25
+
26
+ ## Background
27
+ <!--
28
+ The current state of the operating system: which workflow, template, eval
29
+ loop, or governance process is in play today, and what's actually happening
30
+ when teams or agents use it. Cite real examples: recent PRDs, prior decisions,
31
+ trace evidence, support tickets: not hypotheticals.
32
+ -->
33
+
34
+ ## Problem
35
+ <!--
36
+ The failure mode in the current process. Name who feels it, how often, and
37
+ what breaks downstream. Keep solutions out of this section.
38
+
39
+ Examples of the right shape:
40
+ - "PRDs ship without rejected alternatives, so reviewers re-litigate decisions
41
+ three weeks in. Happens on ~40% of PRDs in the last quarter."
42
+ - "Postmortems are written by the on-call who shipped the bug, so the action
43
+ items reflect their proposals: not independent review."
44
+ -->
45
+
46
+ ## Goals
47
+ <!--
48
+ What success looks like for the operating system. Three to five outcomes max.
49
+ Examples: "PRDs cite primary sources by default", "Postmortems get peer
50
+ review before publish", "ADR rejection rate drops from 60% to under 20%".
51
+ -->
52
+
53
+ ## Outcome
54
+ <!--
55
+ What is concretely different about how work moves through the org once this
56
+ operating model is adopted. Written from the practitioner's perspective:
57
+ "When I open a PRD, I'm prompted to record rejected alternatives before
58
+ the doc enters review."
59
+ -->
60
+
61
+ ## In scope and out of scope
62
+
63
+ | | Description |
64
+ |---|---|
65
+ | **In scope** | <which templates, workflows, agents, gates, or evals are touched> |
66
+ | **Out of scope** | <related operating systems explicitly deferred: name the reason> |
67
+ | **Adjacent (deferred)** | <natural follow-up changes not in this Meta PRD> |
68
+
69
+ ## Principles
70
+ <!--
71
+ Durable rules this operating system must preserve across phases. Each
72
+ principle should be testable enough to guide tradeoffs when phases conflict.
73
+ -->
74
+
75
+ ## Inputs and evidence
76
+ <!--
77
+ What evidence the system consumes: customer notes, interviews, traces, Jira
78
+ issues, PRDs, research, analytics, support tickets, prior decisions. State
79
+ minimum evidence thresholds where useful (e.g. "two independent customer
80
+ interviews before a PRD enters review").
81
+ -->
82
+
83
+ ## Phases
84
+
85
+ <!--
86
+ Each phase below holds its own goal, status, workflow requirements (MR),
87
+ and document + evaluation requirements (DR), with acceptance criteria
88
+ inline next to each. Use `MR-<phase>.<n>` and `DR-<phase>.<n>` so
89
+ requirements can be referenced from reviews, traces, and evals.
90
+
91
+ MR = Workflow requirement: how the process or agent workflow must behave;
92
+ observable in generated artifacts, workflow state, or tool behavior.
93
+
94
+ DR = Document + evaluation requirement: how outputs are shaped, reviewed,
95
+ and scored; required sections, evidence rules, citation rules, formatting
96
+ constraints, anti-patterns, rubric dimensions, pass/fail checks.
97
+
98
+ Status values: not started | in progress | shipped | deferred.
99
+ -->
100
+
101
+ ### Phase 1: <name>
102
+
103
+ - **Goal**: <what this phase delivers>
104
+ - **Status**: not started
105
+
106
+ **Workflow**
107
+
108
+ - **MR-1.1**: <imperative statement of how the workflow must behave>
109
+ - *Acceptance*: <how a reviewer or trace verifies this without asking the author>
110
+ - **MR-1.2**: <...>
111
+ - *Acceptance*: <...>
112
+
113
+ **Document + evaluation**
114
+
115
+ - **DR-1.1**: <required section, evidence rule, citation rule, formatting constraint, or anti-pattern>
116
+ - *Acceptance*: <rubric dimension, pass/fail check, or trace signal that proves it>
117
+
118
+ ### Phase 2: <name>
119
+
120
+ - **Goal**: <what this phase delivers>
121
+ - **Status**: not started
122
+
123
+ **Workflow**
124
+
125
+ - **MR-2.1**: <...>
126
+ - *Acceptance*: <...>
127
+ - **MR-2.2**: <...>
128
+ - *Acceptance*: <...>
129
+
130
+ **Document + evaluation**
131
+
132
+ - **DR-2.1**: <...>
133
+ - *Acceptance*: <...>
134
+
135
+ ### Phase 3: <name>
136
+
137
+ - **Goal**: <what this phase delivers>
138
+ - **Status**: not started
139
+
140
+ **Workflow**
141
+
142
+ - **MR-3.1**: <...>
143
+ - *Acceptance*: <...>
144
+
145
+ **Document + evaluation**
146
+
147
+ - **DR-3.1**: <...>
148
+ - *Acceptance*: <...>
149
+
150
+ ## Human approval gates
151
+ <!--
152
+ Where a person must review, approve, reject, or supply missing context before
153
+ the system writes externally or treats a document as approved. Name the gate,
154
+ the reviewer role, and the timeout policy if no reviewer responds.
155
+ -->
156
+
157
+ ## Failure modes and mitigations
158
+
159
+ | Failure mode | Likelihood | Impact | Mitigation |
160
+ |---|---|---|---|
161
+ | <how this could go wrong if followed too literally, over-automated, or used with weak evidence> | low / med / high | low / med / high | <guardrail or escape hatch> |
162
+
163
+ ## Rollout
164
+ <!--
165
+ How this operating model becomes the default. Migration steps, owners,
166
+ training, deprecation date for the older template or workflow. Name what
167
+ happens to in-flight work (grandfathered or migrated).
168
+ -->
169
+
170
+ ## Open questions
171
+
172
+ | Question | Owner | Decision needed by |
173
+ |---|---|---|
174
+ | <unknown that could change the operating model> | <name> | <YYYY-MM-DD> |
175
+
176
+ ## References
177
+ <!-- Linked examples, prior PRDs, Meta PRDs, research, tickets, traces, or decisions. -->
@@ -0,0 +1,61 @@
1
+ # Business PRD: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Owner**: {name}
5
+ - **Status**: draft | in-review | approved | shipped | deprecated
6
+
7
+ <!--
8
+ Use this for strategic bets, market positioning decisions, business model changes,
9
+ partnership structures, pricing strategy, and make-vs-buy decisions.
10
+
11
+ This is not a feature spec. It defines the bet, the market thesis, the alternatives
12
+ rejected, and what would have to be true for this to work.
13
+
14
+ Use prd.md for customer-facing product capabilities.
15
+ Use prd-platform.md for internal platform and developer-facing capabilities.
16
+ -->
17
+
18
+ ## The bet
19
+ <!-- One or two sentences: what we are committing to and why now. This should be falsifiable. -->
20
+
21
+ ## Market thesis
22
+ <!-- The one-paragraph view of market shape, buyer behavior, and where value accrues. Every decision in this document links back here or challenges it. -->
23
+
24
+ ## Problem and opportunity
25
+ <!-- What is broken in the market or business today? What does the opportunity look like at full scale? State the pain and the size of the prize: with evidence. -->
26
+
27
+ ## Strategic goals
28
+ <!-- What this decision achieves at the business level: position, revenue, defensibility, optionality. Tie to company objectives. -->
29
+
30
+ ## Alternatives rejected
31
+ <!-- The other credible paths that were considered. For each: what it is, why it was rejected, and what would have to change to reconsider it. No strawmen. -->
32
+
33
+ ## What must be true
34
+ <!-- The conditions that have to hold for this bet to pay off. Make them explicit so they can be monitored. -->
35
+
36
+ ## Competitive analysis
37
+ <!-- For each relevant competitor: business model (unit economics, distribution, defensibility), not just feature surface. Avoid feature parity tables that ignore economics. -->
38
+
39
+ ## Make vs. buy vs. partner
40
+ <!-- If applicable: the build/buy/partner tradeoffs with rationale. Include cost, control, speed, and strategic leverage. -->
41
+
42
+ ## Go-to-market implications
43
+ <!-- Pricing, packaging, channels, positioning changes. What motion this requires from sales, marketing, or customer success. -->
44
+
45
+ ## Financial frame
46
+ <!-- Revenue model, cost structure, expected unit economics. Include the range of outcomes, not just the upside case. -->
47
+
48
+ ## Kill criteria
49
+ <!-- The leading indicator and the threshold at which this strategy is revisited or abandoned. Without this, bad bets survive longer than they should. -->
50
+
51
+ ## Risks
52
+ <!-- Market, execution, regulatory, competitive, and technical risks. Rate each by likelihood and impact. State the mitigation or acceptance rationale. -->
53
+
54
+ ## Constraints
55
+ <!-- Budget, timeline, team, regulatory, or partner dependencies that shape the scope of this decision. -->
56
+
57
+ ## Open questions
58
+ <!-- Genuine unknowns. Each names an owner and a decision deadline. -->
59
+
60
+ ## References
61
+ <!-- Market research, customer interviews, financial models, prior decisions, analyst reports, competitor filings. -->
@@ -0,0 +1,81 @@
1
+ # Platform PRD: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Owner**: {name}
5
+ - **Status**: draft | in-review | approved | shipped | deprecated
6
+
7
+ <!--
8
+ Use this for capabilities consumed by internal systems, developers, operators, or other
9
+ services: not directly by end users. Covers APIs, SDKs, admin surfaces, data contracts,
10
+ shared infrastructure, and operational tooling.
11
+
12
+ Use prd.md instead for customer-facing product capabilities.
13
+ Use meta-prd.md for requirements about the product operating system itself.
14
+
15
+ Name the platform actor precisely: platform builder, application developer, security admin,
16
+ operator. "Developer" is too broad.
17
+ -->
18
+
19
+ ## Problem
20
+ <!-- What is broken, missing, or blocking a platform actor or downstream system? One paragraph. State the operational or integration pain, not the solution. -->
21
+
22
+ ## Platform actors
23
+ <!-- Who consumes this capability? Name roles precisely (app developer, ops engineer, data analyst, etc.). Include scale and current workaround. Cite evidence: tickets, incidents, support load. -->
24
+
25
+ ## Goals and non-goals
26
+ <!-- Goals: what success looks like for the consumers. Non-goals: explicitly scoped out. -->
27
+
28
+ ## Platform flow
29
+
30
+ ```mermaid
31
+ flowchart TD
32
+ A[Consumer] --> B[Platform API]
33
+ B --> C[Core service]
34
+ C --> D[Response / event]
35
+ ```
36
+
37
+ ## API and interface contract
38
+ <!-- The surface being defined: endpoints, schemas, SDK methods, event payloads, config shapes, permission models. Number each contract item (C-1, C-2, …). -->
39
+
40
+ ## Functional requirements
41
+ <!-- What the system must do. Number them (FR-1, FR-2, …). -->
42
+
43
+ ## Non-functional requirements
44
+ <!-- Performance SLOs, reliability targets, security, compliance, scalability limits. Include numeric targets. -->
45
+
46
+ ## Backwards compatibility and versioning
47
+ <!-- Is this a new contract or a change to an existing one? If a change: breaking vs. non-breaking, versioning strategy, and how existing consumers are supported. -->
48
+
49
+ ## Migration and rollout
50
+ <!-- How consumers move to the new contract. Include migration steps, tooling, timeline, and who is responsible. Flag any coordination with downstream teams. -->
51
+
52
+ ## Operational requirements
53
+ <!-- Observability (metrics, logs, traces), auditability, rate limits, failure modes, fallback behavior, support diagnostics, admin controls. These are product requirements, not afterthoughts. -->
54
+
55
+ ## Acceptance criteria
56
+ <!-- Observable, falsifiable conditions a reviewer can check. Include integration and contract tests where relevant. -->
57
+
58
+ ## Success metrics
59
+ <!-- How we know this worked: adoption, error rate, latency, support ticket reduction. Leading vs. lagging. -->
60
+
61
+ | Metric | Baseline | Target |
62
+ |---|---|---|
63
+ | {name} | {current} | {goal} |
64
+
65
+ ## Risks and mitigations
66
+
67
+ | Risk | Likelihood | Impact | Mitigation |
68
+ |---|---|---|---|
69
+ | {risk} | low / med / high | low / med / high | {mitigation} |
70
+
71
+ ## Consumer impact
72
+ <!-- What changes for existing consumers. What breaks, what degrades, what stays the same. Link to migration guide if needed. -->
73
+
74
+ ## Dependencies
75
+ <!-- Upstream services, data contracts, team availability, vendor timelines. -->
76
+
77
+ ## Open questions
78
+ <!-- Genuine unknowns. Each question names an owner and a decision deadline. -->
79
+
80
+ ## References
81
+ <!-- Linked designs, prior PRDs, ADRs, incidents, runbooks, tickets. -->
@@ -0,0 +1,38 @@
1
+ # PRFAQ: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Owner**: {name}
5
+ - **Status**: draft | in-review | approved
6
+
7
+ <!--
8
+ Use for working-backwards product thinking. A PRFAQ can be generated from a PRD
9
+ or directly from evidence, but it must not invent customer demand.
10
+ -->
11
+
12
+ ## One-sentence summary
13
+ <!-- One sentence for an executive reader. Name the audience and outcome. -->
14
+
15
+ ## Problem statement
16
+ <!-- Two or three paragraphs grounded in evidence. Explain the customer problem, why now, and what is missing today. -->
17
+
18
+ ```mermaid
19
+ flowchart LR
20
+ A[Customer need] --> B[Current workaround]
21
+ B --> C[Proposed capability]
22
+ C --> D[Outcome after launch]
23
+ ```
24
+
25
+ ## Press release
26
+ <!-- Write as if the capability has shipped. Focus on customer outcome, not implementation. Include a spokesperson quote and a customer quote — mark a hypothetical quote as such; never invent an attributed one (rules/common/no-fabrication.md). -->
27
+
28
+ ## External FAQ
29
+ <!-- Customer-facing questions and answers. Keep answers concrete and honest about limits. -->
30
+
31
+ ## Internal FAQ
32
+ <!-- Questions from engineering, sales, support, security, finance, and leadership. Include unknowns as TBD with what would resolve them. Cover the launch/success metrics: what target defines success and by when. -->
33
+
34
+ ## Evidence appendix
35
+ <!-- Source links, customer quotes, related issues, research, and PRDs. -->
36
+
37
+ ## Review tracking
38
+ <!-- Reviewer, function, decision, date, and required follow-up. -->
@@ -0,0 +1,22 @@
1
+ ---
2
+ cx_doc_id: 019ddb68-5aed-7dcf-829c-e5e0bea4e511
3
+ created_at: "2026-04-29T22:42:22.573Z"
4
+ updated_at: "2026-04-29T22:42:22.573Z"
5
+ generator: construct/init-docs
6
+ body_hash: "sha256:ce40ad549fb8706ceb73055550c09928256233e3a074acbee4e5ce38126fce2d"
7
+ ---
8
+ <!--
9
+ templates/docs/rfcs/README.md: lane guide for RFCs.
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
+ # RFCs
16
+
17
+ Architecture and implementation proposals that need review before a decision.
18
+
19
+ ## Starter templates
20
+
21
+ - [_template.md](./templates/_template.md)
22
+ - [rfc-platform.template.md](./templates/rfc-platform.template.md)
@@ -0,0 +1,58 @@
1
+ # RFC: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Author**: {name}
5
+ - **Status**: draft | in-review | accepted | rejected | superseded
6
+ - **Supersedes**: {RFC title or N/A}
7
+ - **Superseded by**: {RFC title or N/A}
8
+
9
+ <!--
10
+ Use this for significant technical or architectural proposals that need structured
11
+ review before implementation begins. An RFC is not an ADR (which records a decision
12
+ already made): it is the proposal that leads to one.
13
+
14
+ Use rfc-platform.md instead when the proposal introduces breaking changes to a
15
+ contract, API, schema, or protocol consumed by other systems.
16
+ -->
17
+
18
+ ## Summary
19
+ <!-- One paragraph. What is being proposed and why. Someone who reads only this should understand the intent. -->
20
+
21
+ ## Motivation
22
+ <!-- What problem or limitation drives this proposal? Include evidence: incidents, performance data, support tickets, developer friction. Explain why the status quo is not acceptable. -->
23
+
24
+ ## Proposed design
25
+ <!-- The concrete proposal. Enough detail for reviewers to evaluate feasibility and tradeoffs. The sequence below shows the proposed behavior in context — include the happy path and at least one error path. -->
26
+
27
+ ```mermaid
28
+ sequenceDiagram
29
+ participant Client
30
+ participant Service
31
+ participant Store
32
+ Client->>Service: request
33
+ Service->>Store: read or write
34
+ Store-->>Service: result
35
+ Service-->>Client: response
36
+ Note over Service,Store: error path — Store unavailable → Service returns degraded response
37
+ ```
38
+
39
+ ## Tradeoffs and alternatives
40
+ <!-- The other credible designs considered. For each: what it is, why it was not chosen, and under what conditions it would be preferred. No strawmen. -->
41
+
42
+ ## Drawbacks
43
+ <!-- What this proposal makes harder, slower, or more expensive. Include technical debt, operational complexity, and team burden. -->
44
+
45
+ ## Risks
46
+ <!-- What could go wrong during implementation or in production. For each: likelihood, impact, and mitigation. -->
47
+
48
+ ## Rollout
49
+ <!-- How this change ships. Phased rollout, feature flags, dark launch, migration path, deprecation timeline. -->
50
+
51
+ ## Verification
52
+ <!-- How we confirm the proposal achieved its goals. Tests, metrics, observable evidence. -->
53
+
54
+ ## Unresolved questions
55
+ <!-- Genuine unknowns that remain. Each names an owner and a decision deadline. These should be resolved before the RFC is accepted. -->
56
+
57
+ ## References
58
+ <!-- Related ADRs, prior RFCs, design docs, tickets, research, external standards. -->
@@ -0,0 +1,72 @@
1
+ # Platform RFC: {title}
2
+
3
+ - **Date**: {YYYY-MM-DD}
4
+ - **Author**: {name}
5
+ - **Status**: draft | in-review | accepted | rejected | superseded
6
+ - **Change type**: breaking | non-breaking | additive
7
+ - **Affects**: {API | SDK | schema | event | config | permission model | protocol}
8
+ - **Supersedes**: {RFC title or N/A}
9
+
10
+ <!--
11
+ Use this when the proposal changes a contract consumed by other systems:
12
+ APIs, SDKs, schemas, event payloads, permission models, config shapes, or protocols.
13
+
14
+ Use rfc.md instead for proposals that do not touch external contracts.
15
+ -->
16
+
17
+ ## Summary
18
+ <!-- One paragraph. What contract is changing, in what direction, and why. -->
19
+
20
+ ## Motivation
21
+ <!-- What problem or limitation in the current contract drives this change? Cite evidence: consumer pain points, incidents, performance data, support load. Explain why the current interface cannot simply be extended. -->
22
+
23
+ ## Breaking change declaration
24
+ <!-- Be explicit: what is breaking, what is not. List every removed, renamed, or semantically changed interface element. Omitting a breaking change here is a contract violation. -->
25
+
26
+ ## Proposed contract
27
+ <!-- The new interface in full. Schemas, endpoint signatures, payload shapes, permission rules, config fields. Be precise enough that a consumer can write against this spec without asking questions. -->
28
+
29
+ ```mermaid
30
+ sequenceDiagram
31
+ participant Consumer
32
+ participant Platform
33
+ participant Backend
34
+ Consumer->>Platform: contract call
35
+ Platform->>Backend: validate and execute
36
+ Backend-->>Platform: result
37
+ Platform-->>Consumer: response
38
+ Note over Platform,Backend: error path — validation failure returns typed error
39
+ ```
40
+
41
+ ## Backwards compatibility strategy
42
+ <!-- How existing consumers are supported during transition. Options: versioning, dual-write, feature flags, shim layer, deprecation window. State which and why. -->
43
+
44
+ ## Migration guide
45
+ <!-- Step-by-step: what a consumer must change, in what order, with examples. If migration tooling is provided, describe it. If migration is manual, estimate effort. -->
46
+
47
+ ## Versioning and deprecation
48
+ <!-- Version scheme for this interface. Deprecation timeline for the old version: announcement date, sunset date, removal date. Include who owns communicating the deprecation to consumers. -->
49
+
50
+ ## Consumer impact analysis
51
+ <!-- List known consumers. For each: what breaks, what changes, what stays compatible, estimated migration effort. Flag consumers that require coordinated migration. -->
52
+
53
+ ## Rollout plan
54
+ <!-- How the new contract ships alongside the old one. Dual-version period, traffic migration, kill switch, removal gate. Include the observable signal that triggers each phase. -->
55
+
56
+ ## Operational requirements
57
+ <!-- Observability, rate limits, error handling, fallback behavior, and admin controls required for the new contract to be supportable. -->
58
+
59
+ ## Tradeoffs and alternatives
60
+ <!-- Other contract designs considered. For each: what it is, why it was not chosen. -->
61
+
62
+ ## Risks
63
+ <!-- Compatibility gaps, consumer adoption risk, timing risk, coordination failure. For each: likelihood, impact, mitigation. -->
64
+
65
+ ## Verification
66
+ <!-- How we confirm the migration succeeded and the old version can be safely removed. Metrics, tests, observable evidence. -->
67
+
68
+ ## Unresolved questions
69
+ <!-- Genuine unknowns. Each names an owner and a decision deadline. -->
70
+
71
+ ## References
72
+ <!-- Related ADRs, prior RFCs, API design guidelines, consumer runbooks, tickets. -->
@@ -8,7 +8,7 @@
8
8
  # scratch on every `v*` tag push — it downloads sha256 sidecars from the
9
9
  # GitHub Release, fills in the version and per-platform URLs/SHAs, and pushes
10
10
  # directly to the tap. The placeholder SHAs below are only used when seeding
11
- # the tap by hand the first time (see docs/maintenance/homebrew-tap.md).
11
+ # the tap by hand the first time (see docs/operations/maintenance/homebrew-tap.md).
12
12
  class Construct < Formula
13
13
  desc "Deployable AI R&D operating system for coding agents — runs locally or for teams"
14
14
  homepage "https://github.com/geraldmaron/construct"
@@ -13,28 +13,28 @@ inputs:
13
13
 
14
14
  artifacts:
15
15
  - template: prd.md
16
- path: "docs/prd/${feature_name}.md"
16
+ path: "docs/specs/prd/${feature_name}.md"
17
17
  title: "PRD: ${feature_name}"
18
18
 
19
19
  - template: adr.md
20
- path: "docs/adr/${feature_name}.md"
20
+ path: "docs/decisions/adr/${feature_name}.md"
21
21
  title: "ADR: ${feature_name}"
22
22
  depends_on:
23
- - "docs/prd/${feature_name}.md"
23
+ - "docs/specs/prd/${feature_name}.md"
24
24
 
25
25
  - template: test-plan.md
26
26
  path: "docs/test-plans/${feature_name}.md"
27
27
  depends_on:
28
- - "docs/adr/${feature_name}.md"
28
+ - "docs/decisions/adr/${feature_name}.md"
29
29
 
30
30
  beads_items:
31
31
  - type: feature
32
32
  title: "${feature_name}: spec"
33
- link_to: "docs/prd/${feature_name}.md"
33
+ link_to: "docs/specs/prd/${feature_name}.md"
34
34
 
35
35
  - type: feature
36
36
  title: "${feature_name}: design"
37
- link_to: "docs/adr/${feature_name}.md"
37
+ link_to: "docs/decisions/adr/${feature_name}.md"
38
38
  depends_on_prior: true
39
39
 
40
40
  - type: feature
@@ -49,5 +49,5 @@ checks:
49
49
  - name: prd-precedes-adr
50
50
  kind: file-order
51
51
  files:
52
- - "docs/prd/${feature_name}.md"
53
- - "docs/adr/${feature_name}.md"
52
+ - "docs/specs/prd/${feature_name}.md"
53
+ - "docs/decisions/adr/${feature_name}.md"