@geraldmaron/construct 1.0.3 → 1.0.5

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 (157) hide show
  1. package/README.md +51 -42
  2. package/agents/prompts/cx-ai-engineer.md +6 -26
  3. package/agents/prompts/cx-architect.md +1 -0
  4. package/agents/prompts/cx-business-strategist.md +2 -0
  5. package/agents/prompts/cx-data-analyst.md +6 -26
  6. package/agents/prompts/cx-docs-keeper.md +1 -31
  7. package/agents/prompts/cx-explorer.md +1 -0
  8. package/agents/prompts/cx-orchestrator.md +40 -112
  9. package/agents/prompts/cx-platform-engineer.md +2 -22
  10. package/agents/prompts/cx-product-manager.md +2 -1
  11. package/agents/prompts/cx-qa.md +0 -20
  12. package/agents/prompts/cx-rd-lead.md +2 -0
  13. package/agents/prompts/cx-researcher.md +77 -31
  14. package/agents/prompts/cx-security.md +11 -49
  15. package/agents/prompts/cx-sre.md +9 -43
  16. package/agents/prompts/cx-ux-researcher.md +1 -0
  17. package/agents/role-manifests.json +4 -4
  18. package/bin/construct +279 -4
  19. package/commands/understand/research.md +5 -3
  20. package/db/schema/004_recommendations.sql +46 -0
  21. package/db/schema/005_strategy.sql +21 -0
  22. package/lib/auto-docs.mjs +3 -4
  23. package/lib/beads-automation.mjs +16 -7
  24. package/lib/cli-commands.mjs +52 -2
  25. package/lib/comment-lint.mjs +7 -1
  26. package/lib/config/schema.mjs +3 -0
  27. package/lib/embed/conflict-detection.mjs +26 -9
  28. package/lib/embed/customer-profiles.mjs +37 -17
  29. package/lib/embed/daemon.mjs +10 -8
  30. package/lib/embed/recommendation-store.mjs +213 -14
  31. package/lib/embed/workspaces.mjs +53 -18
  32. package/lib/flavors/loader.mjs +136 -0
  33. package/lib/gates-audit.mjs +3 -3
  34. package/lib/health-check.mjs +1 -1
  35. package/lib/hooks/agent-tracker.mjs +22 -3
  36. package/lib/hooks/pre-compact.mjs +3 -0
  37. package/lib/hooks/pre-push-gate.mjs +14 -1
  38. package/lib/hooks/read-tracker.mjs +10 -101
  39. package/lib/hooks/session-optimize.mjs +3 -2
  40. package/lib/hooks/session-reflect.mjs +68 -0
  41. package/lib/host-capabilities.mjs +90 -1
  42. package/lib/init-unified.mjs +25 -2
  43. package/lib/init-update.mjs +246 -131
  44. package/lib/intake/classify.mjs +61 -183
  45. package/lib/intake/prepare.mjs +7 -0
  46. package/lib/intake/tables/creative.mjs +94 -0
  47. package/lib/intake/tables/operations.mjs +85 -0
  48. package/lib/intake/tables/research.mjs +85 -0
  49. package/lib/intake/tables/rnd.mjs +175 -0
  50. package/lib/intent-classifier.mjs +1 -0
  51. package/lib/knowledge/layout.mjs +10 -0
  52. package/lib/knowledge/research-store.mjs +109 -0
  53. package/lib/mcp/tools/telemetry.mjs +30 -78
  54. package/lib/model-router.mjs +61 -1
  55. package/lib/observation-store.mjs +19 -0
  56. package/lib/ollama-manager.mjs +1 -1
  57. package/lib/opencode-telemetry.mjs +4 -5
  58. package/lib/orchestration-policy.mjs +9 -0
  59. package/lib/outcomes/aggregate.mjs +104 -0
  60. package/lib/outcomes/record.mjs +115 -0
  61. package/lib/parity.mjs +121 -21
  62. package/lib/profiles/lifecycle.mjs +388 -0
  63. package/lib/profiles/loader.mjs +123 -0
  64. package/lib/profiles/validate-custom.mjs +114 -0
  65. package/lib/prompt-composer.js +106 -29
  66. package/lib/read-tracker-store.mjs +149 -0
  67. package/lib/reflect/extractor.mjs +193 -0
  68. package/lib/reflect.mjs +89 -2
  69. package/lib/sandbox.mjs +102 -0
  70. package/lib/server/index.mjs +76 -0
  71. package/lib/server/telemetry-login.mjs +17 -25
  72. package/lib/service-manager.mjs +30 -22
  73. package/lib/services/local-postgres.mjs +15 -0
  74. package/lib/services/telemetry-backend.mjs +1 -2
  75. package/lib/setup.mjs +8 -43
  76. package/lib/status.mjs +51 -5
  77. package/lib/storage/backend.mjs +12 -2
  78. package/lib/strategy-store.mjs +371 -0
  79. package/lib/telemetry/backends/local.mjs +6 -4
  80. package/lib/telemetry/client.mjs +185 -0
  81. package/lib/telemetry/ingest.mjs +13 -5
  82. package/lib/telemetry/team-rollup.mjs +9 -2
  83. package/lib/worker/trace.mjs +17 -27
  84. package/package.json +10 -2
  85. package/personas/construct.md +20 -20
  86. package/platforms/claude/settings.template.json +13 -0
  87. package/rules/common/research.md +44 -12
  88. package/scripts/sync-agents.mjs +11 -0
  89. package/skills/docs/backlog-proposal-workflow.md +2 -2
  90. package/skills/docs/customer-profile-workflow.md +1 -1
  91. package/skills/docs/evidence-ingest-workflow.md +5 -5
  92. package/skills/docs/prfaq-workflow.md +1 -1
  93. package/skills/docs/product-intelligence-review.md +1 -1
  94. package/skills/docs/product-intelligence-workflow.md +3 -3
  95. package/skills/docs/product-signal-workflow.md +48 -18
  96. package/skills/docs/research-workflow.md +26 -14
  97. package/skills/docs/strategy-workflow.md +36 -0
  98. package/skills/roles/architect.ai-systems.md +4 -2
  99. package/skills/roles/architect.data.md +4 -2
  100. package/skills/roles/architect.enterprise.md +4 -2
  101. package/skills/roles/architect.integration.md +4 -2
  102. package/skills/roles/architect.md +7 -5
  103. package/skills/roles/architect.platform.md +4 -2
  104. package/skills/roles/data-analyst.experiment.md +4 -2
  105. package/skills/roles/data-analyst.md +9 -7
  106. package/skills/roles/data-analyst.product-intelligence.md +5 -3
  107. package/skills/roles/data-analyst.product.md +4 -2
  108. package/skills/roles/data-analyst.telemetry.md +4 -2
  109. package/skills/roles/data-engineer.pipeline.md +4 -2
  110. package/skills/roles/data-engineer.vector-retrieval.md +4 -2
  111. package/skills/roles/data-engineer.warehouse.md +4 -2
  112. package/skills/roles/debugger.md +7 -5
  113. package/skills/roles/designer.accessibility.md +4 -2
  114. package/skills/roles/designer.md +10 -8
  115. package/skills/roles/engineer.ai.md +4 -2
  116. package/skills/roles/engineer.data.md +5 -3
  117. package/skills/roles/engineer.md +14 -12
  118. package/skills/roles/engineer.platform.md +5 -3
  119. package/skills/roles/operator.docs.md +6 -4
  120. package/skills/roles/operator.md +6 -4
  121. package/skills/roles/operator.release.md +4 -2
  122. package/skills/roles/operator.sre.md +5 -3
  123. package/skills/roles/orchestrator.md +5 -3
  124. package/skills/roles/product-manager.ai-product.md +4 -2
  125. package/skills/roles/product-manager.business-strategy.md +4 -2
  126. package/skills/roles/product-manager.enterprise.md +4 -2
  127. package/skills/roles/product-manager.growth.md +4 -2
  128. package/skills/roles/product-manager.md +6 -4
  129. package/skills/roles/product-manager.platform.md +4 -2
  130. package/skills/roles/product-manager.product.md +4 -2
  131. package/skills/roles/qa.ai-eval.md +4 -2
  132. package/skills/roles/qa.api-contract.md +4 -2
  133. package/skills/roles/qa.data-pipeline.md +4 -2
  134. package/skills/roles/qa.md +7 -5
  135. package/skills/roles/qa.test-automation.md +5 -3
  136. package/skills/roles/qa.web-ui.md +4 -2
  137. package/skills/roles/researcher.explorer.md +4 -2
  138. package/skills/roles/researcher.md +35 -20
  139. package/skills/roles/researcher.ux.md +4 -2
  140. package/skills/roles/reviewer.devil-advocate.md +4 -2
  141. package/skills/roles/reviewer.evaluator.md +4 -2
  142. package/skills/roles/reviewer.md +14 -12
  143. package/skills/roles/reviewer.trace.md +4 -2
  144. package/skills/roles/security.ai.md +4 -2
  145. package/skills/roles/security.appsec.md +4 -2
  146. package/skills/roles/security.cloud.md +4 -2
  147. package/skills/roles/security.legal-compliance.md +4 -2
  148. package/skills/roles/security.md +7 -5
  149. package/skills/roles/security.privacy.md +4 -2
  150. package/skills/roles/security.supply-chain.md +4 -2
  151. package/skills/routing.md +8 -1
  152. package/templates/docs/persona-artifact.md +36 -0
  153. package/templates/docs/research-brief.md +63 -9
  154. package/templates/docs/research-finding.md +26 -0
  155. package/templates/docs/skill-artifact.md +27 -0
  156. package/templates/docs/strategy.md +36 -0
  157. package/templates/homebrew/construct.rb +6 -6
