@mindrian_os/cli 2.0.0-beta.3 → 2.0.0-beta.31
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/.claude-plugin/plugin.json +21 -0
- package/.mcp.json +14 -0
- package/CHANGELOG.md +467 -0
- package/agents/analogy-query-fetcher.md +119 -0
- package/agents/brain-query.md +91 -0
- package/agents/competitor-watch-fetcher.md +94 -0
- package/agents/framework-runner.md +258 -0
- package/agents/grading.md +216 -0
- package/agents/grant-reviewer.md +191 -0
- package/agents/investor.md +141 -0
- package/agents/larry-extended.md +215 -0
- package/agents/meeting-perspective-extractor.md +94 -0
- package/agents/opportunity-scanner.md +105 -0
- package/agents/persona-analyst.md +201 -0
- package/agents/research.md +103 -0
- package/agents/reverse-salient-agent.md +42 -0
- package/agents/vault-section-reviewer.md +107 -0
- package/assets/banner-showcase.html +537 -0
- package/assets/fonts/BebasNeue-Regular.ttf +0 -0
- package/assets/fonts/Inter-Bold.ttf +0 -0
- package/assets/fonts/Inter-Regular.ttf +0 -0
- package/assets/logo.svg +10 -0
- package/bin/local-chain-recommender.cjs +256 -0
- package/bin/mindrian-brain-mcp-client.cjs +319 -0
- package/bin/mindrian-mcp-server.cjs +445 -0
- package/bin/mindrian-mcp-shim.cjs +100 -0
- package/bin/mindrian-tools.cjs +784 -0
- package/commands/act.md +529 -0
- package/commands/admin.md +439 -0
- package/commands/agentshield.md +49 -0
- package/commands/analyze-needs.md +78 -0
- package/commands/analyze-systems.md +73 -0
- package/commands/analyze-timing.md +98 -0
- package/commands/auto-explore.md +85 -0
- package/commands/beautiful-question.md +76 -0
- package/commands/bono.md +152 -0
- package/commands/brain-derive.md +137 -0
- package/commands/build-knowledge.md +121 -0
- package/commands/build-thesis.md +94 -0
- package/commands/causal.md +269 -0
- package/commands/challenge-assumptions.md +78 -0
- package/commands/compare-ventures.md +117 -0
- package/commands/correct-reference-now.md +88 -0
- package/commands/dashboard.md +144 -0
- package/commands/deck.md +117 -0
- package/commands/deep-grade.md +214 -0
- package/commands/diagnose.md +131 -0
- package/commands/diagnostics.md +195 -0
- package/commands/dial-memory-refresh.md +113 -0
- package/commands/diffusion.md +129 -0
- package/commands/discover.md +221 -0
- package/commands/doctor.md +271 -0
- package/commands/dogfood-flush.md +130 -0
- package/commands/dominant-designs.md +76 -0
- package/commands/eureka.md +315 -0
- package/commands/explain-decision.md +135 -0
- package/commands/explore-domains.md +78 -0
- package/commands/explore-futures.md +67 -0
- package/commands/explore-opportunity.md +172 -0
- package/commands/explore-trends.md +78 -0
- package/commands/export.md +128 -0
- package/commands/feynman-timeline-refresh.md +102 -0
- package/commands/file-meeting.md +1195 -0
- package/commands/find-analogies.md +369 -0
- package/commands/find-bottlenecks.md +108 -0
- package/commands/find-connections.md +111 -0
- package/commands/funding.md +114 -0
- package/commands/futures.md +128 -0
- package/commands/grade-grant.md +297 -0
- package/commands/grade.md +257 -0
- package/commands/graph.md +218 -0
- package/commands/hat-briefing.md +163 -0
- package/commands/heal.md +72 -0
- package/commands/help.md +176 -0
- package/commands/hmi-status.md +75 -0
- package/commands/ignite.md +229 -0
- package/commands/ingest-methodology.md +128 -0
- package/commands/intel-pipeline.md +133 -0
- package/commands/jtbd.md +262 -0
- package/commands/leadership.md +113 -0
- package/commands/lean-canvas.md +74 -0
- package/commands/macro-trends.md +88 -0
- package/commands/map-unknowns.md +76 -0
- package/commands/memory-cortex-reach.md +79 -0
- package/commands/memory.md +213 -0
- package/commands/models.md +200 -0
- package/commands/mos-reason.md +489 -0
- package/commands/mos.md +162 -0
- package/commands/mullins.md +155 -0
- package/commands/mva-brief.md +86 -0
- package/commands/mva-option.md +119 -0
- package/commands/mva-report.md +76 -0
- package/commands/new-project.md +633 -0
- package/commands/new-surface.md +116 -0
- package/commands/onboard.md +489 -0
- package/commands/operator.md +168 -0
- package/commands/opportunities.md +177 -0
- package/commands/organize.md +74 -0
- package/commands/persona.md +276 -0
- package/commands/pipeline.md +167 -0
- package/commands/present.md +125 -0
- package/commands/publish.md +227 -0
- package/commands/pws-brain.md +154 -0
- package/commands/qualify-opportunity.md +113 -0
- package/commands/query.md +70 -0
- package/commands/radar.md +110 -0
- package/commands/reanalyze.md +124 -0
- package/commands/research.md +467 -0
- package/commands/room.md +385 -0
- package/commands/rooms.md +682 -0
- package/commands/root-cause.md +77 -0
- package/commands/rs-experts.md +153 -0
- package/commands/rs-explain.md +134 -0
- package/commands/rs-fetch.md +119 -0
- package/commands/rs-thesis.md +131 -0
- package/commands/scenario-plan.md +80 -0
- package/commands/scheduled-tasks.md +308 -0
- package/commands/score-innovation.md +78 -0
- package/commands/scout.md +379 -0
- package/commands/setup.md +658 -0
- package/commands/show.md +71 -0
- package/commands/skill.md +108 -0
- package/commands/snapshot.md +179 -0
- package/commands/speakers.md +118 -0
- package/commands/splash.md +55 -0
- package/commands/stance.md +91 -0
- package/commands/status.md +109 -0
- package/commands/structure-argument.md +82 -0
- package/commands/suggest-next.md +141 -0
- package/commands/systems-thinking.md +224 -0
- package/commands/think-hats.md +86 -0
- package/commands/trending-to-absurd.md +151 -0
- package/commands/update.md +256 -0
- package/commands/user-needs.md +77 -0
- package/commands/validate.md +77 -0
- package/commands/value-proposition.md +116 -0
- package/commands/vault.md +330 -0
- package/commands/visualize.md +71 -0
- package/commands/whitespace.md +541 -0
- package/commands/wiki.md +96 -0
- package/data/ROOM.md +47 -0
- package/data/brain-census.generated.json +2617 -0
- package/data/brain-orchestration-projection.json +4973 -0
- package/data/brain-packet-schema.json +545 -0
- package/data/brain-surface-contract.json +32 -0
- package/data/capability-ledger.json +391 -0
- package/data/capability-map-registry.json +23 -0
- package/data/command-registry.json +2433 -0
- package/data/connector-coverage-ledger.json +1618 -0
- package/data/connector-out-of-spine-allowlist.json +71 -0
- package/data/connector-registry.json +3637 -0
- package/data/corpus-stats-source.json +11 -0
- package/data/corpus-stats.generated.json +10 -0
- package/data/cross-domain-analogues.json +15 -0
- package/data/deck-aliases.json +6 -0
- package/data/deck-styles.json +85 -0
- package/data/deployment-surfaces.json +69 -0
- package/data/dispatch-framework-map.json +18 -0
- package/data/doctor-modules.json +206 -0
- package/data/dual-graph-health-baseline.json +12 -0
- package/data/eureka-critic-tags.json +32 -0
- package/data/first-reward-surfaces.json +66 -0
- package/data/first-touch-surfaces.json +60 -0
- package/data/flagship-floor-set.json +37 -0
- package/data/framework-names.json +121 -0
- package/data/grant-rubric-fixtures/early-stage-pre-seed.json +18 -0
- package/data/grant-rubric-fixtures/early-stage-round-a.json +18 -0
- package/data/grant-rubric-fixtures/early-stage-seed.json +18 -0
- package/data/grant-rubric-fixtures/hybrid-seed-incentive.json +18 -0
- package/data/grant-rubric-fixtures/rd-fund.json +18 -0
- package/data/grant-rubric-fixtures/regional-innovation-incubators.json +18 -0
- package/data/grant-rubric-fixtures/technology-incubators.json +18 -0
- package/data/grant-rubric-fixtures/tnufa.json +167 -0
- package/data/grant-rubric-schema.json +33 -0
- package/data/harness-fixtures/converged-room/.context/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/.intelligence/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/.snapshots/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/MINTO.md +19 -0
- package/data/harness-fixtures/converged-room/STATE.md +73 -0
- package/data/harness-fixtures/converged-room/USER.md +23 -0
- package/data/harness-fixtures/converged-room/assets/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/business-model/CONTEXT.md +32 -0
- package/data/harness-fixtures/converged-room/business-model/ROOM.md +36 -0
- package/data/harness-fixtures/converged-room/competitive-analysis/CONTEXT.md +33 -0
- package/data/harness-fixtures/converged-room/competitive-analysis/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/financial-model/CONTEXT.md +30 -0
- package/data/harness-fixtures/converged-room/financial-model/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/funding/CONTEXT.md +41 -0
- package/data/harness-fixtures/converged-room/funding/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/legal-ip/CONTEXT.md +30 -0
- package/data/harness-fixtures/converged-room/legal-ip/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/market-analysis/CONTEXT.md +32 -0
- package/data/harness-fixtures/converged-room/market-analysis/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/opportunity-bank/CONTEXT.md +39 -0
- package/data/harness-fixtures/converged-room/opportunity-bank/ROOM.md +36 -0
- package/data/harness-fixtures/converged-room/problem-definition/CONTEXT.md +32 -0
- package/data/harness-fixtures/converged-room/problem-definition/ROOM.md +36 -0
- package/data/harness-fixtures/converged-room/references/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/references/SECTION-SCHEMA.md +213 -0
- package/data/harness-fixtures/converged-room/references/SUB-SCHEMAS.md +91 -0
- package/data/harness-fixtures/converged-room/solution-design/CONTEXT.md +36 -0
- package/data/harness-fixtures/converged-room/solution-design/ROOM.md +36 -0
- package/data/harness-fixtures/converged-room/strategy/CONTEXT.md +35 -0
- package/data/harness-fixtures/converged-room/strategy/ROOM.md +35 -0
- package/data/harness-fixtures/converged-room/team/ROOM.md +13 -0
- package/data/harness-fixtures/converged-room/team-execution/CONTEXT.md +36 -0
- package/data/harness-fixtures/converged-room/team-execution/ROOM.md +35 -0
- package/data/harness-manifest.json +74 -0
- package/data/harness-policies/CONTEXT.md +55 -0
- package/data/harness-policies/_schema.json +42 -0
- package/data/harness-policies/contract-parity-larry.json +63 -0
- package/data/harness-policies/gate-card-fire.json +13 -0
- package/data/harness-policies/gate-graph-derive-health.json +13 -0
- package/data/harness-policies/gate-shape-declaration.json +13 -0
- package/data/harness-policies/gate-tool-honesty.json +13 -0
- package/data/harness-policies/gate-worktree-hygiene.json +13 -0
- package/data/harness-policies/memory-write-policy.json +28 -0
- package/data/harness-policies/registry-drift.json +13 -0
- package/data/harness-policies/release-payload-ceiling.json +13 -0
- package/data/harness-policies/voice-backend-noun-free.json +13 -0
- package/data/harness-policies/voice-fork-as-card.json +13 -0
- package/data/harness-policies/voice-glyph-present.json +13 -0
- package/data/harness-policies/voice-hyphens-only.json +13 -0
- package/data/help-groups.json +236 -0
- package/data/hitl-shape-backfill.json +777 -0
- package/data/hitl-shape-declaration-fixtures/invalid-bad-shape.json +5 -0
- package/data/hitl-shape-declaration-fixtures/invalid-missing-why.json +4 -0
- package/data/hitl-shape-declaration-fixtures/invalid-ranker-contradiction.json +6 -0
- package/data/hitl-shape-declaration-fixtures/invalid-skill-gap.json +3 -0
- package/data/hitl-shape-declaration-fixtures/valid-multi-stage.json +7 -0
- package/data/hitl-shape-declaration-fixtures/valid-single-shape.json +5 -0
- package/data/hitl-shape-declaration-fixtures/valid-skill-exempt.json +5 -0
- package/data/hitl-shape-declaration-schema.json +34 -0
- package/data/hitl-stages-fixtures/bono.json +10 -0
- package/data/hitl-stages-fixtures/pipeline-1.json +9 -0
- package/data/hitl-stages-fixtures/pipeline-2.json +9 -0
- package/data/hitl-stages-fixtures/pipeline-3.json +10 -0
- package/data/hitl-stages-fixtures/research.json +10 -0
- package/data/hitl-stages-fixtures/rs-convergence.json +10 -0
- package/data/hitl-stages-fixtures/rs-family.json +11 -0
- package/data/hitl-stages-fixtures/rs-reverse-salient.json +10 -0
- package/data/hitl-stages-fixtures/trending-to-absurd.json +11 -0
- package/data/hitl-stages-schema.json +26 -0
- package/data/mcp-tool-connectors.json +464 -0
- package/data/mva-agent-prompts.json +31 -0
- package/data/mva-deck-template.html +15 -0
- package/data/mva-heuristic-keywords.json +35 -0
- package/data/orchestration-command-ledger.json +576 -0
- package/data/orchestration-unwired-allowlist.json +6 -0
- package/data/portfolio-ahp-matrix.json +16 -0
- package/data/publish-needs.json +76 -0
- package/data/render-coverage-registry.json +1152 -0
- package/data/research-sources.json +58 -0
- package/data/roadmap-type-chains.json +28 -0
- package/data/room-blueprints.json +156 -0
- package/data/subagent-dispatch-grants.json +150 -0
- package/hooks/hooks.json +493 -0
- package/hooks/run-hook.cmd +64 -0
- package/lib/__init__.py +0 -0
- package/lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/lib/agents/auto-explore-agent.cjs +1163 -0
- package/lib/agents/mva/brain-classic-traps.cjs +55 -0
- package/lib/agents/mva/brain-cross-domain.cjs +79 -0
- package/lib/agents/mva/brain-similar-ventures.cjs +93 -0
- package/lib/agents/mva/dashboard-graph-neighborhood.cjs +72 -0
- package/lib/agents/mva/index.cjs +42 -0
- package/lib/agents/mva/six-hats-red-black.cjs +137 -0
- package/lib/agents/mva/tavily-funding-scan.cjs +147 -0
- package/lib/agents/mva/test-all-six-agents.cjs +467 -0
- package/lib/agents/reverse-salient-agent.cjs +757 -0
- package/lib/agents/tension-hook-agent.cjs +586 -0
- package/lib/brain/ROOM.md +44 -0
- package/lib/brain/chain-recommender.cjs +784 -0
- package/lib/brain/curation-batch.cjs +519 -0
- package/lib/brain/framework-chain-slice.cjs +252 -0
- package/lib/brain/hypergraph-event-schema.cjs +184 -0
- package/lib/chat/chat-context.js +185 -0
- package/lib/chat/chat-panel.js +721 -0
- package/lib/chat/fabric-chat.cjs +288 -0
- package/lib/chat/generative-tools.js +219 -0
- package/lib/conversation/ROOM.md +39 -0
- package/lib/conversation/classifier-rules.json +38 -0
- package/lib/conversation/classifier.cjs +264 -0
- package/lib/conversation/operator-epistemic-cap.test.cjs +156 -0
- package/lib/conversation/operator.cjs +492 -0
- package/lib/conversation/operator.test.cjs +160 -0
- package/lib/copy/115-spec-strings.cjs +55 -0
- package/lib/core/__init__.py +0 -0
- package/lib/core/__nav-stub.cjs +14 -0
- package/lib/core/__pycache__/__init__.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs-math.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_cache.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_corpus.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_corpus_exclude.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_hybrid.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_math.cpython-312.pyc +0 -0
- package/lib/core/__pycache__/rs_rooms.cpython-312.pyc +0 -0
- package/lib/core/abstraction-gate.cjs +133 -0
- package/lib/core/act-jtbd-blurb.cjs +231 -0
- package/lib/core/artifact-id.cjs +148 -0
- package/lib/core/asset-ops.cjs +151 -0
- package/lib/core/auto-commit-throttle.cjs +129 -0
- package/lib/core/bearer-token.cjs +199 -0
- package/lib/core/behavioral/observation-schema.cjs +86 -0
- package/lib/core/bono/cell-fanout.cjs +305 -0
- package/lib/core/bono/debate-composition.cjs +495 -0
- package/lib/core/bono/hat-governance.cjs +367 -0
- package/lib/core/bono/persona-research.cjs +288 -0
- package/lib/core/bono/reviewer-governance.cjs +331 -0
- package/lib/core/brain-client.cjs +2365 -0
- package/lib/core/brain-derivation-prompts.cjs +331 -0
- package/lib/core/brain-derivation-queue.cjs +535 -0
- package/lib/core/brain-derivation.cjs +740 -0
- package/lib/core/brain-md-schema.cjs +528 -0
- package/lib/core/brain-md-staleness.cjs +357 -0
- package/lib/core/brain-response-sanitize.cjs +396 -0
- package/lib/core/breakthrough/canary.cjs +134 -0
- package/lib/core/breakthrough/canary.test.cjs +136 -0
- package/lib/core/breakthrough/detectors.cjs +359 -0
- package/lib/core/breakthrough/detectors.test.cjs +333 -0
- package/lib/core/breakthrough/ethics-fence.cjs +129 -0
- package/lib/core/breakthrough/ethics-fence.test.cjs +178 -0
- package/lib/core/breakthrough/resurfacing.cjs +150 -0
- package/lib/core/breakthrough/resurfacing.test.cjs +233 -0
- package/lib/core/breakthrough/review-queue.cjs +168 -0
- package/lib/core/breakthrough/review-queue.test.cjs +160 -0
- package/lib/core/breakthrough/scanner-d17-d18.test.cjs +229 -0
- package/lib/core/breakthrough/scanner.cjs +435 -0
- package/lib/core/breakthrough/scanner.test.cjs +267 -0
- package/lib/core/breakthrough/schema.cjs +180 -0
- package/lib/core/breakthrough/schema.test.cjs +256 -0
- package/lib/core/breakthrough/scoring.cjs +293 -0
- package/lib/core/breakthrough/scoring.test.cjs +423 -0
- package/lib/core/breakthrough/verb-dispatch.cjs +230 -0
- package/lib/core/breakthrough/verb-dispatch.test.cjs +185 -0
- package/lib/core/breakthrough/voice-scaffold.cjs +249 -0
- package/lib/core/breakthrough/voice-scaffold.test.cjs +251 -0
- package/lib/core/bridge-writer.cjs +477 -0
- package/lib/core/cache-prune.cjs +314 -0
- package/lib/core/card-fire-gate.cjs +107 -0
- package/lib/core/card-fire-sidechannel.cjs +518 -0
- package/lib/core/chain-executor.cjs +939 -0
- package/lib/core/chain-retry.cjs +214 -0
- package/lib/core/chain-step-dispatcher.cjs +397 -0
- package/lib/core/chat-context-builder.cjs +253 -0
- package/lib/core/check-plugin-enabled.cjs +145 -0
- package/lib/core/close-loop-writer.cjs +492 -0
- package/lib/core/command-registration-check.cjs +246 -0
- package/lib/core/correlation-label-index.cjs +230 -0
- package/lib/core/correlation.cjs +112 -0
- package/lib/core/coverage-monitor.cjs +183 -0
- package/lib/core/coverage-rollup.cjs +232 -0
- package/lib/core/cross-room-aggregator.cjs +1127 -0
- package/lib/core/cross-room-store.cjs +292 -0
- package/lib/core/cross-room-triggers.cjs +222 -0
- package/lib/core/daily-briefing.cjs +438 -0
- package/lib/core/decision-axes.cjs +178 -0
- package/lib/core/decision-capture.cjs +618 -0
- package/lib/core/deck-design-rules.cjs +211 -0
- package/lib/core/deep-links.cjs +82 -0
- package/lib/core/directive-envelope.cjs +217 -0
- package/lib/core/directive-envelope.test.cjs +225 -0
- package/lib/core/dispatch-optimizer.cjs +354 -0
- package/lib/core/doc-text-extractor.cjs +133 -0
- package/lib/core/doctor/capability-ledger-module.cjs +170 -0
- package/lib/core/doctor/card-fire-health-module.cjs +159 -0
- package/lib/core/doctor/cascade-rooms-active-module.cjs +127 -0
- package/lib/core/doctor/cascade-rooms-module.cjs +184 -0
- package/lib/core/doctor/class-m-brain-smoke.cjs +479 -0
- package/lib/core/doctor/class-m-brain-smoke.test.cjs +448 -0
- package/lib/core/doctor/class-s-eureka-smoke.cjs +380 -0
- package/lib/core/doctor/deployment-surfaces-module.cjs +408 -0
- package/lib/core/doctor/deprecated-usage-module.cjs +155 -0
- package/lib/core/doctor/eureka-fts-health-module.cjs +236 -0
- package/lib/core/doctor/graph-derive-heal-retrofit-module.cjs +148 -0
- package/lib/core/doctor/graph-derive-health-module.cjs +486 -0
- package/lib/core/doctor/install-incomplete-module.cjs +320 -0
- package/lib/core/doctor/install-state-module.cjs +503 -0
- package/lib/core/doctor/mcp-surface-module.cjs +369 -0
- package/lib/core/doctor/mode-select-checkpoint-module.cjs +113 -0
- package/lib/core/doctor/plugin-enabled-state-module.cjs +86 -0
- package/lib/core/doctor/room-graph-density-module.cjs +181 -0
- package/lib/core/doctor/room-md-module.cjs +198 -0
- package/lib/core/doctor/shared.cjs +555 -0
- package/lib/core/doctor/stale-first-touch-copy-module.cjs +83 -0
- package/lib/core/doctor/statusline-visibility-module.cjs +295 -0
- package/lib/core/doctor/ui-compliance-module.cjs +223 -0
- package/lib/core/doctor/umbilical-module.cjs +486 -0
- package/lib/core/doctor/verify-surface-module.cjs +82 -0
- package/lib/core/doctor/voice-style-log-module.cjs +146 -0
- package/lib/core/domain-insight-sweep.cjs +224 -0
- package/lib/core/drift-baseline.cjs +362 -0
- package/lib/core/drift-runtime-reachability.cjs +283 -0
- package/lib/core/dual-path-detector.cjs +84 -0
- package/lib/core/dual-path-detector.test.cjs +334 -0
- package/lib/core/enrichment-queue.cjs +636 -0
- package/lib/core/eureka/ahp-weights.cjs +232 -0
- package/lib/core/eureka/analogy-fitness.cjs +326 -0
- package/lib/core/eureka/compression-meter.cjs +165 -0
- package/lib/core/eureka/embedding-classifier.cjs +226 -0
- package/lib/core/eureka/embedding-spine.cjs +563 -0
- package/lib/core/eureka/entity-classifier.cjs +232 -0
- package/lib/core/eureka/entity-extractor.cjs +356 -0
- package/lib/core/eureka/eureka-enable.cjs +228 -0
- package/lib/core/eureka/eureka-offer.cjs +225 -0
- package/lib/core/eureka/eureka-reach-runner.cjs +430 -0
- package/lib/core/eureka/explore-chain.cjs +834 -0
- package/lib/core/eureka/explored-artifact.cjs +456 -0
- package/lib/core/eureka/fts-index-lifecycle.cjs +265 -0
- package/lib/core/eureka/grade-grant-examine.cjs +544 -0
- package/lib/core/eureka/grade-grant.cjs +596 -0
- package/lib/core/eureka/hybrid-retrieve.cjs +256 -0
- package/lib/core/eureka/lateral-engine-adapter.cjs +118 -0
- package/lib/core/eureka/lexical-overlap.cjs +98 -0
- package/lib/core/eureka/online-pattern-query.cjs +142 -0
- package/lib/core/eureka/opportunity-harvest.cjs +752 -0
- package/lib/core/eureka/opportunity-statement.cjs +519 -0
- package/lib/core/eureka/portfolio-dimensions.cjs +255 -0
- package/lib/core/eureka/qualify-opportunity.cjs +607 -0
- package/lib/core/eureka/reasoning-mode.cjs +481 -0
- package/lib/core/eureka/report-html.cjs +368 -0
- package/lib/core/eureka/research-filing.cjs +547 -0
- package/lib/core/eureka/room-native-substrate.cjs +343 -0
- package/lib/core/eureka/tail-quadrant.cjs +177 -0
- package/lib/core/eureka/tri-modal-index.cjs +564 -0
- package/lib/core/eureka/vector-store.cjs +414 -0
- package/lib/core/eureka-critic.cjs +733 -0
- package/lib/core/eureka-deps-resolver.cjs +179 -0
- package/lib/core/expert-genesis.cjs +437 -0
- package/lib/core/expert-library.cjs +303 -0
- package/lib/core/exports-log.cjs +79 -0
- package/lib/core/feynman/ROOM.md +25 -0
- package/lib/core/feynman/dial-memory-renderer.cjs +279 -0
- package/lib/core/feynman/dial-memory-runner.cjs +173 -0
- package/lib/core/feynman/feynman-seed-writer.cjs +187 -0
- package/lib/core/feynman/timeline-renderer.cjs +197 -0
- package/lib/core/feynman/timeline-runner.cjs +281 -0
- package/lib/core/feynman-minto-invariants.cjs +609 -0
- package/lib/core/findings-wirer.cjs +360 -0
- package/lib/core/first-touch-version-stamper.cjs +113 -0
- package/lib/core/folder-memory-async.cjs +424 -0
- package/lib/core/folder-memory-shared.cjs +890 -0
- package/lib/core/folder-memory.cjs +546 -0
- package/lib/core/framework-chain-composer.cjs +583 -0
- package/lib/core/frontmatter-schemas.cjs +468 -0
- package/lib/core/fusion-router.cjs +540 -0
- package/lib/core/futures/causal-cue.cjs +91 -0
- package/lib/core/futures/orchestrator.cjs +1391 -0
- package/lib/core/futures/subsystem-render.cjs +164 -0
- package/lib/core/gate-relevance.cjs +278 -0
- package/lib/core/git-ops.cjs +141 -0
- package/lib/core/graph-backfill.cjs +562 -0
- package/lib/core/graph-candidate-producer.cjs +235 -0
- package/lib/core/graph-derivation.cjs +546 -0
- package/lib/core/graph-derive-classifier.cjs +352 -0
- package/lib/core/graph-ops.cjs +274 -0
- package/lib/core/graph-refine-loop.cjs +194 -0
- package/lib/core/graph-self-heal.cjs +289 -0
- package/lib/core/greeting-intent-detector.cjs +201 -0
- package/lib/core/grill-engine.cjs +459 -0
- package/lib/core/hat-persistence.cjs +274 -0
- package/lib/core/hsi-engine.cjs +439 -0
- package/lib/core/hsi-lsa.cjs +246 -0
- package/lib/core/hsi-spectral.cjs +554 -0
- package/lib/core/hsi-to-graph.test.cjs +168 -0
- package/lib/core/icm-forest.cjs +703 -0
- package/lib/core/ignite-branch-gate.cjs +66 -0
- package/lib/core/index.cjs +60 -0
- package/lib/core/insight-sensors.cjs +1000 -0
- package/lib/core/install-state.cjs +242 -0
- package/lib/core/integration-registry.cjs +232 -0
- package/lib/core/intel-pipeline.cjs +545 -0
- package/lib/core/intelligence-cascade.cjs +852 -0
- package/lib/core/issue-tree.cjs +269 -0
- package/lib/core/larry-thinness-acknowledgment.cjs +64 -0
- package/lib/core/larry-thinness-acknowledgment.test.cjs +97 -0
- package/lib/core/lazygraph-ops.cjs +1453 -0
- package/lib/core/lens-engine.cjs +434 -0
- package/lib/core/leverage-scan.cjs +218 -0
- package/lib/core/llm-name-suggester.cjs +194 -0
- package/lib/core/llm-name-suggester.test.cjs +132 -0
- package/lib/core/lru-cache.cjs +139 -0
- package/lib/core/mcp-dep-heal.cjs +475 -0
- package/lib/core/mcp-dep-heal.test.cjs +253 -0
- package/lib/core/mcp-profiles.cjs +185 -0
- package/lib/core/meeting-ops.cjs +54 -0
- package/lib/core/memory/governance-candidate-raiser.cjs +205 -0
- package/lib/core/memory/governance-candidate.cjs +95 -0
- package/lib/core/memory/reconcile-memory-runner.cjs +653 -0
- package/lib/core/memory-ops.cjs +641 -0
- package/lib/core/meter/gate-density-reader.cjs +112 -0
- package/lib/core/meter/transfer-reader.cjs +276 -0
- package/lib/core/meter/two-gauge.cjs +245 -0
- package/lib/core/methodology-ingest.cjs +346 -0
- package/lib/core/metrics/larryreach-loop-health.cjs +142 -0
- package/lib/core/migration-snapshot.cjs +287 -0
- package/lib/core/migration-snapshot.test.cjs +174 -0
- package/lib/core/migrations/ROOM.md +33 -0
- package/lib/core/migrations/phase-109-nodes-provenance.cjs +400 -0
- package/lib/core/migrations/phase-109-session-focus.cjs +99 -0
- package/lib/core/migrations/phase-160-nodes-bitemporal.cjs +168 -0
- package/lib/core/migrations/phase-160-nodes-bitemporal.test.cjs +140 -0
- package/lib/core/migrations/phase-162-section-nodes.cjs +156 -0
- package/lib/core/migrations/phase-222-ranker-weights.cjs +62 -0
- package/lib/core/migrations/phase-224-edge-review-status.cjs +87 -0
- package/lib/core/mindrian-brain-shim.test.cjs +221 -0
- package/lib/core/mode-select-sidechannel.cjs +259 -0
- package/lib/core/model-profiles.cjs +246 -0
- package/lib/core/mullins-scaffold.cjs +258 -0
- package/lib/core/mullins-scaffold.test.cjs +128 -0
- package/lib/core/mva-agent-contract.cjs +170 -0
- package/lib/core/mva-agent-contract.test.cjs +169 -0
- package/lib/core/mva-budget.cjs +75 -0
- package/lib/core/mva-budget.test.cjs +68 -0
- package/lib/core/mva-classifier.cjs +392 -0
- package/lib/core/mva-classifier.test.cjs +248 -0
- package/lib/core/mva-deck-builder.cjs +452 -0
- package/lib/core/mva-deck-builder.test.cjs +287 -0
- package/lib/core/mva-detect.smoke.test.cjs +209 -0
- package/lib/core/mva-dispatcher.cjs +110 -0
- package/lib/core/mva-dispatcher.test.cjs +216 -0
- package/lib/core/mva-option-router.cjs +414 -0
- package/lib/core/mva-option-router.test.cjs +483 -0
- package/lib/core/mva-orchestrator.cjs +365 -0
- package/lib/core/mva-orchestrator.test.cjs +916 -0
- package/lib/core/mva-progressive-renderer.cjs +194 -0
- package/lib/core/mva-progressive-renderer.test.cjs +157 -0
- package/lib/core/mva-rule-linter.cjs +458 -0
- package/lib/core/mva-rule-linter.test.cjs +484 -0
- package/lib/core/mva-state.cjs +159 -0
- package/lib/core/mva-telemetry.cjs +58 -0
- package/lib/core/mva-telemetry.test.cjs +196 -0
- package/lib/core/mva-vercel-deploy.cjs +168 -0
- package/lib/core/mva-vercel-deploy.test.cjs +239 -0
- package/lib/core/nav-dial.cjs +440 -0
- package/lib/core/navigation/ROOM.md +15 -0
- package/lib/core/navigation/abstraction-claim.cjs +185 -0
- package/lib/core/navigation/calibration-gate.cjs +284 -0
- package/lib/core/navigation/calibration-log.cjs +141 -0
- package/lib/core/navigation/confirm-node.cjs +73 -0
- package/lib/core/navigation/dashboard-helpers.cjs +145 -0
- package/lib/core/navigation/edges.cjs +1150 -0
- package/lib/core/navigation/evidence-claim.cjs +186 -0
- package/lib/core/navigation/explanation.cjs +48 -0
- package/lib/core/navigation/file-evidence-readback.cjs +242 -0
- package/lib/core/navigation/focus.cjs +155 -0
- package/lib/core/navigation/get-domains-for-trends.cjs +277 -0
- package/lib/core/navigation/governance.cjs +101 -0
- package/lib/core/navigation/grant-rubric.cjs +218 -0
- package/lib/core/navigation/graph-export.cjs +325 -0
- package/lib/core/navigation/ingestion.cjs +109 -0
- package/lib/core/navigation/insights-stale.test.cjs +127 -0
- package/lib/core/navigation/insights.cjs +574 -0
- package/lib/core/navigation/lens-nodes.cjs +315 -0
- package/lib/core/navigation/memory-artifacts.cjs +437 -0
- package/lib/core/navigation/memory-cortex-packet.cjs +274 -0
- package/lib/core/navigation/memory-events.cjs +811 -0
- package/lib/core/navigation/neighborhood.cjs +79 -0
- package/lib/core/navigation/packet.cjs +420 -0
- package/lib/core/navigation/planning-artifacts.cjs +219 -0
- package/lib/core/navigation/projections.cjs +295 -0
- package/lib/core/navigation/ranker-weights.cjs +133 -0
- package/lib/core/navigation/reasoning-write.cjs +211 -0
- package/lib/core/navigation/reconcile-guard.cjs +98 -0
- package/lib/core/navigation/reified-claim.cjs +287 -0
- package/lib/core/navigation/research-preflight.cjs +156 -0
- package/lib/core/navigation/room-birth.cjs +1213 -0
- package/lib/core/navigation/room-context.cjs +380 -0
- package/lib/core/navigation/room-home.cjs +142 -0
- package/lib/core/navigation/spine-events.cjs +548 -0
- package/lib/core/navigation/synthetic-expert.cjs +177 -0
- package/lib/core/navigation/transitions.cjs +253 -0
- package/lib/core/navigation/typed-claim.cjs +208 -0
- package/lib/core/navigation/typed-domain.cjs +249 -0
- package/lib/core/navigation/typed-entity.cjs +236 -0
- package/lib/core/navigation/typed-frame.cjs +257 -0
- package/lib/core/navigation/typed-open-question.cjs +130 -0
- package/lib/core/navigation/typed-opportunity.cjs +418 -0
- package/lib/core/navigation-engine-offer.cjs +776 -0
- package/lib/core/navigation-engine-shared.cjs +256 -0
- package/lib/core/navigation-engine.cjs +1696 -0
- package/lib/core/navigation.cjs +686 -0
- package/lib/core/nl-graph-queries.cjs +164 -0
- package/lib/core/node-insert-epistemic.test.cjs +212 -0
- package/lib/core/node-insert-overrides.test.cjs +273 -0
- package/lib/core/node-insert.cjs +274 -0
- package/lib/core/npm-cli-resolve.cjs +151 -0
- package/lib/core/npm-cli-resolve.test.cjs +153 -0
- package/lib/core/npm-install-lock.cjs +326 -0
- package/lib/core/npm-install-lock.test.cjs +379 -0
- package/lib/core/numeric/sklearn-stopwords-v1.json +325 -0
- package/lib/core/numeric/svd.cjs +377 -0
- package/lib/core/numeric/tfidf.cjs +241 -0
- package/lib/core/offer-presenter.cjs +406 -0
- package/lib/core/opportunity-extractor.cjs +183 -0
- package/lib/core/opportunity-ops.cjs +1423 -0
- package/lib/core/orchestration-candidate-lift.cjs +284 -0
- package/lib/core/part8-egress-guard.cjs +536 -0
- package/lib/core/part8-egress-guard.test.cjs +194 -0
- package/lib/core/part8-egress-ontology.cjs +174 -0
- package/lib/core/part8-egress-ontology.test.cjs +133 -0
- package/lib/core/persona-ops.cjs +692 -0
- package/lib/core/persona-override.cjs +327 -0
- package/lib/core/persona-taxonomy.cjs +328 -0
- package/lib/core/pinecone-inference.cjs +176 -0
- package/lib/core/pitch-feedback-schemas.cjs +303 -0
- package/lib/core/planning/artifact-brain-packet.cjs +212 -0
- package/lib/core/planning/reconcile-runner.cjs +347 -0
- package/lib/core/platform-gates.cjs +120 -0
- package/lib/core/platform.cjs +257 -0
- package/lib/core/proactive-intelligence.cjs +528 -0
- package/lib/core/problem-type-router.cjs +315 -0
- package/lib/core/publish-needs-default-lane.cjs +110 -0
- package/lib/core/ralph-loop-gate.cjs +48 -0
- package/lib/core/reader/ab-harness.cjs +177 -0
- package/lib/core/reader/decide-projection-reader.cjs +358 -0
- package/lib/core/reasoning-ops.cjs +639 -0
- package/lib/core/recipe-maps.cjs +442 -0
- package/lib/core/recovery/case-file.cjs +358 -0
- package/lib/core/recovery/controller.cjs +1008 -0
- package/lib/core/recovery/dispatcher.cjs +533 -0
- package/lib/core/recovery/result-semantics.cjs +488 -0
- package/lib/core/recovery/stage-envelope.cjs +338 -0
- package/lib/core/refusal-messaging.cjs +569 -0
- package/lib/core/refusal-messaging.test.cjs +220 -0
- package/lib/core/repo-version.cjs +134 -0
- package/lib/core/research-cache.cjs +165 -0
- package/lib/core/research-cache.test.cjs +137 -0
- package/lib/core/research-context-extractor.cjs +283 -0
- package/lib/core/research-corpus.cjs +814 -0
- package/lib/core/research-corpus.test.cjs +280 -0
- package/lib/core/research-filing-selector.cjs +189 -0
- package/lib/core/resolve-active-room.cjs +602 -0
- package/lib/core/resolve-brain-key.cjs +273 -0
- package/lib/core/resolve-umbilical-target.cjs +288 -0
- package/lib/core/resolve-vercel-key.cjs +107 -0
- package/lib/core/resolve-vercel-key.test.cjs +137 -0
- package/lib/core/reverse-salient-persona-suffix.cjs +115 -0
- package/lib/core/room-auto-create.cjs +318 -0
- package/lib/core/room-auto-create.test.cjs +198 -0
- package/lib/core/room-chooser.cjs +244 -0
- package/lib/core/room-classifier-strict-mode.cjs +235 -0
- package/lib/core/room-db.cjs +348 -0
- package/lib/core/room-discard-cascade.cjs +238 -0
- package/lib/core/room-discard-cascade.test.cjs +135 -0
- package/lib/core/room-name-validator.cjs +132 -0
- package/lib/core/room-name-validator.test.cjs +156 -0
- package/lib/core/room-naming-selector.cjs +357 -0
- package/lib/core/room-naming-selector.test.cjs +277 -0
- package/lib/core/room-open.cjs +259 -0
- package/lib/core/room-ops-async.cjs +92 -0
- package/lib/core/room-ops-shared.cjs +64 -0
- package/lib/core/room-ops-sync.cjs +70 -0
- package/lib/core/room-ops.cjs +32 -0
- package/lib/core/room-receipt-emit.cjs +63 -0
- package/lib/core/room-root.cjs +93 -0
- package/lib/core/room-skeleton-scaffold.cjs +669 -0
- package/lib/core/room-skeleton-scaffold.test.cjs +296 -0
- package/lib/core/room-type-detector.cjs +386 -0
- package/lib/core/rs-backend-dispatch.cjs +64 -0
- package/lib/core/rs-brain-substrate-prompts.cjs +129 -0
- package/lib/core/rs-brain-substrate.cjs +570 -0
- package/lib/core/rs-breakthrough-scorer.cjs +255 -0
- package/lib/core/rs-canon-violations.cjs +82 -0
- package/lib/core/rs-chain-feeder.cjs +381 -0
- package/lib/core/rs-commercial-assessor.cjs +280 -0
- package/lib/core/rs-corpus-quality-gate.cjs +62 -0
- package/lib/core/rs-differential-scorer.cjs +629 -0
- package/lib/core/rs-domain-analyzer.cjs +385 -0
- package/lib/core/rs-egress-prompts.cjs +113 -0
- package/lib/core/rs-egress-telemetry.cjs +225 -0
- package/lib/core/rs-egress-violations.cjs +53 -0
- package/lib/core/rs-engine.cjs +597 -0
- package/lib/core/rs-expert-brain-projection.cjs +280 -0
- package/lib/core/rs-expert-mapper.cjs +467 -0
- package/lib/core/rs-fetcher-academic.cjs +697 -0
- package/lib/core/rs-fetcher-experts.cjs +314 -0
- package/lib/core/rs-fetcher-industry.cjs +731 -0
- package/lib/core/rs-fetcher-patents.cjs +564 -0
- package/lib/core/rs-innovation-classifier.cjs +194 -0
- package/lib/core/rs-math.cjs +458 -0
- package/lib/core/rs-mind-map.cjs +656 -0
- package/lib/core/rs-neo4j-writer.cjs +388 -0
- package/lib/core/rs-nl-to-query.cjs +435 -0
- package/lib/core/rs-pinecone-bridge.cjs +344 -0
- package/lib/core/rs-preprocessor.cjs +350 -0
- package/lib/core/rs-query-matrix.cjs +316 -0
- package/lib/core/rs-query-to-text.cjs +438 -0
- package/lib/core/rs-sqlite-mirror.cjs +495 -0
- package/lib/core/rs-thesis-generator.cjs +188 -0
- package/lib/core/rs_cache.py +635 -0
- package/lib/core/rs_corpus.py +562 -0
- package/lib/core/rs_corpus_exclude.py +62 -0
- package/lib/core/rs_hybrid.py +589 -0
- package/lib/core/rs_math.py +287 -0
- package/lib/core/rs_rooms.py +196 -0
- package/lib/core/salient-governance.cjs +315 -0
- package/lib/core/scheduled-scanner.cjs +658 -0
- package/lib/core/scratchpad-ops.cjs +316 -0
- package/lib/core/seam-liveness.cjs +191 -0
- package/lib/core/seam-liveness.test.cjs +177 -0
- package/lib/core/section-8-trace-schema.cjs +138 -0
- package/lib/core/section-registry.cjs +167 -0
- package/lib/core/security/agentshield-adapters.test.cjs +104 -0
- package/lib/core/security/agentshield-run.cjs +343 -0
- package/lib/core/security/agentshield-scanner.cjs +314 -0
- package/lib/core/security/agentshield-scanner.test.cjs +259 -0
- package/lib/core/sensors/hat-scoping-table.cjs +103 -0
- package/lib/core/sensors/sensor-circularity.cjs +278 -0
- package/lib/core/sensors/sensor-content-relevance.cjs +407 -0
- package/lib/core/sensors/sensor-diffusion-adoption.cjs +230 -0
- package/lib/core/sensors/sensor-eureka.cjs +208 -0
- package/lib/core/sensors/sensor-expert-skill.cjs +293 -0
- package/lib/core/sensors/sensor-external-fact.cjs +184 -0
- package/lib/core/sensors/sensor-gate-approach.cjs +104 -0
- package/lib/core/sensors/sensor-jtbd-reweight.cjs +141 -0
- package/lib/core/sensors/sensor-lagging-component.cjs +115 -0
- package/lib/core/sensors/sensor-memory-cortex.cjs +111 -0
- package/lib/core/sensors/sensor-methodology-decision.cjs +131 -0
- package/lib/core/sensors/sensor-opportunity-harvest.cjs +195 -0
- package/lib/core/sensors/sensor-perspective-lock.cjs +174 -0
- package/lib/core/sensors/sensor-priority.cjs +183 -0
- package/lib/core/sensors/sensor-recency.cjs +151 -0
- package/lib/core/sensors/sensor-roadmap-type.cjs +421 -0
- package/lib/core/sensors/sensor-room-pick.cjs +238 -0
- package/lib/core/sensors/sensor-show-share.cjs +215 -0
- package/lib/core/sensors/sensor-temporal-blindness.cjs +123 -0
- package/lib/core/sensors/sensor-types.cjs +294 -0
- package/lib/core/sensors/sensor-url-ingest.cjs +234 -0
- package/lib/core/session-binding.cjs +208 -0
- package/lib/core/session-presence.cjs +404 -0
- package/lib/core/session-register.cjs +138 -0
- package/lib/core/session-state.cjs +144 -0
- package/lib/core/shallow-doc-parser.cjs +353 -0
- package/lib/core/shallow-doc-parser.test.cjs +226 -0
- package/lib/core/skill-activation-router.cjs +284 -0
- package/lib/core/skillopt-schemas.cjs +509 -0
- package/lib/core/stale-copy-scanner.cjs +190 -0
- package/lib/core/stance-state.cjs +153 -0
- package/lib/core/state-aware-router.cjs +78 -0
- package/lib/core/state-ops.cjs +80 -0
- package/lib/core/state-version.cjs +350 -0
- package/lib/core/statusline-cache.cjs +266 -0
- package/lib/core/statusline-liveness-gate.cjs +105 -0
- package/lib/core/surface-fence.cjs +127 -0
- package/lib/core/synthesizers/comparison-matrix.cjs +82 -0
- package/lib/core/synthesizers/convergence-map.cjs +107 -0
- package/lib/core/synthesizers/domain-hierarchy.cjs +138 -0
- package/lib/core/synthesizers/source-comparison.cjs +56 -0
- package/lib/core/synthesizers/tension-map.cjs +119 -0
- package/lib/core/synthetic-expert-behavior-gate.cjs +99 -0
- package/lib/core/synthetic-expert-construction-gate.cjs +170 -0
- package/lib/core/telemetry/schema.cjs +168 -0
- package/lib/core/telemetry/schema.test.cjs +124 -0
- package/lib/core/telemetry/validator.cjs +200 -0
- package/lib/core/telemetry/validator.test.cjs +188 -0
- package/lib/core/telemetry/writer.cjs +141 -0
- package/lib/core/telemetry/writer.test.cjs +331 -0
- package/lib/core/temporal/date-sync-gate.cjs +256 -0
- package/lib/core/temporal/date-sync-gate.test.cjs +191 -0
- package/lib/core/temporal/dual-stamp.cjs +172 -0
- package/lib/core/temporal/dual-stamp.test.cjs +172 -0
- package/lib/core/temporal/point-in-time.cjs +76 -0
- package/lib/core/temporal/point-in-time.test.cjs +169 -0
- package/lib/core/temporal/recency-decay.cjs +119 -0
- package/lib/core/temporal/recency-decay.test.cjs +140 -0
- package/lib/core/temporal/reference-now.cjs +281 -0
- package/lib/core/temporal/reference-now.test.cjs +225 -0
- package/lib/core/temporal/resolve-relative-time.cjs +116 -0
- package/lib/core/temporal/resolve-relative-time.test.cjs +138 -0
- package/lib/core/temporal/supersession.cjs +250 -0
- package/lib/core/temporal/supersession.test.cjs +103 -0
- package/lib/core/terminal-capability.cjs +88 -0
- package/lib/core/token-estimator.cjs +348 -0
- package/lib/core/tone-filter.cjs +147 -0
- package/lib/core/trending-to-absurd/orchestrator.cjs +341 -0
- package/lib/core/trending-to-absurd/stage7-roadmap.cjs +317 -0
- package/lib/core/trending-to-absurd/variance.cjs +169 -0
- package/lib/core/unknowns/bandit.cjs +332 -0
- package/lib/core/unknowns/corpus-adapter.cjs +327 -0
- package/lib/core/unknowns/dsp.cjs +356 -0
- package/lib/core/unknowns/edge-writer.cjs +211 -0
- package/lib/core/unknowns/iface.cjs +212 -0
- package/lib/core/unknowns/orchestrator.cjs +375 -0
- package/lib/core/unknowns/pattern-miner.cjs +214 -0
- package/lib/core/unknowns/rumsfeld-matrix.cjs +155 -0
- package/lib/core/unknowns/verdict.cjs +254 -0
- package/lib/core/update-path.cjs +57 -0
- package/lib/core/url-ingest.cjs +568 -0
- package/lib/core/user-archetype.cjs +284 -0
- package/lib/core/user-md-ops.cjs +578 -0
- package/lib/core/venture-shape-nudge.cjs +178 -0
- package/lib/core/venture-shape-nudge.test.cjs +266 -0
- package/lib/core/verb-reach-affinity.cjs +299 -0
- package/lib/core/visual-ops.cjs +692 -0
- package/lib/core/voice-transition-detector.cjs +125 -0
- package/lib/core/watched-sources.cjs +237 -0
- package/lib/core/write-lock.cjs +149 -0
- package/lib/graph/canvas-graph.js +467 -0
- package/lib/graph/constellation-config.cjs +299 -0
- package/lib/graph/graph-detail-panel.js +165 -0
- package/lib/hmi/ROOM.md +47 -0
- package/lib/hmi/across-session-memory.cjs +669 -0
- package/lib/hmi/agentshield-drift-gate.cjs +142 -0
- package/lib/hmi/brain-review-packet.cjs +221 -0
- package/lib/hmi/cortex-reach-adapter.cjs +271 -0
- package/lib/hmi/cross-room-memory.cjs +618 -0
- package/lib/hmi/decoy-tier.cjs +395 -0
- package/lib/hmi/depth-state.cjs +164 -0
- package/lib/hmi/dial-label-composer.cjs +410 -0
- package/lib/hmi/dial-presenter.cjs +508 -0
- package/lib/hmi/dial-reach-orchestrator.cjs +377 -0
- package/lib/hmi/dial-selector.cjs +239 -0
- package/lib/hmi/f1-pick-capture-cli.cjs +131 -0
- package/lib/hmi/f3-depth-capture-cli.cjs +77 -0
- package/lib/hmi/f4-scope-capture-cli.cjs +86 -0
- package/lib/hmi/f8-action-capture-cli.cjs +145 -0
- package/lib/hmi/f8-capture.test.cjs +77 -0
- package/lib/hmi/f9-ordered-capture-cli.cjs +138 -0
- package/lib/hmi/harvest-scope-state.cjs +202 -0
- package/lib/hmi/hats-persona-cache.cjs +142 -0
- package/lib/hmi/jtbd-classifier.cjs +219 -0
- package/lib/hmi/jtbd-state.cjs +263 -0
- package/lib/hmi/jtbd-taxonomy.json +402 -0
- package/lib/hmi/mindrian-ascii-logo.cjs +96 -0
- package/lib/hmi/part8-egress-gate.cjs +149 -0
- package/lib/hmi/reach-component-map.json +47 -0
- package/lib/hmi/reach-relevance-gate.cjs +147 -0
- package/lib/hmi/selector-dispatcher.cjs +1201 -0
- package/lib/hmi/selector-dispatcher.test.cjs +141 -0
- package/lib/hmi/selector-telemetry.cjs +269 -0
- package/lib/hmi/shape-f0-renderer.cjs +145 -0
- package/lib/hmi/shape-f1-fallback.cjs +80 -0
- package/lib/hmi/shape-f1-renderer.cjs +219 -0
- package/lib/hmi/shape-f2-renderer.cjs +132 -0
- package/lib/hmi/shape-f3-parity.test.cjs +64 -0
- package/lib/hmi/shape-f3-renderer.cjs +66 -0
- package/lib/hmi/shape-f4-parity.test.cjs +72 -0
- package/lib/hmi/shape-f4-renderer.cjs +72 -0
- package/lib/hmi/shape-f5-renderer.cjs +155 -0
- package/lib/hmi/shape-f6-plan-review-renderer.cjs +324 -0
- package/lib/hmi/shape-f6-renderer.cjs +144 -0
- package/lib/hmi/shape-f7-breakthrough-renderer.cjs +234 -0
- package/lib/hmi/shape-f7-breakthrough-renderer.test.cjs +233 -0
- package/lib/hmi/shape-f8-renderer.cjs +150 -0
- package/lib/hmi/shape-f8-renderer.test.cjs +70 -0
- package/lib/hmi/shape-f9-renderer.cjs +187 -0
- package/lib/hmi/shape-f9-renderer.test.cjs +80 -0
- package/lib/hmi/shape-g-renderer.cjs +219 -0
- package/lib/hmi/shape-h-renderer.cjs +222 -0
- package/lib/hmi/tier-check.cjs +63 -0
- package/lib/hmi/turn-text.cjs +268 -0
- package/lib/hmi/voice-color-mark.cjs +318 -0
- package/lib/hmi/voice-style-log.cjs +276 -0
- package/lib/import/PRECONDITIONS.md +41 -0
- package/lib/import/branding.cjs +210 -0
- package/lib/import/branding.test.cjs +235 -0
- package/lib/import/classifications-sync.cjs +104 -0
- package/lib/import/classifications-sync.test.cjs +129 -0
- package/lib/import/enricher.cjs +296 -0
- package/lib/import/enricher.test.cjs +273 -0
- package/lib/import/integration.test.cjs +376 -0
- package/lib/import/manifest.cjs +129 -0
- package/lib/import/manifest.schema.json +185 -0
- package/lib/import/manifest.test.cjs +123 -0
- package/lib/import/meeting-detector.cjs +92 -0
- package/lib/import/meeting-detector.test.cjs +100 -0
- package/lib/import/person-detector.cjs +229 -0
- package/lib/import/person-detector.test.cjs +149 -0
- package/lib/import/report.cjs +186 -0
- package/lib/import/report.test.cjs +186 -0
- package/lib/import/room-md-scaffolder.cjs +49 -0
- package/lib/import/router.cjs +224 -0
- package/lib/import/router.test.cjs +356 -0
- package/lib/import/run-all-tests.cjs +36 -0
- package/lib/import/smoke-test.cjs +213 -0
- package/lib/import/smoke-test.test.cjs +148 -0
- package/lib/import/undo.test.cjs +199 -0
- package/lib/import/vault-scanner.cjs +105 -0
- package/lib/import/vault-scanner.test.cjs +67 -0
- package/lib/lens-engine/correlation-resolver.cjs +174 -0
- package/lib/lens-engine/source-lens-driver.cjs +736 -0
- package/lib/mcp/adapter-client.cjs +103 -0
- package/lib/mcp/app-html/dashboard.html +316 -0
- package/lib/mcp/app-html/graph.html +428 -0
- package/lib/mcp/app-html/mindrian-platform.html +1841 -0
- package/lib/mcp/app-html/wiki.html +383 -0
- package/lib/mcp/app-views.cjs +322 -0
- package/lib/mcp/brain-composition-census.cjs +184 -0
- package/lib/mcp/brain-router.cjs +530 -0
- package/lib/mcp/capability-registry.cjs +62 -0
- package/lib/mcp/contract-version.cjs +59 -0
- package/lib/mcp/daemon-lifecycle.cjs +324 -0
- package/lib/mcp/gate-dedup.cjs +120 -0
- package/lib/mcp/gate-ledger.cjs +145 -0
- package/lib/mcp/gate-render.cjs +483 -0
- package/lib/mcp/hook-adapter-audit.cjs +199 -0
- package/lib/mcp/larry-context.cjs +42 -0
- package/lib/mcp/mcp-first-flag.cjs +147 -0
- package/lib/mcp/no-instructions.test.cjs +270 -0
- package/lib/mcp/pipeline-state.cjs +424 -0
- package/lib/mcp/prompts.cjs +421 -0
- package/lib/mcp/register-core-tools.cjs +78 -0
- package/lib/mcp/resources.cjs +359 -0
- package/lib/mcp/runtime-instructions.cjs +38 -0
- package/lib/mcp/session-catchup.cjs +349 -0
- package/lib/mcp/session-registry.cjs +113 -0
- package/lib/mcp/session-room.cjs +124 -0
- package/lib/mcp/sse-event-bus.cjs +98 -0
- package/lib/mcp/stop-gate-handler.cjs +589 -0
- package/lib/mcp/surface-detect.cjs +186 -0
- package/lib/mcp/tool-router.cjs +2113 -0
- package/lib/mcp/tools/chain.cjs +674 -0
- package/lib/mcp/tools/claim.cjs +180 -0
- package/lib/mcp/tools/context.cjs +92 -0
- package/lib/mcp/tools/dual-path.cjs +79 -0
- package/lib/mcp/tools/gate.cjs +392 -0
- package/lib/mcp/tools/graph-reason.cjs +130 -0
- package/lib/mcp/tools/graph.cjs +321 -0
- package/lib/mcp/tools/identity.cjs +174 -0
- package/lib/mcp/tools/room.cjs +449 -0
- package/lib/mcp/tools/sensors.cjs +450 -0
- package/lib/mcp/tools/status.cjs +183 -0
- package/lib/mcp/tools/stop-gate.cjs +103 -0
- package/lib/mcp/tools/views.cjs +382 -0
- package/lib/mcp/tree-watcher.cjs +199 -0
- package/lib/memory/.mindrian/auto-explore-mat-test-001.json +11 -0
- package/lib/memory/aaak-compress.cjs +403 -0
- package/lib/memory/aaak-compress.test.cjs +288 -0
- package/lib/memory/async-artifact-auto-commit.test.cjs +223 -0
- package/lib/memory/bearer-token.test.cjs +315 -0
- package/lib/memory/body-shape-coverage.test.cjs +268 -0
- package/lib/memory/brain-cache-lru.test.cjs +259 -0
- package/lib/memory/brain-client-query-shape.test.cjs +160 -0
- package/lib/memory/brain-cypher-chain-slice.test.cjs +368 -0
- package/lib/memory/brain-derivation-graceful-degradation.test.cjs +1019 -0
- package/lib/memory/brain-derivation-queue.test.cjs +553 -0
- package/lib/memory/brain-derivation.test.cjs +639 -0
- package/lib/memory/brain-derive-command.test.cjs +534 -0
- package/lib/memory/brain-derive-curation.test.cjs +243 -0
- package/lib/memory/brain-md-invariants-validator.test.cjs +704 -0
- package/lib/memory/brain-md-schema.test.cjs +467 -0
- package/lib/memory/brain-md-staleness.test.cjs +525 -0
- package/lib/memory/brain-server-resolution.test.cjs +314 -0
- package/lib/memory/brain-suggestion-template.test.cjs +200 -0
- package/lib/memory/chain-recommender-canonical.test.cjs +208 -0
- package/lib/memory/chain-recommender.test.cjs +233 -0
- package/lib/memory/chat-context.test.cjs +128 -0
- package/lib/memory/command-registry.test.cjs +220 -0
- package/lib/memory/connector-registry.test.cjs +94 -0
- package/lib/memory/correlation-label-index.test.cjs +119 -0
- package/lib/memory/correlation.test.cjs +253 -0
- package/lib/memory/cross-room-aggregator.test.cjs +909 -0
- package/lib/memory/curation-132-03-dedup-held-rename.test.cjs +251 -0
- package/lib/memory/curation-132-05-pseudonymize.test.cjs +205 -0
- package/lib/memory/curation-batch.test.cjs +213 -0
- package/lib/memory/dashboard-server.test.cjs +256 -0
- package/lib/memory/debouncer-drain-at-prompt.test.cjs +389 -0
- package/lib/memory/decision-capture.test.cjs +632 -0
- package/lib/memory/decision-capture.worker.cjs +70 -0
- package/lib/memory/doctor-deprecation-surface.test.cjs +188 -0
- package/lib/memory/dual-graph-health.test.cjs +485 -0
- package/lib/memory/explain-decision-command.test.cjs +521 -0
- package/lib/memory/explain-decision-footer.test.cjs +316 -0
- package/lib/memory/explored-materials-store.cjs +392 -0
- package/lib/memory/f-selector-ranker.test.cjs +593 -0
- package/lib/memory/feynman-minto-guardian.test.cjs +863 -0
- package/lib/memory/feynman-minto-invariants.test.cjs +554 -0
- package/lib/memory/feynman-prompts-drift.test.cjs +144 -0
- package/lib/memory/feynman-prompts.cjs +151 -0
- package/lib/memory/feynman-prompts.test.cjs +96 -0
- package/lib/memory/first-touch-version.test.cjs +198 -0
- package/lib/memory/folder-memory-quadruple.test.cjs +548 -0
- package/lib/memory/folder-memory.test.cjs +503 -0
- package/lib/memory/framework-chain-composer.test.cjs +549 -0
- package/lib/memory/frontmatter-schema-validator.test.cjs +344 -0
- package/lib/memory/guardian-onstop-reaches-user.test.cjs +396 -0
- package/lib/memory/heal-command.test.cjs +604 -0
- package/lib/memory/help-coverage.test.cjs +108 -0
- package/lib/memory/help-renderer.test.cjs +145 -0
- package/lib/memory/huji-run-one-async-parity.test.cjs +242 -0
- package/lib/memory/hypergraph-event-schema.test.cjs +116 -0
- package/lib/memory/index-artifact-transaction.test.cjs +333 -0
- package/lib/memory/lazygraph-rs-discoveries-view.test.cjs +122 -0
- package/lib/memory/local-chain-recommender.test.cjs +172 -0
- package/lib/memory/mcp-input-validation.test.cjs +240 -0
- package/lib/memory/mcp-server-brain-deps.test.cjs +270 -0
- package/lib/memory/mcp-stack-fallback.test.cjs +433 -0
- package/lib/memory/minto-debounce-consumer-census.test.cjs +567 -0
- package/lib/memory/minto-debouncer.test.cjs +407 -0
- package/lib/memory/minto-debouncer.worker.cjs +46 -0
- package/lib/memory/minto-migration-v88.test.cjs +265 -0
- package/lib/memory/minto-schema-v88.test.cjs +390 -0
- package/lib/memory/mos-status-renderer.test.cjs +631 -0
- package/lib/memory/narrative-schema.cjs +376 -0
- package/lib/memory/narrative-schema.test.cjs +209 -0
- package/lib/memory/nav-dial.test.cjs +414 -0
- package/lib/memory/navigation-engine-core.test.cjs +712 -0
- package/lib/memory/navigation-engine-offer.test.cjs +404 -0
- package/lib/memory/navigation-hook-resolver.test.cjs +177 -0
- package/lib/memory/navigation-invariants.test.cjs +483 -0
- package/lib/memory/navigation-projections.test.cjs +241 -0
- package/lib/memory/navigation-write-edge.test.cjs +206 -0
- package/lib/memory/offer-closer.test.cjs +258 -0
- package/lib/memory/offer-presenter.test.cjs +554 -0
- package/lib/memory/on-stop-snapshot.test.cjs +404 -0
- package/lib/memory/orchestration-projection.test.cjs +706 -0
- package/lib/memory/packet-chain-hint.test.cjs +407 -0
- package/lib/memory/packet-schema-validation.test.cjs +317 -0
- package/lib/memory/palette-consistency.test.cjs +127 -0
- package/lib/memory/pending-tension-store.cjs +453 -0
- package/lib/memory/per-command-jtbd-derivation.test.cjs +130 -0
- package/lib/memory/per-command-teaching.test.cjs +110 -0
- package/lib/memory/post-compact-reinjection.test.cjs +854 -0
- package/lib/memory/post-write-triple.test.cjs +317 -0
- package/lib/memory/pre-compact-snapshot.test.cjs +495 -0
- package/lib/memory/precommit-real-commit.test.cjs +301 -0
- package/lib/memory/problem-type-router.test.cjs +656 -0
- package/lib/memory/query-efficiency-telemetry.test.cjs +612 -0
- package/lib/memory/recompile-room-references.test.cjs +392 -0
- package/lib/memory/recompile-room-references.worker.cjs +42 -0
- package/lib/memory/record-decision-dual-write.test.cjs +454 -0
- package/lib/memory/render-v2-disposition.test.cjs +199 -0
- package/lib/memory/room-classifier-strict-mode.test.cjs +430 -0
- package/lib/memory/room-minto-hook.test.cjs +398 -0
- package/lib/memory/rs-discovery-engine.test.cjs +323 -0
- package/lib/memory/run-feynman-tests.cjs +2101 -0
- package/lib/memory/security-trifecta.test.cjs +329 -0
- package/lib/memory/selector-alias-map.test.cjs +172 -0
- package/lib/memory/selector-decisions.test.cjs +417 -0
- package/lib/memory/selector-miss.test.cjs +290 -0
- package/lib/memory/session-start-brain-staleness.test.cjs +363 -0
- package/lib/memory/session-start-triple-injection.test.cjs +514 -0
- package/lib/memory/sessionstart-banner-formatter.cjs +318 -0
- package/lib/memory/sessionstart-coordinator.test.cjs +446 -0
- package/lib/memory/sessionstart-minto-banner.test.cjs +373 -0
- package/lib/memory/skill-activation-router.test.cjs +465 -0
- package/lib/memory/skill-vs-code-drift.test.cjs +257 -0
- package/lib/memory/soft-alias.test.cjs +144 -0
- package/lib/memory/spine-events-correlation.test.cjs +198 -0
- package/lib/memory/stale-copy-scanner.test.cjs +294 -0
- package/lib/memory/stamp-artifact-write.test.cjs +304 -0
- package/lib/memory/state-aware-router.test.cjs +90 -0
- package/lib/memory/statusline-active-room-write.test.cjs +245 -0
- package/lib/memory/statusline-active-room.test.cjs +315 -0
- package/lib/memory/statusline-minto-segment.test.cjs +292 -0
- package/lib/memory/statusline-two-row.test.cjs +338 -0
- package/lib/memory/suggest-next-workflow.test.cjs +176 -0
- package/lib/memory/sync-async-entry-points.test.cjs +204 -0
- package/lib/memory/terminal-capability.test.cjs +155 -0
- package/lib/memory/test-bridge-writer-enhanced.cjs +452 -0
- package/lib/memory/test-rs-brain-substrate-shape.cjs +529 -0
- package/lib/memory/test-rs-brain-substrate.cjs +636 -0
- package/lib/memory/test-rs-breakthrough-scorer.cjs +375 -0
- package/lib/memory/test-rs-canon-violations.cjs +218 -0
- package/lib/memory/test-rs-chain-feeder-core.cjs +344 -0
- package/lib/memory/test-rs-chain-feeder-skill-spawn.cjs +297 -0
- package/lib/memory/test-rs-commercial-assessor.cjs +385 -0
- package/lib/memory/test-rs-differential-scorer.cjs +480 -0
- package/lib/memory/test-rs-discovery-engine.cjs +648 -0
- package/lib/memory/test-rs-domain-analyzer.cjs +492 -0
- package/lib/memory/test-rs-egress-primitives.cjs +420 -0
- package/lib/memory/test-rs-expert-mapper.cjs +547 -0
- package/lib/memory/test-rs-explain-command.cjs +443 -0
- package/lib/memory/test-rs-fetcher-academic.cjs +848 -0
- package/lib/memory/test-rs-fetcher-experts.cjs +496 -0
- package/lib/memory/test-rs-fetcher-industry.cjs +702 -0
- package/lib/memory/test-rs-fetcher-patents.cjs +674 -0
- package/lib/memory/test-rs-innovation-classifier.cjs +301 -0
- package/lib/memory/test-rs-mind-map.cjs +646 -0
- package/lib/memory/test-rs-neo4j-writer.cjs +518 -0
- package/lib/memory/test-rs-nl-to-query.cjs +449 -0
- package/lib/memory/test-rs-pinecone-bridge.cjs +282 -0
- package/lib/memory/test-rs-preprocessor.cjs +433 -0
- package/lib/memory/test-rs-query-matrix.cjs +391 -0
- package/lib/memory/test-rs-query-to-text.cjs +551 -0
- package/lib/memory/test-rs-sqlite-mirror.cjs +649 -0
- package/lib/memory/test-rs-thesis-generator.cjs +360 -0
- package/lib/memory/triple-context-formatter.cjs +473 -0
- package/lib/memory/triple-context-formatter.test.cjs +442 -0
- package/lib/memory/user-md-persona.test.cjs +565 -0
- package/lib/memory/userpromptsubmit-integration.test.cjs +787 -0
- package/lib/memory/validators/README.md +157 -0
- package/lib/memory/validators/brain-md-invariants.cjs +475 -0
- package/lib/memory/validators/brain-substrate-invariants.cjs +285 -0
- package/lib/memory/validators/external-academic-invariants.cjs +249 -0
- package/lib/memory/validators/external-industry-invariants.cjs +271 -0
- package/lib/memory/validators/external-patents-invariants.cjs +266 -0
- package/lib/memory/validators/minto-invariants.cjs +62 -0
- package/lib/memory/validators/navigation-invariants.cjs +340 -0
- package/lib/memory/validators/queue-health.cjs +95 -0
- package/lib/memory/validators/snapshot-integrity.cjs +129 -0
- package/lib/memory/validators/stale-lifecycle.cjs +116 -0
- package/lib/memory/vault-section-minto-generator-atomic.test.cjs +556 -0
- package/lib/memory/vault-section-minto-generator-atomic.worker.cjs +73 -0
- package/lib/memory/workflow-layer-e2e.test.cjs +262 -0
- package/lib/memory/write-lock-atomic.test.cjs +137 -0
- package/lib/memory/write-lock-atomic.worker.cjs +55 -0
- package/lib/parity/check-parity.cjs +83 -0
- package/lib/presentation/presentation-server.cjs +101 -0
- package/lib/presentation/presentation-watcher.cjs +123 -0
- package/lib/quickview/hub-server.cjs +719 -0
- package/lib/quickview/server.cjs +533 -0
- package/lib/render/JTBD-PALETTES.md +145 -0
- package/lib/render/ROOM.md +111 -0
- package/lib/render/render-v2.cjs +532 -0
- package/lib/render/render-v2.test.cjs +267 -0
- package/lib/render/render.cjs +65 -0
- package/lib/sessionstart/budget-compressor.cjs +130 -0
- package/lib/sessionstart/contributor-interface.cjs +134 -0
- package/lib/sessionstart/contributor-isolator.cjs +128 -0
- package/lib/sessionstart/precedence-ladder.cjs +47 -0
- package/lib/state/ROOM.md +46 -0
- package/lib/state/state-md-parser.cjs +215 -0
- package/lib/statusline/ROOM.md +38 -0
- package/lib/statusline/banner-suppression.cjs +50 -0
- package/lib/statusline/cockpit-renderer.cjs +443 -0
- package/lib/statusline/cockpit-signals.cjs +312 -0
- package/lib/statusline/cockpit-telemetry.cjs +152 -0
- package/lib/statusline/ctx-window.cjs +135 -0
- package/lib/statusline/governing-thought-truncator.cjs +45 -0
- package/lib/statusline/next-move-cache.cjs +235 -0
- package/lib/statusline/ratification-next.cjs +164 -0
- package/lib/statusline/room-health-cache.cjs +200 -0
- package/lib/statusline/surface-detect.cjs +85 -0
- package/lib/statusline/two-row-renderer.cjs +207 -0
- package/lib/statusline/version-resolver.cjs +81 -0
- package/lib/ui/design-system.cjs +19 -0
- package/lib/update-bootstrap.sh.template +145 -0
- package/lib/vault/frontmatter-schema.cjs +297 -0
- package/lib/vault/room-scanner.cjs +365 -0
- package/lib/vault/wikilink-builder.cjs +231 -0
- package/lib/vault/wikilink-builder.test.cjs +182 -0
- package/lib/wiki/briefing.cjs +193 -0
- package/lib/wiki/editor-dist/wiki-editor.css +1 -0
- package/lib/wiki/editor-dist/wiki-editor.js +1327 -0
- package/lib/wiki/graph-links.cjs +281 -0
- package/lib/wiki/page-renderer.cjs +229 -0
- package/lib/wiki/room-home.cjs +353 -0
- package/lib/wiki/wiki-chat.cjs +81 -0
- package/lib/wiki/wiki-export.cjs +364 -0
- package/lib/wiki/wiki-layout.cjs +1143 -0
- package/lib/wiki/wiki-search.cjs +142 -0
- package/lib/wiki/wiki-server.cjs +748 -0
- package/lib/wiki/wiki-watcher.cjs +105 -0
- package/lib/workflow/ROOM.md +47 -0
- package/lib/workflow/chain-source.cjs +179 -0
- package/lib/workflow/command-resolver.cjs +155 -0
- package/lib/workflow/command-resolver.test.cjs +235 -0
- package/lib/workflow/cross-room-umbilical-closer.cjs +364 -0
- package/lib/workflow/dial-close-reach.cjs +405 -0
- package/lib/workflow/f-selector-ranker.cjs +1148 -0
- package/lib/workflow/f1-pick-consumer.cjs +232 -0
- package/lib/workflow/f3-depth-consumer.cjs +98 -0
- package/lib/workflow/f4-scope-consumer.cjs +112 -0
- package/lib/workflow/f8-consumer.test.cjs +82 -0
- package/lib/workflow/f8-fanout-consumer.cjs +208 -0
- package/lib/workflow/f9-consumer.test.cjs +71 -0
- package/lib/workflow/f9-ordered-consumer.cjs +199 -0
- package/lib/workflow/local-chain-recommender.cjs +330 -0
- package/lib/workflow/memory-cascade-f9-adapter.cjs +273 -0
- package/lib/workflow/memory-governance-closer.cjs +384 -0
- package/lib/workflow/offer-closer.cjs +407 -0
- package/lib/workflow/reach-hedge-ranker.cjs +809 -0
- package/lib/workflow/reach-reject-reader.cjs +372 -0
- package/lib/workflow/reconcile-f9-adapter.cjs +299 -0
- package/lib/workflow/selector-decisions.cjs +478 -0
- package/lib/workflow/session-binding-consumer.cjs +249 -0
- package/npm-shrinkwrap.json +1544 -0
- package/output-styles/destijl.md +67 -0
- package/package.json +22 -4
- package/pipelines/PWS_grading/01-deep-grade.md +48 -0
- package/pipelines/PWS_grading/02-mullins.md +50 -0
- package/pipelines/PWS_grading/03-build-thesis.md +60 -0
- package/pipelines/PWS_grading/04-structure-argument.md +77 -0
- package/pipelines/PWS_grading/CHAIN.md +79 -0
- package/pipelines/analogy/01-decompose.md +80 -0
- package/pipelines/analogy/02-abstract.md +87 -0
- package/pipelines/analogy/03-search.md +135 -0
- package/pipelines/analogy/04-transfer.md +101 -0
- package/pipelines/analogy/05-validate.md +106 -0
- package/pipelines/analogy/CHAIN.md +73 -0
- package/pipelines/discovery/01-explore-domains.md +44 -0
- package/pipelines/discovery/02-think-hats.md +50 -0
- package/pipelines/discovery/03-analyze-needs.md +54 -0
- package/pipelines/discovery/CHAIN.md +48 -0
- package/pipelines/thesis/01-structure-argument.md +45 -0
- package/pipelines/thesis/02-challenge-assumptions.md +48 -0
- package/pipelines/thesis/03-build-thesis.md +54 -0
- package/pipelines/thesis/CHAIN.md +48 -0
- package/references/brain/causal-directives.md +91 -0
- package/references/brain/causal-enrichment.cypher +165 -0
- package/references/brain/command-triggers-schema.md +15 -0
- package/references/brain/graph-architecture.md +317 -0
- package/references/brain/query-patterns.md +504 -0
- package/references/brain/room-hierarchy-schema.md +218 -0
- package/references/brain/schema.md +86 -0
- package/references/capability-radar/capabilities-index.md +269 -0
- package/references/capability-radar/changelog-cache.md +95 -0
- package/references/causal/causal-schema.md +103 -0
- package/references/design/email-template-standard.md +169 -0
- package/references/design/graph-visualization-standard.md +178 -0
- package/references/design/newsletter-email-template.html +307 -0
- package/references/document-generation.md +179 -0
- package/references/hsi/HSI-TOOLS-REFERENCE.md +222 -0
- package/references/import-config.md +141 -0
- package/references/integrations/detection-patterns.md +101 -0
- package/references/meeting/artifact-template.md +377 -0
- package/references/meeting/cross-meeting-intelligence.md +216 -0
- package/references/meeting/cross-relationship-patterns.md +202 -0
- package/references/meeting/extraction-perspectives.md +225 -0
- package/references/meeting/filing-protocol.md +222 -0
- package/references/meeting/knowledge-typing.md +242 -0
- package/references/meeting/live-join-interface.md +244 -0
- package/references/meeting/section-mapping.md +192 -0
- package/references/meeting/segment-classification.md +258 -0
- package/references/meeting/speaker-profile-template.md +219 -0
- package/references/meeting/summary-template.md +348 -0
- package/references/meeting/transcript-patterns.md +226 -0
- package/references/methodology/analyze-needs.md +135 -0
- package/references/methodology/analyze-systems.md +121 -0
- package/references/methodology/analyze-timing.md +149 -0
- package/references/methodology/beautiful-question.md +109 -0
- package/references/methodology/build-knowledge.md +161 -0
- package/references/methodology/build-thesis-scored.md +60 -0
- package/references/methodology/build-thesis.md +237 -0
- package/references/methodology/causal-loop-diagrams.md +65 -0
- package/references/methodology/challenge-assumptions.md +127 -0
- package/references/methodology/diagnose.md +169 -0
- package/references/methodology/dominant-designs.md +212 -0
- package/references/methodology/explore-domains.md +147 -0
- package/references/methodology/explore-futures.md +163 -0
- package/references/methodology/explore-trends.md +129 -0
- package/references/methodology/find-bottlenecks.md +131 -0
- package/references/methodology/grade.md +211 -0
- package/references/methodology/huji-stage-a-intake.md +246 -0
- package/references/methodology/index.md +34 -0
- package/references/methodology/leadership.md +200 -0
- package/references/methodology/lean-canvas.md +116 -0
- package/references/methodology/leverage-scan-signatures.md +83 -0
- package/references/methodology/macro-trends.md +192 -0
- package/references/methodology/map-unknowns.md +137 -0
- package/references/methodology/mullins-7-domains.md +104 -0
- package/references/methodology/problem-types.md +65 -0
- package/references/methodology/root-cause.md +178 -0
- package/references/methodology/rubric-huji.md +160 -0
- package/references/methodology/sapphire-encoding.md +355 -0
- package/references/methodology/scenario-plan.md +190 -0
- package/references/methodology/score-innovation.md +154 -0
- package/references/methodology/skillopt-judge-rubric.md +48 -0
- package/references/methodology/skillopt-queries-rubric.md +60 -0
- package/references/methodology/skillopt-refute-rubric.md +59 -0
- package/references/methodology/skillopt-review-rubric.md +72 -0
- package/references/methodology/skillopt-revise-rubric.md +48 -0
- package/references/methodology/structure-argument.md +158 -0
- package/references/methodology/systems-thinking.md +231 -0
- package/references/methodology/think-hats.md +147 -0
- package/references/methodology/triz-matrix.json +751 -0
- package/references/methodology/triz-principles.md +501 -0
- package/references/methodology/user-needs.md +199 -0
- package/references/methodology/validate.md +163 -0
- package/references/methodology/value-proposition.md +244 -0
- package/references/opportunities/funding-lifecycle.md +103 -0
- package/references/opportunities/grant-api-patterns.md +99 -0
- package/references/opportunities/opportunity-template.md +84 -0
- package/references/opportunities/tnufa-rubric.md +81 -0
- package/references/personality/assessment-philosophy.md +72 -0
- package/references/personality/lexicon.md +100 -0
- package/references/personality/persona-chains.md +56 -0
- package/references/personality/pws-lexicon-full.md +499 -0
- package/references/personality/voice-dna.md +156 -0
- package/references/personas/hat-perspectives.md +76 -0
- package/references/personas/persona-template.md +63 -0
- package/references/pipeline/act-output-contract.md +88 -0
- package/references/pipeline/chains-index.md +39 -0
- package/references/pws-profile-generation.md +79 -0
- package/references/reasoning/reasoning-schema.md +143 -0
- package/references/reasoning/reasoning-template.md +68 -0
- package/references/reasoning/run-template.md +38 -0
- package/references/research/RESEARCH_14_CLAUDE_CODE_SOURCE_ARCHITECTURE.md +209 -0
- package/references/research/RESEARCH_15_V1.8_OPTIMIZATION_JTBD.md +375 -0
- package/references/research/RESEARCH_16_NATIVE_FIRST_PLUGIN_ARCHITECTURE.md +575 -0
- package/references/research/RESEARCH_17_MCP_UI_FRAMEWORKS.md +272 -0
- package/references/security/agentshield-baseline.json +8 -0
- package/references/security/cve-db.json +220 -0
- package/references/taxonomy/TAXONOMY.md +192 -0
- package/references/templates/MINTO.md +36 -0
- package/references/user-research/2026-04-05-leah-lawrence-session.md +202 -0
- package/references/vault-kit/README.md +35 -0
- package/references/vault-kit/app.json +12 -0
- package/references/vault-kit/appearance.json +12 -0
- package/references/vault-kit/graph.json +35 -0
- package/references/vault-kit/snippets/mindrian-destijl.css +297 -0
- package/references/vault-kit/templates/new-artifact.md +37 -0
- package/references/vault-kit/templates/new-meeting-note.md +35 -0
- package/references/vault-kit/templates/new-team-profile.md +29 -0
- package/references/vault-kit/templates/new-xref.md +35 -0
- package/references/visual/ROOM.md +55 -0
- package/references/visual/palette.json +54 -0
- package/references/visual/symbol-system.md +151 -0
- package/scripts/189-plurai-gate-check.cjs +88 -0
- package/scripts/198-plurai-gate-check.cjs +118 -0
- package/scripts/198-rollback-rehearsal.cjs +233 -0
- package/scripts/83-scope-injection.test.cjs +648 -0
- package/scripts/PYTHON_GATES.md +78 -0
- package/scripts/__pycache__/compute-hsi.cpython-312.pyc +0 -0
- package/scripts/__pycache__/detect-reverse-salients.cpython-312.pyc +0 -0
- package/scripts/__pycache__/rs-engine.cpython-312.pyc +0 -0
- package/scripts/act-command.cjs +518 -0
- package/scripts/admin-brain-write.cjs +442 -0
- package/scripts/admin-command-gate.cjs +178 -0
- package/scripts/agentshield-scan-cli.cjs +226 -0
- package/scripts/agentshield-sessionstart-scan.cjs +282 -0
- package/scripts/analogy-fitness-report.cjs +266 -0
- package/scripts/analyze-room +1079 -0
- package/scripts/apply-teaching-content.cjs +298 -0
- package/scripts/async-artifact-auto-commit.cjs +485 -0
- package/scripts/audit-active-phase-resolver.cjs +160 -0
- package/scripts/audit-body-shape-coverage.cjs +213 -0
- package/scripts/auto-explore-drain.cjs +274 -0
- package/scripts/auto-explore-fingerprint.cjs +354 -0
- package/scripts/auto-explore-fire.cjs +359 -0
- package/scripts/backfill-correlation-id.cjs +425 -0
- package/scripts/backfill-hitl-shape.cjs +276 -0
- package/scripts/backfill-hitl-shape.test.cjs +307 -0
- package/scripts/backup-modifications +68 -0
- package/scripts/banner +182 -0
- package/scripts/brain-derivation-drain.cjs +291 -0
- package/scripts/brain-derive-command.cjs +846 -0
- package/scripts/brain-normalize-books.cypher +505 -0
- package/scripts/brain-normalize-final.cypher +1355 -0
- package/scripts/brain-normalize-problemtype.cypher +475 -0
- package/scripts/brain-normalize-supplement.cypher +449 -0
- package/scripts/brain-normalize-targeted.cypher +344 -0
- package/scripts/brain-normalize-v194.cypher +61 -0
- package/scripts/brain-normalize.cypher +530 -0
- package/scripts/brain-response-sanitize-hook.cjs +165 -0
- package/scripts/build-brain-census.cjs +957 -0
- package/scripts/build-brain-packet-schema.cjs +225 -0
- package/scripts/build-command-registry.cjs +587 -0
- package/scripts/build-connector-registry.cjs +1331 -0
- package/scripts/build-corpus-stats.cjs +408 -0
- package/scripts/build-dist-bundles.cjs +495 -0
- package/scripts/build-ecosystem-graph.cjs +490 -0
- package/scripts/build-graph +1462 -0
- package/scripts/build-graph-from-sqlite.cjs +97 -0
- package/scripts/build-harness-manifest.cjs +1090 -0
- package/scripts/build-jtbd-nudges +205 -0
- package/scripts/build-new-surface.cjs +805 -0
- package/scripts/build-orchestration-projection.cjs +1221 -0
- package/scripts/build-render-coverage.cjs +637 -0
- package/scripts/build-skill-mirrors.cjs +681 -0
- package/scripts/cache-hitrate-report.cjs +216 -0
- package/scripts/causal-to-graph.cjs +163 -0
- package/scripts/check-abstraction-fixture-neutral.cjs +160 -0
- package/scripts/check-admin-identity.cjs +212 -0
- package/scripts/check-brain-tool-liveness.cjs +502 -0
- package/scripts/check-card-fire.cjs +1809 -0
- package/scripts/check-cirs-declaration.cjs +279 -0
- package/scripts/check-deck-design.cjs +104 -0
- package/scripts/check-dual-graph-health.cjs +645 -0
- package/scripts/check-first-touch-drift.cjs +220 -0
- package/scripts/check-flagship-floor.cjs +391 -0
- package/scripts/check-framework-vocabulary-drift.cjs +563 -0
- package/scripts/check-gate-seam.cjs +178 -0
- package/scripts/check-graph-derive-health.cjs +208 -0
- package/scripts/check-graph-export-typemap.cjs +118 -0
- package/scripts/check-help-coverage.cjs +290 -0
- package/scripts/check-hitl-stages.cjs +219 -0
- package/scripts/check-hook-schema-compatibility.cjs +231 -0
- package/scripts/check-hsi-deps +42 -0
- package/scripts/check-kuzu-reintroduction.cjs +251 -0
- package/scripts/check-onboard +43 -0
- package/scripts/check-onboard-statusline.cjs +363 -0
- package/scripts/check-palette-consistency.cjs +106 -0
- package/scripts/check-pending-ambiguous.cjs +244 -0
- package/scripts/check-pending-breakthrough.cjs +189 -0
- package/scripts/check-pending-breakthrough.test.cjs +166 -0
- package/scripts/check-pending-naming-decision.cjs +97 -0
- package/scripts/check-plugin-path-anchoring.cjs +830 -0
- package/scripts/check-publish-needs.cjs +126 -0
- package/scripts/check-registry-drift.cjs +206 -0
- package/scripts/check-release-payload-ceiling.cjs +269 -0
- package/scripts/check-render-coverage.cjs +558 -0
- package/scripts/check-research-isomorphism.cjs +446 -0
- package/scripts/check-reward-before-investment.cjs +261 -0
- package/scripts/check-room-blueprints.cjs +213 -0
- package/scripts/check-schema-aliases.cjs +532 -0
- package/scripts/check-shape-declaration.cjs +958 -0
- package/scripts/check-shape-declaration.test.cjs +185 -0
- package/scripts/check-skill-spec.cjs +312 -0
- package/scripts/check-skill-vs-code-drift.cjs +178 -0
- package/scripts/check-substrate.cjs +513 -0
- package/scripts/check-tool-honesty.cjs +1601 -0
- package/scripts/check-update +60 -0
- package/scripts/check-version-and-sha.cjs +366 -0
- package/scripts/check-voice-style.cjs +184 -0
- package/scripts/check-worktree-hygiene.cjs +530 -0
- package/scripts/classify-insight +59 -0
- package/scripts/coherence-smoke-test.cjs +489 -0
- package/scripts/compute-bayesian-surprise.py +175 -0
- package/scripts/compute-blindspot-mass.py +209 -0
- package/scripts/compute-disruption-index.py +211 -0
- package/scripts/compute-element-novelty.py +254 -0
- package/scripts/compute-external-whitespace.py +563 -0
- package/scripts/compute-hsi.py +947 -0
- package/scripts/compute-meetings-intelligence +716 -0
- package/scripts/compute-opportunity-state +17 -0
- package/scripts/compute-state +393 -0
- package/scripts/compute-team +1112 -0
- package/scripts/compute-whitespace-embeddings.py +464 -0
- package/scripts/compute-whitespace-gaps.py +562 -0
- package/scripts/compute_topic_forest.py +684 -0
- package/scripts/consolidate-pinecone.py +265 -0
- package/scripts/context-monitor +943 -0
- package/scripts/create-speaker-profile +311 -0
- package/scripts/cross-room-detect.cjs +195 -0
- package/scripts/csv-to-idea-graph.cjs +755 -0
- package/scripts/ctxl-eval.cjs +846 -0
- package/scripts/curation-132-03-dedup-held-rename.cjs +395 -0
- package/scripts/curation-132-05-pseudonymize.cjs +189 -0
- package/scripts/derive-verb-reach-affinity.cjs +507 -0
- package/scripts/detect-reverse-salients.py +242 -0
- package/scripts/diagnostics-command.cjs +345 -0
- package/scripts/dial-memory-refresh-command.cjs +147 -0
- package/scripts/discover-analogy-whitespace.py +433 -0
- package/scripts/discover-hsi-whitespace.py +352 -0
- package/scripts/discover-rs-whitespace.py +327 -0
- package/scripts/discovery-cycle.cjs +625 -0
- package/scripts/disposition-render-v2.cjs +229 -0
- package/scripts/doctor-preflight-format.cjs +101 -0
- package/scripts/doctor.cjs +4327 -0
- package/scripts/dogfood-bridge/append-to-queue.sh +59 -0
- package/scripts/dogfood-bridge/path-filter.cjs +86 -0
- package/scripts/dogfood-derive.cjs +158 -0
- package/scripts/dogfood-emit.cjs +126 -0
- package/scripts/empathy-observation-emit.cjs +108 -0
- package/scripts/enrichment-queue-append.cjs +157 -0
- package/scripts/ensure-brain-baseline.cjs +117 -0
- package/scripts/entity-extract.cjs +1135 -0
- package/scripts/eureka-command.cjs +687 -0
- package/scripts/eureka-critic-run.cjs +662 -0
- package/scripts/eureka-portfolio-report.cjs +2038 -0
- package/scripts/eureka-room-report.cjs +419 -0
- package/scripts/explain-decision-command.cjs +499 -0
- package/scripts/export-pinecone-embeddings.cjs +516 -0
- package/scripts/extract-room-intelligence.cjs +714 -0
- package/scripts/fetch-brain-baseline.cjs +190 -0
- package/scripts/fetch-brain-baseline.py +360 -0
- package/scripts/feynman-minto-guardian.cjs +672 -0
- package/scripts/feynman-timeline-refresh-command.cjs +270 -0
- package/scripts/file-asset +253 -0
- package/scripts/fire-sensor-event.cjs +83 -0
- package/scripts/first-install-router.cjs +968 -0
- package/scripts/frontmatter-schema-validator.cjs +339 -0
- package/scripts/fts-index-drain.cjs +221 -0
- package/scripts/generate-chat-embed.cjs +179 -0
- package/scripts/generate-deck.cjs +322 -0
- package/scripts/generate-export.cjs +474 -0
- package/scripts/generate-hub.cjs +2553 -0
- package/scripts/generate-lobby.cjs +718 -0
- package/scripts/generate-presentation.cjs +988 -0
- package/scripts/generate-presentation.test.cjs +405 -0
- package/scripts/generate-section-intelligence.cjs +330 -0
- package/scripts/generate-snapshot.cjs +1410 -0
- package/scripts/generate-standalone +159 -0
- package/scripts/git-ops +211 -0
- package/scripts/graph-heal-pipeline.cjs +321 -0
- package/scripts/gsd-artifact-graph-hook.cjs +219 -0
- package/scripts/gsd-graph-derive-drain.cjs +571 -0
- package/scripts/gsd-graph-derive-sweep.cjs +195 -0
- package/scripts/heal-command.cjs +1365 -0
- package/scripts/hedge-refit-pipeline.cjs +207 -0
- package/scripts/help-renderer.cjs +303 -0
- package/scripts/hmi-compliance-poll.cjs +451 -0
- package/scripts/hmi-status-command.cjs +510 -0
- package/scripts/hooked-rescore-117.cjs +224 -0
- package/scripts/hooks/pre-commit +533 -0
- package/scripts/hooks/pre-commit-room-minto-guard.cmd +43 -0
- package/scripts/hooks/pre-commit-room-minto-guard.sh +533 -0
- package/scripts/hsi-to-graph.cjs +194 -0
- package/scripts/huji-batch.cjs +821 -0
- package/scripts/huji-eval.cjs +1158 -0
- package/scripts/huji-intake.cjs +563 -0
- package/scripts/huji-pin-smoketest.cjs +454 -0
- package/scripts/huji-run-one-async.cjs +305 -0
- package/scripts/huji-run-one.cjs +671 -0
- package/scripts/install-pre-commit.sh +113 -0
- package/scripts/intent-classifier +106 -0
- package/scripts/intent-classifier.cjs +3620 -0
- package/scripts/interpret-whitespace.cjs +691 -0
- package/scripts/jtbd-command.cjs +810 -0
- package/scripts/jtbd-update.cjs +299 -0
- package/scripts/label-topic-forest.cjs +667 -0
- package/scripts/learn-from-usage +168 -0
- package/scripts/lib/__pycache__/ensure_ml_deps.cpython-312.pyc +0 -0
- package/scripts/lib/ensure_ml_deps.py +97 -0
- package/scripts/load-embeddings-into-neo4j.cjs +569 -0
- package/scripts/memory-artifact-graph-hook.cjs +191 -0
- package/scripts/memory-command.cjs +687 -0
- package/scripts/memory-completion-detector.cjs +217 -0
- package/scripts/memory-lifecycle.cjs +620 -0
- package/scripts/memory-resume-nudge.cjs +233 -0
- package/scripts/methodology-ingest-local.sh +36 -0
- package/scripts/migrate-brain-mcp-from-http-to-stdio.cjs +190 -0
- package/scripts/migrate-brain-mcp-from-http-to-stdio.test.cjs +242 -0
- package/scripts/migrate-hats-to-roomdb.cjs +217 -0
- package/scripts/migrate-lazygraph.cjs +250 -0
- package/scripts/migrate-minto-schema-v88.cjs +296 -0
- package/scripts/migrate-plugin-root-refs.cjs +168 -0
- package/scripts/migrate-room-sections-v275.cjs +556 -0
- package/scripts/migrate-rooms +417 -0
- package/scripts/migrate-skill-frontmatter.cjs +472 -0
- package/scripts/migrate-stale-user-settings.cjs +296 -0
- package/scripts/migrate-telemetry-v1.cjs +384 -0
- package/scripts/migrate-telemetry-v1.test.cjs +356 -0
- package/scripts/minto-debouncer.cjs +428 -0
- package/scripts/mos-status.cjs +622 -0
- package/scripts/mva-detect.cjs +229 -0
- package/scripts/mva-run.cjs +36 -0
- package/scripts/on-agent-complete +163 -0
- package/scripts/on-cwd-changed +149 -0
- package/scripts/on-file-changed +68 -0
- package/scripts/on-stop +617 -0
- package/scripts/on-task-complete +194 -0
- package/scripts/operator-command.cjs +858 -0
- package/scripts/operator-update.cjs +308 -0
- package/scripts/part8-egress-guard-hook.cjs +229 -0
- package/scripts/pipeline-command.cjs +271 -0
- package/scripts/post-compact +383 -0
- package/scripts/post-update-activation.cjs +339 -0
- package/scripts/post-write +283 -0
- package/scripts/power-demo-prompt.md +621 -0
- package/scripts/pre-compact +273 -0
- package/scripts/preflight-auto-explore.cjs +314 -0
- package/scripts/preflight-doctor.cjs +225 -0
- package/scripts/preflight-release-drift.cjs +168 -0
- package/scripts/preflight-tension-surface.cjs +414 -0
- package/scripts/probe-brain-contract.cjs +502 -0
- package/scripts/publish-ops +346 -0
- package/scripts/query-efficiency-telemetry.cjs +364 -0
- package/scripts/query-semantic-scholar.cjs +545 -0
- package/scripts/reapply-modifications +49 -0
- package/scripts/reassign-primary.cjs +125 -0
- package/scripts/recompile-room-references.cjs +601 -0
- package/scripts/release-beta-preflight.sh +69 -0
- package/scripts/render-pdf +588 -0
- package/scripts/render-viz +190 -0
- package/scripts/research-speaker +239 -0
- package/scripts/resolve-room +204 -0
- package/scripts/restore-post-compact-context.cjs +320 -0
- package/scripts/room-auto-create-nudge.cjs +136 -0
- package/scripts/room-naming-selector.cjs +201 -0
- package/scripts/room-registry +767 -0
- package/scripts/rs-discovery-engine.cjs +725 -0
- package/scripts/rs-engine.py +2073 -0
- package/scripts/rs-experts-command.cjs +300 -0
- package/scripts/rs-explain-command.cjs +323 -0
- package/scripts/rs-fetch-command.cjs +170 -0
- package/scripts/rs-thesis-command.cjs +203 -0
- package/scripts/rs-vector-bridge.cjs +410 -0
- package/scripts/run-harness.cjs +890 -0
- package/scripts/scout-cadence-guard.cjs +323 -0
- package/scripts/scout-cadence-runner.cjs +509 -0
- package/scripts/scout-telemetry-aggregator.cjs +268 -0
- package/scripts/sealed-walker.py +96 -0
- package/scripts/seed-brain-commands.cjs +324 -0
- package/scripts/self-update +105 -0
- package/scripts/sentinel-deadline-monitor +241 -0
- package/scripts/sentinel-health-check +198 -0
- package/scripts/sentinel-snapshot +42 -0
- package/scripts/serve-dashboard +103 -0
- package/scripts/serve-dashboard-live +932 -0
- package/scripts/serve-presentation +97 -0
- package/scripts/serve-wiki +90 -0
- package/scripts/session-end-presence.cjs +79 -0
- package/scripts/session-start +1942 -0
- package/scripts/sessionstart-coordinator.cjs +249 -0
- package/scripts/sessionstart-npm-reconcile.cjs +111 -0
- package/scripts/sessionstart-post-update-preflight.cjs +303 -0
- package/scripts/sessionstart-reference-now-seed.cjs +137 -0
- package/scripts/setup-hooks.sh +112 -0
- package/scripts/skillopt-codereview.cjs +830 -0
- package/scripts/skillopt-eval.cjs +519 -0
- package/scripts/skillopt-funnel.cjs +1076 -0
- package/scripts/skillopt-genqueries.cjs +571 -0
- package/scripts/skillopt-inventory.cjs +319 -0
- package/scripts/skillopt-merge.cjs +656 -0
- package/scripts/skillopt-triggerloop.cjs +1126 -0
- package/scripts/soft-alias-runner.cjs +116 -0
- package/scripts/stamp-artifact-write.cjs +276 -0
- package/scripts/stamp-firing-block.cjs +325 -0
- package/scripts/state-write.cjs +97 -0
- package/scripts/statusline-fallback-echo.cjs +297 -0
- package/scripts/statusline-mos +116 -0
- package/scripts/statusline-mos-dispatch +127 -0
- package/scripts/suggest-next-command.cjs +416 -0
- package/scripts/sweep-skill-descriptions.cjs +263 -0
- package/scripts/sync-rooms-brain +438 -0
- package/scripts/sync-rooms-graph +264 -0
- package/scripts/telemetry-command-invocation.cjs +120 -0
- package/scripts/test-doctor-recovery.cjs +242 -0
- package/scripts/test-fresh-install.md +140 -0
- package/scripts/track-analytics +156 -0
- package/scripts/transcribe-audio +148 -0
- package/scripts/transcript-ingest.cjs +225 -0
- package/scripts/update-icm-index +153 -0
- package/scripts/v182-brain-optimize.cypher +1191 -0
- package/scripts/validate-model-profiles +93 -0
- package/scripts/vault-content-reformatter.cjs +581 -0
- package/scripts/vault-export-orchestrator.cjs +400 -0
- package/scripts/vault-footer-injector.cjs +315 -0
- package/scripts/vault-import.cjs +839 -0
- package/scripts/vault-integration-test.cjs +318 -0
- package/scripts/vault-regenerate-all.cjs +216 -0
- package/scripts/vault-regenerate-all.test.cjs +138 -0
- package/scripts/vault-rules-generator.cjs +220 -0
- package/scripts/vault-section-minto-generator.cjs +1642 -0
- package/scripts/vault-section-minto-generator.integration.test.cjs +576 -0
- package/scripts/vault-section-minto-generator.test.cjs +291 -0
- package/scripts/vault-section-state-generator.cjs +385 -0
- package/scripts/vault-welcome-generator.cjs +403 -0
- package/scripts/vault-wikilink-injector.cjs +449 -0
- package/scripts/verify-phase-132.cjs +338 -0
- package/scripts/verify-release +744 -0
- package/scripts/whitespace-command.cjs +831 -0
- package/scripts/whitespace-to-brain.cjs +383 -0
- package/scripts/whitespace-to-graph.cjs +220 -0
- package/scripts/wikilink-batch.cjs +102 -0
- package/scripts/wikilink-file.cjs +139 -0
- package/scripts/write-bridge-artifacts.cjs +140 -0
- package/scripts/write-scope-check +12 -0
- package/scripts/write-scope-check.cjs +461 -0
- package/scripts/write-whitespace-sections.cjs +483 -0
- package/settings.json +7 -0
- package/skills/act/SKILL.md +523 -0
- package/skills/admin/SKILL.md +437 -0
- package/skills/agentshield/SKILL.md +50 -0
- package/skills/analyze-needs/SKILL.md +74 -0
- package/skills/analyze-systems/SKILL.md +69 -0
- package/skills/analyze-timing/SKILL.md +94 -0
- package/skills/auto-explore/SKILL.md +84 -0
- package/skills/beautiful-question/SKILL.md +72 -0
- package/skills/bono/SKILL.md +146 -0
- package/skills/brain-connector/SKILL.md +206 -0
- package/skills/brain-derive/SKILL.md +140 -0
- package/skills/build-knowledge/SKILL.md +118 -0
- package/skills/build-thesis/SKILL.md +90 -0
- package/skills/causal/SKILL.md +265 -0
- package/skills/challenge-assumptions/SKILL.md +74 -0
- package/skills/client-discovery-interview/SKILL.md +94 -0
- package/skills/client-discovery-interview/discovery-scaffold.json +41 -0
- package/skills/client-discovery-interview/question-bank.md +149 -0
- package/skills/compare-ventures/SKILL.md +113 -0
- package/skills/context-engine/SKILL.md +169 -0
- package/skills/conversation-mode/SKILL.md +189 -0
- package/skills/correct-reference-now/SKILL.md +86 -0
- package/skills/dashboard/SKILL.md +142 -0
- package/skills/deck/SKILL.md +113 -0
- package/skills/deep-grade/SKILL.md +210 -0
- package/skills/diagnose/SKILL.md +128 -0
- package/skills/diagnostics/SKILL.md +193 -0
- package/skills/dial-memory-refresh/SKILL.md +116 -0
- package/skills/diffusion/SKILL.md +125 -0
- package/skills/discover/SKILL.md +216 -0
- package/skills/doctor/SKILL.md +269 -0
- package/skills/dogfood-flush/SKILL.md +133 -0
- package/skills/dominant-designs/SKILL.md +72 -0
- package/skills/eureka/SKILL.md +313 -0
- package/skills/explain-decision/SKILL.md +138 -0
- package/skills/explore-domains/SKILL.md +74 -0
- package/skills/explore-futures/SKILL.md +64 -0
- package/skills/explore-opportunity/SKILL.md +168 -0
- package/skills/explore-trends/SKILL.md +74 -0
- package/skills/export/SKILL.md +126 -0
- package/skills/feynman-timeline-refresh/SKILL.md +105 -0
- package/skills/file-meeting/SKILL.md +1190 -0
- package/skills/find-analogies/SKILL.md +360 -0
- package/skills/find-bottlenecks/SKILL.md +104 -0
- package/skills/find-connections/SKILL.md +108 -0
- package/skills/funding/SKILL.md +110 -0
- package/skills/futures/SKILL.md +124 -0
- package/skills/grade/SKILL.md +252 -0
- package/skills/grade-grant/SKILL.md +293 -0
- package/skills/graph/SKILL.md +216 -0
- package/skills/hat-briefing/SKILL.md +160 -0
- package/skills/heal/SKILL.md +69 -0
- package/skills/help/SKILL.md +172 -0
- package/skills/hmi-status/SKILL.md +73 -0
- package/skills/ignite/SKILL.md +225 -0
- package/skills/ingest-methodology/SKILL.md +125 -0
- package/skills/intel-pipeline/SKILL.md +128 -0
- package/skills/intelligence-orchestrator/SKILL.md +262 -0
- package/skills/jtbd/SKILL.md +261 -0
- package/skills/larry-personality/SKILL.md +570 -0
- package/skills/larry-personality/framework-chains.md +92 -0
- package/skills/larry-personality/mode-engine.md +185 -0
- package/skills/leadership/SKILL.md +109 -0
- package/skills/lean-canvas/SKILL.md +70 -0
- package/skills/macro-trends/SKILL.md +84 -0
- package/skills/map-unknowns/SKILL.md +72 -0
- package/skills/memory/SKILL.md +212 -0
- package/skills/memory-cortex-reach/SKILL.md +80 -0
- package/skills/models/SKILL.md +197 -0
- package/skills/mos/SKILL.md +160 -0
- package/skills/mos-deck-engine/SKILL.md +329 -0
- package/skills/mos-reason/SKILL.md +484 -0
- package/skills/mullins/SKILL.md +151 -0
- package/skills/mullins-scaffold/SKILL.md +132 -0
- package/skills/mullins-scaffold/scaffold.json +223 -0
- package/skills/mva-brief/SKILL.md +87 -0
- package/skills/mva-option/SKILL.md +120 -0
- package/skills/mva-pipeline/SKILL.md +158 -0
- package/skills/mva-report/SKILL.md +79 -0
- package/skills/new-project/SKILL.md +629 -0
- package/skills/new-surface/SKILL.md +112 -0
- package/skills/onboard/SKILL.md +485 -0
- package/skills/operator/SKILL.md +167 -0
- package/skills/opportunities/SKILL.md +171 -0
- package/skills/organize/SKILL.md +69 -0
- package/skills/persona/SKILL.md +272 -0
- package/skills/pipeline/SKILL.md +164 -0
- package/skills/present/SKILL.md +123 -0
- package/skills/publish/SKILL.md +224 -0
- package/skills/pws-brain/SKILL.md +152 -0
- package/skills/pws-methodology/SKILL.md +92 -0
- package/skills/qualify-opportunity/SKILL.md +111 -0
- package/skills/query/SKILL.md +68 -0
- package/skills/radar/SKILL.md +106 -0
- package/skills/reanalyze/SKILL.md +122 -0
- package/skills/research/SKILL.md +462 -0
- package/skills/room/SKILL.md +381 -0
- package/skills/room-passive/SKILL.md +174 -0
- package/skills/room-proactive/SKILL.md +344 -0
- package/skills/rooms/SKILL.md +678 -0
- package/skills/root-cause/SKILL.md +73 -0
- package/skills/rs-experts/SKILL.md +151 -0
- package/skills/rs-explain/SKILL.md +130 -0
- package/skills/rs-fetch/SKILL.md +115 -0
- package/skills/rs-thesis/SKILL.md +129 -0
- package/skills/scenario-plan/SKILL.md +76 -0
- package/skills/scheduled-tasks/SKILL.md +301 -0
- package/skills/score-innovation/SKILL.md +74 -0
- package/skills/scout/SKILL.md +370 -0
- package/skills/setup/SKILL.md +654 -0
- package/skills/show/SKILL.md +68 -0
- package/skills/skill/SKILL.md +104 -0
- package/skills/snapshot/SKILL.md +178 -0
- package/skills/speakers/SKILL.md +116 -0
- package/skills/splash/SKILL.md +54 -0
- package/skills/stance/SKILL.md +89 -0
- package/skills/status/SKILL.md +107 -0
- package/skills/structure-argument/SKILL.md +78 -0
- package/skills/suggest-next/SKILL.md +137 -0
- package/skills/systems-thinking/SKILL.md +220 -0
- package/skills/think-hats/SKILL.md +82 -0
- package/skills/trending-to-absurd/SKILL.md +100 -0
- package/skills/ui-system/SKILL.md +474 -0
- package/skills/ui-system/design-system/M-OS-DESIGN-SYSTEM.md +273 -0
- package/skills/ui-system/design-system/SPEC.md +72 -0
- package/skills/ui-system/design-system/image-prompt-style.md +29 -0
- package/skills/ui-system/design-system/mos-design-system.css +240 -0
- package/skills/ui-system/rules/design-system.md +60 -0
- package/skills/ui-system/rules/dual-palette.md +156 -0
- package/skills/ui-system/rules/glyph-disambiguation.md +171 -0
- package/skills/ui-system/rules/shape-f-zero-and-six.md +169 -0
- package/skills/update/SKILL.md +254 -0
- package/skills/user-needs/SKILL.md +73 -0
- package/skills/validate/SKILL.md +73 -0
- package/skills/value-proposition/SKILL.md +141 -0
- package/skills/vault/SKILL.md +326 -0
- package/skills/visualize/SKILL.md +69 -0
- package/skills/whitespace/SKILL.md +539 -0
- package/skills/wiki/SKILL.md +94 -0
- package/templates/_base.html +20 -0
- package/templates/chat-panel.html +205 -0
- package/templates/constellation-chat-hooks.js +89 -0
- package/templates/constellation.html +1272 -0
- package/templates/destijl-base.css +268 -0
- package/templates/discovery/discovery-brief-template.md +97 -0
- package/templates/due-diligence.html +49 -0
- package/templates/executive-summary.html +40 -0
- package/templates/icm/CLAUDE.md +31 -0
- package/templates/icm/GROUP-CLAUDE.md +33 -0
- package/templates/icm/INDEX.md +26 -0
- package/templates/import/stage-contracts/01-ingest.md +34 -0
- package/templates/import/stage-contracts/02-classify.md +48 -0
- package/templates/import/stage-contracts/03-route.md +42 -0
- package/templates/import/stage-contracts/04-enrich.md +40 -0
- package/templates/investment-thesis.html +25 -0
- package/templates/meeting-report.html +361 -0
- package/templates/presentation/dashboard.html +1150 -0
- package/templates/presentation/deck.html +540 -0
- package/templates/presentation/diagrams.html +437 -0
- package/templates/presentation/graph.html +391 -0
- package/templates/presentation/insights.html +548 -0
- package/templates/presentation/wiki.html +533 -0
- package/templates/profile.html +136 -0
- package/templates/room-context/last-session.md +56 -0
- package/templates/room-context/methodology-history.md +28 -0
- package/templates/room-context/rejection-log.md +25 -0
- package/templates/room-context/weekly-digest.md +54 -0
- package/templates/room-skeleton/MINTO.md.tmpl +19 -0
- package/templates/room-skeleton/ROOM.md.identity.tmpl +13 -0
- package/templates/room-skeleton/ROOM.md.section.tmpl +33 -0
- package/templates/room-skeleton/STATE.md.tmpl +33 -0
- package/templates/room-skeleton/USER.md.tmpl +23 -0
- package/templates/room-skeleton/references/.gitkeep +0 -0
- package/templates/room-skeleton/references/SECTION-SCHEMA.md +213 -0
- package/templates/room-skeleton/references/SUB-SCHEMAS.md +91 -0
- package/templates/room-skeleton/section-contracts/.gitkeep +0 -0
- package/templates/room-skeleton/section-contracts/business-model.md +32 -0
- package/templates/room-skeleton/section-contracts/competitive-analysis.md +33 -0
- package/templates/room-skeleton/section-contracts/financial-model.md +30 -0
- package/templates/room-skeleton/section-contracts/funding.md +41 -0
- package/templates/room-skeleton/section-contracts/legal-ip.md +30 -0
- package/templates/room-skeleton/section-contracts/market-analysis.md +32 -0
- package/templates/room-skeleton/section-contracts/opportunity-bank.md +39 -0
- package/templates/room-skeleton/section-contracts/problem-definition.md +32 -0
- package/templates/room-skeleton/section-contracts/solution-design.md +36 -0
- package/templates/room-skeleton/section-contracts/strategy.md +35 -0
- package/templates/room-skeleton/section-contracts/team-execution.md +36 -0
- package/templates/shared.css +427 -0
- package/templates/showcase/blueprint.html +432 -0
- package/templates/showcase/library.html +571 -0
- package/templates/showcase/narrative.html +361 -0
- package/templates/showcase/overview.html +468 -0
- package/templates/showcase/synthesis.html +473 -0
- package/templates/signature-footer.html +34 -0
|
@@ -0,0 +1,1331 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Phase 143.3-01 - Connector registry generator + drift tripwire + names refresh.
|
|
6
|
+
*
|
|
7
|
+
* Implements: CONN-02 (the generator with the nested-map parser extension).
|
|
8
|
+
*
|
|
9
|
+
* The Connector Contract generalizes Phase 122: the `connector:` frontmatter
|
|
10
|
+
* block on each skill/command is the ONE place the reach-wiring lives, and
|
|
11
|
+
* `data/connector-registry.json` is GENERATED from it and CI-checked against it.
|
|
12
|
+
* A `--check` run regenerates it in memory and exits non-zero on a stale
|
|
13
|
+
* on-disk registry OR an unresolvable framework name (one not in the
|
|
14
|
+
* FEEDS_INTO-linked Brain framework slice snapshotted to
|
|
15
|
+
* `data/framework-names.json`).
|
|
16
|
+
*
|
|
17
|
+
* Canon Part 7 (Reuse Before Build): this MIRRORS
|
|
18
|
+
* scripts/build-command-registry.cjs wholesale -- the hand-rolled line-walk
|
|
19
|
+
* frontmatter parser, the static-allowlist load, the deterministic serializer,
|
|
20
|
+
* the three-branch main(). The ONE genuine net-new concern is the nested-map
|
|
21
|
+
* descent (parseConnectorFrontmatter), because the `connector:` block is one
|
|
22
|
+
* indent level deeper than Phase 122's flat `frameworks:` list. It adds NO new
|
|
23
|
+
* dependency (no gray-matter, no zod).
|
|
24
|
+
*
|
|
25
|
+
* Canon Part 8 (The Graph Boundary): the registry is plugin-local, validated
|
|
26
|
+
* AGAINST the SHIPPED Brain framework-name snapshot, NEVER written back. The
|
|
27
|
+
* ONLY Brain touch is a read-only brain.query in --refresh-names at BUILD time
|
|
28
|
+
* -- the query carries only generic `:Framework` node names (a methodology
|
|
29
|
+
* handle, never user data), and there is no write Cypher anywhere in this file.
|
|
30
|
+
* A connector's framework/web_scope are GENERIC handles only; the registry
|
|
31
|
+
* never carries user content. The generator and the orchestrator never need the
|
|
32
|
+
* Brain at runtime.
|
|
33
|
+
*
|
|
34
|
+
* Usage:
|
|
35
|
+
* node scripts/build-connector-registry.cjs
|
|
36
|
+
* scan the commands and skills frontmatter -> write
|
|
37
|
+
* data/connector-registry.json ; exit 1 on an unresolvable framework
|
|
38
|
+
* node scripts/build-connector-registry.cjs --check
|
|
39
|
+
* regenerate in memory ; exit 1 if on-disk JSON is stale OR a framework
|
|
40
|
+
* is unresolvable ; print a one-line recovery command in stderr
|
|
41
|
+
* node scripts/build-connector-registry.cjs --refresh-names
|
|
42
|
+
* read-only brain.query -> rewrite data/framework-names.json
|
|
43
|
+
* (build-time only ; graceful no-op if the Brain is unreachable)
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
const fs = require('node:fs');
|
|
47
|
+
const path = require('node:path');
|
|
48
|
+
|
|
49
|
+
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
50
|
+
|
|
51
|
+
// CONN-03 frozen banks. REACH_IDS (the 6, Phase 148 D-09) + POSTURE_IDS (the 3) are required
|
|
52
|
+
// from the SINGLE frozen source so the connector validations can NEVER drift
|
|
53
|
+
// from the dial doctrine (lib/core/sensors/sensor-types.cjs). The --check
|
|
54
|
+
// tripwire validates every connector's reach_id / posture against these banks.
|
|
55
|
+
// This require is sync, zero-I/O, and makes ZERO Brain/network calls (Part 8).
|
|
56
|
+
const { REACH_IDS, POSTURE_IDS } = require(
|
|
57
|
+
path.join(REPO_ROOT, 'lib', 'core', 'sensors', 'sensor-types.cjs')
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// CONN-03 WFL-01 resolver-resolution guard. commandsForFramework() is the only
|
|
61
|
+
// door from a framework name to a /mos: command (Phase 122). The --check
|
|
62
|
+
// tripwire asserts every connector framework RESOLVES through it (length > 0),
|
|
63
|
+
// catching a fake/typo framework that the build-time allowlist has() could
|
|
64
|
+
// miss. The resolver reads only data/command-registry.json; it makes ZERO Brain
|
|
65
|
+
// calls (command-resolver.cjs header, Part 8).
|
|
66
|
+
const { commandsForFramework } = require(
|
|
67
|
+
path.join(REPO_ROOT, 'lib', 'workflow', 'command-resolver.cjs')
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// Phase 235-02 (CIRS-02). The generic seam-liveness helper. coverageReport()
|
|
71
|
+
// below routes its MCP-tool-file walk through checkClaimedModuleLiveness() so
|
|
72
|
+
// the "this module claims to export connectors" seam is checked by the SAME
|
|
73
|
+
// shared primitive Phases 237/238/239 use for their own seams, instead of a
|
|
74
|
+
// CIRS-local reimplementation. Pure, zero Brain/network (Part 8).
|
|
75
|
+
const seamLiveness = require(path.join(REPO_ROOT, 'lib', 'core', 'seam-liveness.cjs'));
|
|
76
|
+
|
|
77
|
+
const COMMANDS_DIR = path.join(REPO_ROOT, 'commands');
|
|
78
|
+
const SKILLS_DIR = path.join(REPO_ROOT, 'skills');
|
|
79
|
+
const AGENTS_DIR = path.join(REPO_ROOT, 'agents');
|
|
80
|
+
const DATA_DIR = path.join(REPO_ROOT, 'data');
|
|
81
|
+
const REGISTRY_PATH = path.join(DATA_DIR, 'connector-registry.json');
|
|
82
|
+
const FW_NAMES_PATH = path.join(DATA_DIR, 'framework-names.json');
|
|
83
|
+
const LEDGER_PATH = path.join(DATA_DIR, 'connector-coverage-ledger.json');
|
|
84
|
+
|
|
85
|
+
const LEDGER_GENERATED_NOTE =
|
|
86
|
+
'GENERATED by scripts/build-connector-registry.cjs (coverageReport) - do not edit by hand. The wired-XOR-excluded coverage ledger: every command/skill/agent surface classified as wired, excluded, or gap (Canon Part 11 R1).';
|
|
87
|
+
|
|
88
|
+
// Phase 198-04 (SPEC-2, Task 1) -- the MCP-tool connector discovery source. A
|
|
89
|
+
// FOURTH connector source (commands/skills/agents are the first three) so MCP
|
|
90
|
+
// tools are first-class in the born-wired gate: every lib/mcp/tools/*.cjs
|
|
91
|
+
// module -- plus lib/mcp/tool-router.cjs's MCP_TOOL_CONNECTORS and
|
|
92
|
+
// lib/mcp/contract-version.cjs's connectors -- exports a `connectors` array
|
|
93
|
+
// (the SOURCE of truth); this generator discovers each and GENERATES
|
|
94
|
+
// data/mcp-tool-connectors.json from them (the MCP-tool projection, "do not
|
|
95
|
+
// edit by hand" like data/connector-registry.json), AND folds the same
|
|
96
|
+
// entries into data/connector-registry.json's `connectors` array so a single
|
|
97
|
+
// `--check` proves BOTH files clean. Canon Part 8: zero Brain/network calls --
|
|
98
|
+
// this is pure filesystem discovery, exactly like listSourceFiles() above.
|
|
99
|
+
const MCP_TOOLS_DIR = path.join(REPO_ROOT, 'lib', 'mcp', 'tools');
|
|
100
|
+
const MCP_TOOL_ROUTER_PATH = path.join(REPO_ROOT, 'lib', 'mcp', 'tool-router.cjs');
|
|
101
|
+
const MCP_CONTRACT_VERSION_PATH = path.join(REPO_ROOT, 'lib', 'mcp', 'contract-version.cjs');
|
|
102
|
+
const MCP_CONNECTORS_PATH = path.join(DATA_DIR, 'mcp-tool-connectors.json');
|
|
103
|
+
const MCP_GENERATED_NOTE =
|
|
104
|
+
'GENERATED by scripts/build-connector-registry.cjs (MCP-tool discovery) - do not edit by hand. The MCP-tool projection: every lib/mcp/tools/*.cjs module (plus lib/mcp/tool-router.cjs and lib/mcp/contract-version.cjs) exports a `connectors` array (the SOURCE of truth); this file is the generated registry of those descriptors, also folded into data/connector-registry.json (source: "mcp_tool").';
|
|
105
|
+
|
|
106
|
+
const GENERATED_NOTE =
|
|
107
|
+
'GENERATED by scripts/build-connector-registry.cjs - do not edit by hand';
|
|
108
|
+
|
|
109
|
+
// The FEEDS_INTO traversal that snapshots the framework-name allowlist. This
|
|
110
|
+
// is the ONLY Cypher this file ever runs, it is read-only, and it carries no
|
|
111
|
+
// user-specific strings -- only the generic `:Framework` label. Reused from
|
|
112
|
+
// build-command-registry.cjs verbatim so a --refresh-names here matches Phase
|
|
113
|
+
// 122 exactly.
|
|
114
|
+
const FW_NAMES_CYPHER =
|
|
115
|
+
'MATCH (f:Framework) WHERE (f)-[:FEEDS_INTO]-() RETURN f.name AS name';
|
|
116
|
+
|
|
117
|
+
// The 11 connector sub-keys (the contract in docs/CONNECTOR-CONTRACT.md). The
|
|
118
|
+
// generator pulls each from the parsed connector map; absent fields degrade.
|
|
119
|
+
const CONNECTOR_KEYS = [
|
|
120
|
+
'connects_to_spine',
|
|
121
|
+
'sensor_triggers',
|
|
122
|
+
'reach_id',
|
|
123
|
+
'sub_mode',
|
|
124
|
+
'framework',
|
|
125
|
+
'posture',
|
|
126
|
+
'hierarchy_rank',
|
|
127
|
+
'filing',
|
|
128
|
+
'plan_gated',
|
|
129
|
+
'web_scope',
|
|
130
|
+
'surface',
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// ---------------------------------------------------------------------------
|
|
134
|
+
// coerce(v) -- the value coercions the flat parser already does (null, boolean,
|
|
135
|
+
// integer, JSON array, quote-strip). Shared by the flat top-level walk and the
|
|
136
|
+
// nested connector descent so the two stay byte-identical in behavior.
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
function coerce(v) {
|
|
139
|
+
if (v === '') return [];
|
|
140
|
+
if (v === 'null' || v === '~') return null;
|
|
141
|
+
if (v === 'true' || v === 'false') return v === 'true';
|
|
142
|
+
if (/^-?\d+$/.test(v)) return parseInt(v, 10);
|
|
143
|
+
if (v.startsWith('[')) {
|
|
144
|
+
try {
|
|
145
|
+
return JSON.parse(v);
|
|
146
|
+
} catch (_e) {
|
|
147
|
+
// Not strict JSON (e.g. `[SENS-02, SENS-07]` with unquoted tokens, the
|
|
148
|
+
// common shape for sensor_triggers). Split the inner CSV into a trimmed,
|
|
149
|
+
// quote-stripped array. An empty `[]` yields [].
|
|
150
|
+
const inner = v.replace(/^\[/, '').replace(/\]$/, '').trim();
|
|
151
|
+
if (inner === '') return [];
|
|
152
|
+
return inner
|
|
153
|
+
.split(',')
|
|
154
|
+
.map((s) => s.trim().replace(/^["']|["']$/g, ''))
|
|
155
|
+
.filter((s) => s.length > 0);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return v.replace(/^["']|["']$/g, '');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
// parseConnectorFrontmatter(md) -- the nested-map parser. Mirrors the flat
|
|
163
|
+
// parseFrontmatter in build-command-registry.cjs (lines 100-137) AND extends it
|
|
164
|
+
// to DESCEND one indent level into the `connector:` nested map: when a
|
|
165
|
+
// top-level key is `connector` with an empty value, subsequent indented
|
|
166
|
+
// ` key: value` lines are accumulated into out.connector as an object, with
|
|
167
|
+
// the SAME value coercions (null, booleans, integers, JSON arrays, indented
|
|
168
|
+
// dash-lists, quote-stripping). This nested descent is the ONE genuine net-new
|
|
169
|
+
// parsing concern this phase introduces.
|
|
170
|
+
// ---------------------------------------------------------------------------
|
|
171
|
+
function parseConnectorFrontmatter(md) {
|
|
172
|
+
if (typeof md !== 'string') return {};
|
|
173
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(md);
|
|
174
|
+
if (!m) return {};
|
|
175
|
+
const out = {};
|
|
176
|
+
let key = null; // current top-level dash-list key
|
|
177
|
+
|
|
178
|
+
// Nested-descent state: when we are inside the `connector:` map, every
|
|
179
|
+
// indented line is parsed into `connectorObj` until a non-indented line ends
|
|
180
|
+
// the block.
|
|
181
|
+
let inConnector = false;
|
|
182
|
+
let connectorObj = null;
|
|
183
|
+
let connectorKey = null; // current nested dash-list key
|
|
184
|
+
|
|
185
|
+
for (const rawLine of m[1].split(/\r?\n/)) {
|
|
186
|
+
const line = rawLine.replace(/\s+$/, '');
|
|
187
|
+
const indented = /^\s+\S/.test(line);
|
|
188
|
+
|
|
189
|
+
// While inside the connector map, an indented line is a nested sub-key (or a
|
|
190
|
+
// nested dash-list item). A non-indented, non-blank line ends the block.
|
|
191
|
+
if (inConnector) {
|
|
192
|
+
if (line.trim() === '' || indented) {
|
|
193
|
+
if (line.trim() === '') continue;
|
|
194
|
+
// Strip the comment-only lines (e.g. ` # MUST match ...`).
|
|
195
|
+
const noComment = line.replace(/\s+#.*$/, '');
|
|
196
|
+
const subKv = /^\s+([A-Za-z0-9_-]+):\s*(.*)$/.exec(noComment);
|
|
197
|
+
if (subKv) {
|
|
198
|
+
connectorKey = subKv[1];
|
|
199
|
+
const sv = subKv[2].trim();
|
|
200
|
+
connectorObj[connectorKey] = coerce(sv);
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
const subDash = /^\s+-\s+(.*)$/.exec(noComment);
|
|
204
|
+
if (subDash && connectorKey) {
|
|
205
|
+
if (!Array.isArray(connectorObj[connectorKey])) connectorObj[connectorKey] = [];
|
|
206
|
+
connectorObj[connectorKey].push(subDash[1].replace(/^["']|["']$/g, ''));
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
// An indented line that is neither (blank-after-trim handled above) is
|
|
210
|
+
// ignored.
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
// A non-indented line -> the connector block is done.
|
|
214
|
+
inConnector = false;
|
|
215
|
+
out.connector = connectorObj;
|
|
216
|
+
connectorObj = null;
|
|
217
|
+
connectorKey = null;
|
|
218
|
+
// fall through to parse this line as a normal top-level line
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const kv = /^([A-Za-z0-9_-]+):\s*(.*)$/.exec(line);
|
|
222
|
+
if (kv) {
|
|
223
|
+
key = kv[1];
|
|
224
|
+
const v = kv[2].trim();
|
|
225
|
+
if (key === 'connector' && v === '') {
|
|
226
|
+
// Enter the nested descent. connectorObj accumulates the sub-keys.
|
|
227
|
+
inConnector = true;
|
|
228
|
+
connectorObj = {};
|
|
229
|
+
connectorKey = null;
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
out[key] = coerce(v);
|
|
233
|
+
} else if (key && /^\s*-\s+/.test(line)) {
|
|
234
|
+
if (!Array.isArray(out[key])) out[key] = [];
|
|
235
|
+
out[key].push(line.replace(/^\s*-\s+/, '').replace(/^["']|["']$/g, ''));
|
|
236
|
+
}
|
|
237
|
+
// Any other line (blank, comment `# ...`) is ignored.
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// EOF inside the connector block -> flush it.
|
|
241
|
+
if (inConnector && connectorObj) out.connector = connectorObj;
|
|
242
|
+
|
|
243
|
+
return out;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
// Load the committed framework-name allowlist (the FEEDS_INTO-linked Brain
|
|
248
|
+
// slice UNION curated_extras). Mirrors build-command-registry.cjs verbatim --
|
|
249
|
+
// the connector generator REUSES the shipped data/framework-names.json; it adds
|
|
250
|
+
// NO new Brain query.
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
function loadFrameworkNames() {
|
|
253
|
+
try {
|
|
254
|
+
const raw = JSON.parse(fs.readFileSync(FW_NAMES_PATH, 'utf8'));
|
|
255
|
+
const names = Array.isArray(raw && raw.framework_names) ? raw.framework_names : [];
|
|
256
|
+
const extras = Array.isArray(raw && raw.curated_extras) ? raw.curated_extras : [];
|
|
257
|
+
return new Set([...names, ...extras]);
|
|
258
|
+
} catch (_e) {
|
|
259
|
+
return new Set();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function loadCuratedExtras() {
|
|
264
|
+
try {
|
|
265
|
+
const raw = JSON.parse(fs.readFileSync(FW_NAMES_PATH, 'utf8'));
|
|
266
|
+
const extras = Array.isArray(raw && raw.curated_extras) ? raw.curated_extras : [];
|
|
267
|
+
return extras.slice();
|
|
268
|
+
} catch (_e) {
|
|
269
|
+
return [];
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// ---------------------------------------------------------------------------
|
|
274
|
+
// Source-file discovery: walk commands/*.md AND skills/*/SKILL.md AND
|
|
275
|
+
// agents/*.md, deterministically sorted (commands, then skills, then agents),
|
|
276
|
+
// so the registry is byte-stable across machines. Returns [{ kind, file, base }]
|
|
277
|
+
// where the kind drives the surface id in buildRegistry(). The agents leg
|
|
278
|
+
// byte-mirrors the commands leg (the same readdirSync + .md filter + sort +
|
|
279
|
+
// try/catch-yields-[] when the dir is absent); an agent .md is parsed by the
|
|
280
|
+
// SAME parseConnectorFrontmatter and obeys the SAME one-connector-per-file
|
|
281
|
+
// contract, exactly like a command.
|
|
282
|
+
// ---------------------------------------------------------------------------
|
|
283
|
+
function listSourceFiles() {
|
|
284
|
+
const out = [];
|
|
285
|
+
|
|
286
|
+
let cmdFiles = [];
|
|
287
|
+
try {
|
|
288
|
+
cmdFiles = fs.readdirSync(COMMANDS_DIR).filter((f) => f.endsWith('.md')).sort();
|
|
289
|
+
} catch (_e) {
|
|
290
|
+
cmdFiles = [];
|
|
291
|
+
}
|
|
292
|
+
for (const f of cmdFiles) {
|
|
293
|
+
out.push({ kind: 'command', file: path.join(COMMANDS_DIR, f), base: f.replace(/\.md$/, '') });
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
let skillDirs = [];
|
|
297
|
+
try {
|
|
298
|
+
skillDirs = fs
|
|
299
|
+
.readdirSync(SKILLS_DIR, { withFileTypes: true })
|
|
300
|
+
.filter((e) => e.isDirectory())
|
|
301
|
+
.map((e) => e.name)
|
|
302
|
+
.sort();
|
|
303
|
+
} catch (_e) {
|
|
304
|
+
skillDirs = [];
|
|
305
|
+
}
|
|
306
|
+
for (const d of skillDirs) {
|
|
307
|
+
const skillFile = path.join(SKILLS_DIR, d, 'SKILL.md');
|
|
308
|
+
if (fs.existsSync(skillFile)) {
|
|
309
|
+
out.push({ kind: 'skill', file: skillFile, base: d });
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
let agentFiles = [];
|
|
314
|
+
try {
|
|
315
|
+
agentFiles = fs.readdirSync(AGENTS_DIR).filter((f) => f.endsWith('.md')).sort();
|
|
316
|
+
} catch (_e) {
|
|
317
|
+
agentFiles = [];
|
|
318
|
+
}
|
|
319
|
+
for (const f of agentFiles) {
|
|
320
|
+
out.push({ kind: 'agent', file: path.join(AGENTS_DIR, f), base: f.replace(/\.md$/, '') });
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
return out;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// ---------------------------------------------------------------------------
|
|
327
|
+
// listMcpToolConnectorDescriptors() -- Phase 198-04 (SPEC-2, Task 1) MCP-tool
|
|
328
|
+
// discovery. Walks lib/mcp/tools/*.cjs (sorted, deterministic) PLUS the two
|
|
329
|
+
// named non-tools/ exporters (tool-router.cjs's MCP_TOOL_CONNECTORS,
|
|
330
|
+
// contract-version.cjs's connectors), requires each, and collects every raw
|
|
331
|
+
// descriptor from its exported array. Returns the RAW descriptors (each
|
|
332
|
+
// module's own {tool, surface, connector, hitl_shape, hitl_why, ...} shape) --
|
|
333
|
+
// normalizeMcpToolEntry() below maps them into the registry entry shape. A
|
|
334
|
+
// module that fails to load or export nothing is silently skipped (Wave-safe,
|
|
335
|
+
// mirrors listSourceFiles()'s try/catch-yields-[] discipline). Zero Brain/
|
|
336
|
+
// network calls -- pure filesystem + require.
|
|
337
|
+
// ---------------------------------------------------------------------------
|
|
338
|
+
function listMcpToolConnectorDescriptors() {
|
|
339
|
+
const out = [];
|
|
340
|
+
|
|
341
|
+
const namedModules = [
|
|
342
|
+
{ file: MCP_TOOL_ROUTER_PATH, exportKey: 'MCP_TOOL_CONNECTORS' },
|
|
343
|
+
{ file: MCP_CONTRACT_VERSION_PATH, exportKey: 'connectors' },
|
|
344
|
+
];
|
|
345
|
+
for (const nm of namedModules) {
|
|
346
|
+
if (!fs.existsSync(nm.file)) continue;
|
|
347
|
+
let mod;
|
|
348
|
+
try {
|
|
349
|
+
mod = require(nm.file);
|
|
350
|
+
} catch (_e) {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
const arr = mod && Array.isArray(mod[nm.exportKey]) ? mod[nm.exportKey] : [];
|
|
354
|
+
for (const c of arr) out.push(c);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
let toolFiles = [];
|
|
358
|
+
try {
|
|
359
|
+
toolFiles = fs.readdirSync(MCP_TOOLS_DIR).filter((f) => f.endsWith('.cjs')).sort();
|
|
360
|
+
} catch (_e) {
|
|
361
|
+
toolFiles = [];
|
|
362
|
+
}
|
|
363
|
+
for (const f of toolFiles) {
|
|
364
|
+
let mod;
|
|
365
|
+
try {
|
|
366
|
+
mod = require(path.join(MCP_TOOLS_DIR, f));
|
|
367
|
+
} catch (_e) {
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
const arr = mod && Array.isArray(mod.connectors) ? mod.connectors : [];
|
|
371
|
+
for (const c of arr) out.push(c);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
return out;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// ---------------------------------------------------------------------------
|
|
378
|
+
// listMcpToolClaimedSources() -- Phase 235-02 (CIRS-02). The CENSUS half of the
|
|
379
|
+
// MCP-tool blind-spot fix. listMcpToolConnectorDescriptors() above answers "what
|
|
380
|
+
// loaded?", which is exactly why it could not see the bug: a file that throws at
|
|
381
|
+
// require time, or that forgets its `connectors` export, simply contributes
|
|
382
|
+
// nothing and disappears without a trace. This function answers the other
|
|
383
|
+
// question, "what does the repo CLAIM should be there?", by enumerating files on
|
|
384
|
+
// disk and never requiring anything. The gap between the two censuses IS the
|
|
385
|
+
// dead seam.
|
|
386
|
+
//
|
|
387
|
+
// Returns [{ id, path, exportKey }] -- one entry per lib/mcp/tools/*.cjs file
|
|
388
|
+
// (sorted, deterministic), plus lib/mcp/tool-router.cjs (MCP_TOOL_CONNECTORS)
|
|
389
|
+
// and lib/mcp/contract-version.cjs (connectors) when they exist. Pure
|
|
390
|
+
// filesystem, zero Brain/network (Part 8).
|
|
391
|
+
// ---------------------------------------------------------------------------
|
|
392
|
+
function listMcpToolClaimedSources() {
|
|
393
|
+
const out = [];
|
|
394
|
+
|
|
395
|
+
let toolFiles = [];
|
|
396
|
+
try {
|
|
397
|
+
toolFiles = fs.readdirSync(MCP_TOOLS_DIR).filter((f) => f.endsWith('.cjs')).sort();
|
|
398
|
+
} catch (_e) {
|
|
399
|
+
toolFiles = [];
|
|
400
|
+
}
|
|
401
|
+
for (const f of toolFiles) {
|
|
402
|
+
out.push({
|
|
403
|
+
id: 'lib/mcp/tools/' + f,
|
|
404
|
+
path: path.join(MCP_TOOLS_DIR, f),
|
|
405
|
+
exportKey: 'connectors',
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (fs.existsSync(MCP_TOOL_ROUTER_PATH)) {
|
|
410
|
+
out.push({
|
|
411
|
+
id: 'lib/mcp/tool-router.cjs',
|
|
412
|
+
path: MCP_TOOL_ROUTER_PATH,
|
|
413
|
+
exportKey: 'MCP_TOOL_CONNECTORS',
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
if (fs.existsSync(MCP_CONTRACT_VERSION_PATH)) {
|
|
417
|
+
out.push({
|
|
418
|
+
id: 'lib/mcp/contract-version.cjs',
|
|
419
|
+
path: MCP_CONTRACT_VERSION_PATH,
|
|
420
|
+
exportKey: 'connectors',
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return out;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// ---------------------------------------------------------------------------
|
|
428
|
+
// listMcpToolFileHealth(claimedSources) -- the PROBE half. For each claimed
|
|
429
|
+
// source, require() it inside a try/catch and read the claimed export. Returns
|
|
430
|
+
// [{ id, live, loadError, connectorCount }] where `live` means the module loaded
|
|
431
|
+
// AND its claimed export is a NON-EMPTY array. Unlike
|
|
432
|
+
// listMcpToolConnectorDescriptors()'s `catch { continue }`, nothing is swallowed
|
|
433
|
+
// here: a load failure becomes a reported loadError, and an empty/missing export
|
|
434
|
+
// becomes live:false with connectorCount 0.
|
|
435
|
+
//
|
|
436
|
+
// claimedSources is OPTIONAL and defaults to listMcpToolClaimedSources(), so a
|
|
437
|
+
// test can pass a synthetic array pointing at temp files and probe the real
|
|
438
|
+
// logic without touching the real lib/mcp/tools/ tree.
|
|
439
|
+
// ---------------------------------------------------------------------------
|
|
440
|
+
function listMcpToolFileHealth(claimedSources) {
|
|
441
|
+
const sources = Array.isArray(claimedSources) ? claimedSources : listMcpToolClaimedSources();
|
|
442
|
+
const out = [];
|
|
443
|
+
for (const src of sources) {
|
|
444
|
+
const id = src && typeof src.id === 'string' ? src.id : String(src && src.path);
|
|
445
|
+
const exportKey =
|
|
446
|
+
src && typeof src.exportKey === 'string' && src.exportKey ? src.exportKey : 'connectors';
|
|
447
|
+
let mod = null;
|
|
448
|
+
let loadError = null;
|
|
449
|
+
try {
|
|
450
|
+
mod = require(src.path);
|
|
451
|
+
} catch (e) {
|
|
452
|
+
loadError = e && e.message ? String(e.message) : String(e);
|
|
453
|
+
}
|
|
454
|
+
const arr = !loadError && mod && Array.isArray(mod[exportKey]) ? mod[exportKey] : null;
|
|
455
|
+
out.push({
|
|
456
|
+
id,
|
|
457
|
+
exportKey,
|
|
458
|
+
live: !loadError && Array.isArray(arr) && arr.length > 0,
|
|
459
|
+
loadError,
|
|
460
|
+
connectorCount: arr ? arr.length : 0,
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
return out;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// normalizeMcpToolEntry(raw) -- maps a raw MCP-tool connector descriptor into
|
|
467
|
+
// the SAME entry shape buildRegistry() emits for commands/skills/agents (a
|
|
468
|
+
// superset: it carries reach_id/posture/framework as null -- the MCP-tool
|
|
469
|
+
// governance dial is hitl_shape/hitl_why, not reach/posture -- plus the two
|
|
470
|
+
// additive keys). source:'mcp_tool' is the discriminator validateConnectors()
|
|
471
|
+
// uses to skip the frozen-6/frozen-3 reach/posture checks for these entries
|
|
472
|
+
// (they are validated separately, advisory, by scripts/check-shape-
|
|
473
|
+
// declaration.cjs's MCP-tool enumeration).
|
|
474
|
+
function normalizeMcpToolEntry(raw) {
|
|
475
|
+
const r = raw && typeof raw === 'object' ? raw : {};
|
|
476
|
+
const tool = typeof r.tool === 'string' && r.tool
|
|
477
|
+
? r.tool
|
|
478
|
+
: (typeof r.surface === 'string' && r.surface ? r.surface : 'unknown');
|
|
479
|
+
return {
|
|
480
|
+
surface: 'mcp:' + tool,
|
|
481
|
+
source: 'mcp_tool',
|
|
482
|
+
connects_to_spine: true,
|
|
483
|
+
sensor_triggers: [],
|
|
484
|
+
reach_id: null,
|
|
485
|
+
sub_mode: null,
|
|
486
|
+
framework: null,
|
|
487
|
+
posture: null,
|
|
488
|
+
hierarchy_rank: null,
|
|
489
|
+
filing: null,
|
|
490
|
+
plan_gated: false,
|
|
491
|
+
web_scope: null,
|
|
492
|
+
decision_surface: null,
|
|
493
|
+
hitl_shape: typeof r.hitl_shape === 'string' ? r.hitl_shape : null,
|
|
494
|
+
hitl_why: typeof r.hitl_why === 'string' ? r.hitl_why : null,
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// buildMcpToolRegistry() -- the MCP-tool projection (data/mcp-tool-
|
|
499
|
+
// connectors.json). Discovers + normalizes + sorts by surface for byte-stable
|
|
500
|
+
// --check comparisons, mirroring serializeRegistry's determinism discipline.
|
|
501
|
+
function buildMcpToolRegistry() {
|
|
502
|
+
const raw = listMcpToolConnectorDescriptors();
|
|
503
|
+
const connectors = raw
|
|
504
|
+
.map(normalizeMcpToolEntry)
|
|
505
|
+
.sort((a, b) => a.surface.localeCompare(b.surface));
|
|
506
|
+
return { generated_note: MCP_GENERATED_NOTE, connectors };
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// serializeMcpToolRegistry(reg) -- same JSON.stringify(...,2)+trailing-newline
|
|
510
|
+
// discipline as serializeRegistry(), so the --check byte-compare is
|
|
511
|
+
// deterministic.
|
|
512
|
+
function serializeMcpToolRegistry(reg) {
|
|
513
|
+
const clean = {
|
|
514
|
+
generated_note: reg.generated_note,
|
|
515
|
+
connectors: reg.connectors,
|
|
516
|
+
};
|
|
517
|
+
return JSON.stringify(clean, null, 2) + '\n';
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
// ---------------------------------------------------------------------------
|
|
521
|
+
// buildRegistry() -- walk commands + skills (sorted), parse the nested
|
|
522
|
+
// connector map, filter to surfaces where connector.connects_to_spine === true,
|
|
523
|
+
// build the connectors[] array, the sensor_index, the framework_index, and
|
|
524
|
+
// collect _unresolved for any framework not in the allowlist. Returns the
|
|
525
|
+
// registry object PLUS the non-serialized `_unresolved` field (callers strip it
|
|
526
|
+
// before writing).
|
|
527
|
+
// ---------------------------------------------------------------------------
|
|
528
|
+
function buildRegistry() {
|
|
529
|
+
const fwNames = loadFrameworkNames();
|
|
530
|
+
const sources = listSourceFiles();
|
|
531
|
+
const connectors = [];
|
|
532
|
+
const sensorIndex = {};
|
|
533
|
+
const frameworkIndex = {};
|
|
534
|
+
const unresolved = [];
|
|
535
|
+
|
|
536
|
+
for (const src of sources) {
|
|
537
|
+
let fm;
|
|
538
|
+
try {
|
|
539
|
+
fm = parseConnectorFrontmatter(fs.readFileSync(src.file, 'utf8'));
|
|
540
|
+
} catch (_e) {
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
const conn = fm.connector;
|
|
544
|
+
if (!conn || typeof conn !== 'object' || Array.isArray(conn)) continue;
|
|
545
|
+
// R1 (Canon Part 11) EXCLUDE branch: a connector that declares
|
|
546
|
+
// `excluded: true` is a first-class EXCLUDED surface, NOT wired. It does NOT
|
|
547
|
+
// push a wired connector entry and is NOT subject to the wired validations.
|
|
548
|
+
// `reason` is REQUIRED (D-172-a "no surface dark by accident") -- a missing
|
|
549
|
+
// reason is a build error surfaced via _excludeErrors so the default run and
|
|
550
|
+
// --check both fail closed. The exclude path opens NO Brain wire (Part 8).
|
|
551
|
+
if (conn.excluded === true) continue;
|
|
552
|
+
// Filter: only surfaces that opt in are wired. Absent/false = legacy.
|
|
553
|
+
if (conn.connects_to_spine !== true) continue;
|
|
554
|
+
|
|
555
|
+
// Three-way surface-id branch: command -> "/mos:" + base, skill -> "skill:"
|
|
556
|
+
// + base, agent -> "agent:" + base. The agent prefix mirrors the command and
|
|
557
|
+
// skill prefixes; an agent that declares a connect-to-spine connector: block
|
|
558
|
+
// joins the registry the same way a command does.
|
|
559
|
+
const surfaceName =
|
|
560
|
+
src.kind === 'command'
|
|
561
|
+
? '/mos:' + src.base
|
|
562
|
+
: src.kind === 'skill'
|
|
563
|
+
? 'skill:' + src.base
|
|
564
|
+
: 'agent:' + src.base;
|
|
565
|
+
|
|
566
|
+
const sensorTriggers = Array.isArray(conn.sensor_triggers)
|
|
567
|
+
? conn.sensor_triggers.slice()
|
|
568
|
+
: [];
|
|
569
|
+
const framework =
|
|
570
|
+
typeof conn.framework === 'string' && conn.framework ? conn.framework : null;
|
|
571
|
+
|
|
572
|
+
const entry = {
|
|
573
|
+
surface: surfaceName,
|
|
574
|
+
source: src.kind,
|
|
575
|
+
connects_to_spine: true,
|
|
576
|
+
sensor_triggers: sensorTriggers,
|
|
577
|
+
reach_id: typeof conn.reach_id === 'string' ? conn.reach_id : null,
|
|
578
|
+
sub_mode: typeof conn.sub_mode === 'string' ? conn.sub_mode : null,
|
|
579
|
+
framework,
|
|
580
|
+
posture: typeof conn.posture === 'string' ? conn.posture : null,
|
|
581
|
+
hierarchy_rank:
|
|
582
|
+
typeof conn.hierarchy_rank === 'number' ? conn.hierarchy_rank : null,
|
|
583
|
+
filing: typeof conn.filing === 'string' ? conn.filing : null,
|
|
584
|
+
plan_gated: conn.plan_gated === true,
|
|
585
|
+
web_scope:
|
|
586
|
+
typeof conn.web_scope === 'string' && conn.web_scope ? conn.web_scope : null,
|
|
587
|
+
decision_surface: typeof conn.surface === 'string' ? conn.surface : null,
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
// WFL-01 build-time guard (mirror build-command-registry.cjs line 222):
|
|
591
|
+
// a framework not in the allowlist is unresolvable.
|
|
592
|
+
if (framework && !fwNames.has(framework)) {
|
|
593
|
+
unresolved.push({ surface: surfaceName, framework });
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
// sensor_index: each sensor_id -> push this connector's surface.
|
|
597
|
+
for (const sid of sensorTriggers) {
|
|
598
|
+
if (!Array.isArray(sensorIndex[sid])) sensorIndex[sid] = [];
|
|
599
|
+
sensorIndex[sid].push(surfaceName);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// framework_index: framework -> [surface] (the Phase 122 inverse-index idiom).
|
|
603
|
+
if (framework) {
|
|
604
|
+
if (!Array.isArray(frameworkIndex[framework])) frameworkIndex[framework] = [];
|
|
605
|
+
frameworkIndex[framework].push(surfaceName);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
connectors.push(entry);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// Phase 198-04 (SPEC-2, Task 1): fold the MCP-tool connector projection into
|
|
612
|
+
// the SAME generated connector-registry.json, source-tagged 'mcp_tool' so
|
|
613
|
+
// validateConnectors() below can distinguish the HITL-shape dial (MCP tools)
|
|
614
|
+
// from the reach/posture dial (commands/skills/agents). The mcpToolRegistry
|
|
615
|
+
// returned alongside is the dedicated MCP-tool projection
|
|
616
|
+
// (data/mcp-tool-connectors.json), generated from the SAME discovery pass so
|
|
617
|
+
// the two files can never drift from each other.
|
|
618
|
+
const mcpToolRegistry = buildMcpToolRegistry();
|
|
619
|
+
for (const c of mcpToolRegistry.connectors) connectors.push(c);
|
|
620
|
+
|
|
621
|
+
return {
|
|
622
|
+
ontology_ref: 'data/framework-names.json',
|
|
623
|
+
generated_note: GENERATED_NOTE,
|
|
624
|
+
connectors,
|
|
625
|
+
sensor_index: sensorIndex,
|
|
626
|
+
framework_index: frameworkIndex,
|
|
627
|
+
_unresolved: unresolved,
|
|
628
|
+
_mcpToolRegistry: mcpToolRegistry,
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// Serialize the registry exactly the way the on-disk file is written, so the
|
|
633
|
+
// --check byte-compare is deterministic. Strips the non-serialized
|
|
634
|
+
// `_unresolved` field. (Copied from build-command-registry.cjs lines 256-265 in
|
|
635
|
+
// spirit so the layout + trailing newline are stable.)
|
|
636
|
+
function serializeRegistry(reg) {
|
|
637
|
+
const clean = {
|
|
638
|
+
ontology_ref: reg.ontology_ref,
|
|
639
|
+
generated_note: reg.generated_note,
|
|
640
|
+
connectors: reg.connectors,
|
|
641
|
+
sensor_index: reg.sensor_index,
|
|
642
|
+
framework_index: reg.framework_index,
|
|
643
|
+
};
|
|
644
|
+
return JSON.stringify(clean, null, 2) + '\n';
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// ---------------------------------------------------------------------------
|
|
648
|
+
// ---------------------------------------------------------------------------
|
|
649
|
+
// The four governed surface CLASSES (Canon Part 11 R1 four-class amendment,
|
|
650
|
+
// navigator-LOCKED 2026-06-23; externally grounded in the ArbiterOS
|
|
651
|
+
// governance-ISA paradigm, research/172-GOVERNOR-RESEARCH.md). Every governed
|
|
652
|
+
// surface carries EXACTLY ONE class. The four classes are the invocation
|
|
653
|
+
// governance ISA; the gate is class-aware. A fifth label, `utility-excluded`,
|
|
654
|
+
// is NOT one of the four governance classes -- it is the class slot for an
|
|
655
|
+
// EXCLUDED utility surface (the first-class conformant terminal state, R1), kept
|
|
656
|
+
// distinct so an excluded utility is never mis-counted as a governed class.
|
|
657
|
+
// This MINTS no new edge/node/reach and opens no Brain wire -- it NAMES existing
|
|
658
|
+
// surface types. The wired/excluded/gap COUNTS are UNCHANGED by the class field.
|
|
659
|
+
// mechanical -- a non-framework command/operation (plumbing that triggers a
|
|
660
|
+
// reach but is not itself a pws methodology).
|
|
661
|
+
// framework -- a pws methodology (declares frameworks: or a resolvable
|
|
662
|
+
// connector.framework).
|
|
663
|
+
// intelligence -- an engine/sensor/analysis surface (rs-* / find-* / score-* /
|
|
664
|
+
// whitespace / diagnostics / radar / the intelligence
|
|
665
|
+
// orchestrator / analysis agents).
|
|
666
|
+
// pipeline -- a chain/workflow surface (act / discover / ingest / a
|
|
667
|
+
// multi-step orchestrated flow).
|
|
668
|
+
// ---------------------------------------------------------------------------
|
|
669
|
+
const FOUR_CLASSES = Object.freeze(['mechanical', 'framework', 'intelligence', 'pipeline']);
|
|
670
|
+
const CLASS_UTILITY_EXCLUDED = 'utility-excluded';
|
|
671
|
+
|
|
672
|
+
// Phase 235-02 (CIRS-02). The MCP-tool-FILE class: an ADDITIVE fifth member of
|
|
673
|
+
// the class enum, deliberately NOT one of the four governance classes. An MCP
|
|
674
|
+
// tool file is a module-liveness surface (does it load and export usable
|
|
675
|
+
// connectors?), not a pws methodology / plumbing / engine / pipeline surface, so
|
|
676
|
+
// it sits alongside CLASS_UTILITY_EXCLUDED rather than inside FOUR_CLASSES.
|
|
677
|
+
// tests/test-cirs-four-class-floor.cjs deliberately never asserts a class COUNT
|
|
678
|
+
// (see its header) precisely so an additive member like this one cannot
|
|
679
|
+
// false-fail the floor.
|
|
680
|
+
const CLASS_MCP_TOOL = 'mcp_tool';
|
|
681
|
+
const SURFACE_CLASS_ENUM = Object.freeze(
|
|
682
|
+
FOUR_CLASSES.concat([CLASS_UTILITY_EXCLUDED, CLASS_MCP_TOOL])
|
|
683
|
+
);
|
|
684
|
+
|
|
685
|
+
// The intelligence-surface name prefixes/markers (engine/sensor/analysis). A
|
|
686
|
+
// surface whose base matches one of these is an intelligence class. Generic
|
|
687
|
+
// machinery handles only (Part 8).
|
|
688
|
+
const INTELLIGENCE_MARKERS = Object.freeze([
|
|
689
|
+
'rs-', 'find-', 'score-', 'whitespace', 'diagnostics', 'radar',
|
|
690
|
+
'breakthrough', 'reverse-salient', 'analyze-', 'detect-',
|
|
691
|
+
'intelligence-orchestrator', 'lens', 'sensor',
|
|
692
|
+
]);
|
|
693
|
+
|
|
694
|
+
// The pipeline-surface name markers (chain/workflow). A multi-step orchestrated
|
|
695
|
+
// flow.
|
|
696
|
+
const PIPELINE_MARKERS = Object.freeze([
|
|
697
|
+
'act', 'discover', 'ingest', 'pipeline', 'chain', 'workflow', 'run-chain', 'runchain',
|
|
698
|
+
]);
|
|
699
|
+
|
|
700
|
+
// ---------------------------------------------------------------------------
|
|
701
|
+
// classifySurfaceClass(src, fm, state) -- derive the one governed class for a
|
|
702
|
+
// surface (Canon Part 11 R1 four-class amendment). EXCLUDED surfaces take the
|
|
703
|
+
// `utility-excluded` slot. Otherwise: a surface that declares a frameworks:
|
|
704
|
+
// block or a resolvable connector.framework is `framework`; an intelligence
|
|
705
|
+
// marker base is `intelligence`; a pipeline marker base is `pipeline`;
|
|
706
|
+
// everything else is `mechanical`. Deterministic + pure (reads only the passed
|
|
707
|
+
// frontmatter + base name). The order is framework -> pipeline -> intelligence
|
|
708
|
+
// -> mechanical so an act-like pipeline that also declares a framework is named
|
|
709
|
+
// by its strongest signal (framework methodology wins). Zero Brain/network.
|
|
710
|
+
// ---------------------------------------------------------------------------
|
|
711
|
+
function classifySurfaceClass(src, fm, state) {
|
|
712
|
+
if (state === 'excluded') return CLASS_UTILITY_EXCLUDED;
|
|
713
|
+
const base = (src && typeof src.base === 'string') ? src.base.toLowerCase() : '';
|
|
714
|
+
const conn = fm && fm.connector && typeof fm.connector === 'object' && !Array.isArray(fm.connector)
|
|
715
|
+
? fm.connector
|
|
716
|
+
: null;
|
|
717
|
+
const hasFrameworksBlock = Array.isArray(fm && fm.frameworks) && fm.frameworks.length > 0;
|
|
718
|
+
const hasConnFramework =
|
|
719
|
+
conn && typeof conn.framework === 'string' && conn.framework.trim().length > 0;
|
|
720
|
+
if (hasFrameworksBlock || hasConnFramework) return 'framework';
|
|
721
|
+
if (PIPELINE_MARKERS.indexOf(base) !== -1) return 'pipeline';
|
|
722
|
+
if (INTELLIGENCE_MARKERS.some(function (m) { return base.indexOf(m) === 0 || base === m; })) {
|
|
723
|
+
return 'intelligence';
|
|
724
|
+
}
|
|
725
|
+
return 'mechanical';
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// classifySurface(src) -- the pure per-surface classifier shared by
|
|
729
|
+
// coverageReport(). Reads ONE source file's connector frontmatter and returns
|
|
730
|
+
// the R1 (Canon Part 11) terminal state:
|
|
731
|
+
// - 'wired' : connector.connects_to_spine === true
|
|
732
|
+
// - 'excluded' : connector.excluded === true (a reason is REQUIRED; a missing
|
|
733
|
+
// reason is a build error reported via the `error` field)
|
|
734
|
+
// - 'gap' : neither (the surface is dark)
|
|
735
|
+
// `excluded` takes precedence over a stray connects_to_spine on the same block:
|
|
736
|
+
// an EXCLUDED surface is never counted as a gap. Returns
|
|
737
|
+
// { surface, source, state, reason?, error? }. Zero Brain, zero network.
|
|
738
|
+
// ---------------------------------------------------------------------------
|
|
739
|
+
function classifySurface(src) {
|
|
740
|
+
const surfaceName =
|
|
741
|
+
src.kind === 'command'
|
|
742
|
+
? '/mos:' + src.base
|
|
743
|
+
: src.kind === 'skill'
|
|
744
|
+
? 'skill:' + src.base
|
|
745
|
+
: 'agent:' + src.base;
|
|
746
|
+
|
|
747
|
+
let fm;
|
|
748
|
+
try {
|
|
749
|
+
fm = parseConnectorFrontmatter(fs.readFileSync(src.file, 'utf8'));
|
|
750
|
+
} catch (_e) {
|
|
751
|
+
fm = {};
|
|
752
|
+
}
|
|
753
|
+
const conn = fm.connector;
|
|
754
|
+
const hasConn = conn && typeof conn === 'object' && !Array.isArray(conn);
|
|
755
|
+
|
|
756
|
+
if (hasConn && conn.excluded === true) {
|
|
757
|
+
const reason =
|
|
758
|
+
typeof conn.reason === 'string' && conn.reason.trim() ? conn.reason.trim() : null;
|
|
759
|
+
const out = {
|
|
760
|
+
surface: surfaceName,
|
|
761
|
+
source: src.kind,
|
|
762
|
+
state: 'excluded',
|
|
763
|
+
reason,
|
|
764
|
+
class: classifySurfaceClass(src, fm, 'excluded'),
|
|
765
|
+
};
|
|
766
|
+
if (!reason) {
|
|
767
|
+
out.error =
|
|
768
|
+
'connector ' + surfaceName +
|
|
769
|
+
' declares excluded:true but no reason (D-172-a: no surface dark by accident)';
|
|
770
|
+
}
|
|
771
|
+
return out;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (hasConn && conn.connects_to_spine === true) {
|
|
775
|
+
return {
|
|
776
|
+
surface: surfaceName,
|
|
777
|
+
source: src.kind,
|
|
778
|
+
state: 'wired',
|
|
779
|
+
class: classifySurfaceClass(src, fm, 'wired'),
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
return {
|
|
784
|
+
surface: surfaceName,
|
|
785
|
+
source: src.kind,
|
|
786
|
+
state: 'gap',
|
|
787
|
+
class: classifySurfaceClass(src, fm, 'gap'),
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// ---------------------------------------------------------------------------
|
|
792
|
+
// coverageReport() -- the wired-XOR-excluded coverage classifier (Canon Part 11
|
|
793
|
+
// R1/R9). Walks EVERY surface listSourceFiles() walks and classifies each as
|
|
794
|
+
// wired / excluded / gap, so the command+skill+agent slice of surfaces.length
|
|
795
|
+
// === the total command+skill+agent file count. Phase 235-02 adds a SECOND
|
|
796
|
+
// slice: one surface per claimed MCP tool file (source:'mcp_tool'), so
|
|
797
|
+
// surfaces.length === listSourceFiles().length + listMcpToolClaimedSources()
|
|
798
|
+
// .length. counts.wired + counts.excluded + counts.gap === surfaces.length
|
|
799
|
+
// either way (the XOR invariant: every surface lands in exactly one bucket).
|
|
800
|
+
// Returns
|
|
801
|
+
// { surfaces: [{surface, source, state}], counts: {wired, excluded, gap},
|
|
802
|
+
// errors: [...] } where errors carries any excluded-without-reason build
|
|
803
|
+
// error. Pure: reads only the source frontmatter, makes ZERO Brain/network
|
|
804
|
+
// calls, opens NO Brain wire (Part 8). This is the R9 gate's source of truth.
|
|
805
|
+
// ---------------------------------------------------------------------------
|
|
806
|
+
function coverageReport() {
|
|
807
|
+
const surfaces = [];
|
|
808
|
+
const counts = { wired: 0, excluded: 0, gap: 0 };
|
|
809
|
+
const errors = [];
|
|
810
|
+
for (const src of listSourceFiles()) {
|
|
811
|
+
const c = classifySurface(src);
|
|
812
|
+
surfaces.push({ surface: c.surface, source: c.source, state: c.state, class: c.class });
|
|
813
|
+
counts[c.state] += 1;
|
|
814
|
+
if (c.error) errors.push(c.error);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
// Phase 235-02 (CIRS-02): the MCP-tool-file walk. Before this, MCP tools sat
|
|
818
|
+
// entirely outside the wired-XOR-excluded invariant -- coverageReport() walked
|
|
819
|
+
// only listSourceFiles(), and the separate listMcpToolConnectorDescriptors()
|
|
820
|
+
// path silently swallowed both a require() failure and a missing/empty
|
|
821
|
+
// `connectors` export. A tool file could be born dark and the gate stayed
|
|
822
|
+
// green. Every claimed source is now a surface here, so main()'s existing
|
|
823
|
+
// generic `state === 'gap'` hard-fail catches a dead one with no change to
|
|
824
|
+
// main() itself. The dead/live decision is delegated to the SHARED
|
|
825
|
+
// seam-liveness helper, never reimplemented inline: this call is load-bearing
|
|
826
|
+
// and tests/test-235-seam-liveness-mcp-coverage.cjs proves it.
|
|
827
|
+
const mcpHealth = listMcpToolFileHealth();
|
|
828
|
+
const mcpLiveness = seamLiveness.checkClaimedModuleLiveness(
|
|
829
|
+
mcpHealth.map((h) => ({
|
|
830
|
+
id: h.id,
|
|
831
|
+
live: h.live,
|
|
832
|
+
reason: h.loadError || 'exports.' + h.exportKey + ' is missing or empty',
|
|
833
|
+
}))
|
|
834
|
+
);
|
|
835
|
+
const mcpDead = new Set(mcpLiveness.dead);
|
|
836
|
+
for (const h of mcpHealth) {
|
|
837
|
+
const state = mcpDead.has(h.id) ? 'gap' : 'wired';
|
|
838
|
+
surfaces.push({
|
|
839
|
+
surface: 'mcp_tool_file:' + h.id,
|
|
840
|
+
source: 'mcp_tool',
|
|
841
|
+
state,
|
|
842
|
+
class: CLASS_MCP_TOOL,
|
|
843
|
+
});
|
|
844
|
+
counts[state] += 1;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
surfaces.sort((a, b) => a.surface.localeCompare(b.surface));
|
|
848
|
+
return { surfaces, counts, errors };
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// ---------------------------------------------------------------------------
|
|
852
|
+
// serializeLedger(report) -- emit data/connector-coverage-ledger.json from a
|
|
853
|
+
// coverageReport() result. Top-level keys are EXACTLY generated_note, counts,
|
|
854
|
+
// surfaces (surfaces sorted by surface name for determinism). Mirrors
|
|
855
|
+
// serializeRegistry's JSON.stringify(...,2) + trailing-newline + byte-compare
|
|
856
|
+
// discipline so the --check STALE byte-compare is deterministic. The non-
|
|
857
|
+
// serialized `errors` field never lands on disk.
|
|
858
|
+
// ---------------------------------------------------------------------------
|
|
859
|
+
function serializeLedger(report) {
|
|
860
|
+
const surfaces = Array.isArray(report && report.surfaces)
|
|
861
|
+
? report.surfaces
|
|
862
|
+
.slice()
|
|
863
|
+
.map((s) => ({ surface: s.surface, source: s.source, state: s.state, class: s.class }))
|
|
864
|
+
.sort((a, b) => a.surface.localeCompare(b.surface))
|
|
865
|
+
: [];
|
|
866
|
+
const counts =
|
|
867
|
+
report && report.counts
|
|
868
|
+
? { wired: report.counts.wired, excluded: report.counts.excluded, gap: report.counts.gap }
|
|
869
|
+
: { wired: 0, excluded: 0, gap: 0 };
|
|
870
|
+
const clean = {
|
|
871
|
+
generated_note: LEDGER_GENERATED_NOTE,
|
|
872
|
+
counts,
|
|
873
|
+
surfaces,
|
|
874
|
+
};
|
|
875
|
+
return JSON.stringify(clean, null, 2) + '\n';
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
// ---------------------------------------------------------------------------
|
|
879
|
+
// validateConnectors(reg) -- the four CONN-03 validations. Returns an array of
|
|
880
|
+
// error strings (empty = clean). Pure: reads only the built registry + the two
|
|
881
|
+
// frozen banks + the resolver (zero Brain, zero network). Exported so
|
|
882
|
+
// tests/test-connector-tripwire.cjs can exercise each bad case directly without
|
|
883
|
+
// spawning a subprocess.
|
|
884
|
+
//
|
|
885
|
+
// The four validations (mirroring the missingTeaching error in
|
|
886
|
+
// build-command-registry.cjs lines 367-382):
|
|
887
|
+
// (1) every reach_id is one of the frozen 6 (REACH_IDS)
|
|
888
|
+
// (2) every framework resolves via commandsForFramework() (WFL-01) -- checked
|
|
889
|
+
// for connectors that declare a filing or a decision surface (the ones
|
|
890
|
+
// that actually fire a command on APPROVE)
|
|
891
|
+
// (3) every posture is one of the frozen 3 (POSTURE_IDS)
|
|
892
|
+
// (4) no duplicate (sensor, reach, sub_mode) tuple collision
|
|
893
|
+
// ---------------------------------------------------------------------------
|
|
894
|
+
function validateConnectors(reg) {
|
|
895
|
+
const errs = [];
|
|
896
|
+
const connectors = Array.isArray(reg && reg.connectors) ? reg.connectors : [];
|
|
897
|
+
const seenTuples = new Set();
|
|
898
|
+
|
|
899
|
+
for (const c of connectors) {
|
|
900
|
+
const surface = (c && c.surface) || (c && c.command) || '<unknown>';
|
|
901
|
+
|
|
902
|
+
// Phase 198-04 (SPEC-2, Task 1): an MCP-tool connector (source:'mcp_tool')
|
|
903
|
+
// is governed by the hitl_shape/hitl_why dial, not reach_id/posture -- it
|
|
904
|
+
// legitimately carries reach_id:null/posture:null (normalizeMcpToolEntry
|
|
905
|
+
// above). The frozen-6/frozen-3 checks below are scoped to the
|
|
906
|
+
// reach/posture dial (commands/skills/agents); an MCP tool's hitl_shape is
|
|
907
|
+
// validated separately, advisory, by scripts/check-shape-declaration.cjs's
|
|
908
|
+
// MCP-tool enumeration -- never here, and never a hard --check failure.
|
|
909
|
+
const isMcpTool = c && c.source === 'mcp_tool';
|
|
910
|
+
|
|
911
|
+
// (1) frozen-6 reach.
|
|
912
|
+
if (!isMcpTool && REACH_IDS.indexOf(c && c.reach_id) === -1) {
|
|
913
|
+
errs.push(
|
|
914
|
+
'connector ' + surface + ' reach_id ' + (c && c.reach_id) +
|
|
915
|
+
' not in frozen 6'
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// (3) frozen-3 posture.
|
|
920
|
+
if (!isMcpTool && POSTURE_IDS.indexOf(c && c.posture) === -1) {
|
|
921
|
+
errs.push(
|
|
922
|
+
'connector ' + surface + ' posture ' + (c && c.posture) +
|
|
923
|
+
' not in frozen 3'
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// (2) WFL-01 resolver-resolution: a connector that declares a filing or a
|
|
928
|
+
// decision surface AND DECLARES A FRAMEWORK fires a command on APPROVE via
|
|
929
|
+
// framework resolution, so that framework MUST resolve through
|
|
930
|
+
// commandsForFramework(). A connector with framework:null declares no
|
|
931
|
+
// framework -- per CONNECTOR-CONTRACT.md section 4 (additive-degrade) it
|
|
932
|
+
// routes through the orchestrator with no framework and degrades to "run it
|
|
933
|
+
// manually" rather than fabricating a command. The minimal Part-8-safe
|
|
934
|
+
// memory-cortex reach (Phase 150, framework:null + filing:memory_event_only)
|
|
935
|
+
// is exactly this degrade case; gating the resolver check on a declared
|
|
936
|
+
// framework keeps the additive-degrade rule honest.
|
|
937
|
+
const declaresFramework = typeof c.framework === 'string' && c.framework;
|
|
938
|
+
const firesCommand =
|
|
939
|
+
((typeof c.filing === 'string' && c.filing && c.filing !== 'none') ||
|
|
940
|
+
(typeof c.decision_surface === 'string' && c.decision_surface)) &&
|
|
941
|
+
declaresFramework;
|
|
942
|
+
if (firesCommand) {
|
|
943
|
+
const resolved = commandsForFramework(c && c.framework);
|
|
944
|
+
if (!Array.isArray(resolved) || resolved.length === 0) {
|
|
945
|
+
errs.push(
|
|
946
|
+
'connector ' + surface + ' framework ' +
|
|
947
|
+
JSON.stringify(c && c.framework) +
|
|
948
|
+
' does not resolve via commandsForFramework (WFL-01)'
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
// (4) no duplicate (sensor, reach, sub_mode) tuple. score-innovation and
|
|
954
|
+
// whitespace share SENS-06 + context_block but differ in sub_mode (hsi vs
|
|
955
|
+
// whitespace) -- a legal distinct tuple. A genuine collision (same sensor +
|
|
956
|
+
// reach + sub_mode on two surfaces) fails.
|
|
957
|
+
const sensors = Array.isArray(c && c.sensor_triggers) ? c.sensor_triggers : [];
|
|
958
|
+
const reach = c && c.reach_id;
|
|
959
|
+
const subMode = c && c.sub_mode;
|
|
960
|
+
for (const sid of sensors) {
|
|
961
|
+
const tuple = sid + '|' + reach + '|' + subMode;
|
|
962
|
+
if (seenTuples.has(tuple)) {
|
|
963
|
+
errs.push(
|
|
964
|
+
'duplicate connector tuple (sensor,reach,sub_mode): ' + tuple +
|
|
965
|
+
' (surface ' + surface + ')'
|
|
966
|
+
);
|
|
967
|
+
} else {
|
|
968
|
+
seenTuples.add(tuple);
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
return errs;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
// ---------------------------------------------------------------------------
|
|
977
|
+
// methodologyCommandsMissingConnector() -- the WARN nudge source. A command
|
|
978
|
+
// whose frontmatter carries a `frameworks:` block (the methodology heuristic,
|
|
979
|
+
// mirroring build-command-registry.cjs's kind/frameworks signal) but NO
|
|
980
|
+
// `connector:` block has not opted into the spine. This is a STDERR WARNING
|
|
981
|
+
// (opt-in nudge), NEVER a hard fail -- mirroring the missingServesJtbd WARNING
|
|
982
|
+
// at build-command-registry.cjs lines 406-417.
|
|
983
|
+
// ---------------------------------------------------------------------------
|
|
984
|
+
function methodologyCommandsMissingConnector() {
|
|
985
|
+
const out = [];
|
|
986
|
+
let cmdFiles = [];
|
|
987
|
+
try {
|
|
988
|
+
cmdFiles = fs.readdirSync(COMMANDS_DIR).filter((f) => f.endsWith('.md')).sort();
|
|
989
|
+
} catch (_e) {
|
|
990
|
+
cmdFiles = [];
|
|
991
|
+
}
|
|
992
|
+
for (const f of cmdFiles) {
|
|
993
|
+
let fm;
|
|
994
|
+
try {
|
|
995
|
+
fm = parseConnectorFrontmatter(fs.readFileSync(path.join(COMMANDS_DIR, f), 'utf8'));
|
|
996
|
+
} catch (_e) {
|
|
997
|
+
continue;
|
|
998
|
+
}
|
|
999
|
+
const hasFrameworks =
|
|
1000
|
+
Array.isArray(fm.frameworks) && fm.frameworks.length > 0;
|
|
1001
|
+
const hasConnector =
|
|
1002
|
+
fm.connector && typeof fm.connector === 'object' && !Array.isArray(fm.connector);
|
|
1003
|
+
if (hasFrameworks && !hasConnector) {
|
|
1004
|
+
out.push('/mos:' + f.replace(/\.md$/, ''));
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
return out;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
// ---------------------------------------------------------------------------
|
|
1011
|
+
// --refresh-names: read-only brain.query for the FEEDS_INTO-linked name
|
|
1012
|
+
// slice -> rewrite data/framework-names.json. BUILD-TIME ONLY. The ONLY code
|
|
1013
|
+
// path in this file that touches the Brain, and it is read-only. brain-client
|
|
1014
|
+
// is required HERE -- inside this branch only. There is no top-level require of
|
|
1015
|
+
// brain-client; the generator and --check never load it.
|
|
1016
|
+
// ---------------------------------------------------------------------------
|
|
1017
|
+
async function refreshNames() {
|
|
1018
|
+
let brain;
|
|
1019
|
+
try {
|
|
1020
|
+
brain = require(path.join(REPO_ROOT, 'lib', 'core', 'brain-client.cjs'));
|
|
1021
|
+
} catch (_e) {
|
|
1022
|
+
console.error('Brain client unavailable -- keeping the committed snapshot');
|
|
1023
|
+
process.exit(0);
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
if (!brain.isAvailable || !brain.isAvailable()) {
|
|
1027
|
+
console.log('Brain unavailable -- keeping the committed snapshot');
|
|
1028
|
+
process.exit(0);
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
let result;
|
|
1033
|
+
try {
|
|
1034
|
+
result = await brain.query(FW_NAMES_CYPHER);
|
|
1035
|
+
} catch (_e) {
|
|
1036
|
+
console.log('Brain query failed -- keeping the committed snapshot');
|
|
1037
|
+
process.exit(0);
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
if (!result || !Array.isArray(result.records)) {
|
|
1041
|
+
console.log('Brain returned no usable records -- keeping the committed snapshot');
|
|
1042
|
+
process.exit(0);
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
const names = [];
|
|
1047
|
+
for (const rec of result.records) {
|
|
1048
|
+
const v = rec && (rec.name !== undefined ? rec.name : rec['f.name']);
|
|
1049
|
+
if (typeof v === 'string' && v.trim()) names.push(v.trim());
|
|
1050
|
+
}
|
|
1051
|
+
const deduped = Array.from(new Set(names)).sort((a, b) => a.localeCompare(b));
|
|
1052
|
+
if (deduped.length === 0) {
|
|
1053
|
+
console.log('Brain returned an empty name list -- keeping the committed snapshot');
|
|
1054
|
+
process.exit(0);
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
const curatedExtras = loadCuratedExtras().slice().sort((a, b) => a.localeCompare(b));
|
|
1059
|
+
const snapshot = {
|
|
1060
|
+
snapshot_note:
|
|
1061
|
+
'FEEDS_INTO-linked :Framework names from the Brain (read-only build-time query). Refresh with: node scripts/build-command-registry.cjs --refresh-names',
|
|
1062
|
+
snapshot_date: new Date().toISOString().slice(0, 10),
|
|
1063
|
+
framework_names: deduped,
|
|
1064
|
+
curated_extras_note:
|
|
1065
|
+
'Legitimate :Framework node names that exist in the Brain but are not yet FEEDS_INTO-linked. Hand-curated. NOT junk nodes. The allowlist the registry validates against is framework_names UNION curated_extras.',
|
|
1066
|
+
curated_extras: curatedExtras,
|
|
1067
|
+
};
|
|
1068
|
+
fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
1069
|
+
fs.writeFileSync(FW_NAMES_PATH, JSON.stringify(snapshot, null, 2) + '\n');
|
|
1070
|
+
console.log('Wrote data/framework-names.json (' + deduped.length + ' FEEDS_INTO-linked names)');
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
// ---------------------------------------------------------------------------
|
|
1074
|
+
// Phase 245-01 (D-22 as CORRECTED by 245-RESEARCH.md F-3): the SENSOR-SIDE
|
|
1075
|
+
// SENS_PRIORITY completeness gate.
|
|
1076
|
+
//
|
|
1077
|
+
// WHAT IT PROVES: every sensor registered in lib/core/insight-sensors.cjs's
|
|
1078
|
+
// SENSOR_REGISTRY has a rank in the SENS_PRIORITY doctrine table, and the table
|
|
1079
|
+
// carries no phantom entry for a sensor that does not exist. A sensor with no
|
|
1080
|
+
// priority entry would silently degrade a same-reach collision back to
|
|
1081
|
+
// SENSOR_REGISTRY file order, which is exactly the accident Requirement 4
|
|
1082
|
+
// exists to abolish. So this fails the build CLOSED.
|
|
1083
|
+
//
|
|
1084
|
+
// WHY THIS DOES NOT READ `sensor_index`, AND MUST NOT BE "FIXED" TO DO SO.
|
|
1085
|
+
// The obvious-looking move is to gate on the `sensor_index` this same script
|
|
1086
|
+
// already builds a few hundred lines above. That is wrong, and it was measured
|
|
1087
|
+
// wrong, not guessed wrong (245-RESEARCH.md F-3, key set enumerated live):
|
|
1088
|
+
// `sensor_index` is derived from COMMAND FRONTMATTER (`sensor_triggers` on
|
|
1089
|
+
// commands/*.md), not from SENSOR_REGISTRY. It is a record of which commands
|
|
1090
|
+
// CLAIM a sensor, not of which sensors EXIST. It currently has 13 keys, it
|
|
1091
|
+
// already omits SENS-10, SENS-11, SENS-12 and SENS-16 (three of which are
|
|
1092
|
+
// among the 12 sensors that can fire `context_block`, i.e. exactly the
|
|
1093
|
+
// colliders Requirement 4 is about), and it contains ids with no registered
|
|
1094
|
+
// implementation behind them. A completeness gate built on it would report
|
|
1095
|
+
// green while silently exempting the sensors in scope. The two sides are
|
|
1096
|
+
// allowed to differ; only the SENSOR side answers "does every sensor have a
|
|
1097
|
+
// rank". Leave this reading SENSOR_REGISTRY_IDS.
|
|
1098
|
+
//
|
|
1099
|
+
// This gate adds NO key to data/connector-registry.json and does not touch the
|
|
1100
|
+
// sensor_index build: the generated registry must stay byte-identical.
|
|
1101
|
+
//
|
|
1102
|
+
// Canon Part 8: both requires are pure LOCAL modules, zero Brain/network.
|
|
1103
|
+
// ---------------------------------------------------------------------------
|
|
1104
|
+
function sensorPriorityCompletenessErrors() {
|
|
1105
|
+
const errs = [];
|
|
1106
|
+
let SENSOR_REGISTRY;
|
|
1107
|
+
let SENSOR_REGISTRY_IDS;
|
|
1108
|
+
let SENS_PRIORITY;
|
|
1109
|
+
try {
|
|
1110
|
+
const sensors = require(path.join(REPO_ROOT, 'lib', 'core', 'insight-sensors.cjs'));
|
|
1111
|
+
const priority = require(path.join(REPO_ROOT, 'lib', 'core', 'sensors', 'sensor-priority.cjs'));
|
|
1112
|
+
SENSOR_REGISTRY = sensors.SENSOR_REGISTRY;
|
|
1113
|
+
SENSOR_REGISTRY_IDS = sensors.SENSOR_REGISTRY_IDS;
|
|
1114
|
+
SENS_PRIORITY = priority.SENS_PRIORITY;
|
|
1115
|
+
} catch (e) {
|
|
1116
|
+
errs.push(
|
|
1117
|
+
'SENSOR PRIORITY GATE: could not load the sensor modules: ' +
|
|
1118
|
+
(e && e.message ? e.message : String(e))
|
|
1119
|
+
);
|
|
1120
|
+
return errs;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
if (!Array.isArray(SENSOR_REGISTRY) || !Array.isArray(SENSOR_REGISTRY_IDS) || !Array.isArray(SENS_PRIORITY)) {
|
|
1124
|
+
errs.push('SENSOR PRIORITY GATE: SENSOR_REGISTRY, SENSOR_REGISTRY_IDS and SENS_PRIORITY must all be arrays');
|
|
1125
|
+
return errs;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// (1) The two parallel arrays must stay index-parallel, so an id read by
|
|
1129
|
+
// registry position in dispatchSensors is always the right sensor's id.
|
|
1130
|
+
if (SENSOR_REGISTRY.length !== SENSOR_REGISTRY_IDS.length) {
|
|
1131
|
+
errs.push(
|
|
1132
|
+
'SENSOR PRIORITY GATE: SENSOR_REGISTRY (' + SENSOR_REGISTRY.length + ' sensors) and ' +
|
|
1133
|
+
'SENSOR_REGISTRY_IDS (' + SENSOR_REGISTRY_IDS.length + ' ids) have diverged. ' +
|
|
1134
|
+
'A new sensor must be appended to BOTH arrays, in the same position.'
|
|
1135
|
+
);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
// (2) Every registered sensor must have a doctrine rank.
|
|
1139
|
+
const missingFromPriority = SENSOR_REGISTRY_IDS.filter((id) => SENS_PRIORITY.indexOf(id) === -1);
|
|
1140
|
+
if (missingFromPriority.length) {
|
|
1141
|
+
errs.push(
|
|
1142
|
+
'SENSOR PRIORITY GATE: registered sensor(s) with NO SENS_PRIORITY entry: ' +
|
|
1143
|
+
missingFromPriority.join(', ') +
|
|
1144
|
+
'. Add each to the ordered table in lib/core/sensors/sensor-priority.cjs ' +
|
|
1145
|
+
'(its header carries the three placement rules).'
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
// (3) The table must carry no phantom entry for a sensor that is not
|
|
1150
|
+
// registered, so the doctrine cannot quietly outlive the code.
|
|
1151
|
+
const missingFromRegistry = SENS_PRIORITY.filter((id) => SENSOR_REGISTRY_IDS.indexOf(id) === -1);
|
|
1152
|
+
if (missingFromRegistry.length) {
|
|
1153
|
+
errs.push(
|
|
1154
|
+
'SENSOR PRIORITY GATE: SENS_PRIORITY entr(ies) with NO registered sensor: ' +
|
|
1155
|
+
missingFromRegistry.join(', ') +
|
|
1156
|
+
'. Remove each from lib/core/sensors/sensor-priority.cjs, or register the sensor ' +
|
|
1157
|
+
'in SENSOR_REGISTRY + SENSOR_REGISTRY_IDS.'
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
return errs;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
// ---------------------------------------------------------------------------
|
|
1165
|
+
// main()
|
|
1166
|
+
// ---------------------------------------------------------------------------
|
|
1167
|
+
function main() {
|
|
1168
|
+
const argv = process.argv.slice(2);
|
|
1169
|
+
|
|
1170
|
+
if (argv.includes('--refresh-names')) {
|
|
1171
|
+
refreshNames().catch((e) => {
|
|
1172
|
+
console.error('refresh-names error: ' + (e && e.message ? e.message : String(e)));
|
|
1173
|
+
process.exit(1);
|
|
1174
|
+
});
|
|
1175
|
+
return;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
const reg = buildRegistry();
|
|
1179
|
+
const report = coverageReport();
|
|
1180
|
+
const errs = [];
|
|
1181
|
+
if (reg._unresolved.length) {
|
|
1182
|
+
const list = reg._unresolved
|
|
1183
|
+
.map((u) => u.surface + ' -> "' + u.framework + '"')
|
|
1184
|
+
.join(', ');
|
|
1185
|
+
errs.push('Unresolvable frameworks (not in data/framework-names.json): ' + list);
|
|
1186
|
+
}
|
|
1187
|
+
// R1 build error: any surface that declares excluded:true with no reason
|
|
1188
|
+
// fails CLOSED on BOTH the default write run and --check (D-172-a).
|
|
1189
|
+
for (const e of report.errors) errs.push(e);
|
|
1190
|
+
|
|
1191
|
+
if (argv.includes('--check')) {
|
|
1192
|
+
const next = serializeRegistry(reg);
|
|
1193
|
+
const onDisk = fs.existsSync(REGISTRY_PATH) ? fs.readFileSync(REGISTRY_PATH, 'utf8') : '';
|
|
1194
|
+
if (onDisk !== next) {
|
|
1195
|
+
errs.push('data/connector-registry.json is STALE. Run: node scripts/build-connector-registry.cjs');
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// The coverage ledger STALE byte-compare (same discipline as the registry).
|
|
1199
|
+
// Regenerate the ledger in memory and fail if the on-disk ledger drifts.
|
|
1200
|
+
const nextLedger = serializeLedger(report);
|
|
1201
|
+
const onDiskLedger = fs.existsSync(LEDGER_PATH) ? fs.readFileSync(LEDGER_PATH, 'utf8') : '';
|
|
1202
|
+
if (onDiskLedger !== nextLedger) {
|
|
1203
|
+
errs.push('data/connector-coverage-ledger.json is STALE. Run: node scripts/build-connector-registry.cjs');
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
// Phase 198-04 (SPEC-2, Task 1): data/mcp-tool-connectors.json STALE
|
|
1207
|
+
// byte-compare -- same discipline as the registry + ledger above.
|
|
1208
|
+
const nextMcp = serializeMcpToolRegistry(reg._mcpToolRegistry);
|
|
1209
|
+
const onDiskMcp = fs.existsSync(MCP_CONNECTORS_PATH) ? fs.readFileSync(MCP_CONNECTORS_PATH, 'utf8') : '';
|
|
1210
|
+
if (onDiskMcp !== nextMcp) {
|
|
1211
|
+
errs.push('data/mcp-tool-connectors.json is STALE. Run: node scripts/build-connector-registry.cjs');
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
// Phase 245-01 (D-22 corrected by F-3): the sensor-side SENS_PRIORITY
|
|
1215
|
+
// completeness gate. Fails CLOSED when a registered sensor has no doctrine
|
|
1216
|
+
// rank. Reads SENSOR_REGISTRY_IDS, NEVER sensor_index -- see the function
|
|
1217
|
+
// header for why that distinction is load-bearing.
|
|
1218
|
+
for (const e of sensorPriorityCompletenessErrors()) errs.push(e);
|
|
1219
|
+
|
|
1220
|
+
// The four CONN-03 connector validations (frozen-6 reach, frozen-3 posture,
|
|
1221
|
+
// WFL-01 resolver-resolution framework, no (sensor,reach,sub_mode) tuple
|
|
1222
|
+
// collision). Any failure is a hard exit 1.
|
|
1223
|
+
for (const e of validateConnectors(reg)) errs.push(e);
|
|
1224
|
+
|
|
1225
|
+
// The R9 gap HARD-FAIL (Canon Part 11 R2/R9 / INV-10 step 3; the
|
|
1226
|
+
// navigator-approved "full flip" 2026-06-23). A `gap` surface (neither WIRED
|
|
1227
|
+
// via a connector: block NOR EXCLUDED via connector:{excluded:true,reason})
|
|
1228
|
+
// now makes --check exit non-zero -- it no longer merely warns. The flip is
|
|
1229
|
+
// safe because Plan 172-16 wired/excluded the baseline (counts.gap === 0), so
|
|
1230
|
+
// a clean repo stays exit 0; only an accidental-dark surface trips it. Each
|
|
1231
|
+
// gap names itself + the recovery line (wire it or exclude it with a reason).
|
|
1232
|
+
const gaps = report.surfaces.filter((s) => s.state === 'gap');
|
|
1233
|
+
for (const g of gaps) {
|
|
1234
|
+
errs.push(
|
|
1235
|
+
'GAP: surface "' + g.surface + '" (' + g.source + ') is neither WIRED ' +
|
|
1236
|
+
'(a connector: block) nor EXCLUDED (connector:{excluded:true,reason}). ' +
|
|
1237
|
+
'Wire it or exclude it with a reason. ' +
|
|
1238
|
+
'Run: node scripts/build-connector-registry.cjs'
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
if (errs.length) {
|
|
1243
|
+
console.error(errs.join('\n'));
|
|
1244
|
+
console.error('Recovery: fix the connector frontmatter (or run --refresh-names), then regenerate: node scripts/build-connector-registry.cjs');
|
|
1245
|
+
process.exit(1);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
// The WARN nudge (stderr, NOT exit 1): a methodology command (frameworks:
|
|
1249
|
+
// block) that has not opted into the spine (no connector: block). Opt-in,
|
|
1250
|
+
// never a hard block. Mirrors missingServesJtbd in build-command-registry.
|
|
1251
|
+
const missingConnector = methodologyCommandsMissingConnector();
|
|
1252
|
+
if (missingConnector.length > 0) {
|
|
1253
|
+
const preview = missingConnector.slice(0, 5).join(', ');
|
|
1254
|
+
const ellipsis = missingConnector.length > 5 ? '...' : '';
|
|
1255
|
+
process.stderr.write(
|
|
1256
|
+
'[build-connector-registry] WARNING: ' +
|
|
1257
|
+
missingConnector.length +
|
|
1258
|
+
' methodology command(s) ship a frameworks: block but no connector: block (opt-in nudge): ' +
|
|
1259
|
+
preview +
|
|
1260
|
+
ellipsis +
|
|
1261
|
+
'\n'
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
// (The R9 gap check is now a HARD FAIL folded into `errs` above, before this
|
|
1266
|
+
// success path; a gap surface exits non-zero. Canon Part 11 R2/R9.)
|
|
1267
|
+
|
|
1268
|
+
console.log('connector-registry: OK');
|
|
1269
|
+
return;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
// Default: write the registry, refusing on any unresolvable framework.
|
|
1273
|
+
if (errs.length) {
|
|
1274
|
+
console.error(errs.join('\n'));
|
|
1275
|
+
console.error('Recovery: fix the connector frontmatter (or run --refresh-names), then re-run: node scripts/build-connector-registry.cjs');
|
|
1276
|
+
process.exit(1);
|
|
1277
|
+
}
|
|
1278
|
+
fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
1279
|
+
fs.writeFileSync(REGISTRY_PATH, serializeRegistry(reg));
|
|
1280
|
+
console.log('Wrote data/connector-registry.json (' + reg.connectors.length + ' connectors)');
|
|
1281
|
+
// Emit the wired-XOR-excluded coverage ledger alongside the registry.
|
|
1282
|
+
fs.writeFileSync(LEDGER_PATH, serializeLedger(report));
|
|
1283
|
+
console.log(
|
|
1284
|
+
'Wrote data/connector-coverage-ledger.json (' +
|
|
1285
|
+
report.counts.wired + ' wired, ' +
|
|
1286
|
+
report.counts.excluded + ' excluded, ' +
|
|
1287
|
+
report.counts.gap + ' gap)'
|
|
1288
|
+
);
|
|
1289
|
+
// Phase 198-04 (SPEC-2, Task 1): emit the MCP-tool projection alongside the
|
|
1290
|
+
// registry + ledger, generated from the SAME discovery pass folded into
|
|
1291
|
+
// reg.connectors above.
|
|
1292
|
+
fs.writeFileSync(MCP_CONNECTORS_PATH, serializeMcpToolRegistry(reg._mcpToolRegistry));
|
|
1293
|
+
console.log(
|
|
1294
|
+
'Wrote data/mcp-tool-connectors.json (' + reg._mcpToolRegistry.connectors.length + ' MCP tool connectors)'
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
if (require.main === module) {
|
|
1299
|
+
main();
|
|
1300
|
+
} else {
|
|
1301
|
+
module.exports = {
|
|
1302
|
+
parseConnectorFrontmatter,
|
|
1303
|
+
buildRegistry,
|
|
1304
|
+
serializeRegistry,
|
|
1305
|
+
validateConnectors,
|
|
1306
|
+
methodologyCommandsMissingConnector,
|
|
1307
|
+
classifySurface,
|
|
1308
|
+
classifySurfaceClass,
|
|
1309
|
+
coverageReport,
|
|
1310
|
+
serializeLedger,
|
|
1311
|
+
listSourceFiles,
|
|
1312
|
+
FOUR_CLASSES,
|
|
1313
|
+
SURFACE_CLASS_ENUM,
|
|
1314
|
+
CLASS_UTILITY_EXCLUDED,
|
|
1315
|
+
// Phase 235-02 (CIRS-02): the MCP-tool-file census/probe pair + the additive
|
|
1316
|
+
// class constant, exported so tests/test-235-seam-liveness-mcp-coverage.cjs
|
|
1317
|
+
// can drive them directly (including the synthetic claimed-source override)
|
|
1318
|
+
// without spawning a subprocess.
|
|
1319
|
+
CLASS_MCP_TOOL,
|
|
1320
|
+
listMcpToolClaimedSources,
|
|
1321
|
+
listMcpToolFileHealth,
|
|
1322
|
+
// Phase 198-04 (SPEC-2, Task 1): the MCP-tool discovery/build/serialize
|
|
1323
|
+
// trio, exported so scripts/check-shape-declaration.cjs can mirror the
|
|
1324
|
+
// SAME discovery into its advisory hitl_shape enumeration without
|
|
1325
|
+
// re-walking lib/mcp/tools/ a second way (Canon Part 7).
|
|
1326
|
+
listMcpToolConnectorDescriptors,
|
|
1327
|
+
normalizeMcpToolEntry,
|
|
1328
|
+
buildMcpToolRegistry,
|
|
1329
|
+
serializeMcpToolRegistry,
|
|
1330
|
+
};
|
|
1331
|
+
}
|