@geraldmaron/construct 1.4.1 → 1.5.0
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/.env.example +36 -0
- package/README.md +41 -7
- package/bin/construct +1029 -65
- package/bin/construct-postinstall.mjs +27 -2
- package/config/tag-vocabulary.json +264 -0
- package/examples/distribution/sources/deck-one-pager.md +1 -1
- package/lib/acp/server.mjs +21 -7
- package/lib/adapters-sync.mjs +2 -1
- package/lib/audit-trail.mjs +185 -2
- package/lib/beads/auto-close.mjs +2 -1
- package/lib/beads/drift.mjs +2 -1
- package/lib/bridges/copilot-proxy.mjs +20 -5
- package/lib/certification/skill-inventory.mjs +10 -1
- package/lib/cli/approvals.mjs +147 -0
- package/lib/cli-commands.mjs +105 -14
- package/lib/comment-lint.mjs +127 -8
- package/lib/config/schema.mjs +7 -30
- package/lib/config/source-target-registry.mjs +70 -0
- package/lib/config/source-targets.mjs +179 -205
- package/lib/contracts/coverage.mjs +77 -0
- package/lib/contracts/validate.mjs +102 -13
- package/lib/contracts/violation-log.mjs +50 -4
- package/lib/db/migrate.mjs +69 -0
- package/lib/db/migrations/001_orchestration_runs.sql +9 -0
- package/lib/db/migrations/002_queue_provider.sql +50 -0
- package/lib/db/migrations/003_worker_registry.sql +17 -0
- package/lib/db/migrations/004_trace_events.sql +16 -0
- package/lib/db/migrations/005_shared_memory.sql +15 -0
- package/lib/db/migrations/006_orchestration_runs_tenant.sql +5 -0
- package/lib/decisions/enforced-baseline.json +0 -2
- package/lib/decisions/registry.mjs +3 -2
- package/lib/deployment/parity-contract.mjs +1 -1
- package/lib/deployment-mode.mjs +78 -2
- package/lib/diagram-export.mjs +10 -1
- package/lib/distill.mjs +5 -2
- package/lib/docs-verify.mjs +2 -1
- package/lib/doctor/cli.mjs +1 -0
- package/lib/doctor/command-on-path.mjs +24 -0
- package/lib/doctor/diagnosis.mjs +109 -0
- package/lib/doctor/embedding-health.mjs +50 -0
- package/lib/doctor/engine-health.mjs +93 -0
- package/lib/doctor/graph-validate.mjs +47 -0
- package/lib/doctor/index.mjs +23 -4
- package/lib/doctor/sidecar-providers.mjs +56 -0
- package/lib/doctor/watchers/consistency.mjs +93 -1
- package/lib/doctor/watchers/cx-budget.mjs +1 -1
- package/lib/doctor/watchers/graph-staleness.mjs +1 -1
- package/lib/doctor/watchers/mcp-protocol.mjs +17 -0
- package/lib/doctor/watchers/oracle-liveness.mjs +92 -0
- package/lib/doctor/watchers/orchestration-runs.mjs +108 -0
- package/lib/doctor/watchers/provider-breaker.mjs +78 -0
- package/lib/document-export.mjs +52 -27
- package/lib/document-extract/docling-client.mjs +9 -5
- package/lib/document-extract/docling-sidecar.py +30 -0
- package/lib/document-extract.mjs +1 -1
- package/lib/document-ingest.mjs +9 -0
- package/lib/embed/approval-queue.mjs +184 -88
- package/lib/embed/authority-guard.mjs +65 -2
- package/lib/embed/capability-jobs.mjs +365 -0
- package/lib/embed/capability-lifecycle.mjs +219 -0
- package/lib/embed/capability-loader.mjs +303 -0
- package/lib/embed/capability-runtime.mjs +58 -0
- package/lib/embed/cli.mjs +185 -8
- package/lib/embed/config.mjs +4 -0
- package/lib/embed/daemon.mjs +125 -6
- package/lib/embed/demand-fetch.mjs +190 -54
- package/lib/embed/inbox.mjs +12 -10
- package/lib/embed/presets/ops-triage.mjs +236 -0
- package/lib/embed/presets/pm-feedback.mjs +341 -0
- package/lib/embed/presets/tpm.mjs +401 -0
- package/lib/embed/providers/jira.mjs +72 -1
- package/lib/embed/providers/registry.mjs +140 -33
- package/lib/embed/worker.mjs +5 -0
- package/lib/embedded-contract/capability.mjs +4 -0
- package/lib/embedded-contract/execution.mjs +1 -1
- package/lib/embedded-contract/model-resolve.mjs +53 -3
- package/lib/embedded-contract/workflow-defs.mjs +48 -73
- package/lib/embedded-contract/workflow-invoke.mjs +144 -4
- package/lib/embedded-contract/workflows/architecture-review.manifest.json +15 -0
- package/lib/embedded-contract/workflows/data-structure.manifest.json +14 -0
- package/lib/embedded-contract/workflows/evidence-ingest.manifest.json +14 -0
- package/lib/embedded-contract/workflows/memo-draft.manifest.json +14 -0
- package/lib/embedded-contract/workflows/operations-triage.manifest.json +18 -0
- package/lib/embedded-contract/workflows/operations.manifest.json +18 -0
- package/lib/embedded-contract/workflows/pm-feedback.manifest.json +18 -0
- package/lib/embedded-contract/workflows/prd-draft.manifest.json +15 -0
- package/lib/embedded-contract/workflows/proposal-review.manifest.json +15 -0
- package/lib/embedded-contract/workflows/research-synthesis.manifest.json +14 -0
- package/lib/embedded-contract/workflows/risk-review.manifest.json +15 -0
- package/lib/embedded-contract/workflows/structure-notes.manifest.json +14 -0
- package/lib/embedded-contract/workflows/transcript-process.manifest.json +14 -0
- package/lib/embedded-contract/workflows/triage.manifest.json +14 -0
- package/lib/env-config.mjs +60 -11
- package/lib/export-validate.mjs +34 -2
- package/lib/extensions/index.mjs +27 -0
- package/lib/extensions/loader.mjs +120 -0
- package/lib/extensions/manifest-schema.mjs +141 -0
- package/lib/extensions/manifests/anthropic.manifest.json +12 -0
- package/lib/extensions/manifests/atlassian-confluence.manifest.json +12 -0
- package/lib/extensions/manifests/atlassian-jira.manifest.json +53 -0
- package/lib/extensions/manifests/directory.manifest.json +12 -0
- package/lib/extensions/manifests/docling.manifest.json +37 -0
- package/lib/extensions/manifests/echo.manifest.json +8 -0
- package/lib/extensions/manifests/feedback.manifest.json +12 -0
- package/lib/extensions/manifests/github-copilot.manifest.json +12 -0
- package/lib/extensions/manifests/github.manifest.json +52 -0
- package/lib/extensions/manifests/linear.manifest.json +50 -0
- package/lib/extensions/manifests/local.manifest.json +12 -0
- package/lib/extensions/manifests/ollama.manifest.json +12 -0
- package/lib/extensions/manifests/openai.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter-anthropic.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter-deepseek.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter-google.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter-llama.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter-qwen.manifest.json +12 -0
- package/lib/extensions/manifests/openrouter.manifest.json +12 -0
- package/lib/extensions/manifests/postgres.manifest.json +12 -0
- package/lib/extensions/manifests/salesforce.manifest.json +12 -0
- package/lib/extensions/manifests/slack.manifest.json +58 -0
- package/lib/extensions/manifests/whisper.manifest.json +36 -0
- package/lib/extensions/validate.mjs +175 -0
- package/lib/features.mjs +13 -9
- package/lib/flows/checkpoint.mjs +184 -0
- package/lib/flows/constants.mjs +27 -0
- package/lib/flows/define.mjs +146 -0
- package/lib/flows/engine.mjs +249 -0
- package/lib/flows/errors.mjs +19 -0
- package/lib/flows/index.mjs +27 -0
- package/lib/flows/joins.mjs +18 -0
- package/lib/flows/schema.mjs +90 -0
- package/lib/flows/state.mjs +31 -0
- package/lib/frameworks/loader.mjs +99 -0
- package/lib/frameworks/schema.mjs +157 -0
- package/lib/graph/build-from-corpus.mjs +67 -0
- package/lib/graph/build-from-embed.mjs +82 -0
- package/lib/graph/build-from-registry.mjs +164 -3
- package/lib/graph/cli.mjs +456 -12
- package/lib/graph/gap-queries.mjs +156 -0
- package/lib/graph/gaps.mjs +41 -0
- package/lib/graph/impacted.mjs +129 -0
- package/lib/graph/runtime-evidence.mjs +177 -0
- package/lib/graph/security-coverage.mjs +113 -0
- package/lib/graph/staleness.mjs +241 -10
- package/lib/graph/store.mjs +24 -7
- package/lib/graph/validate.mjs +161 -0
- package/lib/headhunt.mjs +9 -8
- package/lib/health-check.mjs +15 -7
- package/lib/hook-health.mjs +1 -1
- package/lib/hooks/agent-tracker.mjs +10 -4
- package/lib/hooks/edit-guard.mjs +3 -3
- package/lib/hooks/graph-impact-advisory.mjs +2 -2
- package/lib/hooks/guard-bash.mjs +41 -15
- package/lib/hooks/mcp-health-check.mjs +11 -4
- package/lib/hooks/model-fallback.mjs +50 -6
- package/lib/hooks/orchestration-dispatch-guard.mjs +14 -3
- package/lib/hooks/pre-compact.mjs +181 -173
- package/lib/hooks/rule-verifier.mjs +2 -1
- package/lib/hooks/session-reflect.mjs +2 -1
- package/lib/hooks/session-start.mjs +3 -3
- package/lib/host/readiness.mjs +109 -0
- package/lib/host-capabilities.mjs +13 -2
- package/lib/host-disposition.mjs +29 -8
- package/lib/identity.mjs +92 -0
- package/lib/ingest/degraded-extract.mjs +96 -0
- package/lib/ingest/docling-remote.mjs +2 -1
- package/lib/ingest/provider-extract.mjs +7 -19
- package/lib/ingest/sidecar-providers.mjs +196 -0
- package/lib/ingest-tooling.mjs +11 -5
- package/lib/init-unified.mjs +55 -38
- package/lib/init-update.mjs +2 -1
- package/lib/install/legacy-global-cleanup.mjs +25 -0
- package/lib/install/stage-project.mjs +41 -4
- package/lib/intake/daemon.mjs +99 -8
- package/lib/intake/git-queue.mjs +110 -38
- package/lib/intake/prepare.mjs +2 -0
- package/lib/intake/queue-registry.mjs +50 -0
- package/lib/intake/queue.mjs +133 -17
- package/lib/intake/session-prelude.mjs +57 -8
- package/lib/integrations/intake-integrations.mjs +61 -111
- package/lib/intent-classifier.mjs +43 -5
- package/lib/libreoffice-export.mjs +8 -8
- package/lib/logging/rotate.mjs +5 -4
- package/lib/mcp/broker.mjs +332 -17
- package/lib/mcp/denied-store.mjs +95 -0
- package/lib/mcp/destructive-approval.mjs +57 -0
- package/lib/mcp/destructive-gate.mjs +30 -0
- package/lib/mcp/dispatch-envelope.mjs +199 -0
- package/lib/mcp/memory-bridge.mjs +2 -1
- package/lib/mcp/server.mjs +185 -1268
- package/lib/mcp/tool-definitions-memory.mjs +376 -0
- package/lib/mcp/tool-definitions-project.mjs +271 -0
- package/lib/mcp/tool-definitions-skills.mjs +311 -0
- package/lib/mcp/tool-definitions-workflow.mjs +398 -0
- package/lib/mcp/tool-definitions.mjs +25 -0
- package/lib/mcp/tool-rate-limit.mjs +47 -0
- package/lib/mcp/tool-registry.mjs +107 -0
- package/lib/mcp/tool-safety.mjs +95 -0
- package/lib/mcp/tool-surface-parity.mjs +60 -0
- package/lib/mcp/tools/orchestration-delegation-next.tool.mjs +68 -0
- package/lib/mcp/tools/orchestration-run.mjs +197 -19
- package/lib/mcp/tools/orchestration-task-result.tool.mjs +77 -0
- package/lib/mcp/tools/project.mjs +25 -8
- package/lib/mcp/tools/provider-write.mjs +187 -0
- package/lib/mcp/tools/scope.mjs +0 -3
- package/lib/mcp/tools/skills.mjs +1 -1
- package/lib/mcp/tools/storage.mjs +2 -2
- package/lib/mcp/tools/web-search-governance.mjs +96 -0
- package/lib/mcp/tools/web-search.mjs +5 -76
- package/lib/mcp/transport/auth.mjs +238 -0
- package/lib/mcp/transport/http.mjs +136 -0
- package/lib/mcp/transport/mode.mjs +31 -0
- package/lib/mcp/transport/stdio.mjs +22 -0
- package/lib/mcp-catalog.json +4 -4
- package/lib/mcp-manager.mjs +34 -23
- package/lib/mcp-platform-config.mjs +53 -20
- package/lib/mode-capabilities.mjs +109 -0
- package/lib/model-router.mjs +42 -9
- package/lib/models/catalog.mjs +40 -1
- package/lib/net-guard.mjs +247 -0
- package/lib/observation-store.mjs +6 -2
- package/lib/ollama/provision-context.mjs +2 -1
- package/lib/opencode-config.mjs +22 -3
- package/lib/opencode-runtime-plugin.mjs +120 -2
- package/lib/oracle/actions.mjs +204 -10
- package/lib/oracle/cli.mjs +24 -3
- package/lib/oracle/daemon-entry.mjs +6 -0
- package/lib/oracle/dispatch.mjs +2 -1
- package/lib/oracle/execute.mjs +2 -2
- package/lib/oracle/gaps.mjs +3 -3
- package/lib/oracle/heartbeat.mjs +53 -0
- package/lib/oracle/read-model.mjs +69 -13
- package/lib/oracle/reconcile.mjs +3 -46
- package/lib/oracle/routing.mjs +37 -31
- package/lib/oracle/synthesize.mjs +1 -1
- package/lib/orchestration/classification.mjs +434 -0
- package/lib/orchestration/delegation-flow.mjs +132 -0
- package/lib/orchestration/flow-selection.mjs +418 -0
- package/lib/orchestration/gates.mjs +244 -0
- package/lib/orchestration/host-sampling.mjs +121 -0
- package/lib/orchestration/policy-constants.mjs +48 -0
- package/lib/orchestration/provider-outcome.mjs +197 -0
- package/lib/orchestration/readiness.mjs +114 -13
- package/lib/orchestration/run-store-postgres.mjs +32 -26
- package/lib/orchestration/run-store-sqlite.mjs +8 -14
- package/lib/orchestration/run-store.mjs +25 -12
- package/lib/orchestration/runtime.mjs +508 -62
- package/lib/orchestration/store.mjs +87 -12
- package/lib/orchestration/trace-store.mjs +125 -0
- package/lib/orchestration/web-capability.mjs +60 -0
- package/lib/orchestration/worker-runtime.mjs +162 -0
- package/lib/orchestration/worker.mjs +763 -80
- package/lib/orchestration-policy.mjs +67 -1111
- package/lib/output-quality.mjs +61 -2
- package/lib/packs/cli.mjs +144 -0
- package/lib/packs/core-pack.mjs +112 -0
- package/lib/packs/enablement.mjs +187 -0
- package/lib/packs/index.mjs +23 -0
- package/lib/packs/loader.mjs +176 -0
- package/lib/packs/manifest-schema.mjs +58 -0
- package/lib/packs/prompts.mjs +120 -0
- package/lib/packs/validate.mjs +208 -0
- package/lib/path-policy.mjs +56 -0
- package/lib/plugin-registry.mjs +4 -5
- package/lib/policy/audit-gate.mjs +42 -0
- package/lib/policy/consumption-budget.mjs +149 -0
- package/lib/policy/engine.mjs +81 -6
- package/lib/policy/role-authority.mjs +89 -0
- package/lib/prompt-composer.js +19 -3
- package/lib/providers/contract/adapters/confluence/governed-write.mjs +215 -0
- package/lib/providers/contract/adapters/confluence/manifest.json +17 -0
- package/lib/providers/contract/adapters/confluence/transport.mjs +135 -0
- package/lib/providers/contract/adapters/github/governed-write.mjs +121 -0
- package/lib/providers/contract/adapters/github/index.mjs +38 -3
- package/lib/providers/contract/adapters/jira/adf.mjs +151 -0
- package/lib/providers/contract/adapters/jira/createmeta.mjs +143 -0
- package/lib/providers/contract/adapters/jira/governed-write.mjs +182 -0
- package/lib/providers/contract/adapters/jira/manifest.json +17 -0
- package/lib/providers/contract/adapters/jira/transport.mjs +119 -0
- package/lib/providers/contract.mjs +207 -0
- package/lib/providers/credential-bootstrap.mjs +7 -4
- package/lib/providers/credential-sources.mjs +14 -2
- package/lib/providers/directory/index.mjs +261 -0
- package/lib/providers/feedback/index.mjs +392 -0
- package/lib/providers/filter-audit.mjs +68 -0
- package/lib/providers/filter-schema.mjs +54 -0
- package/lib/providers/github/index.mjs +31 -0
- package/lib/providers/instance-config.mjs +215 -0
- package/lib/providers/op-locate.mjs +96 -0
- package/lib/providers/op-run.mjs +64 -9
- package/lib/providers/registry.mjs +26 -3
- package/lib/providers/secret-audit-wiring.mjs +41 -18
- package/lib/providers/secret-resolver.mjs +263 -31
- package/lib/publish-template.mjs +6 -3
- package/lib/publish-tooling.mjs +4 -0
- package/lib/publish.mjs +32 -4
- package/lib/queue/pg-queue.mjs +395 -0
- package/lib/reflect.mjs +2 -1
- package/lib/registry/assemble.mjs +28 -2
- package/lib/registry/catalog.mjs +6 -0
- package/lib/registry/consolidation.mjs +8 -1
- package/lib/registry/custom-scaffold.mjs +200 -0
- package/lib/registry/custom-schema.mjs +137 -0
- package/lib/registry/loader.mjs +15 -4
- package/lib/registry/manifests/format-engines.default.json +15 -0
- package/lib/registry/manifests/surface-map.default.json +46 -0
- package/lib/registry/retired-paths.mjs +1 -0
- package/lib/registry/surface-map.mjs +100 -50
- package/lib/registry/validate.mjs +3 -3
- package/lib/render-visual-check.mjs +240 -0
- package/lib/resources/budget.mjs +40 -17
- package/lib/roles/flavor-bindings.mjs +36 -14
- package/lib/roles/gateway.mjs +15 -8
- package/lib/roots.mjs +107 -0
- package/lib/runtime/uv-bootstrap.mjs +32 -6
- package/lib/runtime/whisper-bootstrap.mjs +11 -3
- package/lib/runtime-env.mjs +5 -2
- package/lib/sandbox.mjs +1 -1
- package/lib/scheduler/index.mjs +8 -20
- package/lib/schema-infer.mjs +31 -2
- package/lib/scopes/lifecycle.mjs +29 -25
- package/lib/scopes/loader.mjs +49 -12
- package/lib/scopes/teams.mjs +1 -1
- package/lib/security/ingest-boundary.mjs +80 -0
- package/lib/security/recall-wrapper.mjs +99 -0
- package/lib/security/trust.mjs +132 -0
- package/lib/service-manager.mjs +93 -24
- package/lib/setup.mjs +41 -23
- package/lib/skills-apply.mjs +4 -2
- package/lib/specialists/postconditions.mjs +2 -2
- package/lib/state-root.mjs +147 -0
- package/lib/status.mjs +597 -6
- package/lib/storage/admin.mjs +84 -7
- package/lib/storage/backend-registry.mjs +73 -0
- package/lib/storage/backend.mjs +63 -9
- package/lib/storage/embeddings-openai.mjs +12 -2
- package/lib/storage/hybrid-query.mjs +11 -3
- package/lib/storage/retrieval-hardening.mjs +384 -0
- package/lib/storage/shared-memory.mjs +158 -0
- package/lib/storage/vector-client.mjs +69 -2
- package/lib/team/health.mjs +72 -0
- package/lib/telemetry/backends/local.mjs +9 -3
- package/lib/telemetry/client.mjs +3 -7
- package/lib/template-registry.mjs +10 -12
- package/lib/tenant/context.mjs +82 -0
- package/lib/tenant/isolation.mjs +129 -0
- package/lib/test-corpus-inventory.mjs +103 -2
- package/lib/uninstall/uninstall.mjs +78 -12
- package/lib/validator.mjs +4 -6
- package/lib/worker/entrypoint.mjs +2 -1
- package/lib/worker/run.mjs +2 -2
- package/lib/worker/trace.mjs +5 -11
- package/lib/workflow-state.mjs +52 -8
- package/lib/workflows/liveness.mjs +203 -0
- package/lib/workflows/loader.mjs +177 -0
- package/lib/workflows/manifest-schema.mjs +71 -0
- package/lib/workflows/surface-parity.mjs +118 -0
- package/lib/workflows/validate.mjs +127 -0
- package/lib/writes/control-plane.mjs +140 -0
- package/lib/writes/envelope.mjs +206 -0
- package/lib/writes/sent-log.mjs +86 -0
- package/lib/writes/write-intent.mjs +109 -0
- package/package.json +20 -7
- package/personas/construct.md +12 -3
- package/registry/agent-manifest.json +117 -0
- package/registry/capabilities.json +1987 -0
- package/rules/common/comments.md +1 -0
- package/schemas/brand-voice.schema.json +24 -0
- package/schemas/capability-registry.schema.json +72 -0
- package/schemas/certification-run.schema.json +130 -0
- package/schemas/demo-recording.schema.json +46 -0
- package/schemas/eval-dataset.schema.json +79 -0
- package/schemas/execution-capability-profile.schema.json +46 -0
- package/schemas/execution-policy.schema.json +114 -0
- package/schemas/improvement-proposal.schema.json +65 -0
- package/schemas/mcp-tool-output.schema.json +61 -0
- package/schemas/platform-capabilities.schema.json +83 -0
- package/schemas/project-config.schema.json +215 -0
- package/schemas/project-demo.schema.json +60 -0
- package/schemas/provider-behavior-matrix.schema.json +91 -0
- package/schemas/scope.schema.json +197 -0
- package/schemas/specialist-trace.schema.json +107 -0
- package/schemas/team.schema.json +99 -0
- package/schemas/unified-registry.schema.json +546 -0
- package/scripts/sync-specialists.mjs +336 -106
- package/skills/docs/adr-workflow.md +1 -1
- package/skills/docs/codebase-research-workflow.md +3 -3
- package/skills/docs/prd-workflow.md +5 -6
- package/skills/docs/runbook-workflow.md +2 -2
- package/skills/docs/user-research-workflow.md +3 -3
- package/skills/operating/fleet-health-routing.md +77 -0
- package/skills/roles/ai-engineer.md +1 -1
- package/skills/roles/architect.md +0 -1
- package/skills/roles/business-strategist.md +1 -1
- package/skills/roles/data-analyst.telemetry.md +1 -1
- package/skills/roles/data-engineer.md +1 -1
- package/skills/roles/data-engineer.pipeline.md +1 -1
- package/skills/roles/data-engineer.vector-retrieval.md +1 -2
- package/skills/roles/data-engineer.warehouse.md +1 -1
- package/skills/roles/designer.accessibility.md +1 -1
- package/skills/roles/designer.md +0 -1
- package/skills/roles/devil-advocate.md +1 -1
- package/skills/roles/docs-keeper.md +1 -1
- package/skills/roles/evaluator.md +1 -1
- package/skills/roles/explorer.md +1 -1
- package/skills/roles/platform-engineer.md +1 -1
- package/skills/roles/qa.ai-eval.md +1 -2
- package/skills/roles/qa.api-contract.md +0 -1
- package/skills/roles/qa.data-pipeline.md +0 -1
- package/skills/roles/qa.md +0 -1
- package/skills/roles/qa.web-ui.md +0 -1
- package/skills/roles/release-manager.md +1 -1
- package/skills/roles/researcher.md +0 -2
- package/skills/roles/reviewer.md +0 -3
- package/skills/roles/security.ai.md +1 -1
- package/skills/roles/security.legal-compliance.md +1 -1
- package/skills/roles/security.md +0 -1
- package/skills/roles/security.privacy.md +0 -1
- package/skills/roles/security.supply-chain.md +1 -1
- package/skills/roles/sre.md +1 -1
- package/skills/roles/test-automation.md +1 -1
- package/skills/roles/trace-reviewer.md +1 -1
- package/skills/roles/ux-researcher.md +1 -1
- package/specialists/artifact-manifest.json +36 -36
- package/specialists/org/contracts/accessibility-to-qa.json +11 -3
- package/specialists/org/contracts/any-to-business-strategist.json +19 -7
- package/specialists/org/contracts/any-to-debugger.json +7 -1
- package/specialists/org/contracts/any-to-designer.json +7 -1
- package/specialists/org/contracts/any-to-docs-keeper.json +18 -4
- package/specialists/org/contracts/any-to-explorer.json +13 -4
- package/specialists/org/contracts/any-to-sre-incident.json +6 -2
- package/specialists/org/contracts/any-to-trace-reviewer.json +16 -4
- package/specialists/org/contracts/architect-to-ai-engineer.json +6 -2
- package/specialists/org/contracts/architect-to-data-engineer.json +17 -5
- package/specialists/org/contracts/architect-to-devil-advocate.json +11 -3
- package/specialists/org/contracts/architect-to-engineer.json +20 -4
- package/specialists/org/contracts/architect-to-evaluator.json +15 -5
- package/specialists/org/contracts/architect-to-legal-compliance.json +15 -5
- package/specialists/org/contracts/architect-to-operations.json +17 -4
- package/specialists/org/contracts/architect-to-platform-engineer.json +20 -4
- package/specialists/org/contracts/construct-to-orchestrator.json +10 -2
- package/specialists/org/contracts/data-analyst-to-product-manager.json +11 -2
- package/specialists/org/contracts/engineer-to-qa.json +20 -4
- package/specialists/org/contracts/engineer-to-reviewer.json +29 -5
- package/specialists/org/contracts/explorer-to-engineer.json +11 -3
- package/specialists/org/contracts/legal-compliance-to-release-manager.json +12 -4
- package/specialists/org/contracts/operations-to-user.json +53 -0
- package/specialists/org/contracts/operations-triage-output.json +53 -0
- package/specialists/org/contracts/pm-requirements-candidates.json +53 -0
- package/specialists/org/contracts/product-manager-to-architect.json +30 -10
- package/specialists/org/contracts/product-manager-to-data-analyst.json +13 -3
- package/specialists/org/contracts/product-manager-to-ux-researcher.json +15 -5
- package/specialists/org/contracts/qa-to-release-manager.json +11 -3
- package/specialists/org/contracts/researcher-to-architect.json +10 -2
- package/specialists/org/contracts/researcher-to-product-manager.json +16 -5
- package/specialists/org/contracts/reviewer-to-security.json +17 -3
- package/specialists/org/contracts/test-automation-to-engineer.json +11 -3
- package/specialists/org/contracts/trace-reviewer-to-sre.json +12 -4
- package/specialists/org/contracts/user-to-construct.json +11 -4
- package/specialists/org/frameworks/cx-architect-constraint-option-failure.md +66 -0
- package/specialists/org/frameworks/cx-engineer-feasibility-blast-radius.md +66 -0
- package/specialists/org/frameworks/cx-ops-dependency-sequencing.md +74 -0
- package/specialists/org/frameworks/cx-pm-value-tradeoff.md +66 -0
- package/specialists/org/frameworks/cx-qa-risk-based-coverage.md +69 -0
- package/specialists/org/groups/engineering-group.json +2 -6
- package/specialists/org/groups/governance-group.json +2 -3
- package/specialists/org/groups/operations-group.json +5 -8
- package/specialists/org/groups/product-group.json +4 -8
- package/specialists/org/groups/quality-group.json +3 -7
- package/specialists/org/groups/strategy-group.json +6 -9
- package/specialists/org/models.json.example +8 -0
- package/specialists/org/scopes/creative.json +6 -1
- package/specialists/org/scopes/operations.json +7 -1
- package/specialists/org/scopes/research.json +6 -1
- package/specialists/org/scopes/rnd.json +7 -1
- package/specialists/org/specialists/cx-architect.json +27 -8
- package/specialists/org/specialists/cx-designer.json +22 -8
- package/specialists/org/specialists/cx-engineer.json +71 -7
- package/specialists/org/specialists/cx-operations.json +89 -15
- package/specialists/org/specialists/cx-orchestrator.json +16 -4
- package/specialists/org/specialists/cx-product-manager.json +28 -9
- package/specialists/org/specialists/cx-qa.json +16 -6
- package/specialists/org/specialists/cx-researcher.json +41 -7
- package/specialists/org/specialists/cx-reviewer.json +61 -11
- package/specialists/org/specialists/cx-security.json +30 -10
- package/specialists/org/teams/design-team.json +3 -4
- package/specialists/org/teams/engineering-team.json +3 -10
- package/specialists/org/teams/governance-team.json +3 -5
- package/specialists/org/teams/operations-team.json +6 -12
- package/specialists/org/teams/product-management-team.json +2 -3
- package/specialists/org/teams/quality-team.json +4 -12
- package/specialists/org/teams/research-team.json +3 -3
- package/specialists/org/teams/strategy-team.json +7 -14
- package/specialists/prompts/cx-architect.md +20 -1
- package/specialists/prompts/cx-data-analyst.md +1 -1
- package/specialists/prompts/cx-designer.md +12 -4
- package/specialists/prompts/cx-engineer.md +15 -1
- package/specialists/prompts/cx-operations.md +14 -2
- package/specialists/prompts/cx-orchestrator.md +9 -5
- package/specialists/prompts/cx-product-manager.md +5 -1
- package/specialists/prompts/cx-qa.md +6 -2
- package/specialists/prompts/cx-researcher.md +27 -31
- package/specialists/prompts/cx-reviewer.md +19 -1
- package/specialists/prompts/cx-security.md +5 -1
- package/templates/distribution/construct-brand.typ +123 -59
- package/templates/distribution/construct-decision.typ +6 -3
- package/templates/distribution/construct-pdf.typ +11 -4
- package/templates/distribution/construct-prd.typ +6 -3
- package/templates/distribution/construct-research.typ +7 -4
- package/vendor/pandoc-ext/README.md +3 -0
- package/vendor/pandoc-ext/diagram.lua +687 -0
- package/lib/providers/contract/adapters/git/index.mjs +0 -115
- package/lib/providers/contract/adapters/slack/index.mjs +0 -175
- package/specialists/org/contracts/business-strategist-to-product-manager.json +0 -39
- package/specialists/org/contracts/construct-to-rd-lead.json +0 -53
- package/specialists/org/contracts/data-engineer-to-platform-engineer.json +0 -36
- package/specialists/org/contracts/designer-to-accessibility.json +0 -36
- package/specialists/org/contracts/platform-engineer-to-engineer.json +0 -31
- package/specialists/org/contracts/qa-to-test-automation.json +0 -42
- package/specialists/org/contracts/rd-lead-to-architect.json +0 -38
- package/specialists/org/contracts/sre-to-release-manager.json +0 -36
- package/specialists/org/specialists/cx-accessibility.json +0 -69
- package/specialists/org/specialists/cx-ai-engineer.json +0 -75
- package/specialists/org/specialists/cx-business-strategist.json +0 -72
- package/specialists/org/specialists/cx-data-engineer.json +0 -71
- package/specialists/org/specialists/cx-devil-advocate.json +0 -71
- package/specialists/org/specialists/cx-docs-keeper.json +0 -82
- package/specialists/org/specialists/cx-evaluator.json +0 -69
- package/specialists/org/specialists/cx-explorer.json +0 -69
- package/specialists/org/specialists/cx-legal-compliance.json +0 -74
- package/specialists/org/specialists/cx-oracle.json +0 -46
- package/specialists/org/specialists/cx-platform-engineer.json +0 -80
- package/specialists/org/specialists/cx-rd-lead.json +0 -73
- package/specialists/org/specialists/cx-release-manager.json +0 -77
- package/specialists/org/specialists/cx-sre.json +0 -94
- package/specialists/org/specialists/cx-test-automation.json +0 -69
- package/specialists/org/specialists/cx-trace-reviewer.json +0 -69
- package/specialists/org/specialists/cx-ux-researcher.json +0 -68
- package/specialists/org/teams/accessibility-team.json +0 -39
- package/specialists/org/teams/ux-research-team.json +0 -39
- package/specialists/prompts/cx-accessibility.md +0 -55
- package/specialists/prompts/cx-ai-engineer.md +0 -124
- package/specialists/prompts/cx-business-strategist.md +0 -58
- package/specialists/prompts/cx-data-engineer.md +0 -55
- package/specialists/prompts/cx-devil-advocate.md +0 -59
- package/specialists/prompts/cx-docs-keeper.md +0 -164
- package/specialists/prompts/cx-evaluator.md +0 -49
- package/specialists/prompts/cx-explorer.md +0 -71
- package/specialists/prompts/cx-legal-compliance.md +0 -58
- package/specialists/prompts/cx-oracle.md +0 -98
- package/specialists/prompts/cx-platform-engineer.md +0 -97
- package/specialists/prompts/cx-rd-lead.md +0 -59
- package/specialists/prompts/cx-release-manager.md +0 -54
- package/specialists/prompts/cx-sre.md +0 -111
- package/specialists/prompts/cx-test-automation.md +0 -55
- package/specialists/prompts/cx-trace-reviewer.md +0 -101
- package/specialists/prompts/cx-ux-researcher.md +0 -53
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/writes/sent-log.mjs — durable JSONL record of executed external writes.
|
|
3
|
+
*
|
|
4
|
+
* WriteSentLog persists idempotency keys and outcomes so a retried or duplicate
|
|
5
|
+
* write-intent is deduplicated rather than re-executed against the remote system.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
|
|
11
|
+
export class WriteSentLog {
|
|
12
|
+
#records = [];
|
|
13
|
+
#persistPath = null;
|
|
14
|
+
|
|
15
|
+
constructor({ persistPath } = {}) {
|
|
16
|
+
if (persistPath) {
|
|
17
|
+
this.#persistPath = persistPath;
|
|
18
|
+
this.#load();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
record(entry) {
|
|
23
|
+
const rec = {
|
|
24
|
+
idempotencyKey: entry.idempotencyKey,
|
|
25
|
+
writeType: entry.writeType,
|
|
26
|
+
provider: entry.provider,
|
|
27
|
+
sentAt: entry.sentAt || new Date().toISOString(),
|
|
28
|
+
completedAt: entry.completedAt || null,
|
|
29
|
+
status: entry.status || 'pending',
|
|
30
|
+
externalUrl: entry.externalUrl || null,
|
|
31
|
+
externalId: entry.externalId || null,
|
|
32
|
+
result: entry.result || null,
|
|
33
|
+
error: entry.error || null,
|
|
34
|
+
};
|
|
35
|
+
this.#records.push(rec);
|
|
36
|
+
this.#persist();
|
|
37
|
+
return rec;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
findByIdempotencyKey(key) {
|
|
41
|
+
let found = null;
|
|
42
|
+
for (const r of this.#records) {
|
|
43
|
+
if (r.idempotencyKey === key) found = r;
|
|
44
|
+
}
|
|
45
|
+
return found;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
list({ provider, status, since } = {}) {
|
|
49
|
+
let results = [...this.#records];
|
|
50
|
+
if (provider) results = results.filter(r => r.provider === provider);
|
|
51
|
+
if (status) results = results.filter(r => r.status === status);
|
|
52
|
+
if (since) results = results.filter(r => new Date(r.sentAt) >= new Date(since));
|
|
53
|
+
return results;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
pruneOlderThan(ms) {
|
|
57
|
+
const cutoff = Date.now() - ms;
|
|
58
|
+
const before = this.#records.length;
|
|
59
|
+
this.#records = this.#records.filter(r => new Date(r.sentAt).getTime() > cutoff);
|
|
60
|
+
this.#persist();
|
|
61
|
+
return before - this.#records.length;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#persist() {
|
|
65
|
+
if (!this.#persistPath) return;
|
|
66
|
+
try {
|
|
67
|
+
fs.mkdirSync(path.dirname(this.#persistPath), { recursive: true });
|
|
68
|
+
const lines = this.#records.map(r => JSON.stringify(r)).join('\n');
|
|
69
|
+
fs.writeFileSync(this.#persistPath, lines + '\n', 'utf8');
|
|
70
|
+
} catch {}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#load() {
|
|
74
|
+
try {
|
|
75
|
+
if (!fs.existsSync(this.#persistPath)) return;
|
|
76
|
+
const lines = fs.readFileSync(this.#persistPath, 'utf8').split('\n').filter(Boolean);
|
|
77
|
+
for (const line of lines) {
|
|
78
|
+
try { this.#records.push(JSON.parse(line)); } catch {}
|
|
79
|
+
}
|
|
80
|
+
} catch {}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static resolvePersistPath(rootDir) {
|
|
84
|
+
return path.join(rootDir, '.cx', 'writes', 'sent-log.jsonl');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/writes/write-intent.mjs — the writeIntent record: the only artifact
|
|
3
|
+
* shape a specialist, embed capability, or MCP caller may produce when it
|
|
4
|
+
* wants an external write to happen.
|
|
5
|
+
*
|
|
6
|
+
* A writeIntent never executes anything by itself. `buildWriteIntent`
|
|
7
|
+
* validates and normalizes the record; `lib/writes/control-plane.mjs` is the
|
|
8
|
+
* only module that turns an *approved* writeIntent into a call through
|
|
9
|
+
* lib/writes/envelope.mjs. Nothing in this file resolves a provider adapter
|
|
10
|
+
* or performs I/O — it is schema and validation only, so it stays importable
|
|
11
|
+
* from any orchestration or embed path without smuggling in write access.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Providers with a governed-write adapter under lib/providers/contract/adapters/*. */
|
|
15
|
+
export const KNOWN_PROVIDERS = Object.freeze(['jira', 'github', 'confluence']);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Validate a writeIntent's required shape. Returns `{ ok: true }` or
|
|
19
|
+
* `{ ok: false, errors: string[] }` — never throws, so a malformed proposal
|
|
20
|
+
* from a specialist degrades to a rejected intent rather than crashing the
|
|
21
|
+
* caller.
|
|
22
|
+
*
|
|
23
|
+
* @param {object} intent
|
|
24
|
+
* @param {string} intent.providerId - one of KNOWN_PROVIDERS
|
|
25
|
+
* @param {string} intent.writeKind - adapter-specific write type (e.g. 'issue', 'comment')
|
|
26
|
+
* @param {object} intent.payload - write payload passed to the adapter
|
|
27
|
+
* @param {object} [intent.requestedBy] - actor identity of the recommending specialist
|
|
28
|
+
* @returns {{ ok: boolean, errors?: string[] }}
|
|
29
|
+
*/
|
|
30
|
+
export function validateWriteIntent(intent) {
|
|
31
|
+
const errors = [];
|
|
32
|
+
if (!intent || typeof intent !== 'object') {
|
|
33
|
+
return { ok: false, errors: ['writeIntent must be an object'] };
|
|
34
|
+
}
|
|
35
|
+
if (!intent.providerId || typeof intent.providerId !== 'string') {
|
|
36
|
+
errors.push('writeIntent.providerId is required');
|
|
37
|
+
} else if (!KNOWN_PROVIDERS.includes(intent.providerId)) {
|
|
38
|
+
errors.push(`writeIntent.providerId "${intent.providerId}" is not a known governed provider (${KNOWN_PROVIDERS.join(', ')})`);
|
|
39
|
+
}
|
|
40
|
+
if (!intent.writeKind || typeof intent.writeKind !== 'string') {
|
|
41
|
+
errors.push('writeIntent.writeKind is required');
|
|
42
|
+
}
|
|
43
|
+
if (!intent.payload || typeof intent.payload !== 'object') {
|
|
44
|
+
errors.push('writeIntent.payload is required and must be an object');
|
|
45
|
+
}
|
|
46
|
+
return errors.length ? { ok: false, errors } : { ok: true };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Build a normalized writeIntent record from a specialist's recommendation.
|
|
51
|
+
* Throws on an invalid intent so a caller cannot silently enqueue a
|
|
52
|
+
* malformed record — the run should see the failure at recommend time, not
|
|
53
|
+
* discover it later when the control plane tries to execute it.
|
|
54
|
+
*
|
|
55
|
+
* @param {object} spec
|
|
56
|
+
* @param {string} spec.providerId
|
|
57
|
+
* @param {string} spec.writeKind
|
|
58
|
+
* @param {object} spec.payload
|
|
59
|
+
* @param {object} [spec.requestedBy] - { specialistId, role, serviceId, sessionId }
|
|
60
|
+
* @param {string} [spec.surface] - origin surface, e.g. 'embed-capability' | 'mcp' | 'cli'
|
|
61
|
+
* @returns {{ providerId: string, writeKind: string, payload: object, requestedBy: object, surface: string, tool: string }}
|
|
62
|
+
*/
|
|
63
|
+
export function buildWriteIntent(spec) {
|
|
64
|
+
const intent = {
|
|
65
|
+
providerId: spec?.providerId,
|
|
66
|
+
writeKind: spec?.writeKind,
|
|
67
|
+
payload: spec?.payload,
|
|
68
|
+
};
|
|
69
|
+
const result = validateWriteIntent(intent);
|
|
70
|
+
if (!result.ok) {
|
|
71
|
+
throw new Error(`buildWriteIntent: invalid writeIntent — ${result.errors.join('; ')}`);
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
providerId: intent.providerId,
|
|
75
|
+
writeKind: intent.writeKind,
|
|
76
|
+
payload: intent.payload,
|
|
77
|
+
requestedBy: spec?.requestedBy ?? {},
|
|
78
|
+
surface: spec?.surface ?? 'unknown',
|
|
79
|
+
tool: writeIntentToolName(intent.providerId, intent.writeKind),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The tool-name encoding shared with lib/embed/capability-jobs.mjs's
|
|
85
|
+
* ApprovalQueue.enqueue({ tool }) calls and lib/embed/authority-guard.mjs's
|
|
86
|
+
* grant keys — "<providerId>.<writeKind>", e.g. "jira.issue". Kept in one
|
|
87
|
+
* place so the control-plane drain and the enqueue side can never drift.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} providerId
|
|
90
|
+
* @param {string} writeKind
|
|
91
|
+
* @returns {string}
|
|
92
|
+
*/
|
|
93
|
+
export function writeIntentToolName(providerId, writeKind) {
|
|
94
|
+
return `${providerId}.${writeKind}`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Parse a "<providerId>.<writeKind>" tool name back into its parts. Returns
|
|
99
|
+
* null when the name has no dot, which the caller should treat as
|
|
100
|
+
* unresolvable rather than guessing.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} tool
|
|
103
|
+
* @returns {{ providerId: string, writeKind: string }|null}
|
|
104
|
+
*/
|
|
105
|
+
export function parseWriteIntentToolName(tool) {
|
|
106
|
+
const idx = typeof tool === 'string' ? tool.indexOf('.') : -1;
|
|
107
|
+
if (idx <= 0 || idx === tool.length - 1) return null;
|
|
108
|
+
return { providerId: tool.slice(0, idx), writeKind: tool.slice(idx + 1) };
|
|
109
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geraldmaron/construct",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "npm@11.5.1",
|
|
6
6
|
"description": "Construct — agent orchestration layer for OpenCode, Claude Code, and other coding surfaces",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"platforms/**",
|
|
27
27
|
"templates/**",
|
|
28
28
|
"templates/distribution/**",
|
|
29
|
+
"schemas/**",
|
|
30
|
+
"registry/**",
|
|
31
|
+
"config/**",
|
|
32
|
+
"vendor/**",
|
|
29
33
|
"scripts/sync-specialists.mjs",
|
|
30
34
|
"README.md",
|
|
31
35
|
".env.example"
|
|
@@ -53,9 +57,10 @@
|
|
|
53
57
|
"mcp": "node lib/mcp/server.mjs",
|
|
54
58
|
"doctor": "node ./bin/construct doctor",
|
|
55
59
|
"test": "node scripts/run-tests.mjs",
|
|
56
|
-
"test:functional": "XDG_CONFIG_HOME= XDG_STATE_HOME= XDG_CACHE_HOME= node --test --test-timeout=120000 --test-concurrency=1 tests/functional/*.functional.test.mjs",
|
|
57
|
-
"test:visual": "node -
|
|
60
|
+
"test:functional": "XDG_CONFIG_HOME= XDG_STATE_HOME= XDG_CACHE_HOME= ANTHROPIC_API_KEY= OPENAI_API_KEY= OPENROUTER_API_KEY= CX_MODEL_REASONING= CX_MODEL_STANDARD= CX_MODEL_FAST= CONSTRUCT_MODEL_REASONING= CONSTRUCT_MODEL_STANDARD= CONSTRUCT_MODEL_FAST= CONSTRUCT_PROVIDER_TIMEOUT_MS= WEB_SEARCH_URL= CX_USER_ENV_PATH= CONSTRUCT_TELEMETRY_URL= node --test --test-timeout=120000 --test-concurrency=1 tests/functional/*.functional.test.mjs",
|
|
61
|
+
"test:visual": "node --test --test-timeout=120000 tests/visual/*.test.mjs",
|
|
58
62
|
"test:unit": "node scripts/run-tests.mjs --exclude=tests/functional",
|
|
63
|
+
"ci:local": "bash scripts/ci-repro/run.sh",
|
|
59
64
|
"lint:js": "eslint bin/construct \"lib/**/*.mjs\" \"scripts/**/*.mjs\" \"tests/**/*.mjs\"",
|
|
60
65
|
"coverage": "c8 --reporter=text-summary --reporter=lcov --src=lib --src=bin node scripts/run-tests.mjs --exclude=tests/functional",
|
|
61
66
|
"docs:init": "node -e \"console.error('docs:init is deprecated — use: construct init --docs-preset=lean|product|full'); process.exit(1)\"",
|
|
@@ -66,33 +71,38 @@
|
|
|
66
71
|
"docs:build": "node scripts/npm-run.mjs npm --prefix apps/docs run build",
|
|
67
72
|
"lint:comments": "node ./bin/construct lint:comments",
|
|
68
73
|
"lint:contracts": "node ./bin/construct lint:contracts",
|
|
74
|
+
"graph:gate": "node scripts/run-graph-gate.mjs",
|
|
69
75
|
"lint:agents": "node ./bin/construct lint:agents",
|
|
70
76
|
"gates:audit": "node ./bin/construct gates:audit",
|
|
71
77
|
"evals": "node ./bin/construct evals",
|
|
72
78
|
"certify:demos": "node ./bin/construct certify demos",
|
|
73
79
|
"build:sea": "esbuild bin/construct --bundle --platform=node --target=node20 --packages=external --outfile=dist/construct-bundle.cjs 2>&1 || (echo 'esbuild not found — install with: npm install -g esbuild' && exit 1)",
|
|
80
|
+
"build:binary": "node scripts/build-binary.mjs",
|
|
81
|
+
"build:binary:fallback": "node scripts/build-sea.mjs",
|
|
74
82
|
"examples:deck": "node scripts/generate-deck-examples.mjs",
|
|
75
83
|
"examples:distribution": "node scripts/generate-distribution-examples.mjs",
|
|
76
84
|
"clean:artifacts": "node scripts/clean-artifacts.mjs",
|
|
77
85
|
"lint:scopes": "node scripts/lint-scopes.mjs",
|
|
78
86
|
"catalog:regen": "node scripts/catalog-regen.mjs",
|
|
79
87
|
"catalog:validate": "node scripts/catalog-validate.mjs",
|
|
88
|
+
"workflow-defs:check": "node scripts/check-workflow-defs-drift.mjs --check",
|
|
80
89
|
"docs:sync": "node scripts/docs-sync.mjs",
|
|
81
90
|
"learning:status": "node scripts/learning-status.mjs",
|
|
82
91
|
"lint:templates": "node scripts/lint-commits-pr.mjs",
|
|
83
92
|
"eval:routing": "node scripts/eval/score-intent-classifier.mjs",
|
|
84
93
|
"adapters": "node lib/adapters-sync.mjs",
|
|
85
|
-
"release:check": "npm run doctor && node ./bin/construct registry:validate --unified && npm run catalog:validate -- --check && npm test && npm run docs:update -- --check && npm run docs:site -- --check && npm run docs:sync -- --check && node ./bin/construct registry:generate-docs --check && npm run docs:verify -- --strict && node scripts/alignment/census.mjs --ratchet && npm run lint:comments && node ./bin/construct certify gate && npm run lint:templates",
|
|
94
|
+
"release:check": "npm run doctor && node ./bin/construct registry:validate --unified && npm run catalog:validate -- --check && npm run workflow-defs:check && npm test && node scripts/release-evidence-gate.mjs --skip-tests && npm run docs:update -- --check && npm run docs:site -- --check && npm run docs:sync -- --check && node ./bin/construct registry:generate-docs --check && npm run docs:verify -- --strict && node scripts/alignment/census.mjs --ratchet && npm run lint:comments && node ./bin/construct certify gate && npm run graph:gate && npm run lint:templates",
|
|
86
95
|
"release:gate": "node --test tests/functional/release-gate.functional.test.mjs",
|
|
87
96
|
"audit:published": "node scripts/audit-published-artifact.mjs",
|
|
88
97
|
"version": "node scripts/sync-construct-version.mjs && git add -f .construct/version",
|
|
89
98
|
"release:preflight": "node scripts/pre-release-check.mjs",
|
|
90
99
|
"release:preflight:no-auth": "node scripts/pre-release-check.mjs --skip-auth",
|
|
91
100
|
"npm:publish": "npm run release:check && npm publish --access public",
|
|
92
|
-
"postinstall": "node ./bin/construct-postinstall.mjs"
|
|
101
|
+
"postinstall": "node ./bin/construct-postinstall.mjs",
|
|
102
|
+
"deps:check": "node scripts/validate-dep-intent.mjs"
|
|
93
103
|
},
|
|
94
104
|
"dependencies": {
|
|
95
|
-
"@lancedb/lancedb": "^0.
|
|
105
|
+
"@lancedb/lancedb": "^0.31.0",
|
|
96
106
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
97
107
|
"apache-arrow": "^18.1.0",
|
|
98
108
|
"js-yaml": "^4.2.0"
|
|
@@ -106,6 +116,7 @@
|
|
|
106
116
|
"ai": "^6.0.208",
|
|
107
117
|
"ink": "^7.1.0",
|
|
108
118
|
"mammoth": "^1.12.0",
|
|
119
|
+
"postgres": "^3.4.9",
|
|
109
120
|
"pptx-embed-fonts": "^0.0.6",
|
|
110
121
|
"pptxgenjs": "^4.0.1",
|
|
111
122
|
"react": "^19.2.7",
|
|
@@ -122,6 +133,8 @@
|
|
|
122
133
|
"esbuild": "^0.28.1",
|
|
123
134
|
"eslint": "^10.4.1",
|
|
124
135
|
"globals": "^17.6.0",
|
|
125
|
-
"ink-testing-library": "^4.0.0"
|
|
136
|
+
"ink-testing-library": "^4.0.0",
|
|
137
|
+
"playwright": "^1.61.1",
|
|
138
|
+
"postject": "1.0.0-alpha.6"
|
|
126
139
|
}
|
|
127
140
|
}
|
package/personas/construct.md
CHANGED
|
@@ -25,9 +25,9 @@ Use the single-writer rule whenever multiple sessions are active: if two session
|
|
|
25
25
|
|
|
26
26
|
## Classify before acting <!-- cx:prio=1 -->
|
|
27
27
|
|
|
28
|
-
Before any non-trivial request, CALL the code-backed orchestration policy via the `orchestration_policy` MCP tool with the request text and your `fileCount` / `moduleCount` / `introducesContract` estimate. Do not classify from memory. Honor the returned `track
|
|
28
|
+
Before any non-trivial request, CALL the code-backed orchestration policy via the `orchestration_policy` MCP tool with the request text and your `fileCount` / `moduleCount` / `introducesContract` estimate. Do not classify from memory. Honor the returned `track`. When `track` is not immediate, dispatch through `orchestration_delegation_next` (below) — do not author the deliverable yourself and do not self-sequence off `orchestration_policy`'s specialist list from memory across turns.
|
|
29
29
|
|
|
30
|
-
Tracks: immediate (act directly), focused (one bounded specialist), orchestrated (plan → challenge → build → validate, tracker-backed). cx-
|
|
30
|
+
Tracks: immediate (act directly), focused (one bounded specialist), orchestrated (plan → challenge → build → validate, tracker-backed). cx-reviewer's plan-challenge mode is mandatory whenever `riskFlags` include architecture, security, dataIntegrity, or ai.
|
|
31
31
|
|
|
32
32
|
Orchestrated dispatches emit a task-packet with `goal`, `intent`, `workCategory`, `riskFlags`, `acceptanceCriteria` before naming specialists (`specialists/contracts.json:construct-to-orchestrator`).
|
|
33
33
|
|
|
@@ -45,9 +45,18 @@ General conversation is still valid for scoping, clarification, and lightweight
|
|
|
45
45
|
|
|
46
46
|
1. **Gates**. `framingChallenge`, `externalResearch`, `docAuthoring`
|
|
47
47
|
2. **Contract chain**. typed handoffs from `specialists/contracts.json`. Call `agent_contract` with `handoffPacket` from `orchestration_policy`.
|
|
48
|
-
3. **Specialist sequence**.
|
|
48
|
+
3. **Specialist sequence**. the engine's job, not yours — see below.
|
|
49
49
|
4. **Team routing**. name `teamRouting.primaryTeam` in the dispatch plan; route through `teamRouting.requiredApprovals` before DONE; if `teamRouting.blockedStatus` is set, stop and escalate along its `escalationPath` rather than proceeding.
|
|
50
50
|
|
|
51
|
+
## Dispatch one step at a time <!-- cx:prio=1 -->
|
|
52
|
+
|
|
53
|
+
Sequencing a multi-specialist chain is the flow engine's job (ADR-0067), not something to hold in your own context across turns. Once `orchestration_policy` says the track is not immediate, drive dispatch through `orchestration_delegation_next`, not by reading a full plan and self-sequencing:
|
|
54
|
+
|
|
55
|
+
- Mint a `run_id` for this dispatch (a session or task id is fine) and call `orchestration_delegation_next` with the same `request`/`fileCount`/`moduleCount` you gave `orchestration_policy`, plus that `run_id`.
|
|
56
|
+
- Act on exactly the returned `currentDelegation` — its `role`, `reason`, and `handoffContract` — and nothing else. Do not pre-plan the rest of the chain from a remembered dispatch plan.
|
|
57
|
+
- Call again with the same `run_id` for the next specialist. Repeat until `done: true`.
|
|
58
|
+
- The chain survives a restart: calling again with the same `run_id` in a later turn or session continues from wherever it left off, never re-running a specialist already dispatched.
|
|
59
|
+
|
|
51
60
|
Before DONE: postconditions met · sources cited · framing logged · ADRs have Rejected alternatives.
|
|
52
61
|
|
|
53
62
|
## Branch + commit approval <!-- cx:prio=1 -->
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://construct.dev/schemas/agent-manifest.v1.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"kind": "agent-execution-manifest",
|
|
5
|
+
"description": "How an agent should reach Construct: MCP-first tool surface, with OpenCode as the primary human conversation surface. Source-of-truth values (core tool set, long-tail dispatcher) are verified against lib/mcp/server.mjs by tests/agent-manifest.test.mjs.",
|
|
6
|
+
"sources": {
|
|
7
|
+
"coreTools": "lib/mcp/server.mjs (CORE_TOOL_NAMES)",
|
|
8
|
+
"longTail": "lib/mcp/server.mjs (CONSTRUCT_CALL_TOOL)",
|
|
9
|
+
"surfaceTiers": "lib/registry/surface-map.mjs (SURFACE_TIERS, COMMAND_SURFACE)",
|
|
10
|
+
"capabilities": "registry/capabilities.json",
|
|
11
|
+
"credentials": "lib/mcp/server.mjs (config.env injection), lib/providers/secret-resolver.mjs"
|
|
12
|
+
},
|
|
13
|
+
"toolSurface": {
|
|
14
|
+
"model": "core-plus-long-tail",
|
|
15
|
+
"rationale": "ListTools front-loads a small core; everything else is reachable through the `call` gateway or discovered by intent via `find_tool`, so the schema stays small and small models stop hallucinating tool names. The long tail is reachable, just not front-loaded.",
|
|
16
|
+
"core": [
|
|
17
|
+
{
|
|
18
|
+
"name": "orchestration_policy",
|
|
19
|
+
"use": "Classify intent and get the specialist routing policy for a request."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "orchestration_run",
|
|
23
|
+
"use": "Dispatch the routed specialist chain for a request after classifying it."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "get_skill",
|
|
27
|
+
"use": "Fetch a role or domain skill playbook by id."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "get_template",
|
|
31
|
+
"use": "Read a doc template (prd, adr, runbook, ...) by name before authoring an artifact."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "search_skills",
|
|
35
|
+
"use": "Find relevant skills by query."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "knowledge_search",
|
|
39
|
+
"use": "Search the project knowledge base."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "memory_search",
|
|
43
|
+
"use": "Search durable cross-session memory."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "project_context",
|
|
47
|
+
"use": "Read the active project context and working state."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "summarize_diff",
|
|
51
|
+
"use": "Summarize a code diff for review or handoff."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "find_tool",
|
|
55
|
+
"use": "Find tools by intent when you don't know the exact name; returns ranked tools with schemas."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "author_artifact",
|
|
59
|
+
"use": "Materialize a typed artifact you drafted (PRD/ADR/RFC/…) and run the release gate."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "document_export",
|
|
63
|
+
"use": "Convert a markdown file to PDF/DOCX/HTML/deck and write it to a path."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "publish_run",
|
|
67
|
+
"use": "Run the publish pipeline to export an artifact (figures and demos optional)."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "artifact_workflow",
|
|
71
|
+
"use": "Plan a manifest-backed artifact workflow; validate or export locally."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "workflow_invoke",
|
|
75
|
+
"use": "Invoke an embedded Construct workflow (prd-draft, architecture-review, …)."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "triage_recommend",
|
|
79
|
+
"use": "Recommend intake triage — type, owner, and routing — for a new signal."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "orchestration_readiness",
|
|
83
|
+
"use": "Verify that the active MCP session has Construct orchestration tools attached; returns a typed failure reason and next step."
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"longTail": {
|
|
87
|
+
"tool": "call",
|
|
88
|
+
"use": "Invoke any non-core Construct tool by name: put the tool name in `tool` and its arguments in `args`. Call find_tool to discover the right tool by intent; the catalog of valid names is the `tool` enum.",
|
|
89
|
+
"rationale": "One dispatcher reuses the same handlers, so collapsing the surface costs no capability — every tool stays reachable by name. The manifest deliberately does not enumerate the full tool list; the live catalog is the `call` enum in lib/mcp/server.mjs, and find_tool ranks it by intent. The former gateway name `construct_call` is recovered tolerantly, so a stale name still resolves."
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"humanEntry": {
|
|
93
|
+
"command": "opencode",
|
|
94
|
+
"subcommand": null,
|
|
95
|
+
"use": "A human uses OpenCode as the primary conversation surface after `construct sync` installs the Construct front-door agent, MCP wiring, and runtime plugin. The `construct` CLI remains setup/admin/headless infrastructure.",
|
|
96
|
+
"rationale": "Construct no longer ships a local conversation UI; OpenCode is primary and other public hosts use generated adapters or MCP.",
|
|
97
|
+
"surface": "opencode"
|
|
98
|
+
},
|
|
99
|
+
"credentials": {
|
|
100
|
+
"policy": "mcp-mediated",
|
|
101
|
+
"guidance": "Agents never resolve secrets themselves. The Construct MCP server applies config.env to its process environment at startup, so provider credentials are present for every tool call. The shared secret resolver walks the trusted sources (process env, config.env, ~/.env, project .env, shell rc) and resolves any 1Password reference internally.",
|
|
102
|
+
"doNot": "Do not instruct or run manual `op read` / `op://` lookups, and do not ask the user to paste keys. MCP tool outputs expose only env-key names and a configured boolean, never credential values.",
|
|
103
|
+
"source": "lib/mcp/server.mjs config.env injection; lib/providers/secret-resolver.mjs; lib/providers/credential-bootstrap.mjs"
|
|
104
|
+
},
|
|
105
|
+
"mcpGaps": {
|
|
106
|
+
"note": "True gaps only: capabilities that declare MCP unsupported. Flag variants of an MCP-backed capability and retired commands are not gaps.",
|
|
107
|
+
"gaps": [
|
|
108
|
+
{
|
|
109
|
+
"id": "oracle.meta-review",
|
|
110
|
+
"name": "Oracle Meta-Review",
|
|
111
|
+
"mcp": "unsupported",
|
|
112
|
+
"cliFallback": "construct oracle review",
|
|
113
|
+
"reason": "Declares surfaces.mcp.supported=false in registry/capabilities.json; reach it via the CLI --json twin."
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|