@@ -8,8 +8,8 @@ Use when: product evidence should create or update Jira, Linear, GitHub Issues,
8
8
  ## Steps
9
9
 
10
10
  1. Load source evidence, evidence brief, PRD, or signal brief.
11
- 2. Search existing tracker context if an MCP is configured; otherwise search local docs and product-intel artifacts.
12
- 3. Create `.cx/product-intel/backlog-proposals/{date}-{slug}.md` with `get_template("backlog-proposal")`.
11
+ 2. Search existing tracker context if an MCP is configured; otherwise search local docs and knowledge artifacts.
12
+ 3. Create `.cx/knowledge/internal/backlog-proposals/{date}-{slug}.md` with `get_template("backlog-proposal")`.
13
13
  4. Include duplicate/conflict analysis and exact proposed writes.
14
14
  5. Return `NEEDS_MAIN_INPUT` for approval before any external write.
15
15
  6. After approval, apply changes and update the proposal's application log.
@@ -7,7 +7,7 @@ Use when: customer evidence should update durable product memory.
7
7
 
8
8
  ## Steps
9
9
 
10
- 1. Load the existing customer profile from `.cx/product-intel/customer-profiles/` if present.
10
+ 1. Load the existing customer profile from `.cx/knowledge/internal/customer-profiles/` if present.
11
11
  2. Read the new source evidence.
