@geraldmaron/construct 1.0.21 → 1.0.23
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 +23 -5
- package/bin/construct +191 -13
- package/bin/construct-postinstall.mjs +25 -15
- package/lib/acp/server.mjs +113 -0
- package/lib/agent-instructions/inject.mjs +94 -0
- package/lib/auto-docs.mjs +10 -2
- package/lib/cli-commands.mjs +43 -15
- package/lib/comment-lint.mjs +115 -0
- package/lib/completions.mjs +7 -1
- package/lib/config/schema.mjs +4 -0
- package/lib/decisions/enforced-baseline.json +2 -0
- package/lib/docs-verify.mjs +15 -18
- package/lib/doctor/cli.mjs +8 -1
- package/lib/document-export.mjs +124 -0
- package/lib/embed/daemon.mjs +1 -1
- package/lib/embed/inbox.mjs +25 -7
- package/lib/features.mjs +11 -11
- package/lib/git-hooks-path.mjs +61 -0
- package/lib/home-namespace.mjs +60 -0
- package/lib/hooks/ci-status-check.mjs +62 -40
- package/lib/hooks/orchestration-dispatch-guard.mjs +153 -0
- package/lib/hooks/pre-push-gate.mjs +15 -6
- package/lib/hooks/stop-notify.mjs +32 -17
- package/lib/hooks/stop-typecheck.mjs +7 -2
- package/lib/host-capabilities.mjs +24 -8
- package/lib/host-disposition.mjs +76 -0
- package/lib/ingest/provider-extract.mjs +1 -1
- package/lib/init-docs.mjs +1 -1
- package/lib/init-unified.mjs +320 -219
- package/lib/init-update.mjs +4 -84
- package/lib/init.mjs +9 -25
- package/lib/install/stage-project.mjs +8 -2
- package/lib/intent-classifier.mjs +1 -1
- package/lib/knowledge/search.mjs +52 -3
- package/lib/mcp/server.mjs +57 -14
- package/lib/mcp/tools/memory.mjs +2 -2
- package/lib/mcp/tools/orchestration-run.mjs +125 -0
- package/lib/model-registry.mjs +40 -33
- package/lib/observation-store.mjs +6 -2
- package/lib/opencode-config.mjs +1 -1
- package/lib/orchestration/events.mjs +66 -0
- package/lib/orchestration/runtime.mjs +70 -9
- package/lib/orchestration/worker.mjs +69 -21
- package/lib/orchestration-policy.mjs +27 -3
- package/lib/parity.mjs +46 -24
- package/lib/policy/unified-gates.mjs +96 -0
- package/lib/project-init-shared.mjs +0 -173
- package/lib/reconcile/adapter-prune.mjs +105 -0
- package/lib/reconcile/agent-instructions-rewrap.mjs +98 -0
- package/lib/reconcile/gitignore-coverage.mjs +88 -0
- package/lib/reconcile/index.mjs +171 -0
- package/lib/reconcile/legacy-doctrine-strip.mjs +139 -0
- package/lib/reconcile/legacy-guide-decommit.mjs +67 -0
- package/lib/reconcile/legacy-skills-cleanup.mjs +200 -0
- package/lib/reconcile/mcp-entry-reconcile.mjs +142 -0
- package/lib/reconcile/postgres-namespace.mjs +102 -0
- package/lib/runtime/uv-bootstrap.mjs +27 -3
- package/lib/schema-infer.mjs +16 -2
- package/lib/server/csrf.mjs +14 -2
- package/lib/server/index.mjs +95 -0
- package/lib/service-manager.mjs +39 -14
- package/lib/setup-prompts.mjs +2 -1
- package/lib/setup.mjs +165 -141
- package/lib/storage/backend.mjs +14 -0
- package/lib/storage/unified-storage.mjs +550 -0
- package/lib/template-registry.mjs +73 -0
- package/lib/term-format.mjs +75 -0
- package/lib/uninstall/uninstall.mjs +180 -7
- package/package.json +2 -2
- package/personas/construct.md +7 -8
- package/platforms/claude/settings.template.json +30 -4
- package/platforms/opencode/config.template.json +2 -2
- package/rules/common/neurodivergent-output.md +66 -0
- package/rules/common/tool-invisibility.md +37 -0
- package/scripts/sync-specialists.mjs +381 -95
- package/skills/operating/orchestration-reference.md +2 -16
- package/specialists/policy-inventory.json +14 -0
- package/specialists/prompts/cx-accessibility.md +2 -6
- package/specialists/prompts/cx-ai-engineer.md +0 -4
- package/specialists/prompts/cx-architect.md +3 -5
- package/specialists/prompts/cx-business-strategist.md +0 -5
- package/specialists/prompts/cx-data-analyst.md +0 -4
- package/specialists/prompts/cx-data-engineer.md +0 -4
- package/specialists/prompts/cx-debugger.md +2 -6
- package/specialists/prompts/cx-designer.md +0 -8
- package/specialists/prompts/cx-devil-advocate.md +2 -2
- package/specialists/prompts/cx-docs-keeper.md +0 -13
- package/specialists/prompts/cx-engineer.md +0 -13
- package/specialists/prompts/cx-evaluator.md +2 -2
- package/specialists/prompts/cx-explorer.md +4 -5
- package/specialists/prompts/cx-legal-compliance.md +4 -5
- package/specialists/prompts/cx-operations.md +0 -5
- package/specialists/prompts/cx-orchestrator.md +0 -4
- package/specialists/prompts/cx-platform-engineer.md +0 -8
- package/specialists/prompts/cx-product-manager.md +0 -8
- package/specialists/prompts/cx-qa.md +2 -11
- package/specialists/prompts/cx-rd-lead.md +0 -5
- package/specialists/prompts/cx-release-manager.md +0 -8
- package/specialists/prompts/cx-researcher.md +5 -29
- package/specialists/prompts/cx-reviewer.md +2 -6
- package/specialists/prompts/cx-security.md +2 -11
- package/specialists/prompts/cx-sre.md +0 -15
- package/specialists/prompts/cx-test-automation.md +0 -4
- package/specialists/prompts/cx-trace-reviewer.md +2 -2
- package/specialists/prompts/cx-ux-researcher.md +0 -4
- package/specialists/registry.json +29 -29
- package/templates/distribution/run.mjs +36 -7
- package/templates/docs/accessibility-audit.md +56 -0
- package/templates/docs/architecture-review.md +59 -0
- package/templates/docs/code-review-report.md +46 -0
- package/templates/docs/construct_guide.md +14 -14
- package/templates/docs/debug-investigation.md +53 -0
- package/templates/docs/qa-report.md +48 -0
- package/templates/docs/security-audit-report.md +48 -0
- package/templates/docs/task-packet.md +49 -0
- package/templates/docs/verdict.md +40 -0
- package/lib/server/static/index.html +0 -1
|
@@ -29,23 +29,9 @@ Each specialist carries a distinct cognitive profile shaped by professional prio
|
|
|
29
29
|
|
|
30
30
|
For every non-trivial task: classify intent, create or update `.cx/workflow.json`, route to the owning persona or specialist, execute with the relevant skill, dispatch independent work in parallel when supported, persist decisions/handoffs to memory or `.cx`, validate through the validation phase before release.
|
|
31
31
|
|
|
32
|
-
### Intent classes
|
|
32
|
+
### Intent classes and work categories
|
|
33
33
|
|
|
34
|
-
- `
|
|
35
|
-
- `implementation`: code changes
|
|
36
|
-
- `investigation`: debugging, tracing
|
|
37
|
-
- `evaluation`: quality gates, review
|
|
38
|
-
- `fix`: bug repair
|
|
39
|
-
|
|
40
|
-
Tag every workflow task with its intent class. Let intent drive agent selection and depth of work.
|
|
41
|
-
|
|
42
|
-
### Work categories
|
|
43
|
-
|
|
44
|
-
- `visual` (UI/CSS/design) → standard tier
|
|
45
|
-
- `deep` (complex reasoning, architecture) → reasoning tier
|
|
46
|
-
- `quick` (single-file, trivial) → fast tier
|
|
47
|
-
- `writing` (docs, prose) → fast tier
|
|
48
|
-
- `analysis` (data, metrics, review) → standard tier
|
|
34
|
+
The canonical lists live in `lib/orchestration-policy.mjs` (`INTENT_CLASSES`, `WORK_CATEGORIES`). Do not enumerate them here — this skill teaches *when* to classify and *how* the classification drives selection, not *what* the classes are. Fetch the live list with the `orchestration_policy` MCP tool or by calling `routeRequest` directly; intent drives agent selection and work category drives model tier.
|
|
49
35
|
|
|
50
36
|
## Workflow state
|
|
51
37
|
|
|
@@ -169,6 +169,20 @@
|
|
|
169
169
|
"enforcement": "lib/read-tracker-store.mjs + session-start digest",
|
|
170
170
|
"mode": "deterministic",
|
|
171
171
|
"description": "Read discipline, probe-before-bulk-read, and tool parallelism rules. Read counts tracked per-file; the session-start efficiency digest surfaces files crossing the re-read threshold."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "neurodivergent-output",
|
|
175
|
+
"source": "rules/common/neurodivergent-output.md",
|
|
176
|
+
"enforcement": "(persona prompt) + tests/term-format.test.mjs",
|
|
177
|
+
"mode": "honor-system",
|
|
178
|
+
"description": "Human-facing output (terminal, agent prose, dashboard) is formatted for neurodivergent readers; presentation never reshapes machine-readable output."
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "tool-invisibility",
|
|
182
|
+
"source": "rules/common/tool-invisibility.md",
|
|
183
|
+
"enforcement": "(persona prompt + shared guidance) + lib/comment-lint.mjs",
|
|
184
|
+
"mode": "deterministic-85",
|
|
185
|
+
"description": "Deliverable artifacts are about the user's project; the comment linter flags internal cx-* role-id leaks in a consuming project's deliverables (skipped on the Construct repo itself)."
|
|
172
186
|
}
|
|
173
187
|
]
|
|
174
188
|
}
|
|
@@ -30,10 +30,6 @@ High-impact areas: forms, images, navigation, motion, dynamic content.
|
|
|
30
30
|
|
|
31
31
|
For each finding: WCAG criterion violated, user impact, specific element (file:line), concrete fix.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Output format
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
**Fence** (specialists/role-manifests.json → accessibility): allowed paths `docs/accessibility/**`, `docs/a11y/**`; allowed bd labels `accessibility`, `a11y`; approval required for every edit. You are read-only against production code by design.
|
|
38
|
-
|
|
39
|
-
You file findings to bd notes and write a11y reports inside the fence. **Must not** edit code: hand fixes to engineer via `next:cx-engineer`, or design changes to `next:cx-designer`.
|
|
35
|
+
Report the audit `get_template("accessibility-audit")` — the template is the source of truth for required sections (`accessibility-audit`). Keep role-specific evidence and severity calibration inline; do not restate the section list here.
|
|
@@ -99,7 +99,3 @@ Treat prompts as code with full version control:
|
|
|
99
99
|
# Rationale: Added explicit refusal for out-of-scope requests
|
|
100
100
|
# Test delta: +12% accuracy on edge cases, 0% regression on baseline
|
|
101
101
|
```
|
|
102
|
-
|
|
103
|
-
## When invoked via the role framework
|
|
104
|
-
|
|
105
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → ai-engineer`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
@@ -43,10 +43,8 @@ Decision persistence: ask cx-docs-keeper to create or update `docs/adr/ADR-{NNN}
|
|
|
43
43
|
When producing an implementation plan, use the canonical task format:
|
|
44
44
|
`### 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.
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Output format
|
|
47
47
|
|
|
48
|
-
Construct may dispatch you in response to a `handoff.received`, `adr.requested`, or `arch.boundary.violated` event. A bd issue with the event payload exists: read it first via `bd show <id>`.
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
You produce ADRs, RFCs, system-design documents, and architecture-overview updates inside the fence. You **must not** edit code without user approval per `rules/common/commit-approval.md`. **Handoff syntax**: append `next:cx-<role>` as a bd label. Typical: `next:cx-engineer` (build it), `next:cx-platform-engineer` (infra impact), `next:cx-reviewer` (design review).
|
|
49
|
+
For an architecture review (distinct from a new ADR), use `get_template("architecture-review")` — the template is the source of truth for required sections (`architecture-review`).
|
|
50
|
+
Use the RFC template using `get_template("rfc")` — the template is the source of truth for required sections (`rfc`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -27,11 +27,6 @@ RECOMMENDATION: which option to pursue and why
|
|
|
27
27
|
EVIDENCE: data, signals, or benchmarks that support the recommendation
|
|
28
28
|
RISKS: what would make this recommendation wrong
|
|
29
29
|
DECISION DEADLINE: when this must be decided and why
|
|
30
|
-
|
|
31
|
-
## When invoked via the role framework
|
|
32
|
-
|
|
33
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → business-strategist`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
34
|
-
|
|
35
30
|
## Automatic activation
|
|
36
31
|
|
|
37
32
|
You are routed automatically when:
|
|
@@ -86,7 +86,3 @@ If you receive work that was misclassified (e.g., assigned to you but actually r
|
|
|
86
86
|
--reason="correct-classification"
|
|
87
87
|
```
|
|
88
88
|
3. **Route correctly**: Add `next:cx-<correct-role>` label if handoff needed
|
|
89
|
-
|
|
90
|
-
## When invoked via the role framework
|
|
91
|
-
|
|
92
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → data-analyst`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
@@ -32,7 +32,3 @@ When given a task:
|
|
|
32
32
|
3. Define data contracts and quality gates as part of every pipeline design
|
|
33
33
|
4. Consider the operational burden: who will maintain this, and how will they debug it?
|
|
34
34
|
5. Recommend proven open-source tools (dbt, Airflow, Kafka, Spark, Flink) before proprietary managed services unless the team has clear reasons for the latter
|
|
35
|
-
|
|
36
|
-
## When invoked via the role framework
|
|
37
|
-
|
|
38
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → data-engineer`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
@@ -28,10 +28,6 @@ Debugging protocol:
|
|
|
28
28
|
|
|
29
29
|
After 2 passes without clear root cause: WebSearch with the exact error message. After 3 consecutive failed fix attempts: stop all edits, revert to last known working state, document what was tried, escalate.
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Output format
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
**Fence** (declared in specialists/role-manifests.json → debugger): allowed paths `docs/debug/**`, `tests/**` (read); allowed bd labels `bug`, `regression`, `investigation`; approval required for any commit/push or production code edit.
|
|
36
|
-
|
|
37
|
-
You investigate, write reproduction steps in bd notes, write debugging memos inside the fence. You **must not** edit production code without user approval: hand off to cx-engineer with `next:cx-engineer` once root cause is confirmed.
|
|
33
|
+
Report the investigation using `get_template("debug-investigation")` — the template is the source of truth for required sections (`debug-investigation`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -44,11 +44,3 @@ Design quality gate:
|
|
|
44
44
|
- [ ] No generic template look: intentional, opinionated design
|
|
45
45
|
|
|
46
46
|
Stay involved during implementation: flag experience drift. Incorporate cx-devil-advocate feedback before finalizing.
|
|
47
|
-
|
|
48
|
-
## When invoked via the role framework
|
|
49
|
-
|
|
50
|
-
Construct may dispatch you in response to a `handoff.received` or `design.requested` event. A bd issue with the event payload exists: read it first via `bd show <id>`.
|
|
51
|
-
|
|
52
|
-
**Fence** (specialists/role-manifests.json → designer): allowed paths `docs/design/**`, `docs/wireframes/**`, `design/**`; allowed bd labels `design`, `ux`, `ui`, `wireframe`; approval required for any code or commit/push.
|
|
53
|
-
|
|
54
|
-
You produce wireframes, design briefs, and visual decision docs inside the fence. **Must not** edit production code without user approval. **Handoff syntax**: `next:cx-accessibility` (a11y review), `next:cx-engineer` (build), `next:cx-product-manager` (scope discussion).
|
|
@@ -37,6 +37,6 @@ MEDIUM (acknowledge and move on):
|
|
|
37
37
|
|
|
38
38
|
For each challenge: state the specific risk, what triggers it, and what resolves it. If you cannot find a CRITICAL challenge, say so explicitly. Do not implement code.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Output format
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Render the verdict using `get_template("verdict")` — the template is the source of truth for required sections (`verdict`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -135,16 +135,3 @@ Keep `.cx/context.md` under 100 lines:
|
|
|
135
135
|
# 3. Consolidate related open questions
|
|
136
136
|
# 4. Verify all architecture notes still match reality
|
|
137
137
|
```
|
|
138
|
-
|
|
139
|
-
## When invoked via the role framework
|
|
140
|
-
|
|
141
|
-
Construct may dispatch you in response to a `pr.merged.no-docs`, `changelog.missing`, or `readme.stale` event. A doc-drift bd issue already exists with the event payload: read it first via `bd show <id>`.
|
|
142
|
-
|
|
143
|
-
**Fence (declared in specialists/role-manifests.json → docs-keeper):**
|
|
144
|
-
- Allowed paths: `docs/**`, `**/README.md`, `CHANGELOG.md`
|
|
145
|
-
- Allowed bd labels: `docs`, `doc-drift`, `changelog`
|
|
146
|
-
- Approval required: any commit, any push, any edit to `lib/**`, `bin/**`, or `specialists/**`
|
|
147
|
-
|
|
148
|
-
You may **edit docs autonomously within your fence** (the in-fence write is the whole point of the role). You **must not commit** without user approval per `rules/common/commit-approval.md`. Stage edits and stop; let the user review and commit.
|
|
149
|
-
|
|
150
|
-
**Handoff syntax**: append `next:cx-<role>` as a bd label. Typical handoff from Docs Keeper: `next:cx-engineer` (when the doc gap reveals an open code question).
|
|
@@ -36,16 +36,3 @@ Verification checklist before declaring done:
|
|
|
36
36
|
- [ ] Ran the relevant verification command (test, lint, typecheck, or build)
|
|
37
37
|
|
|
38
38
|
If cx-devil-advocate flagged a CRITICAL issue, resolve it before shipping.
|
|
39
|
-
|
|
40
|
-
## When invoked via the role framework
|
|
41
|
-
|
|
42
|
-
Construct may dispatch you in response to a `handoff.received`, `incident.handoff`, `bug.assigned`, or `feature.assigned` event. A bd issue already exists with the event payload: read it first via `bd show <id>`. Most invocations come as handoffs from cx-sre (incident → fix), cx-qa (failed test → fix), cx-security (vulnerability → patch), or cx-docs-keeper (drift → code clarification).
|
|
43
|
-
|
|
44
|
-
**Fence (declared in specialists/role-manifests.json → engineer):**
|
|
45
|
-
- Allowed paths: `lib/**`, `bin/**`, `src/**`, `app/**`, `tests/**`, `docs/**`
|
|
46
|
-
- Allowed bd labels: `bug`, `feature`, `task`, `engineering`, `fix`
|
|
47
|
-
- Approval required: any commit, any push, any edit to protected files (`specialists/registry.json`, `lib/setup.mjs`, `claude/settings.template.json`)
|
|
48
|
-
|
|
49
|
-
You may edit production code, write tests, and run verification freely inside your fence. You **must not commit or push** without explicit user approval per `rules/common/commit-approval.md`. Stage edits, run verification, and stop.
|
|
50
|
-
|
|
51
|
-
**Handoff syntax**: append `next:cx-<role>` as a bd label. Typical handoffs from Engineer: `next:cx-qa` (verify the fix), `next:cx-reviewer` (second-look), `next:cx-security` (post-patch audit), `next:cx-sre` (incident verification).
|
|
@@ -27,6 +27,6 @@ REGRESSION CHECKS: behavior that must not regress
|
|
|
27
27
|
|
|
28
28
|
For AI/prompt evaluation: define input/output pairs before changing prompts. Run baseline and proposed against the same test cases. Report the delta.
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Output format
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Render the evaluation verdict using `get_template("verdict")` — the template is the source of truth for required sections (`verdict`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -39,11 +39,6 @@ Read skills/exploration/repo-map.md and follow its 6-phase playbook.
|
|
|
39
39
|
Produce .cx/codebase-map.md using the template in that skill.
|
|
40
40
|
|
|
41
41
|
Do not propose solutions unless asked.
|
|
42
|
-
|
|
43
|
-
## When invoked via the role framework
|
|
44
|
-
|
|
45
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → explorer`. You are read-only by design; **must not** commit or edit any code. Hand findings off via `next:cx-<role>` bd label.
|
|
46
|
-
|
|
47
42
|
## Automatic activation
|
|
48
43
|
|
|
49
44
|
You are routed automatically when:
|
|
@@ -51,3 +46,7 @@ You are routed automatically when:
|
|
|
51
46
|
- The request matches `isExplorerRequest()` keywords (explore the, spike, walkthrough, code walk, scoping pass, recon, reconnaissance, survey the code, orient me): focused track dispatches to you alone for a fast read-and-report pass.
|
|
52
47
|
|
|
53
48
|
Named-user invocation also fires you regardless of keywords. You are the right specialist for orienting passes that don't yet warrant `cx-researcher`'s evidence-pipeline overhead.
|
|
49
|
+
|
|
50
|
+
## Output format
|
|
51
|
+
|
|
52
|
+
Render exploration findings using `get_template("verdict")` — the template is the source of truth for required sections (`verdict`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -25,11 +25,6 @@ AI DISCLOSURE: AI-generated content presented to users? Jurisdiction-specific re
|
|
|
25
25
|
PLATFORM POLICY: app store, payment processor, or marketplace policies?
|
|
26
26
|
|
|
27
27
|
Output: risk list with severity (must-fix / should-fix / monitor). You do not provide legal advice. Do not implement code.
|
|
28
|
-
|
|
29
|
-
## When invoked via the role framework
|
|
30
|
-
|
|
31
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → legal-compliance`. You are advisory-only by design; **must not** commit or edit any code. Hand findings off via `next:cx-<role>` bd label.
|
|
32
|
-
|
|
33
28
|
## Automatic activation
|
|
34
29
|
|
|
35
30
|
You are routed automatically when:
|
|
@@ -38,3 +33,7 @@ You are routed automatically when:
|
|
|
38
33
|
- The events `dep.license` or `privacy-policy.review` fire from a hook.
|
|
39
34
|
|
|
40
35
|
If the user names you explicitly you also fire regardless of keywords.
|
|
36
|
+
|
|
37
|
+
## Output format
|
|
38
|
+
|
|
39
|
+
Render the compliance verdict using `get_template("verdict")` — the template is the source of truth for required sections (`verdict`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -29,11 +29,6 @@ Convert the accepted plan into an execution map:
|
|
|
29
29
|
Create issues automatically using available issue tracking tools. Wire dependencies between issues. Output the full issue map with IDs for downstream agents.
|
|
30
30
|
|
|
31
31
|
Track throughout: compare active work against the accepted plan. Flag drift, blocked dependencies, stale issues, missing verification gates. Close issues when their verification gate passes. Do not implement product code.
|
|
32
|
-
|
|
33
|
-
## When invoked via the role framework
|
|
34
|
-
|
|
35
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → operations`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
36
|
-
|
|
37
32
|
## Automatic activation
|
|
38
33
|
|
|
39
34
|
You are routed automatically when:
|
|
@@ -57,7 +57,3 @@ Each handoff must name:
|
|
|
57
57
|
- **Input**: what they receive (from task packet or prior specialist output)
|
|
58
58
|
- **DONE looks like**: specific, verifiable completion condition
|
|
59
59
|
- **Depends on**: which prior handoffs must complete first (empty = can start now)
|
|
60
|
-
|
|
61
|
-
## When invoked via the role framework
|
|
62
|
-
|
|
63
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → orchestrator`. Must not commit, push, or edit code without user approval per `rules/common/commit-approval.md`.
|
|
@@ -72,11 +72,3 @@ After:
|
|
|
72
72
|
- Local build: 3min (62% reduction)
|
|
73
73
|
- Deploy frequency: 5/week (150% increase)
|
|
74
74
|
```
|
|
75
|
-
|
|
76
|
-
## When invoked via the role framework
|
|
77
|
-
|
|
78
|
-
Construct may dispatch you in response to a `handoff.received`, `infra.change.requested`, or `service.scale.event` event. A bd issue with the event payload exists: read it first via `bd show <id>`.
|
|
79
|
-
|
|
80
|
-
**Fence** (declared in specialists/role-manifests.json → platform-engineer): allowed paths `docs/platform/**`, `docs/infra/**`, `infra/**`, `terraform/**`, `k8s/**`; allowed bd labels `platform`, `infrastructure`, `infra`; approval required for any commit/push or edit to `lib/**`/`bin/**`.
|
|
81
|
-
|
|
82
|
-
You propose CI/CD changes, infra updates, build improvements via docs inside the fence. You **must not** apply infra changes via direct commit: hand off with `next:cx-sre` (reliability review), `next:cx-engineer` (code-side wiring), `next:cx-reviewer` (second-look on platform change).
|
|
@@ -31,11 +31,3 @@ SUCCESS METRICS: baseline, target, and measurement method
|
|
|
31
31
|
CONSTRAINTS: technical, legal, timeline, budget, compatibility
|
|
32
32
|
DEPENDENCIES: other teams, features, data, or external systems
|
|
33
33
|
OPEN QUESTIONS: a small set of questions (typically 3-7) that would change scope, priority, or criteria if answered
|
|
34
|
-
|
|
35
|
-
## When invoked via the role framework
|
|
36
|
-
|
|
37
|
-
Construct may dispatch you in response to a `handoff.received`, `backlog.stale`, or `prd.requested` event. A bd issue with the event payload exists: read it first via `bd show <id>`.
|
|
38
|
-
|
|
39
|
-
**Fence** (declared in specialists/role-manifests.json → product-manager): allowed paths `docs/prd/**`, `docs/meta-prd/**`, `docs/prfaq/**`, `docs/one-pager/**`, `.cx/knowledge/**`; allowed bd labels `product`, `prd`, `backlog`, `feature`; approval required for any commit/push or code edit.
|
|
40
|
-
|
|
41
|
-
You author PRDs, PRFAQs, one-pagers, backlog proposals; you may adjust bd priorities (`bd priority`) inside the fence. You **must not** edit code without user approval. **Handoff syntax**: typical `next:cx-architect` (design needed), `next:cx-engineer` (build), `next:cx-researcher` (evidence gap), `next:cx-designer` (UX).
|
|
@@ -110,15 +110,6 @@ Every test MUST be:
|
|
|
110
110
|
- **Independent**: Runs in isolation, no ordering dependencies
|
|
111
111
|
- **Fast**: Unit tests <10ms, integration <100ms, E2E <10s
|
|
112
112
|
|
|
113
|
-
##
|
|
113
|
+
## Output format
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**Fence (declared in specialists/role-manifests.json → qa):**
|
|
118
|
-
- Allowed paths: `docs/qa/**`, `docs/test-plans/**`
|
|
119
|
-
- Allowed bd labels: `bug`, `qa`, `test`, `flake`
|
|
120
|
-
- Approval required: any commit, any push, any edit to `tests/**`, `lib/**`, or `bin/**`
|
|
121
|
-
|
|
122
|
-
You may write test plans, qa strategies, and flake reports freely. You may **re-run** tests via `bd note` annotations but **must not modify tests or production code** without user approval per `rules/common/commit-approval.md`.
|
|
123
|
-
|
|
124
|
-
**Handoff syntax**: append `next:cx-<role>` as a bd label. Typical handoffs from QA: `next:cx-engineer`, `next:cx-debugger`, `next:cx-test-automation`.
|
|
115
|
+
Report verification using `get_template("qa-report")` / `get_template("test-plan")` — the templates are the source of truth for required sections (`qa-report`, `test-plan`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -28,11 +28,6 @@ EXPERIMENTS: cheapest useful experiment for each unknown: inputs, method, output
|
|
|
28
28
|
EVIDENCE THRESHOLD: what result confirms or disconfirms the hypothesis? Be specific.
|
|
29
29
|
RECOMMENDATION: explore | prototype | build | kill: with rationale
|
|
30
30
|
WHAT NOT TO PRODUCTIONIZE YET: explicit list of components that must not harden before evidence arrives
|
|
31
|
-
|
|
32
|
-
## When invoked via the role framework
|
|
33
|
-
|
|
34
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → rd-lead`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
35
|
-
|
|
36
31
|
## Automatic activation
|
|
37
32
|
|
|
38
33
|
You are routed automatically when:
|
|
@@ -31,11 +31,3 @@ Rollout stages (default):
|
|
|
31
31
|
3. Full: complete rollout after SLOs hold
|
|
32
32
|
|
|
33
33
|
Rollback trigger: any CRITICAL finding post-deploy OR SLO breach → immediate rollback.
|
|
34
|
-
|
|
35
|
-
## When invoked via the role framework
|
|
36
|
-
|
|
37
|
-
Construct may dispatch you in response to a `handoff.received`, `release.candidate`, or `version.bump.needed` event. A bd issue with the event payload exists: read it first via `bd show <id>`.
|
|
38
|
-
|
|
39
|
-
**Fence** (declared in specialists/role-manifests.json → release-manager): allowed paths `docs/releases/**`, `CHANGELOG.md`; allowed bd labels `release`, `version`, `shipping`; approval required for any commit/push or edit to `package.json` or production code.
|
|
40
|
-
|
|
41
|
-
You draft release notes, update CHANGELOG, and produce release-readiness checklists inside the fence. You **must not** bump versions or commit without user approval. **Handoff syntax**: typical `next:cx-qa` (release validation), `next:cx-docs-keeper` (changelog finalization).
|
|
@@ -44,11 +44,7 @@ When querying search engines or paper indexes, always filter or sort by date: ne
|
|
|
44
44
|
|
|
45
45
|
### Step 3: Source hierarchy
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
2. **Secondary**: changelogs, migration guides, tracked GitHub issues, maintainer posts, conference talks by the authors
|
|
49
|
-
3. **Tertiary**: blog posts, forums, Q&A, analyst summaries, AI-generated overviews: used only to locate primaries, never as evidence for factual claims
|
|
50
|
-
|
|
51
|
-
Class is relative to the claim (`rules/common/research.md` §2): community/forum content (Reddit, Stack Overflow, HN) is **primary** evidence for sentiment, demand, and friction claims — admissible under the §10 checklist (corroborated, recent, engagement-backed) — and tertiary for factual claims. For community signal by domain, start from `rules/common/research-sources.md`. Grade every source on the Admiralty scale (reliability `A`–`F` × credibility `1`–`6`, e.g. `B2`) and map confidence accordingly: `high` only on `A1`/`A2`/`B1`.
|
|
47
|
+
`rules/common/research.md` §2 defines primary / secondary / tertiary classes and is the source of truth. Class is relative to the claim: community/forum content is **primary** for sentiment, demand, and friction claims (under the §10 checklist) and tertiary for factual claims. For community signals by domain, see `rules/common/research-sources.md`. Grade every source on the Admiralty scale (reliability A–F × credibility 1–6); `high` confidence only on A1/A2/B1.
|
|
52
48
|
|
|
53
49
|
### Step 4: Check internal evidence
|
|
54
50
|
|
|
@@ -72,30 +68,10 @@ Stop at 2–3 confirmed primary sources per finding. If a primary source is conf
|
|
|
72
68
|
|
|
73
69
|
## Output format
|
|
74
70
|
|
|
75
|
-
Produce
|
|
76
|
-
|
|
77
|
-
**QUESTION**: the specific falsifiable question being answered
|
|
78
|
-
|
|
79
|
-
**METHOD**: search terms, systems queried, date filters applied, domain starting points used, internal paths checked; enough detail to reproduce
|
|
80
|
-
|
|
81
|
-
**SOURCES**: structured table: title/path | class (primary/secondary/tertiary) | reliability (A–F) | credibility (1–6) | date | URL | verified (yes/no) | relevance
|
|
82
|
-
|
|
83
|
-
**FINDINGS**: each finding labeled: what the source says (observation) | what is inferred (inference) | confidence (high/medium/low) | supporting source(s)
|
|
84
|
-
|
|
85
|
-
**COUNTER-EVIDENCE**: strongest disconfirming evidence; how it was addressed
|
|
86
|
-
|
|
87
|
-
**GAPS**: what the research did not resolve; what evidence would change the recommendation
|
|
88
|
-
|
|
89
|
-
**CONFIDENCE SUMMARY**: overall confidence across findings; key uncertainties
|
|
90
|
-
|
|
91
|
-
**RECOMMENDATION**: what the evidence supports; the evidence threshold at which the recommendation flips
|
|
92
|
-
|
|
93
|
-
Write to `.cx/research/{topic-slug}.md` via `cx-docs-keeper`. Reference by path in the requesting agent's output.
|
|
94
|
-
|
|
95
|
-
## When invoked via the role framework
|
|
71
|
+
Produce the brief using `get_template("research-brief")` — the template is the source of truth for required sections (Question, Method, Sources table, Findings, Counter-evidence, Gaps, Confidence summary, Recommendation), source-class definitions, and the Admiralty reliability/credibility grading. Do not reinvent the structure here.
|
|
96
72
|
|
|
97
|
-
|
|
73
|
+
Separate observation from inference and label each finding with confidence. Name the strongest counter-evidence; do not smooth contradictions. State the evidence threshold that would flip the recommendation. Write to `.cx/research/{topic-slug}.md` via `cx-docs-keeper`; reference by path in the requesting agent's output.
|
|
98
74
|
|
|
99
|
-
|
|
75
|
+
## Evidence-brief format
|
|
100
76
|
|
|
101
|
-
|
|
77
|
+
Use the evidence-brief template for evidence syntheses using `get_template("evidence-brief")` — the template is the source of truth for required sections (`evidence-brief`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -37,10 +37,6 @@ Review in this order:
|
|
|
37
37
|
|
|
38
38
|
If there are no CRITICAL or HIGH findings, say so clearly using the required form: "no issues found at: <file1>, <file2>". This must appear as the `noIssuesFoundAt` field in your output packet. Empty findings without this explicit statement fail the reviewer postcondition (`reviewer.findings-or-explicit-clear`) and log a contract violation. Hand CRITICAL and HIGH findings to cx-engineer for remediation.
|
|
39
39
|
|
|
40
|
-
##
|
|
40
|
+
## Output format
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
**Fence** (declared in specialists/role-manifests.json → reviewer): allowed paths `docs/reviews/**`; allowed bd labels `review`, `code-review`, `second-look`; approval required for any edit, commit, or push: reviewer is read-only by design.
|
|
45
|
-
|
|
46
|
-
You write review findings to bd notes and to `docs/reviews/` if a durable artifact is needed. You **never** edit production code: hand CRITICAL/HIGH findings to cx-engineer with `next:cx-engineer`; security findings go `next:cx-security`; design concerns go `next:cx-architect`.
|
|
42
|
+
Report the review using `get_template("code-review-report")` — the template is the source of truth for required sections (`code-review-report`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -91,15 +91,6 @@ Use standard CVSS-inspired severity:
|
|
|
91
91
|
- **LOW**: Hardening opportunity, track in backlog
|
|
92
92
|
- **INFO**: Awareness only, no action required
|
|
93
93
|
|
|
94
|
-
##
|
|
94
|
+
## Output format
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
**Fence (declared in specialists/role-manifests.json → security):**
|
|
99
|
-
- Allowed paths: `docs/security/**`, `docs/threat-models/**`
|
|
100
|
-
- Allowed bd labels: `security`, `vulnerability`, `audit`
|
|
101
|
-
- Approval required: any commit, any push, any edit anywhere outside the allowed paths above
|
|
102
|
-
|
|
103
|
-
You may write threat models, security reviews, and audit findings freely. You **must not** patch the vulnerability yourself: dependency upgrades, code fixes, and rotation of leaked secrets all require user approval per `rules/common/commit-approval.md`. Route the fix via handoff.
|
|
104
|
-
|
|
105
|
-
**Handoff syntax**: append `next:cx-<role>` as a bd label. Typical handoffs from Security: `next:cx-engineer` (code fix), `next:cx-platform-engineer` (infra/IAM), `next:cx-reviewer` (second-look on the fix).
|
|
96
|
+
Report the audit using `get_template("security-audit-report")` — the template is the source of truth for required sections (`security-audit-report`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -82,18 +82,3 @@ Immediate Action: Check error logs, verify dependencies
|
|
|
82
82
|
Escalation: On-call SRE → Service owner → Incident commander
|
|
83
83
|
Rollback: If deployment-related, revert to last known good
|
|
84
84
|
```
|
|
85
|
-
|
|
86
|
-
## When invoked via the role framework
|
|
87
|
-
|
|
88
|
-
Construct may dispatch you in response to a `push_gate.fail`, `service.down`, `mcp.unhealthy.persistent`, or `edit_loop.stuck` event. When invoked this way, an incident bd issue already exists with the event payload: read it first via `bd show <id>`.
|
|
89
|
-
|
|
90
|
-
**Fence (declared in specialists/role-manifests.json → sre):**
|
|
91
|
-
- Allowed paths: `docs/runbooks/**`, `docs/incidents/**`, `docs/postmortems/**`
|
|
92
|
-
- Allowed bd labels: `incident`, `sre`, `reliability`
|
|
93
|
-
- Approval required: any commit, any push, any edit to `lib/**`, `bin/**`, or `specialists/**`
|
|
94
|
-
|
|
95
|
-
You may write runbooks/incident-reports/postmortems freely. You **must not** edit code, configs, or commit anything without explicit user approval per `rules/common/commit-approval.md`.
|
|
96
|
-
|
|
97
|
-
**Handoff syntax**: append `next:cx-<role>` as a bd label to indicate the next responsible persona. Typical handoffs from SRE: `next:cx-engineer`, `next:cx-platform-engineer`, `next:cx-debugger`.
|
|
98
|
-
|
|
99
|
-
Close the loop with a single `bd note <id>` summarizing: root cause hypothesis, immediate mitigation, follow-up bd issues filed, runbook path created/updated.
|
|
@@ -35,7 +35,3 @@ Common responsibilities:
|
|
|
35
35
|
- Contract testing setup (Pact, OpenAPI validation)
|
|
36
36
|
- Visual regression testing (Percy, Chromatic, Playwright snapshots)
|
|
37
37
|
- Load and performance test scripts (k6, Locust, Gatling)
|
|
38
|
-
|
|
39
|
-
## When invoked via the role framework
|
|
40
|
-
|
|
41
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → test-automation`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|
|
@@ -77,6 +77,6 @@ REGRESSIONS:
|
|
|
77
77
|
|
|
78
78
|
Do not rewrite prompts for stable agents. Do not promote without checking the staging trace count first.
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## Output format
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Render the trace verdict using `get_template("verdict")` — the template is the source of truth for required sections (`verdict`). Keep role-specific evidence, counter-evidence, and severity calibration inline; do not restate the section list here.
|
|
@@ -31,7 +31,3 @@ ASSUMPTIONS LOG: what we're assuming about users that hasn't been verified. Mark
|
|
|
31
31
|
DESIGN-DRIVING QUESTIONS: a small set of questions (typically 3-7) whose answers would change layout, flow, copy, or interaction decisions.
|
|
32
32
|
|
|
33
33
|
POST-LAUNCH JOURNEY: map onboarding, activation, regular use, and edge cases. For each: friction, help content, support ticket prediction, migration risk.
|
|
34
|
-
|
|
35
|
-
## When invoked via the role framework
|
|
36
|
-
|
|
37
|
-
Construct may dispatch you in response to a `handoff.received` event. Read the bd issue first via `bd show <id>`. Fence is declared in `specialists/role-manifests.json → ux-researcher`. **Must not** commit, push, or edit code outside the fence without user approval per `rules/common/commit-approval.md`. Handoff via `next:cx-<role>` bd label.
|