@geraldmaron/construct 1.0.6 → 1.0.8
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 +39 -34
- package/bin/construct +1403 -96
- package/commands/build/feature.md +1 -1
- package/commands/build/fix.md +1 -1
- package/commands/design/access.md +1 -1
- package/commands/design/flow.md +1 -1
- package/commands/design/ui.md +1 -1
- package/commands/measure/experiment.md +1 -1
- package/commands/measure/metrics.md +1 -1
- package/commands/measure/results.md +1 -1
- package/commands/plan/api.md +1 -1
- package/commands/plan/challenge.md +1 -1
- package/commands/plan/decide.md +1 -1
- package/commands/plan/feature.md +1 -1
- package/commands/plan/requirements.md +1 -1
- package/commands/remember/context.md +1 -1
- package/commands/remember/handoff.md +1 -1
- package/commands/remember/runbook.md +1 -1
- package/commands/review/code.md +1 -1
- package/commands/review/quality.md +1 -1
- package/commands/review/security.md +1 -1
- package/commands/ship/ready.md +1 -1
- package/commands/ship/release.md +1 -1
- package/commands/ship/status.md +1 -1
- package/commands/understand/docs.md +1 -1
- package/commands/understand/this.md +1 -1
- package/commands/understand/why.md +1 -1
- package/commands/work/clean.md +1 -1
- package/commands/work/drive.md +1 -1
- package/commands/work/optimize-prompts.md +2 -2
- package/commands/work/parallel-review.md +1 -1
- package/db/schema/007_tags.sql +30 -0
- package/db/schema/008_skill_usage.sql +24 -0
- package/db/schema/009_scheduler.sql +14 -0
- package/examples/internal/roles/architect/bad/clever-plan-without-contracts.md +1 -1
- package/examples/internal/roles/architect/golden/explicit-tradeoff-before-plan.md +1 -1
- package/examples/internal/roles/engineer/bad/speculative-abstraction.md +1 -1
- package/examples/internal/roles/engineer/golden/read-before-write.md +1 -1
- package/examples/internal/roles/qa/bad/coverage-theater.md +1 -1
- package/examples/internal/roles/qa/golden/regression-gate.md +1 -1
- package/examples/seed-observations/decisions.md +1 -1
- package/lib/audit-skills.mjs +3 -3
- package/lib/auto-docs.mjs +8 -8
- package/lib/boundary.mjs +126 -0
- package/lib/cache-strategy-google.js +26 -31
- package/lib/cli-commands.mjs +276 -122
- package/lib/comment-lint.mjs +139 -1
- package/lib/completions.mjs +1 -1
- package/lib/config/schema.mjs +15 -1
- package/lib/contracts/validate.mjs +371 -0
- package/lib/daemons/contract.mjs +210 -0
- package/lib/distill.mjs +22 -4
- package/lib/doc-stamp.mjs +48 -0
- package/lib/docs-verify.mjs +59 -6
- package/lib/doctor/cli.mjs +16 -1
- package/lib/doctor/index.mjs +3 -1
- package/lib/doctor/watchers/consistency.mjs +360 -0
- package/lib/doctor/watchers/mcp-protocol.mjs +232 -0
- package/lib/document-extract.mjs +420 -17
- package/lib/document-ingest.mjs +2 -0
- package/lib/embed/cli.mjs +124 -3
- package/lib/embed/daemon.mjs +43 -4
- package/lib/embed/docs-lifecycle.mjs +1 -1
- package/lib/embed/inbox.mjs +50 -3
- package/lib/embed/role-framing.mjs +3 -3
- package/lib/embed/scheduler.mjs +33 -5
- package/lib/env-config.mjs +9 -3
- package/lib/evaluator-optimizer.mjs +2 -3
- package/lib/extractors/calendar.mjs +173 -0
- package/lib/extractors/shared/drop-info.mjs +22 -0
- package/lib/extractors/transcript.mjs +0 -0
- package/lib/gates-audit.mjs +8 -2
- package/lib/git-hooks/prepare-commit-msg +1 -1
- package/lib/headhunt.mjs +2 -2
- package/lib/hooks/agent-tracker.mjs +6 -11
- package/lib/hooks/comment-lint.mjs +16 -0
- package/lib/hooks/guard-bash.mjs +35 -14
- package/lib/hooks/mcp-audit.mjs +14 -1
- package/lib/hooks/pre-compact.mjs +92 -5
- package/lib/hooks/pre-push-gate.mjs +41 -8
- package/lib/hooks/proactive-activation.mjs +0 -14
- package/lib/hooks/registry-sync.mjs +2 -2
- package/lib/hooks/rule-verifier.mjs +217 -0
- package/lib/hooks/session-optimize.mjs +2 -1
- package/lib/hooks/stop-notify.mjs +7 -6
- package/lib/host-capabilities.mjs +10 -1
- package/lib/hygiene/scan.mjs +141 -0
- package/lib/init-unified.mjs +73 -65
- package/lib/install/stage-project.mjs +4 -4
- package/lib/intake/classify.mjs +309 -58
- package/lib/intake/daemon.mjs +121 -0
- package/lib/intake/filesystem-queue.mjs +31 -6
- package/lib/intake/intake-config.mjs +2 -1
- package/lib/intake/postgres-queue.mjs +45 -3
- package/lib/intake/prepare.mjs +3 -1
- package/lib/intake/quarantine.mjs +205 -0
- package/lib/intake/session-prelude.mjs +7 -1
- package/lib/intake/traceability.mjs +90 -0
- package/lib/knowledge/postgres-search.mjs +132 -0
- package/lib/knowledge/research-store.mjs +2 -0
- package/lib/knowledge/search.mjs +14 -4
- package/lib/maintenance/cleanup.mjs +315 -0
- package/lib/mcp/memory-bridge.mjs +276 -0
- package/lib/mcp/server.mjs +11 -3
- package/lib/mcp/tools/skills.mjs +32 -11
- package/lib/mcp/tools/workflow.mjs +25 -0
- package/lib/mcp-catalog.json +12 -8
- package/lib/mcp-platform-config.mjs +16 -8
- package/lib/migrations/index.mjs +106 -0
- package/lib/migrations/v1-baseline.mjs +33 -0
- package/lib/model-registry.mjs +1 -1
- package/lib/observation-store.mjs +9 -4
- package/lib/opencode-runtime-plugin.mjs +1 -1
- package/lib/orchestration-policy.mjs +4 -4
- package/lib/outcomes/record.mjs +2 -0
- package/lib/overrides/resolver.mjs +3 -3
- package/lib/parity.mjs +4 -4
- package/lib/policy/engine.mjs +2 -2
- package/lib/profiles/lifecycle.mjs +1 -1
- package/lib/profiles/rebrand.mjs +46 -0
- package/lib/project-init-shared.mjs +12 -0
- package/lib/prompt-metadata.mjs +4 -4
- package/lib/provider-capabilities.js +20 -7
- package/lib/providers/auth-manager.mjs +58 -17
- package/lib/providers/circuit-breaker.mjs +14 -0
- package/lib/providers/contract.mjs +67 -3
- package/lib/providers/creds.mjs +219 -0
- package/lib/providers/scaffold.mjs +107 -0
- package/lib/reflect.mjs +49 -12
- package/lib/role-preload.mjs +5 -0
- package/lib/roles/catalog.mjs +1 -1
- package/lib/roles/manifest.mjs +2 -2
- package/lib/scheduler/index.mjs +112 -0
- package/lib/scheduler/solo.mjs +183 -0
- package/lib/server/index.mjs +29 -29
- package/lib/server/insights.mjs +14 -12
- package/lib/server/langfuse-login.mjs +58 -0
- package/lib/server/static/assets/index-ab25c707.js +1 -1
- package/lib/session-store.mjs +6 -4
- package/lib/setup.mjs +14 -3
- package/lib/{agent-contracts-enforce.mjs → specialist-contracts-enforce.mjs} +4 -4
- package/lib/{agent-contracts.mjs → specialist-contracts.mjs} +9 -8
- package/lib/{agents → specialists}/postconditions.mjs +3 -3
- package/lib/{agents → specialists}/schema.mjs +6 -6
- package/lib/status.mjs +13 -11
- package/lib/storage/backup.mjs +2 -2
- package/lib/tags/lifecycle.mjs +278 -0
- package/lib/tags/vocabulary.mjs +140 -0
- package/lib/telemetry/client.mjs +5 -1
- package/lib/telemetry/otel-tracer.mjs +184 -0
- package/lib/telemetry/skill-calls.mjs +73 -12
- package/lib/uninstall/uninstall.mjs +1 -1
- package/lib/update.mjs +1 -1
- package/lib/validator.mjs +57 -56
- package/lib/version.mjs +51 -0
- package/lib/worker/trace.mjs +5 -1
- package/lib/workflows/instantiate.mjs +320 -0
- package/package.json +16 -3
- package/personas/construct.md +5 -3
- package/platforms/claude/CLAUDE.md +1 -1
- package/rules/common/development-workflow.md +2 -1
- package/rules/common/no-fabrication.md +69 -0
- package/rules/common/review-before-change.md +58 -0
- package/scripts/{sync-agents.mjs → sync-specialists.mjs} +171 -68
- package/skills/ai/prompt-optimizer.md +3 -3
- package/skills/exploration/dependency-graph-reading.md +98 -0
- package/skills/exploration/tracer-bullet-method.md +71 -0
- package/skills/exploration/unknown-codebase-onboarding.md +91 -0
- package/skills/operating/change-management.md +91 -0
- package/skills/operating/incident-response.md +75 -0
- package/skills/operating/oncall-rotation.md +95 -0
- package/skills/operating/orchestration-reference.md +2 -2
- package/skills/strategy/competitive-landscape.md +75 -0
- package/skills/strategy/market-research-methods.md +87 -0
- package/skills/strategy/narrative-arc.md +77 -0
- package/skills/strategy/pricing-positioning.md +94 -0
- package/specialists/contracts.json +1002 -0
- package/specialists/contracts.schema.json +83 -0
- package/specialists/policy-inventory.json +160 -0
- package/{agents → specialists}/prompts/cx-accessibility.md +3 -1
- package/{agents → specialists}/prompts/cx-ai-engineer.md +3 -1
- package/{agents → specialists}/prompts/cx-architect.md +3 -1
- package/{agents → specialists}/prompts/cx-business-strategist.md +3 -1
- package/{agents → specialists}/prompts/cx-data-analyst.md +3 -1
- package/{agents → specialists}/prompts/cx-data-engineer.md +3 -1
- package/{agents → specialists}/prompts/cx-debugger.md +3 -1
- package/{agents → specialists}/prompts/cx-designer.md +3 -1
- package/{agents → specialists}/prompts/cx-devil-advocate.md +3 -1
- package/{agents → specialists}/prompts/cx-docs-keeper.md +4 -2
- package/{agents → specialists}/prompts/cx-engineer.md +4 -2
- package/{agents → specialists}/prompts/cx-evaluator.md +3 -1
- package/{agents → specialists}/prompts/cx-explorer.md +3 -1
- package/{agents → specialists}/prompts/cx-legal-compliance.md +3 -1
- package/{agents → specialists}/prompts/cx-operations.md +3 -1
- package/{agents → specialists}/prompts/cx-orchestrator.md +4 -2
- package/{agents → specialists}/prompts/cx-platform-engineer.md +3 -1
- package/{agents → specialists}/prompts/cx-product-manager.md +3 -1
- package/{agents → specialists}/prompts/cx-qa.md +3 -1
- package/{agents → specialists}/prompts/cx-rd-lead.md +3 -1
- package/{agents → specialists}/prompts/cx-release-manager.md +3 -1
- package/{agents → specialists}/prompts/cx-researcher.md +3 -1
- package/{agents → specialists}/prompts/cx-reviewer.md +4 -2
- package/{agents → specialists}/prompts/cx-security.md +3 -1
- package/{agents → specialists}/prompts/cx-sre.md +4 -2
- package/{agents → specialists}/prompts/cx-test-automation.md +3 -1
- package/{agents → specialists}/prompts/cx-trace-reviewer.md +5 -3
- package/{agents → specialists}/prompts/cx-ux-researcher.md +3 -1
- package/{agents → specialists}/registry.json +651 -418
- package/{agents → specialists}/role-manifests.json +8 -8
- package/templates/docs/construct_guide.md +6 -6
- package/templates/docs/skill-artifact.md +1 -1
- package/templates/provider-scaffold/health.test.mjs +30 -0
- package/templates/provider-scaffold/index.mjs +48 -0
- package/templates/workflows/cross-team-handoff.yml +85 -0
- package/templates/workflows/engineering-onboarding.yml +77 -0
- package/templates/workflows/new-feature.yml +53 -0
- package/agents/contracts.json +0 -387
- /package/{agents → specialists}/teams.json +0 -0
|
@@ -4,7 +4,7 @@ commands/build/feature.md (Build a feature) implement it end to end, tested and
|
|
|
4
4
|
Build a feature: implement it end to end, tested and ready to ship
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Build a feature: implement it end to end, tested and ready to ship
|
|
7
|
+
description: "Build a feature: implement it end to end, tested and ready to ship"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Build the following: $ARGUMENTS
|
package/commands/build/fix.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/build/fix.md (Fix something broken) reproduce, find the root cause, app
|
|
|
4
4
|
Fix something broken: reproduce, find the root cause, apply the smallest safe change
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Fix something broken: reproduce, find the root cause, apply the smallest safe change
|
|
7
|
+
description: "Fix something broken: reproduce, find the root cause, apply the smallest safe change"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct.
|
|
@@ -4,7 +4,7 @@ commands/design/access.md (Accessibility audit) WCAG 2.1 AA, keyboard, screen re
|
|
|
4
4
|
Accessibility audit: WCAG 2.1 AA, keyboard, screen readers, contrast, motion
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Accessibility audit: WCAG 2.1 AA, keyboard, screen readers, contrast, motion
|
|
7
|
+
description: "Accessibility audit: WCAG 2.1 AA, keyboard, screen readers, contrast, motion"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Audit: $ARGUMENTS
|
package/commands/design/flow.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/design/flow.md (Map the user flow) entry to success, friction points, j
|
|
|
4
4
|
Map the user flow: entry to success, friction points, jobs-to-be-done
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Map the user flow: entry to success, friction points, jobs-to-be-done
|
|
7
|
+
description: "Map the user flow: entry to success, friction points, jobs-to-be-done"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Map the user flow for: $ARGUMENTS
|
package/commands/design/ui.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/design/ui.md (Design or review UI) visual hierarchy, states, interactio
|
|
|
4
4
|
Design or review UI: visual hierarchy, states, interaction model, accessibility baseline
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Design or review UI: visual hierarchy, states, interaction model, accessibility baseline
|
|
7
|
+
description: "Design or review UI: visual hierarchy, states, interaction model, accessibility baseline"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Design or review the UI for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/measure/experiment.md (Design an experiment) hypothesis, test, evidence
|
|
|
4
4
|
Design an experiment: hypothesis, test, evidence threshold, go/no-go decision
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Design an experiment: hypothesis, test, evidence threshold, go/no-go decision
|
|
7
|
+
description: "Design an experiment: hypothesis, test, evidence threshold, go/no-go decision"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Design an experiment for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/measure/metrics.md (Define metrics) what to measure, baselines, success
|
|
|
4
4
|
Define metrics: what to measure, baselines, success thresholds, instrumentation needed
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Define metrics: what to measure, baselines, success thresholds, instrumentation needed
|
|
7
|
+
description: "Define metrics: what to measure, baselines, success thresholds, instrumentation needed"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Define metrics for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/measure/results.md (Analyze results) interpret data, separate signal fr
|
|
|
4
4
|
Analyze results: interpret data, separate signal from noise, produce a recommendation
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Analyze results: interpret data, separate signal from noise, produce a recommendation
|
|
7
|
+
description: "Analyze results: interpret data, separate signal from noise, produce a recommendation"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Analyze: $ARGUMENTS
|
package/commands/plan/api.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/plan/api.md (Design an API) contracts, endpoints, error model, data sch
|
|
|
4
4
|
Design an API: contracts, endpoints, error model, data schema
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Design an API: contracts, endpoints, error model, data schema
|
|
7
|
+
description: "Design an API: contracts, endpoints, error model, data schema"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Design the API for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/plan/challenge.md (Challenge a plan) stress-test assumptions, surface f
|
|
|
4
4
|
Challenge a plan: stress-test assumptions, surface failure modes and risks
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Challenge a plan: stress-test assumptions, surface failure modes and risks
|
|
7
|
+
description: "Challenge a plan: stress-test assumptions, surface failure modes and risks"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Challenge the following: $ARGUMENTS
|
package/commands/plan/decide.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/plan/decide.md (Record a decision) context, options considered, consequ
|
|
|
4
4
|
Record a decision: context, options considered, consequences, what it locks in
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Record a decision: context, options considered, consequences, what it locks in
|
|
7
|
+
description: "Record a decision: context, options considered, consequences, what it locks in"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Document the decision about: $ARGUMENTS
|
package/commands/plan/feature.md
CHANGED
|
@@ -5,7 +5,7 @@ Produces a structured spec using the canonical Construct plan format, saves it
|
|
|
5
5
|
to .cx/plans/ as a durable planning artifact linked to the active tracker slice.
|
|
6
6
|
-->
|
|
7
7
|
---
|
|
8
|
-
description: Plan a feature: produce a structured spec and link it to the active tracker-backed plan
|
|
8
|
+
description: "Plan a feature: produce a structured spec and link it to the active tracker-backed plan"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
You are Construct. Plan the following: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/plan/requirements.md (Define requirements) what needs to be true for th
|
|
|
4
4
|
Define requirements: what needs to be true for this to be done
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Define requirements: what needs to be true for this to be done
|
|
7
|
+
description: "Define requirements: what needs to be true for this to be done"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Define requirements for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/remember/context.md (Save project context) update .cx/context.md so the
|
|
|
4
4
|
Save project context: update .cx/context.md so the next session picks up where this one left off
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Save project context: update .cx/context.md so the next session picks up where this one left off
|
|
7
|
+
description: "Save project context: update .cx/context.md so the next session picks up where this one left off"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Save context for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/remember/handoff.md (Write a handoff) transfer context so the next sess
|
|
|
4
4
|
Write a handoff: transfer context so the next session or person can continue without loss
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Write a handoff: transfer context so the next session or person can continue without loss
|
|
7
|
+
description: "Write a handoff: transfer context so the next session or person can continue without loss"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Write a handoff for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/remember/runbook.md (Write a runbook) step-by-step procedure for a recu
|
|
|
4
4
|
Write a runbook: step-by-step procedure for a recurring task or incident
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Write a runbook: step-by-step procedure for a recurring task or incident
|
|
7
|
+
description: "Write a runbook: step-by-step procedure for a recurring task or incident"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Write a runbook for: $ARGUMENTS
|
package/commands/review/code.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/review/code.md (Code review) correctness, regressions, security, test c
|
|
|
4
4
|
Code review: correctness, regressions, security, test coverage
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Code review: correctness, regressions, security, test coverage
|
|
7
|
+
description: "Code review: correctness, regressions, security, test coverage"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Review: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/review/quality.md (Quality audit) complexity, naming, duplication, dead
|
|
|
4
4
|
Quality audit: complexity, naming, duplication, dead code, maintainability
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Quality audit: complexity, naming, duplication, dead code, maintainability
|
|
7
|
+
description: "Quality audit: complexity, naming, duplication, dead code, maintainability"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Audit quality for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/review/security.md (Security scan) secrets, auth, injection, data expos
|
|
|
4
4
|
Security scan: secrets, auth, injection, data exposure, dependency risk
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Security scan: secrets, auth, injection, data exposure, dependency risk
|
|
7
|
+
description: "Security scan: secrets, auth, injection, data exposure, dependency risk"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Scan: $ARGUMENTS
|
package/commands/ship/ready.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/ship/ready.md (Pre-release check) is this ready to ship?
|
|
|
4
4
|
Pre-release check: is this ready to ship?
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Pre-release check: is this ready to ship?
|
|
7
|
+
description: "Pre-release check: is this ready to ship?"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Check if the following is ready: $ARGUMENTS
|
package/commands/ship/release.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/ship/release.md (Release) plan rollout, changelog, rollback, and post-r
|
|
|
4
4
|
Release: plan rollout, changelog, rollback, and post-release verification
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Release: plan rollout, changelog, rollback, and post-release verification
|
|
7
|
+
description: "Release: plan rollout, changelog, rollback, and post-release verification"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Release the following: $ARGUMENTS
|
package/commands/ship/status.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/ship/status.md (Status) current project state, workflow, uncommitted ch
|
|
|
4
4
|
Status: current project state, workflow, uncommitted changes, recent activity
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Status: current project state, workflow, uncommitted changes, recent activity
|
|
7
|
+
description: "Status: current project state, workflow, uncommitted changes, recent activity"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Report status for: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/understand/docs.md (Look up documentation) current behavior from primar
|
|
|
4
4
|
Look up documentation: current behavior from primary sources, not training memory
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Look up documentation: current behavior from primary sources, not training memory
|
|
7
|
+
description: "Look up documentation: current behavior from primary sources, not training memory"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Look up: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/understand/this.md (Explore and understand something) trace execution p
|
|
|
4
4
|
Explore and understand something: trace execution paths, map structure, gather evidence
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Explore and understand something: trace execution paths, map structure, gather evidence
|
|
7
|
+
description: "Explore and understand something: trace execution paths, map structure, gather evidence"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Explore and explain: $ARGUMENTS
|
|
@@ -4,7 +4,7 @@ commands/understand/why.md (Investigate a failure) why is this broken, what is t
|
|
|
4
4
|
Investigate a failure: why is this broken, what is the root cause
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Investigate a failure: why is this broken, what is the root cause
|
|
7
|
+
description: "Investigate a failure: why is this broken, what is the root cause"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct. Investigate: $ARGUMENTS
|
package/commands/work/clean.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/work/clean.md (Remove AI-generated code smells) verbosity, hedging, dea
|
|
|
4
4
|
Remove AI-generated code smells: verbosity, hedging, dead comments, generic names
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Remove AI-generated code smells: verbosity, hedging, dead comments, generic names
|
|
7
|
+
description: "Remove AI-generated code smells: verbosity, hedging, dead comments, generic names"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are cx-reviewer identifying AI slop in: $ARGUMENTS
|
package/commands/work/drive.md
CHANGED
|
@@ -4,7 +4,7 @@ commands/work/drive.md (Full autonomous execution) explore, plan, implement, ver
|
|
|
4
4
|
Full autonomous execution: explore, plan, implement, verify, loop until done
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Full autonomous execution: explore, plan, implement, verify, loop until done
|
|
7
|
+
description: "Full autonomous execution: explore, plan, implement, verify, loop until done"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct in drive mode. Execute $ARGUMENTS fully and autonomously without stopping for confirmation.
|
|
@@ -4,7 +4,7 @@ commands/work/optimize-prompts.md: Prompt optimization command.
|
|
|
4
4
|
Runs the closed-loop prompt optimization workflow using telemetry trace data.
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Closed-loop prompt optimization: read telemetry traces, diagnose failures, push improved version to staging
|
|
7
|
+
description: "Closed-loop prompt optimization: read telemetry traces, diagnose failures, push improved version to staging"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are cx-trace-reviewer running a prompt optimization cycle for: $ARGUMENTS
|
|
@@ -18,7 +18,7 @@ Optimize prompt fragments and overlays, not the runtime orchestration policy. If
|
|
|
18
18
|
|
|
19
19
|
## Required steps
|
|
20
20
|
|
|
21
|
-
1. **Read current prompt**: read the agent's prompt from `
|
|
21
|
+
1. **Read current prompt**: read the agent's prompt from `specialists/registry.json` (or its `promptFile`)
|
|
22
22
|
2. **Fetch recent scores**: GET `{CONSTRUCT_TELEMETRY_URL}/api/public/scores?name=quality&limit=200`
|
|
23
23
|
3. **Skip agents with fewer than 20 scored traces**: insufficient signal; note them but do not optimize
|
|
24
24
|
4. **Diagnose failure patterns**: analyze low-scoring traces, identify top 3 recurring patterns
|
|
@@ -4,7 +4,7 @@ commands/work/parallel-review.md (Adversarial parallel review) 5 reviewers must
|
|
|
4
4
|
Adversarial parallel review: 5 reviewers must agree before output ships
|
|
5
5
|
-->
|
|
6
6
|
---
|
|
7
|
-
description: Adversarial parallel review: 5 reviewers must agree before output ships
|
|
7
|
+
description: "Adversarial parallel review: 5 reviewers must agree before output ships"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
You are Construct running a parallel adversarial review of: $ARGUMENTS
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Tag attribution and migration tracking for construct_documents.
|
|
2
|
+
-- The construct_documents.tags JSONB column already exists in 001_init.sql.
|
|
3
|
+
-- This migration adds GIN indexing, attribution history, and migration audit.
|
|
4
|
+
|
|
5
|
+
create index if not exists construct_documents_tags_gin_idx
|
|
6
|
+
on construct_documents using gin (tags jsonb_path_ops);
|
|
7
|
+
|
|
8
|
+
create table if not exists construct_tag_attribution (
|
|
9
|
+
document_id text not null references construct_documents(id) on delete cascade,
|
|
10
|
+
tag text not null,
|
|
11
|
+
source text not null, -- 'agent:classifier' | 'user' | 'curator'
|
|
12
|
+
confidence numeric,
|
|
13
|
+
applied_at timestamptz not null default now(),
|
|
14
|
+
migrated_from text,
|
|
15
|
+
primary key (document_id, tag, source)
|
|
16
|
+
);
|
|
17
|
+
create index if not exists construct_tag_attribution_tag_idx on construct_tag_attribution (tag);
|
|
18
|
+
|
|
19
|
+
create table if not exists construct_tag_migrations (
|
|
20
|
+
id text primary key,
|
|
21
|
+
from_tag text not null,
|
|
22
|
+
to_tag text,
|
|
23
|
+
executed_at timestamptz not null default now(),
|
|
24
|
+
executed_by text not null,
|
|
25
|
+
reason text not null,
|
|
26
|
+
doc_count_before integer not null,
|
|
27
|
+
doc_count_after integer,
|
|
28
|
+
reversible boolean not null default true,
|
|
29
|
+
rolled_back_at timestamptz
|
|
30
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- db/schema/008_skill_usage.sql — Per-skill invocation log.
|
|
2
|
+
--
|
|
3
|
+
-- Backs `construct skills usage/orphans/hot`. The local
|
|
4
|
+
-- JSONL path (~/.cx/skill-calls.jsonl) is primary in solo mode; this table is
|
|
5
|
+
-- primary in team/enterprise mode. One-time backfill via
|
|
6
|
+
-- `construct skills backfill-postgres`.
|
|
7
|
+
|
|
8
|
+
create table if not exists construct_skill_invocations (
|
|
9
|
+
id bigserial primary key,
|
|
10
|
+
ts timestamptz not null,
|
|
11
|
+
skill_id text not null,
|
|
12
|
+
source text not null, -- 'mcp' | 'role-preload' | 'prompt-composer' | …
|
|
13
|
+
agent_id text,
|
|
14
|
+
session_id text,
|
|
15
|
+
caller_context text,
|
|
16
|
+
latency_ms integer,
|
|
17
|
+
tokens_returned integer
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
create index if not exists construct_skill_invocations_skill_ts_idx
|
|
21
|
+
on construct_skill_invocations (skill_id, ts desc);
|
|
22
|
+
|
|
23
|
+
create index if not exists construct_skill_invocations_session_idx
|
|
24
|
+
on construct_skill_invocations (session_id);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Scheduler job state for team and enterprise deployment modes.
|
|
2
|
+
-- Solo mode uses native trigger files instead of this table.
|
|
3
|
+
-- The lock_holder column stores a short identifier for the process/host
|
|
4
|
+
-- that currently holds the advisory lock for a running job.
|
|
5
|
+
|
|
6
|
+
create table if not exists construct_scheduled_jobs (
|
|
7
|
+
id text primary key,
|
|
8
|
+
schedule text not null,
|
|
9
|
+
last_run_at timestamptz,
|
|
10
|
+
last_run_status text,
|
|
11
|
+
lock_holder text,
|
|
12
|
+
lock_acquired_at timestamptz,
|
|
13
|
+
created_at timestamptz not null default now()
|
|
14
|
+
);
|
|
@@ -7,7 +7,7 @@ verdict: fail
|
|
|
7
7
|
summary: Recommends a clever architecture without exposing contracts or rejected alternatives.
|
|
8
8
|
references:
|
|
9
9
|
- skills/roles/architect.md
|
|
10
|
-
-
|
|
10
|
+
- specialists/prompts/cx-architect.md
|
|
11
11
|
tags:
|
|
12
12
|
- missing-contracts
|
|
13
13
|
- hidden-dependencies
|
|
@@ -7,7 +7,7 @@ verdict: fail
|
|
|
7
7
|
summary: Introduces an abstraction for future cases without evidence from the code.
|
|
8
8
|
references:
|
|
9
9
|
- skills/roles/engineer.md
|
|
10
|
-
-
|
|
10
|
+
- specialists/prompts/cx-engineer.md
|
|
11
11
|
tags:
|
|
12
12
|
- speculative-abstraction
|
|
13
13
|
- unnecessary-surface-area
|
|
@@ -7,7 +7,7 @@ verdict: pass
|
|
|
7
7
|
summary: Reads the touched files and surrounding pattern before proposing code changes.
|
|
8
8
|
references:
|
|
9
9
|
- skills/roles/engineer.md
|
|
10
|
-
-
|
|
10
|
+
- specialists/prompts/cx-engineer.md
|
|
11
11
|
tags:
|
|
12
12
|
- read-before-write
|
|
13
13
|
- local-conventions
|
|
@@ -33,4 +33,4 @@ Hook guards for workflow, drive, bootstrap, and task behavior are expressed as Y
|
|
|
33
33
|
|
|
34
34
|
## Registry as Single Source of Truth
|
|
35
35
|
|
|
36
|
-
`
|
|
36
|
+
`specialists/registry.json` is the canonical definition for all agents on all platforms (Claude Code, OpenCode, Codex, Copilot). `construct sync` regenerates all platform-specific files from the registry. Never edit generated files directly: edits are overwritten on the next sync.
|
package/lib/audit-skills.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import path from 'node:path';
|
|
|
11
11
|
function findConstructRoot(startPath = process.cwd()) {
|
|
12
12
|
let current = path.resolve(startPath);
|
|
13
13
|
while (true) {
|
|
14
|
-
if (fs.existsSync(path.join(current, '
|
|
14
|
+
if (fs.existsSync(path.join(current, 'specialists', 'registry.json'))) return current;
|
|
15
15
|
const parent = path.dirname(current);
|
|
16
16
|
if (parent === current) return path.resolve(startPath);
|
|
17
17
|
current = parent;
|
|
@@ -36,7 +36,7 @@ function collectSkillFiles(skillsDir) {
|
|
|
36
36
|
|
|
37
37
|
export function auditSkills({ rootDir, silent = false } = {}) {
|
|
38
38
|
const root = rootDir ?? findConstructRoot();
|
|
39
|
-
const registryPath = path.join(root, '
|
|
39
|
+
const registryPath = path.join(root, 'specialists', 'registry.json');
|
|
40
40
|
const skillsDir = path.join(root, 'skills');
|
|
41
41
|
|
|
42
42
|
const registry = JSON.parse(fs.readFileSync(registryPath, 'utf8'));
|
|
@@ -46,7 +46,7 @@ export function auditSkills({ rootDir, silent = false } = {}) {
|
|
|
46
46
|
const agentsWithNoSkills = [];
|
|
47
47
|
const missingSkillFiles = [];
|
|
48
48
|
|
|
49
|
-
for (const agent of registry.
|
|
49
|
+
for (const agent of registry.specialists ?? []) {
|
|
50
50
|
const skills = agent.skills ?? [];
|
|
51
51
|
if (skills.length === 0) {
|
|
52
52
|
agentsWithNoSkills.push(agent.name);
|
package/lib/auto-docs.mjs
CHANGED
|
@@ -158,10 +158,10 @@ function buildAgentsTable(rootDir) {
|
|
|
158
158
|
const agents = registry.agents ?? registry;
|
|
159
159
|
if (!Array.isArray(agents)) return '';
|
|
160
160
|
|
|
161
|
-
const rows = ['|
|
|
161
|
+
const rows = ['| Specialist | Tier | Purpose |', '|---|---|---|'];
|
|
162
162
|
for (const agent of agents.slice(0, 30)) {
|
|
163
|
-
const name = agent.
|
|
164
|
-
const tier = agent.tier ?? agent.model_tier ?? 'n/a';
|
|
163
|
+
const name = agent.name ?? agent.id ?? 'n/a';
|
|
164
|
+
const tier = agent.modelTier ?? agent.tier ?? agent.model_tier ?? 'n/a';
|
|
165
165
|
// Strip em-dashes from descriptions so the prose lint stays clean across
|
|
166
166
|
// AUTO regen. Em-dashes are allowed in the registry's source descriptions
|
|
167
167
|
// but never in the rendered markdown.
|
|
@@ -195,7 +195,7 @@ export async function regenerateDocs({ rootDir, check = false } = {}) {
|
|
|
195
195
|
},
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
|
-
file: path.join(rootDir, 'docs', 'concepts', 'architecture.
|
|
198
|
+
file: path.join(rootDir, 'docs', 'concepts', 'architecture.mdx'),
|
|
199
199
|
regions: {
|
|
200
200
|
agents: buildAgentsTable(rootDir),
|
|
201
201
|
},
|
|
@@ -396,13 +396,13 @@ function renderAgentsPage(rootDir) {
|
|
|
396
396
|
if (!table) return null;
|
|
397
397
|
return [
|
|
398
398
|
'---',
|
|
399
|
-
'title:
|
|
400
|
-
'description: The 28
|
|
399
|
+
'title: Specialists',
|
|
400
|
+
'description: The 28 specialists behind the construct persona. Generated from specialists/registry.json.',
|
|
401
401
|
'---',
|
|
402
402
|
'',
|
|
403
|
-
'> Generated from `
|
|
403
|
+
'> Generated from `specialists/registry.json`. Re-run `construct docs:site` to refresh.',
|
|
404
404
|
'',
|
|
405
|
-
'Construct ships one persona (`construct`)
|
|
405
|
+
'Construct ships one persona (`construct`) and 28 specialists behind it. You address `@construct` for all everyday work; it routes to specialists internally. Each specialist has a role, model tier, and prompt file that defines its decision authority.',
|
|
406
406
|
'',
|
|
407
407
|
table,
|
|
408
408
|
'',
|
package/lib/boundary.mjs
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/boundary.mjs — Authenticated parent/child boundary registration.
|
|
3
|
+
*
|
|
4
|
+
* Verifies a parent Construct instance is reachable, validates an HMAC
|
|
5
|
+
* signature over `childInstanceId|nonce` when a shared secret is configured,
|
|
6
|
+
* and persists the binding to ~/.construct/boundary.json (mode 0600). A
|
|
7
|
+
* different parent rotates the registration only when explicitly allowed via
|
|
8
|
+
* CONSTRUCT_BOUNDARY_ALLOW_OVERRIDE=1; prior configs are archived alongside
|
|
9
|
+
* the active one. Exposed as a standalone module so the dashboard endpoint
|
|
10
|
+
* and the functional tests share the same logic.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
import { homedir } from 'node:os';
|
|
16
|
+
import { createHmac, timingSafeEqual, randomBytes } from 'node:crypto';
|
|
17
|
+
import { request as httpRequest } from 'node:http';
|
|
18
|
+
import { request as httpsRequest } from 'node:https';
|
|
19
|
+
|
|
20
|
+
export const BOUNDARY_VERSION = '1.0';
|
|
21
|
+
|
|
22
|
+
function boundaryDir(home = homedir()) {
|
|
23
|
+
return join(home, '.construct');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function boundaryConfigPath(home = homedir()) {
|
|
27
|
+
return join(boundaryDir(home), 'boundary.json');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function registerBoundary({
|
|
31
|
+
parentInstance,
|
|
32
|
+
parentUrl,
|
|
33
|
+
childInstanceId,
|
|
34
|
+
nonce,
|
|
35
|
+
signature,
|
|
36
|
+
sharedSecret = null,
|
|
37
|
+
home = homedir(),
|
|
38
|
+
allowOverride = process.env.CONSTRUCT_BOUNDARY_ALLOW_OVERRIDE === '1',
|
|
39
|
+
probe = probeParent,
|
|
40
|
+
}) {
|
|
41
|
+
if (!parentInstance || !parentUrl) {
|
|
42
|
+
return { ok: false, status: 400, error: 'parentInstance and parentUrl are required' };
|
|
43
|
+
}
|
|
44
|
+
if (!childInstanceId) {
|
|
45
|
+
return { ok: false, status: 400, error: 'childInstanceId is required' };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (sharedSecret) {
|
|
49
|
+
if (!nonce || !signature) {
|
|
50
|
+
return { ok: false, status: 401, error: 'nonce and signature are required when a shared secret is configured' };
|
|
51
|
+
}
|
|
52
|
+
const expected = createHmac('sha256', sharedSecret).update(`${childInstanceId}|${nonce}`).digest('hex');
|
|
53
|
+
const a = Buffer.from(expected, 'hex');
|
|
54
|
+
let b;
|
|
55
|
+
try { b = Buffer.from(String(signature), 'hex'); } catch { return { ok: false, status: 401, error: 'invalid signature encoding' }; }
|
|
56
|
+
if (a.length !== b.length || !timingSafeEqual(a, b)) {
|
|
57
|
+
return { ok: false, status: 401, error: 'signature mismatch' };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const reachable = await probe(parentUrl);
|
|
62
|
+
if (!reachable.ok) {
|
|
63
|
+
return { ok: false, status: 502, error: `parent unreachable: ${reachable.error}` };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const dir = boundaryDir(home);
|
|
67
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
68
|
+
const cfgPath = boundaryConfigPath(home);
|
|
69
|
+
|
|
70
|
+
let prior = null;
|
|
71
|
+
if (existsSync(cfgPath)) {
|
|
72
|
+
try { prior = JSON.parse(readFileSync(cfgPath, 'utf8')); } catch { prior = null; }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (prior && prior.parentInstance && prior.parentInstance !== parentInstance) {
|
|
76
|
+
if (!allowOverride) {
|
|
77
|
+
return {
|
|
78
|
+
ok: false,
|
|
79
|
+
status: 409,
|
|
80
|
+
error: `child already bound to parent '${prior.parentInstance}'; set CONSTRUCT_BOUNDARY_ALLOW_OVERRIDE=1 to rotate`,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const archivePath = join(dir, `boundary.${Date.now()}.json`);
|
|
84
|
+
try { writeFileSync(archivePath, JSON.stringify(prior, null, 2)); } catch { /* archive is best effort */ }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const config = {
|
|
88
|
+
parentInstance,
|
|
89
|
+
parentUrl,
|
|
90
|
+
childInstanceId,
|
|
91
|
+
registeredAt: new Date().toISOString(),
|
|
92
|
+
rotatedFrom: prior?.parentInstance || null,
|
|
93
|
+
nonce: nonce || randomBytes(16).toString('hex'),
|
|
94
|
+
boundaryVersion: BOUNDARY_VERSION,
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
writeFileSync(cfgPath, JSON.stringify(config, null, 2), { mode: 0o600 });
|
|
98
|
+
return { ok: true, config, path: cfgPath };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function probeParent(parentUrl) {
|
|
102
|
+
return new Promise((resolve) => {
|
|
103
|
+
let parsed;
|
|
104
|
+
try { parsed = new URL(parentUrl); } catch { return resolve({ ok: false, error: 'invalid URL' }); }
|
|
105
|
+
if (!/^https?:$/.test(parsed.protocol)) return resolve({ ok: false, error: 'unsupported protocol' });
|
|
106
|
+
const fn = parsed.protocol === 'https:' ? httpsRequest : httpRequest;
|
|
107
|
+
const req = fn({
|
|
108
|
+
method: 'HEAD',
|
|
109
|
+
protocol: parsed.protocol,
|
|
110
|
+
hostname: parsed.hostname,
|
|
111
|
+
port: parsed.port,
|
|
112
|
+
path: parsed.pathname || '/',
|
|
113
|
+
timeout: 3000,
|
|
114
|
+
}, (response) => {
|
|
115
|
+
resolve({ ok: response.statusCode < 500 });
|
|
116
|
+
response.resume();
|
|
117
|
+
});
|
|
118
|
+
req.on('timeout', () => { req.destroy(); resolve({ ok: false, error: 'timeout' }); });
|
|
119
|
+
req.on('error', (err) => resolve({ ok: false, error: err.message }));
|
|
120
|
+
req.end();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function signBoundaryRequest({ childInstanceId, nonce, sharedSecret }) {
|
|
125
|
+
return createHmac('sha256', sharedSecret).update(`${childInstanceId}|${nonce}`).digest('hex');
|
|
126
|
+
}
|