12
12
  3. Add new facts, asks, pain points, contacts, product areas, and evidence links.
13
13
  4. Preserve historical entries. Do not delete or rewrite prior history without explicit approval.
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/docs/evidence-ingest-workflow.md — Normalize raw product evidence into Construct product-intel artifacts.
2
+ skills/docs/evidence-ingest-workflow.md — Normalize raw product evidence into Construct knowledge artifacts.
3
3
  -->
4
4
  # Evidence Ingest Workflow
5
5
 
@@ -11,9 +11,9 @@ Follow [rules/common/research.md](../../rules/common/research.md) for source met
11
11
 
12
12
  1. Identify the source type and date.
13
13
  2. Extract source metadata: customer, actor, product area, channel, linked issue, and confidence.
14
- 3. Save raw or lightly normalized source material under `.cx/product-intel/sources/`.
15
- 4. If customer-specific, update or create `.cx/product-intel/customer-profiles/{customer}.md` using `get_template("customer-profile")`.
16
- 5. Create `.cx/product-intel/evidence-briefs/{date}-{slug}.md` using `get_template("evidence-brief")` when the evidence supports a product decision.
14
+ 3. Save raw or lightly normalized source material under `.cx/knowledge/internal/sources/`.
15
+ 4. If customer-specific, update or create `.cx/knowledge/internal/customer-profiles/{customer}.md` using `get_template("customer-profile")`.
16
+ 5. Create `.cx/knowledge/internal/evidence-briefs/{date}-{slug}.md` using `get_template("evidence-brief")` when the evidence supports a product decision.
17
17
  6. If evidence is weak but worth preserving, create a signal brief with `get_template("signal-brief")`.
18
18
 
19
19
  ## Rules
@@ -29,4 +29,4 @@ Always preserve:
29
29
 
30
30
  ## Storage
31
31
 
32
- Files in `.cx/product-intel/` are indexed by Construct's hybrid retrieval path. Postgres stores them as `product-intel` documents during sync, and the vector layer makes them semantically retrievable for future PRDs and Meta PRDs.
32
+ Files in `.cx/knowledge/` are indexed by Construct's hybrid retrieval path. The vector layer makes them semantically retrievable for future PRDs and Meta PRDs.
@@ -18,7 +18,7 @@ Use when: the user asks for a PRFAQ, working-backwards doc, launch narrative, or
18
18
  4. Write the press release in shipped-state language.
19
19
  5. Write external FAQ for customers and internal FAQ for engineering, sales, support, security, finance, and leadership.
20
20
  6. Include unknowns as `TBD` with what would resolve them.
21
- 7. Save to `.cx/product-intel/prfaqs/` until approved.
21
+ 7. Save to `.cx/knowledge/internal/prfaqs/` until approved.
22
22
 
23
23
  ## Approval
24
24
 
@@ -14,7 +14,7 @@ Score each dimension as pass, warning, or fail:
14
14
  - Acceptance criteria: observable and pass/fail.
15
15
  - Scope discipline: goals, non-goals, and tradeoffs are explicit.
16
16
  - Approval safety: external writes and approved status are gated.
17
- - Storage readiness: artifact path is under `.cx/product-intel/`, `docs/prd/`, or `docs/meta-prd/` so hybrid retrieval can index it.
17
+ - Storage readiness: artifact path is under `.cx/knowledge/`, `docs/prd/`, or `docs/meta-prd/` so hybrid retrieval can index it.
18
18
  - Readability: balanced paragraphs, tables, and bullets. Few em dashes.
19
19
 
20
20
  ## Output
@@ -14,7 +14,7 @@ Follow [rules/common/research.md](../../rules/common/research.md) for source ord
14
14
 
15
15
  Product Intelligence is a Construct-native loop:
16
16
 
17
- 1. Capture evidence into `.cx/product-intel/sources/` or link existing sources.
17
+ 1. Capture evidence into `.cx/knowledge/internal/sources/` or link existing sources.
18
18
  2. Normalize evidence into field notes, customer profiles, and evidence briefs.
19
19
  3. Synthesize themes, asks, pain points, product areas, and confidence.
20
20
  4. Select the PM flavor: product, platform, enterprise, ai-product, or growth.
@@ -53,9 +53,9 @@ Load the core product-manager role guidance and the selected overlay before draf
53
53
 
54
54
  ## Storage
55
55
 
56
- Write working artifacts under `.cx/product-intel/` unless they are docs of record. Approved PRDs live in `docs/prd/`; approved Meta PRDs live in `docs/meta-prd/`.
56
+ 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
57
 
58
- The hybrid storage layer indexes `.cx/product-intel/`, `docs/prd/`, and `docs/meta-prd/`. When Postgres is configured, `construct storage sync` can persist these artifacts into shared SQL rows. The vector layer scores the same documents for local, remote, or file-backed semantic retrieval.
58
+ 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
59
 
60
60
  ## Approval boundaries
61
61
 
@@ -1,31 +1,61 @@
1
1
  <!--
2
- skills/docs/product-signal-workflow.md — Synthesize product signals from evidence.
2
+ skills/docs/product-signal-workflow.md — Synthesize product signals from evidence into the right artifact.
3
+ Confidence rubric, contradiction resolution, artifact decision tree, and storage are all defined here.
4
+ Follow rules/common/research.md for source-handling policy.
3
5
  -->
4
6
  # Product Signal Workflow
5
7
 
6
8
  Use when: the user asks what customers are asking for, what themes are emerging, whether evidence is strong enough, or what should become a PRD.
7
9
 
8
- Follow [rules/common/research.md](../../rules/common/research.md) for confidence, contradictions, and source handling.
10
+ ## Confidence Rubric
9
11
 
10
- ## Steps
12
+ | Level | Criteria |
13
+ |---|---|
14
+ | **high** | ≥ 3 independent customers mention the same problem verbatim, OR 1 enterprise blocker with revenue at risk named |
15
+ | **medium** | 2 independent customers, OR 1 customer with high frequency (≥ 3 mentions), OR corroborated by a competitor signal |
16
+ | **low** | 1 customer mention, OR internal opinion without user observation, OR inferred from adjacent evidence |
17
+
18
+ ## Contradiction Resolution
11
19
 
12
- 1. Gather relevant evidence briefs, customer profiles, notes, tickets, research, and product docs.
13
- 2. Group evidence into themes, asks, pain points, affected personas, product areas, and counter-signals.
14
- 3. Assign confidence: high, medium, or low.
15
- 4. Choose the next artifact:
16
- - signal brief for weak or early evidence
17
- - evidence brief for decision-ready synthesis
18
- - PRD or PRFAQ for strong customer-facing product demand
19
- - Meta PRD for operating-system or process changes
20
- - backlog proposal for tracker changes after approval
21
- 5. Store synthesis in `.cx/product-intel/signals/` or `.cx/product-intel/evidence-briefs/`.
20
+ When two signals conflict:
21
+ 1. Name both signals explicitly do not average them away.
22
+ 2. Weight by customer tier (enterprise > growth > SMB) and recency (weight decays after 90 days).
23
+ 3. Record the contradiction in the signal brief as an open question.
24
+ 4. Never let a minority signal disappear it may be the leading indicator.
22
25
 
23
- ## Evidence threshold
26
+ ## Artifact Decision Tree
24
27
 
25
- Default threshold for PRD-ready evidence: at least two independent customers, three independent mentions, one severe enterprise blocker, or a clear strategic mandate with named risk. If the threshold is not met, write a signal brief instead of inventing requirements.
28
+ | Condition | Artifact |
29
+ |---|---|
30
+ | < 2 independent sources OR < medium confidence | signal brief |
31
+ | ≥ 2 independent sources AND ≥ medium confidence AND no strategic mandate yet | evidence brief |
32
+ | ≥ 3 sources OR 1 enterprise blocker OR PM has declared this a bet | PRD |
33
+ | PRD is approved AND launch narrative needed | PRFAQ |
34
+ | Subject is an internal process, agent workflow, or governance mechanism | Meta PRD |
35
+ | Artifact is approved AND needs a tracker item | backlog proposal (requires approval gate) |
26
36
 
27
- ## Quality bar
37
+ ## Strategy Check
28
38
 
29
- Separate asks from requirements. Separate observation from inference. Name what evidence would change the recommendation.
39
+ After grouping evidence, check `.cx/knowledge/decisions/strategy/` for any declared strategy documents:
40
+ - Signal aligns with a declared Bet → raise priority, note alignment explicitly.
41
+ - Signal conflicts with a declared Non-bet → flag the conflict; the user must make an explicit override decision before proceeding.
42
+ - No strategy documents exist → continue without blocking; note that strategy grounding is not available.
43
+
44
+ ## Steps
30
45
 
31
- When a claim depends on time-sensitive or external information, include the date or version basis. If evidence conflicts, state the counter-signal explicitly instead of averaging it away.
46
+ 1. **Gather** collect evidence briefs, customer profiles, field notes, tickets, and research from `.cx/knowledge/` and linked sources.
47
+ 2. **Group** — cluster by theme, ask, pain point, affected persona, product area, and counter-signal.
48
+ 3. **Assign confidence** — apply the rubric above; separate observation from inference.
49
+ 4. **Check strategy** — check `.cx/knowledge/decisions/strategy/`; flag alignment or conflict with Bets and Non-bets if documents exist.
50
+ 5. **Select artifact** — apply the decision tree; write the artifact; store to the path below.
51
+
52
+ ## Storage
53
+
54
+ | Artifact | Path |
55
+ |---|---|
56
+ | Signal brief | `.cx/knowledge/internal/signals/` |
57
+ | Evidence brief | `.cx/knowledge/internal/evidence-briefs/` |
58
+ | PRD | `docs/prd/` |
59
+ | PRFAQ | `docs/prfaq/` |
60
+ | Meta PRD | `docs/meta-prd/` |
61
+ | Backlog proposal | pending approval gate — do not file until explicit user approval |
@@ -12,25 +12,37 @@ Follow [rules/common/research.md](../../rules/common/research.md) as the default
12
12
  ## Steps
13
13
 
14
14
  1. **Clarify the question** — one specific, falsifiable question the research must answer.
15
- 2. **Check internal evidence first** — search `.cx/research/`, `.cx/product-intel/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts before going external.
16
- 3. **Choose the research path**:
17
- - Library/API/framework/version questions primary vendor docs, source code, changelogs, exact-version references
18
- - Market, competitive, policy, or general evidence → cx-researcher using primary sources first
19
- 4. **Use a source hierarchy**:
20
- - Primary: official docs, exact-version API references, standards, source code
21
- - Secondary: changelogs, migration guides, maintainer issue comments
22
- - Tertiary: blogs/forums/Q&A only to locate primaries
23
- 5. **Structure findings** using the template from `get_template("research-brief")` resolves `.cx/templates/docs/research-brief.md` (override) then `templates/docs/research-brief.md` (shipped)
24
- 6. **Write to `.cx/research/{topic-slug}.md`** cx-docs-keeper owns this
25
- 7. **Reference the research doc** in the requesting agent's output (link by path)
15
+ 2. **Apply recency discipline** — always search from the most recent year backward. For fast-moving domains (AI tools, security, market data), treat anything older than 12 months as presumptively stale unless a newer source confirms it is still accurate.
16
+ 3. **Check internal evidence first** — search `.cx/research/`, `.cx/knowledge/`, `docs/prd/`, `docs/meta-prd/`, ADRs, runbooks, and ingested artifacts before going external.
17
+ 4. **Choose the research path and starting point** by domain:
18
+
19
+ | Domain | Authoritative starting points |
20
+ |---|---|
21
+ | AI tools / LLM behavior / multi-agent | arXiv (cs.AI, cs.SE, cs.CL), ACL Anthology, conference proceedings (NeurIPS, ICML, ICLR, HICSS) |
22
+ | Developer tools / IDE / adoption | Stack Overflow Developer Survey, JetBrains Developer Ecosystem Report, GitHub blog, editor changelogs |
23
+ | Security / CVEs / supply chain | NVD, GitHub Security Advisories, OWASP, vendor security blogs (Google Project Zero, Microsoft Security), ProjectDiscovery |
24
+ | Market data / ARR / adoption | Primary company announcements, SEC filings, then TechCrunch/Bloomberg citing company sources |
25
+ | Cloud / API / SDK / version | Official vendor docs for exact version, changelog, migration guide |
26
+ | Regulatory / compliance / privacy | Primary regulation text, then official agency guidance |
27
+
28
+ 5. **Use a source hierarchy**:
29
+ - Primary: official docs, exact-version API references, standards, source code, peer-reviewed papers
30
+ - Secondary: changelogs, migration guides, maintainer issue comments, release notes
31
+ - Tertiary: blogs/forums/Q&A only to locate primaries — never cite tertiary alone for a load-bearing claim
32
+ 6. **Verify every URL** — fetch each URL cited and confirm it resolves and matches the cited claim. Mark unconfirmed URLs as `[unverified]`.
33
+ 7. **Structure findings** using the template from `get_template("research-brief")` — resolves `.cx/templates/docs/research-brief.md` (override) then `templates/docs/research-brief.md` (shipped)
34
+ 8. **Write to `.cx/research/{topic-slug}.md`** — cx-docs-keeper owns this
35
+ 9. **Reference the research doc** in the requesting agent's output (link by path)
26
36
 
27
37
  ## Verification bar
28
38
 
29
- - Every load-bearing claim must cite a source path, URL, or document reference.
30
- - Record publication date, version, or access date for each source.
31
- - Separate observation from inference.
39
+ - Every load-bearing claim must cite a verified source path, URL, or document reference.
40
+ - Record publication date, version, or access date for each source. If no date is available, state `[undated]` and treat confidence as `low`.
41
+ - Fetch and confirm every URL before including it in a committed document.
42
+ - Separate observation from inference — label each finding's confidence as `high`, `medium`, or `low`.
32
43
  - Name contradictions and unresolved gaps.
33
44
  - Prefer two independent sources per load-bearing claim unless one authoritative primary source is sufficient.
45
+ - State the strongest counter-evidence when one exists.
34
46
 
35
47
  ## File naming
36
48
  - Topic slug: lowercase, hyphens, no spaces — e.g., `firebase-auth-v9-migration.md`
@@ -0,0 +1,36 @@
1
+ <!--
2
+ skills/docs/strategy-workflow.md — Read, update, and reason about the product strategy.
3
+ Canonical store: ~/.cx/strategy.md (user-global) or .cx/strategy.md (project-local, committed).
4
+ Template: templates/docs/strategy.md.
5
+ -->
6
+ # Strategy Workflow
7
+
8
+ Use when: the user asks about product direction, strategic bets, what to prioritize, whether a signal aligns with strategy, or wants to update the strategy.
9
+
10
+ ## Reading Strategy
11
+
12
+ 1. Read `~/.cx/strategy.md` (or project-local `.cx/strategy.md`).
13
+ 2. If the file does not exist, inform the user and offer to create it using `templates/docs/strategy.md`.
14
+ 3. Parse sections: Vision, Bets, Non-bets, Time Horizon, North Star Metric, Competitive Positioning.
15
+
16
+ ## Checking Signal Alignment
17
+
18
+ Given a product signal or PRD, check:
19
+ - Does the signal target a declared Bet? → flag as strategically aligned.
20
+ - Does the signal conflict with a Non-bet? → flag the conflict; the user must make an explicit override decision.
21
+ - Does the signal address the Time Horizon goal? → note this in the signal brief.
22
+
23
+ ## Updating Strategy
24
+
25
+ 1. Show the user the current section being updated.
26
+ 2. Propose the change with rationale.
27
+ 3. Write the updated section and increment the `updated` date.
28
+ 4. If a Bet is being added, check for conflicting Non-bets and surface them.
29
+ 5. Strategy changes are always approved by the user before writing.
30
+
31
+ ## Storage
32
+
33
+ | Scope | Path | Committed? |
34
+ |---|---|---|
35
+ | User-global | `~/.cx/strategy.md` | No — local only |
36
+ | Project-local | `.cx/strategy.md` | Yes — source of truth for this repo |
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.ai-systems.md Anti-pattern guidance for the Architect.ai-systems (ai systems) role.
2
+ skills/roles/architect.ai-systems.md. Anti-pattern guidance for the Architect.ai-systems (ai systems) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the architect.ai-systems (ai systems) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-architect.
9
9
  role: architect.ai-systems
10
10
  applies_to: [cx-architect]
11
11
  inherits: architect
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # AI Systems Architect Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.data.md Anti-pattern guidance for the Architect.data (data) role.
2
+ skills/roles/architect.data.md. Anti-pattern guidance for the Architect.data (data) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the architect.data (data) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-architect.
9
9
  role: architect.data
10
10
  applies_to: [cx-architect]
11
11
  inherits: architect
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Data Architect Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.enterprise.md Anti-pattern guidance for the Architect.enterprise (enterprise) role.
2
+ skills/roles/architect.enterprise.md. Anti-pattern guidance for the Architect.enterprise (enterprise) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the architect.enterprise (enterprise) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-architect.
9
9
  role: architect.enterprise
10
10
  applies_to: [cx-architect]
11
11
  inherits: architect
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Enterprise Architect Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.integration.md Anti-pattern guidance for the Architect.integration (integration) role.
2
+ skills/roles/architect.integration.md. Anti-pattern guidance for the Architect.integration (integration) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the architect.integration (integration) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-architect.
9
9
  role: architect.integration
10
10
  applies_to: [cx-architect]
11
11
  inherits: architect
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Integration Architect Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.md Anti-pattern guidance for the Architect role.
2
+ skills/roles/architect.md. Anti-pattern guidance for the Architect role.
3
3
 
4
4
  ## Improvement Note (auto-generated 2026-04-29)
5
5
  - Improve specificity in technical guidance; provide detailed steps or code snippets rather than vague suggestions.
@@ -14,11 +14,13 @@ Applies to: cx-architect, cx-rd-lead.
14
14
  role: architect
15
15
  applies_to: [cx-architect, cx-rd-lead]
16
16
  inherits: null
17
- version: 1
17
+ version: 2
18
+ profiles: [rnd]
19
+ cap: 1
18
20
  ---
19
- # Architect Role guidance
21
+ # Architect. Role guidance
20
22
 
21
- Load this before drafting. These are the failure modes that separate strong role output from weak role output check your draft against each.
23
+ Load this before drafting. These are the failure modes that separate strong role output from weak role output. check your draft against each.
22
24
 
23
25
 
24
26
  ### 1. Premature tech choice
@@ -42,7 +44,7 @@ Load this before drafting. These are the failure modes that separate strong role
42
44
  **Counter-move**: label every major decision as one-way or two-way and match the evidence burden to it.
43
45
 
44
46
  ### 5. Boundary vagueness
45
- **Symptom**: modules, services, or teams are drawn with arrows but the contracts inputs, outputs, failure modes are not specified.
47
+ **Symptom**: modules, services, or teams are drawn with arrows but the contracts. inputs, outputs, failure modes. are not specified.
46
48
  **Why it fails**: each team implements its own interpretation; the integration surfaces the gaps in production.
47
49
  **Counter-move**: every boundary has a contract. Every contract names its failure modes.
48
50
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/architect.platform.md Anti-pattern guidance for the Architect.platform (platform) role.
2
+ skills/roles/architect.platform.md. Anti-pattern guidance for the Architect.platform (platform) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the architect.platform (platform) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-architect.
9
9
  role: architect.platform
10
10
  applies_to: [cx-architect]
11
11
  inherits: architect
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Platform Architect Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-analyst.experiment.md Anti-pattern guidance for the Data-analyst.experiment (experiment) role.
2
+ skills/roles/data-analyst.experiment.md. Anti-pattern guidance for the Data-analyst.experiment (experiment) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-analyst.experiment (experiment) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-analyst.
9
9
  role: data-analyst.experiment
10
10
  applies_to: [cx-data-analyst]
11
11
  inherits: data-analyst
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Experiment Analyst Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-analyst.md Anti-pattern guidance for the Data-analyst role.
2
+ skills/roles/data-analyst.md. Anti-pattern guidance for the Data-analyst role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-analyst domain and counter-moves to avoid them.
@@ -9,27 +9,29 @@ Applies to: cx-data-analyst.
9
9
  role: data-analyst
10
10
  applies_to: [cx-data-analyst]
11
11
  inherits: null
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
- # Data Analyst Role guidance
16
+ # Data Analyst. Role guidance
15
17
 
16
- Load this before drafting. These are the failure modes that separate strong role output from weak role output check your draft against each.
18
+ Load this before drafting. These are the failure modes that separate strong role output from weak role output. check your draft against each.
17
19
 
18
20
 
19
21
  ### 1. Metric without definition
20
- **Symptom**: a metric cited without its precise definition which events, what time window, deduplication rules, filters.
22
+ **Symptom**: a metric cited without its precise definition. which events, what time window, deduplication rules, filters.
21
23
  **Why it fails**: two teams compute "active users" differently. Decisions rest on numbers nobody can reproduce.
22
24
  **Counter-move**: name the metric and its SQL-level or event-level definition before any number. Version the definition.
23
25
 
24
26
  ### 2. Vanity over outcome
25
- **Symptom**: reports lead with impressions, pageviews, clicks activity disconnected from whether users got value.
27
+ **Symptom**: reports lead with impressions, pageviews, clicks. activity disconnected from whether users got value.
26
28
  **Why it fails**: rewards teams for moving activity numbers while outcomes stagnate.
27
29
  **Counter-move**: tie every vanity metric to an outcome metric. Report both. Lead with the outcome.
28
30
 
29
31
  ### 3. Ignoring data quality
30
32
  **Symptom**: analysis assumes the underlying events fire correctly, are deduped, and have consistent schemas.
31
33
  **Why it fails**: real pipelines drop, duplicate, and malform events. Analysis without QA produces confident wrong numbers.
32
- **Counter-move**: run sanity checks row counts, null rates, distribution shape, schema checks before analysis. Report data quality alongside findings.
34
+ **Counter-move**: run sanity checks. row counts, null rates, distribution shape, schema checks. before analysis. Report data quality alongside findings.
33
35
 
34
36
  ### 4. Correlation as causation
35
37
  **Symptom**: "users who did X had higher retention" presented as a reason to make everyone do X.
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-analyst.product-intelligence.md Anti-pattern guidance for the Data-analyst.product-intelligence (product intelligence) role.
2
+ skills/roles/data-analyst.product-intelligence.md. Anti-pattern guidance for the Data-analyst.product-intelligence (product intelligence) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-analyst.product-intelligence (product intelligence) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-analyst, cx-product-manager.
9
9
  role: data-analyst.product-intelligence
10
10
  applies_to: [cx-data-analyst, cx-product-manager]
11
11
  inherits: data-analyst
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Product Intelligence Analyst Overlay
15
17
 
@@ -28,7 +30,7 @@ Additional failure modes on top of the data-analyst core.
28
30
  ### 3. Evidence store ignored
29
31
  **Symptom**: new briefs are written without checking prior Product Intelligence artifacts.
30
32
  **Why it fails**: teams rediscover the same signal and lose longitudinal context.
31
- **Counter-move**: query `.cx/product-intel`, `docs/prd`, and `docs/meta-prd` through hybrid search before drafting.
33
+ **Counter-move**: query `.cx/knowledge`, `docs/prd`, and `docs/meta-prd` through hybrid search before drafting.
32
34
 
33
35
  ## Self-check before shipping
34
36
  - [ ] Evidence count, confidence, and counter-evidence are explicit
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-analyst.product.md Anti-pattern guidance for the Data-analyst.product (product) role.
2
+ skills/roles/data-analyst.product.md. Anti-pattern guidance for the Data-analyst.product (product) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-analyst.product (product) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-analyst.
9
9
  role: data-analyst.product
10
10
  applies_to: [cx-data-analyst]
11
11
  inherits: data-analyst
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Product Analytics Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-analyst.telemetry.md Anti-pattern guidance for the Data-analyst.telemetry (telemetry) role.
2
+ skills/roles/data-analyst.telemetry.md. Anti-pattern guidance for the Data-analyst.telemetry (telemetry) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-analyst.telemetry (telemetry) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-analyst, cx-sre.
9
9
  role: data-analyst.telemetry
10
10
  applies_to: [cx-data-analyst, cx-sre]
11
11
  inherits: data-analyst
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Telemetry Analyst Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-engineer.pipeline.md Anti-pattern guidance for the Data-engineer.pipeline (pipeline) role.
2
+ skills/roles/data-engineer.pipeline.md. Anti-pattern guidance for the Data-engineer.pipeline (pipeline) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-engineer.pipeline (pipeline) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-engineer.
9
9
  role: data-engineer.pipeline
10
10
  applies_to: [cx-data-engineer]
11
11
  inherits: engineer.data
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Data Pipeline Engineer Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-engineer.vector-retrieval.md Anti-pattern guidance for the Data-engineer.vector-retrieval (vector retrieval) role.
2
+ skills/roles/data-engineer.vector-retrieval.md. Anti-pattern guidance for the Data-engineer.vector-retrieval (vector retrieval) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-engineer.vector-retrieval (vector retrieval) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-engineer, cx-ai-engineer.
9
9
  role: data-engineer.vector-retrieval
10
10
  applies_to: [cx-data-engineer, cx-ai-engineer]
11
11
  inherits: engineer.data
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Vector Retrieval Engineer Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/data-engineer.warehouse.md Anti-pattern guidance for the Data-engineer.warehouse (warehouse) role.
2
+ skills/roles/data-engineer.warehouse.md. Anti-pattern guidance for the Data-engineer.warehouse (warehouse) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the data-engineer.warehouse (warehouse) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-data-engineer.
9
9
  role: data-engineer.warehouse
10
10
  applies_to: [cx-data-engineer]
11
11
  inherits: engineer.data
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Warehouse Engineer Overlay
15
17
 
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/debugger.md Anti-pattern guidance for the Debugger role.
2
+ skills/roles/debugger.md. Anti-pattern guidance for the Debugger role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the debugger domain and counter-moves to avoid them.
@@ -9,11 +9,13 @@ Applies to: cx-debugger.
9
9
  role: debugger
10
10
  applies_to: [cx-debugger]
11
11
  inherits: null
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
- # Debugger Role guidance
16
+ # Debugger. Role guidance
15
17
 
16
- Load this before drafting. These are the failure modes that separate strong role output from weak role output check your draft against each.
18
+ Load this before drafting. These are the failure modes that separate strong role output from weak role output. check your draft against each.
17
19
 
18
20
 
19
21
  ### 1. Fixing the symptom
@@ -63,6 +65,6 @@ Load this before drafting. These are the failure modes that separate strong role
63
65
  - [ ] Failure reproduced locally and reproduction preserved as a test
64
66
  - [ ] No speculative logs, retries, or sleeps in the fix
65
67
  - [ ] Earliest anomaly in the log is the starting point
66
- - [ ] Diff is narrow fix only, no drive-bys
68
+ - [ ] Diff is narrow. fix only, no drive-bys
67
69
  - [ ] Intermittent failures investigated, not shelved
68
70
  - [ ] Regression test added alongside the fix
@@ -1,5 +1,5 @@
1
1
  <!--
2
- skills/roles/designer.accessibility.md Anti-pattern guidance for the Designer.accessibility (accessibility) role.
2
+ skills/roles/designer.accessibility.md. Anti-pattern guidance for the Designer.accessibility (accessibility) role.
3
3
 
4
4
  Loaded at sync time to inline role-specific failure modes into specialist agent prompts.
5
5
  Covers common failure modes for the designer.accessibility (accessibility) domain and counter-moves to avoid them.
@@ -9,7 +9,9 @@ Applies to: cx-accessibility.
9
9
  role: designer.accessibility
10
10
  applies_to: [cx-accessibility]
11
11
  inherits: designer
12
- version: 1
12
+ version: 2
13
+ profiles: [rnd]
14
+ cap: 1
13
15
  ---
14
16
  # Accessibility Overlay
15
17