@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,1221 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Phase 157-02 - Brain orchestration projection generator (the nodes layer +
|
|
6
|
+
* the cross-domain-analogue seed read + the OPERATES edge scaffold).
|
|
7
|
+
*
|
|
8
|
+
* Implements: BOG-02 (methodology_tier on every node), BOG-03 (derived, never
|
|
9
|
+
* hand-authored), BOG-04 (per-file node grain), BOG-09 (zero live Brain),
|
|
10
|
+
* BOG-10 (generic machinery metadata only).
|
|
11
|
+
*
|
|
12
|
+
* THE GENERATOR IS A PART 7 REUSE SIBLING of
|
|
13
|
+
* scripts/build-connector-registry.cjs. It mirrors that file wholesale: the
|
|
14
|
+
* deterministic listSourceFiles() walk (commands/*.md + skills/<dir>/SKILL.md +
|
|
15
|
+
* agents/*.md, sorted), the build* -> serialize* -> byte-compare discipline, and
|
|
16
|
+
* the three-branch main(). The ONE structural difference is that this generator
|
|
17
|
+
* does NOT hand-roll a frontmatter parser: the connector/command registries are
|
|
18
|
+
* ALREADY committed JSON sources (Part 7 - the registries exist), so it reads
|
|
19
|
+
* them with fs.readFileSync + JSON.parse instead of re-walking frontmatter. The
|
|
20
|
+
* skills/agents file walk supplies the per-file node grain for surfaces that the
|
|
21
|
+
* registries do not enumerate (skills carry no connector frontmatter, D-01).
|
|
22
|
+
*
|
|
23
|
+
* Canon Part 8 (The Graph Boundary) + the Phase 157 amendment (Appendix D entry
|
|
24
|
+
* 19): the projection carries ONLY generic machinery metadata - command slugs,
|
|
25
|
+
* reach_ids, sub_modes, framework names, methodology_tier, ranking inputs, and
|
|
26
|
+
* typed edges. EVERY node carries a methodology_tier of exactly "pws" (the
|
|
27
|
+
* teaching IP frameworks) or "mindrian-operation" (the /mos commands, the 6
|
|
28
|
+
* frozen reaches + sub_modes, skills, agents, the connector spine). A node
|
|
29
|
+
* without a methodology_tier is not a legal projection node. The projection
|
|
30
|
+
* never carries user content. It is a Brain-DERIVED LOCAL cache (Part 9): there
|
|
31
|
+
* is NO live Brain read and NO live Brain write anywhere in this file - no
|
|
32
|
+
* brain-client require, no fetch, no http. The Brain is the external cortex the
|
|
33
|
+
* projection is shaped after, never a runtime dependency.
|
|
34
|
+
*
|
|
35
|
+
* This plan (157-02) delivers the nodes[] layer, the cross-domain-analogue seed
|
|
36
|
+
* read (which mints the analogue-endpoint framework nodes so Wave 3's edges do
|
|
37
|
+
* not dangle), and the OPERATES edge scaffold (command -> framework). Plan 03
|
|
38
|
+
* completes the full typed-edge layer (CHAINS / FEEDS_INTO / PREREQUISITE /
|
|
39
|
+
* CROSS_DOMAIN_ANALOGUE) + the ranking-input exposure; Plan 04 adds the --check
|
|
40
|
+
* tripwire (STALE / UN-WIRED / UN-RANKED). main() is structured so Plan 04 can
|
|
41
|
+
* add the --check branch with no refactor.
|
|
42
|
+
*
|
|
43
|
+
* Usage:
|
|
44
|
+
* node scripts/build-orchestration-projection.cjs
|
|
45
|
+
* read the registries + walk skills/agents + read cross-domain-analogues
|
|
46
|
+
* -> write data/brain-orchestration-projection.json
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
const fs = require('node:fs');
|
|
50
|
+
const path = require('node:path');
|
|
51
|
+
|
|
52
|
+
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
53
|
+
|
|
54
|
+
// The 6 frozen reaches (Phase 148 D-09) + the 3 postures come from the SINGLE
|
|
55
|
+
// frozen source so the projection's reach nodes can NEVER drift from the dial
|
|
56
|
+
// doctrine. This require is sync, zero-I/O, and makes ZERO Brain/network calls
|
|
57
|
+
// (Part 8). We NEVER redefine the frozen 6 here.
|
|
58
|
+
const { REACH_IDS } = require(
|
|
59
|
+
path.join(REPO_ROOT, 'lib', 'core', 'sensors', 'sensor-types.cjs')
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const DATA_DIR = path.join(REPO_ROOT, 'data');
|
|
63
|
+
const COMMANDS_DIR = path.join(REPO_ROOT, 'commands');
|
|
64
|
+
const SKILLS_DIR = path.join(REPO_ROOT, 'skills');
|
|
65
|
+
const AGENTS_DIR = path.join(REPO_ROOT, 'agents');
|
|
66
|
+
|
|
67
|
+
const CONNECTOR_REGISTRY_PATH = path.join(DATA_DIR, 'connector-registry.json');
|
|
68
|
+
// The connector-layer coverage ledger (Phase 172-03 / 143.3). The CONNECTOR
|
|
69
|
+
// generator (build-connector-registry.cjs) is the authority for whether a
|
|
70
|
+
// SURFACE is WIRED or EXCLUDED at the connector layer. Phase 172-13 reconciles
|
|
71
|
+
// the projection to it: a command counterpart whose surface is EXCLUDED in the
|
|
72
|
+
// connector layer is EXCLUDED in the projection command-ledger too (the
|
|
73
|
+
// connector EXCLUDE decision PROPAGATES down), so a deprecated/utility surface
|
|
74
|
+
// excluded once (in its own connector:{excluded} frontmatter, distilled into
|
|
75
|
+
// this ledger) is never re-surfaced as an un-ranked projection gap. Read-only,
|
|
76
|
+
// zero Brain/network (Part 8).
|
|
77
|
+
const CONNECTOR_COVERAGE_LEDGER_PATH = path.join(DATA_DIR, 'connector-coverage-ledger.json');
|
|
78
|
+
const COMMAND_REGISTRY_PATH = path.join(DATA_DIR, 'command-registry.json');
|
|
79
|
+
const ANALOGUES_PATH = path.join(DATA_DIR, 'cross-domain-analogues.json');
|
|
80
|
+
const PROJECTION_PATH = path.join(DATA_DIR, 'brain-orchestration-projection.json');
|
|
81
|
+
// The wired-XOR-allowlisted ledger (Phase 144.1 out-of-spine allow-list idiom),
|
|
82
|
+
// read ONLY by the --check UN-WIRED leg (BOG-06). A framework named here is
|
|
83
|
+
// intentionally not reach-wired and does NOT fire UN-WIRED. A bare JSON array of
|
|
84
|
+
// { framework, reason }. Plan 04 Task 0 resolved the live orphan set down to a
|
|
85
|
+
// single allowlisted entry (MECE, a component under The Pyramid Principle).
|
|
86
|
+
const UNWIRED_ALLOWLIST_PATH = path.join(DATA_DIR, 'orchestration-unwired-allowlist.json');
|
|
87
|
+
// The command-grained wired-XOR-excluded ledger (Phase 172-03, INV-04/05/06).
|
|
88
|
+
// Mirrors the wired-XOR-allowlisted framework ledger above, but at the COMMAND
|
|
89
|
+
// grain: every command node is classified ranked | excluded | gap. The ledger is
|
|
90
|
+
// the EXCLUDED source of truth - a non-framework utility command (doctor,
|
|
91
|
+
// dashboard, setup, help, ...) is listed here with state:excluded + a reason, so
|
|
92
|
+
// it is a first-class conformant terminal state (Canon Part 11 R1), never a
|
|
93
|
+
// silent dark command. The ledger is GENERATED (serializeCommandLedger) on the
|
|
94
|
+
// default run and STALE-byte-checked in --check; it is the R5 gate source of
|
|
95
|
+
// truth for command counterparts. A bare JSON object
|
|
96
|
+
// { generated_note, counts, commands:[{command, source, state}] }.
|
|
97
|
+
const COMMAND_LEDGER_PATH = path.join(DATA_DIR, 'orchestration-command-ledger.json');
|
|
98
|
+
|
|
99
|
+
const GENERATED_NOTE =
|
|
100
|
+
'GENERATED by scripts/build-orchestration-projection.cjs - do not edit by hand';
|
|
101
|
+
|
|
102
|
+
// The two legal methodology_tier values (Canon Part 8, Phase 157 amendment).
|
|
103
|
+
// pws = teaching IP frameworks; mindrian-operation = the machinery.
|
|
104
|
+
const TIER_PWS = 'pws';
|
|
105
|
+
const TIER_OP = 'mindrian-operation';
|
|
106
|
+
|
|
107
|
+
// ---------------------------------------------------------------------------
|
|
108
|
+
// The EXCLUDED-command table (Phase 172-03, INV-04/05; Canon Part 11 R1).
|
|
109
|
+
// Because the command ledger is GENERATED (never hand-authored, mirroring the
|
|
110
|
+
// projection itself, BOG-03), the EXCLUDED dispositions live HERE as the
|
|
111
|
+
// authoritative source: a /mos: command slug -> the documented reason it warrants
|
|
112
|
+
// NO mindrian-operation counterpart node. These are the utility commands that
|
|
113
|
+
// neither trigger, chain, nor monitor a thinking surface (doctor/dashboard/setup
|
|
114
|
+
// /help and the like, plus the destructive-admin + render-only + system-status
|
|
115
|
+
// utilities). A command listed here is classified `excluded` (a first-class
|
|
116
|
+
// conformant terminal state, NEVER dark, R1); every OTHER bare command (no
|
|
117
|
+
// reach_id, not excluded) is classified `gap`. EXCLUDED REQUIRES a reason
|
|
118
|
+
// (T-172-06 tampering mitigation): the table value IS the reason, so a command
|
|
119
|
+
// can never be silently both-excluded-and-reasonless. The warranted-dark
|
|
120
|
+
// thinking commands (the rs-* family, causal, ...) are NOT excluded here - they
|
|
121
|
+
// are gaps to be wired in Wave 2/3. WARN-only at this stage (D-172-e); the
|
|
122
|
+
// hard-FAIL flip is Wave 4 / Plan 172-13.
|
|
123
|
+
const EXCLUDED_COMMANDS = Object.freeze({
|
|
124
|
+
'/mos:doctor': 'Health-check / diagnostic utility; runs the install + acceptance gates. Pure machinery with no thinking-surface trigger, chain, or monitor; warrants no mindrian-operation counterpart.',
|
|
125
|
+
'/mos:dashboard': 'Render-only De Stijl dashboard view over the room folder. A presentation utility, not a reach-dispatched thinking surface.',
|
|
126
|
+
'/mos:admin': 'Destructive administrative utility (room and registry maintenance). System plumbing, never a context-triggered reach.',
|
|
127
|
+
'/mos:models': 'Model-profile inspection utility. Configuration surface, not a thinking-surface trigger.',
|
|
128
|
+
'/mos:setup': 'One-time setup / connection utility (graph, brain). Bootstrap plumbing, not a reach.',
|
|
129
|
+
'/mos:help': 'Help / command-listing utility. Discovery surface, not a thinking-surface trigger.',
|
|
130
|
+
'/mos:export': 'Export / snapshot utility (room -> vault/file). I/O plumbing, not a reach-dispatched surface.',
|
|
131
|
+
'/mos:publish': 'Publish / deploy utility. Release plumbing, not a thinking surface.',
|
|
132
|
+
'/mos:rooms': 'Multi-room registry / switching utility. Navigation plumbing, not a reach.',
|
|
133
|
+
'/mos:snapshot': 'Snapshot export utility. I/O plumbing, not a thinking surface.',
|
|
134
|
+
'/mos:ingest-methodology': 'Methodology-ingest pipeline entry (Phase 171). It is the PROMOTION-PATH machinery (dark -> counterpart -> pws frontier), not itself a reach-dispatched thinking surface.',
|
|
135
|
+
'/mos:update': 'Plugin self-update utility. Lifecycle plumbing, not a thinking surface.',
|
|
136
|
+
'/mos:status': 'Session / room status readout utility. Status surface, not a reach.',
|
|
137
|
+
'/mos:hmi-status': 'HMI / dial status readout utility. Diagnostic surface, not a reach.',
|
|
138
|
+
'/mos:splash': 'Splash / banner render utility. Presentation-only, not a thinking surface.',
|
|
139
|
+
'/mos:dogfood-flush': 'Dogfood telemetry flush utility. Internal bookkeeping, not a reach.',
|
|
140
|
+
'/mos:scheduled-tasks': 'Scheduled-task management utility. Scheduling plumbing, not a thinking surface.',
|
|
141
|
+
'/mos:mos': 'Top-level command-group alias / router. Dispatch plumbing, not a reach.',
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// ---------------------------------------------------------------------------
|
|
145
|
+
// loadConnectorExcludedCommands() -- the projection-exclude RECONCILIATION
|
|
146
|
+
// (Phase 172-13, the navigator-approved "full flip" 2026-06-23). Reads the
|
|
147
|
+
// connector-layer coverage ledger (data/connector-coverage-ledger.json, the
|
|
148
|
+
// distillation of every surface's connector:{excluded:true,reason} frontmatter)
|
|
149
|
+
// and returns the Set of COMMAND surfaces classified `excluded` there. This is
|
|
150
|
+
// the source of truth for PROPAGATING the connector EXCLUDE decision into the
|
|
151
|
+
// projection: a command excluded at the connector layer (a deprecated redirect,
|
|
152
|
+
// a render/utility surface) is excluded in the projection command-ledger too,
|
|
153
|
+
// never re-counted as a bare-command gap. The projection's own EXCLUDED_COMMANDS
|
|
154
|
+
// table stays the AUTHORITATIVE local reason source for projection-native
|
|
155
|
+
// exclusions (doctor/setup/help and the like); the connector-excluded set is an
|
|
156
|
+
// ADDITIVE propagation on top of it (their union is the projection-excluded
|
|
157
|
+
// set). Degrades to an empty Set on any read failure (mirrors readJson). ZERO
|
|
158
|
+
// Brain/network (Part 8).
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
function loadConnectorExcludedCommands() {
|
|
161
|
+
const ledger = readJson(CONNECTOR_COVERAGE_LEDGER_PATH);
|
|
162
|
+
const out = new Set();
|
|
163
|
+
if (!ledger || !Array.isArray(ledger.surfaces)) return out;
|
|
164
|
+
for (const s of ledger.surfaces) {
|
|
165
|
+
if (
|
|
166
|
+
s &&
|
|
167
|
+
s.source === 'command' &&
|
|
168
|
+
s.state === 'excluded' &&
|
|
169
|
+
typeof s.surface === 'string'
|
|
170
|
+
) {
|
|
171
|
+
out.add(s.surface);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return out;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Memoized connector-excluded command Set, lazily loaded once per process so the
|
|
178
|
+
// repeated classifier calls (commandCoverageReport + validateProjection) do not
|
|
179
|
+
// re-read the ledger file. A test may pass an explicit Set to the classifier to
|
|
180
|
+
// bypass the cache.
|
|
181
|
+
let _connectorExcludedCache = null;
|
|
182
|
+
function connectorExcludedCommands() {
|
|
183
|
+
if (_connectorExcludedCache === null) {
|
|
184
|
+
_connectorExcludedCache = loadConnectorExcludedCommands();
|
|
185
|
+
}
|
|
186
|
+
return _connectorExcludedCache;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// The closed set of node kinds (file-level grain, BOG-04). framework nodes are
|
|
190
|
+
// pws; every other kind is mindrian-operation machinery.
|
|
191
|
+
const NODE_KINDS = Object.freeze([
|
|
192
|
+
'command',
|
|
193
|
+
'skill',
|
|
194
|
+
'agent',
|
|
195
|
+
'framework',
|
|
196
|
+
'reach',
|
|
197
|
+
'sub_mode',
|
|
198
|
+
]);
|
|
199
|
+
|
|
200
|
+
// The documented CLOSED set of edge types the projection emits (BOG-05). Exactly
|
|
201
|
+
// these five, frozen. Mirrors the frozen-bank idiom of
|
|
202
|
+
// lib/core/sensors/sensor-types.cjs REACH_IDS and
|
|
203
|
+
// lib/core/navigation/edges.cjs ALLOWED_EDGE_TYPES. An undocumented edge type is
|
|
204
|
+
// rejected at build by the addEdge() chokepoint. The set is a CEILING, not a
|
|
205
|
+
// floor: OPERATES (>=1 per framework-declaring command) and CROSS_DOMAIN_ANALOGUE
|
|
206
|
+
// (one per analogue pair, >=2) are hard floors; the three chaining types
|
|
207
|
+
// (CHAINS / FEEDS_INTO / PREREQUISITE) are emitted ONLY from a populated
|
|
208
|
+
// curated_chains source, which is empty today (see generated_note).
|
|
209
|
+
const ALLOWED_EDGE_TYPES = Object.freeze(new Set([
|
|
210
|
+
// command -> framework. The connector/command registries' framework_index
|
|
211
|
+
// inverse map, promoted to a typed edge.
|
|
212
|
+
'OPERATES',
|
|
213
|
+
// framework -> framework sequential chaining (from curated_chains kind=chain).
|
|
214
|
+
'CHAINS',
|
|
215
|
+
// framework -> framework OR reach -> reach progression (curated_chains
|
|
216
|
+
// kind=feeds_into).
|
|
217
|
+
'FEEDS_INTO',
|
|
218
|
+
// framework -> framework prerequisite relation (curated_chains
|
|
219
|
+
// kind=prerequisite).
|
|
220
|
+
'PREREQUISITE',
|
|
221
|
+
// framework <-> framework cross-domain analogy (the 150.10 hand-wired pairs
|
|
222
|
+
// read from data/cross-domain-analogues.json).
|
|
223
|
+
'CROSS_DOMAIN_ANALOGUE',
|
|
224
|
+
]));
|
|
225
|
+
|
|
226
|
+
// Backwards-compatible alias retained for the Plan 02 export surface + tests.
|
|
227
|
+
const EDGE_TYPES = Object.freeze(Array.from(ALLOWED_EDGE_TYPES));
|
|
228
|
+
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
// The Part 8 boundary-scan field allowlists (Plan 05, BOG-10). These are the
|
|
231
|
+
// SINGLE SOURCE OF TRUTH the docs/ORCHESTRATION-PROJECTION-CONTRACT.md cache
|
|
232
|
+
// contract documents AND the boundary scan
|
|
233
|
+
// (tests/test-orchestration-projection-part8-boundary.cjs) asserts against. A
|
|
234
|
+
// node key outside NODE_FIELD_ALLOWLIST or an edge key outside
|
|
235
|
+
// EDGE_FIELD_ALLOWLIST is a Part 8 breach (a candidate user-content field), and
|
|
236
|
+
// the scan fails the build before the artifact lands. Every name here is a
|
|
237
|
+
// GENERIC machinery field (an id, a kind, a tier, a name, a ranking enum/scalar,
|
|
238
|
+
// a typed-edge endpoint); NONE is a user-content channel.
|
|
239
|
+
//
|
|
240
|
+
// The list mirrors the node schema in docs/ORCHESTRATION-PROJECTION-CONTRACT.md
|
|
241
|
+
// section 2 EXACTLY: { id, kind, methodology_tier, name } on every node, plus the
|
|
242
|
+
// connector-derived ranking inputs (reach_id, sub_mode, hierarchy_rank, posture,
|
|
243
|
+
// sensor_triggers, framework), plus the two provenance blocks (chain_provenance,
|
|
244
|
+
// ranking). chain_provenance + ranking are sub-objects whose KEYS are themselves
|
|
245
|
+
// restricted to this same generic set (the scan descends into them); they carry
|
|
246
|
+
// NO new field name beyond the allowlist.
|
|
247
|
+
const NODE_FIELD_ALLOWLIST = Object.freeze([
|
|
248
|
+
// The mandatory four (every node).
|
|
249
|
+
'id',
|
|
250
|
+
'kind',
|
|
251
|
+
'methodology_tier',
|
|
252
|
+
'name',
|
|
253
|
+
// Connector-derived ranking inputs (BOG-07; enum/scalar/id only).
|
|
254
|
+
'reach_id',
|
|
255
|
+
'sub_mode',
|
|
256
|
+
'hierarchy_rank',
|
|
257
|
+
'posture',
|
|
258
|
+
'sensor_triggers',
|
|
259
|
+
'framework',
|
|
260
|
+
// The chain-provenance sub-block + its inner keys (all generic handles).
|
|
261
|
+
'chain_provenance',
|
|
262
|
+
'command',
|
|
263
|
+
'firing_sensors',
|
|
264
|
+
// The Plan 02 ranking sub-block (same scalars as the top-level fields).
|
|
265
|
+
'ranking',
|
|
266
|
+
]);
|
|
267
|
+
|
|
268
|
+
// Every edge is { type, from, to } where from/to are node ids and type is one of
|
|
269
|
+
// the closed ALLOWED_EDGE_TYPES set, OPTIONALLY carrying the two earned-chain
|
|
270
|
+
// scalars `confidence` (a curated float) and `transform` (a SHORT generic
|
|
271
|
+
// handoff descriptor -- a chain-step machinery string, never user content), which
|
|
272
|
+
// mirror the verified Brain FEEDS_INTO {confidence, transform} edge schema
|
|
273
|
+
// (research/172-SPFO-CHAIN-MODEL-REFERENCE.md, Plan 172-15, Canon Part 11 R6 /
|
|
274
|
+
// INV-08). `transform` is enum/scalar machinery metadata (Part 8) -- the
|
|
275
|
+
// forbidden-value heuristic still fences any room/ path, email, or over-cap body.
|
|
276
|
+
// An edge key OUTSIDE this set is a Part 8 breach.
|
|
277
|
+
const EDGE_FIELD_ALLOWLIST = Object.freeze([
|
|
278
|
+
'type',
|
|
279
|
+
'from',
|
|
280
|
+
'to',
|
|
281
|
+
'confidence',
|
|
282
|
+
'transform',
|
|
283
|
+
]);
|
|
284
|
+
|
|
285
|
+
// The curated_chains kind -> edge type mapping (documented in
|
|
286
|
+
// docs/ORCHESTRATION-PROJECTION-CONTRACT.md). A curated_chains entry declares a
|
|
287
|
+
// `kind`; this maps it to one of the three chaining edge types. Anything else is
|
|
288
|
+
// rejected by addEdge() (the type would not be in ALLOWED_EDGE_TYPES).
|
|
289
|
+
const CHAIN_KIND_TO_EDGE_TYPE = Object.freeze({
|
|
290
|
+
chain: 'CHAINS',
|
|
291
|
+
feeds_into: 'FEEDS_INTO',
|
|
292
|
+
prerequisite: 'PREREQUISITE',
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
// readJson(p) -- read a committed JSON source. Returns null on any failure so
|
|
297
|
+
// the generator degrades rather than throwing (mirrors the connector
|
|
298
|
+
// generator's try/catch-yields-empty discipline).
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
function readJson(p) {
|
|
301
|
+
try {
|
|
302
|
+
return JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
303
|
+
} catch (_e) {
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// ---------------------------------------------------------------------------
|
|
309
|
+
// listSourceFiles() -- walk commands/*.md AND skills/<dir>/SKILL.md AND
|
|
310
|
+
// agents/*.md, deterministically sorted (commands, then skills, then agents),
|
|
311
|
+
// so the projection is byte-stable across machines. Byte-mirrors
|
|
312
|
+
// build-connector-registry.cjs listSourceFiles() (same readdirSync + .md filter
|
|
313
|
+
// + sort + try/catch-yields-[] when a dir is absent). Returns
|
|
314
|
+
// [{ kind, file, base }].
|
|
315
|
+
// ---------------------------------------------------------------------------
|
|
316
|
+
function listSourceFiles() {
|
|
317
|
+
const out = [];
|
|
318
|
+
|
|
319
|
+
let cmdFiles = [];
|
|
320
|
+
try {
|
|
321
|
+
cmdFiles = fs.readdirSync(COMMANDS_DIR).filter((f) => f.endsWith('.md')).sort();
|
|
322
|
+
} catch (_e) {
|
|
323
|
+
cmdFiles = [];
|
|
324
|
+
}
|
|
325
|
+
for (const f of cmdFiles) {
|
|
326
|
+
out.push({ kind: 'command', file: path.join(COMMANDS_DIR, f), base: f.replace(/\.md$/, '') });
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
let skillDirs = [];
|
|
330
|
+
try {
|
|
331
|
+
skillDirs = fs
|
|
332
|
+
.readdirSync(SKILLS_DIR, { withFileTypes: true })
|
|
333
|
+
.filter((e) => e.isDirectory())
|
|
334
|
+
.map((e) => e.name)
|
|
335
|
+
.sort();
|
|
336
|
+
} catch (_e) {
|
|
337
|
+
skillDirs = [];
|
|
338
|
+
}
|
|
339
|
+
for (const d of skillDirs) {
|
|
340
|
+
const skillFile = path.join(SKILLS_DIR, d, 'SKILL.md');
|
|
341
|
+
if (fs.existsSync(skillFile)) {
|
|
342
|
+
out.push({ kind: 'skill', file: skillFile, base: d });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
let agentFiles = [];
|
|
347
|
+
try {
|
|
348
|
+
agentFiles = fs.readdirSync(AGENTS_DIR).filter((f) => f.endsWith('.md')).sort();
|
|
349
|
+
} catch (_e) {
|
|
350
|
+
agentFiles = [];
|
|
351
|
+
}
|
|
352
|
+
for (const f of agentFiles) {
|
|
353
|
+
out.push({ kind: 'agent', file: path.join(AGENTS_DIR, f), base: f.replace(/\.md$/, '') });
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return out;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
// commandSurfaceId(base) -- the /mos: surface name for a command base, matching
|
|
361
|
+
// the connector-registry surface naming exactly so OPERATES edges line up with
|
|
362
|
+
// the framework_index inverse-index values.
|
|
363
|
+
// ---------------------------------------------------------------------------
|
|
364
|
+
function commandSurfaceId(base) {
|
|
365
|
+
return '/mos:' + base;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// ---------------------------------------------------------------------------
|
|
369
|
+
// distinctFrameworks(commandReg, connectorReg, analogues) -- the DERIVED
|
|
370
|
+
// distinct-framework set (BOG-03). The union of:
|
|
371
|
+
// - command-registry.framework_index keys
|
|
372
|
+
// - connector-registry.framework_index keys
|
|
373
|
+
// - cross-domain-analogues from/to endpoints
|
|
374
|
+
// Minting the analogue endpoints guarantees Wave 3's CROSS_DOMAIN_ANALOGUE edges
|
|
375
|
+
// resolve to a real framework node even when an endpoint has no command. Sorted
|
|
376
|
+
// for byte-stability.
|
|
377
|
+
// ---------------------------------------------------------------------------
|
|
378
|
+
function distinctFrameworks(commandReg, connectorReg, analogues) {
|
|
379
|
+
const set = new Set();
|
|
380
|
+
const cmdFi = commandReg && commandReg.framework_index;
|
|
381
|
+
if (cmdFi && typeof cmdFi === 'object') {
|
|
382
|
+
for (const k of Object.keys(cmdFi)) set.add(k);
|
|
383
|
+
}
|
|
384
|
+
const connFi = connectorReg && connectorReg.framework_index;
|
|
385
|
+
if (connFi && typeof connFi === 'object') {
|
|
386
|
+
for (const k of Object.keys(connFi)) set.add(k);
|
|
387
|
+
}
|
|
388
|
+
const list = analogues && Array.isArray(analogues.analogues) ? analogues.analogues : [];
|
|
389
|
+
for (const e of list) {
|
|
390
|
+
if (e && typeof e.from === 'string' && e.from) set.add(e.from);
|
|
391
|
+
if (e && typeof e.to === 'string' && e.to) set.add(e.to);
|
|
392
|
+
}
|
|
393
|
+
return Array.from(set).sort((a, b) => a.localeCompare(b));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// ---------------------------------------------------------------------------
|
|
397
|
+
// connectorBySurface(connectorReg) -- index the connectors[] by surface so a
|
|
398
|
+
// command/agent node can pull its ranking inputs (reach_id, sub_mode,
|
|
399
|
+
// hierarchy_rank, posture, sensor_triggers) directly. The connector spine is the
|
|
400
|
+
// ranking-input source (BOG-07; Plan 03 widens the exposure, this plan attaches
|
|
401
|
+
// the connector-derived fields already available).
|
|
402
|
+
// ---------------------------------------------------------------------------
|
|
403
|
+
function connectorBySurface(connectorReg) {
|
|
404
|
+
const map = new Map();
|
|
405
|
+
const connectors = connectorReg && Array.isArray(connectorReg.connectors)
|
|
406
|
+
? connectorReg.connectors
|
|
407
|
+
: [];
|
|
408
|
+
for (const c of connectors) {
|
|
409
|
+
if (c && typeof c.surface === 'string') map.set(c.surface, c);
|
|
410
|
+
}
|
|
411
|
+
return map;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// ---------------------------------------------------------------------------
|
|
415
|
+
// rankingInputsFromConnector(conn) -- pull ONLY the generic ranking scalars a
|
|
416
|
+
// connector exposes (Part 8: enums/ids/ints, never user content). Returns an
|
|
417
|
+
// object with the present scalar fields; absent fields are omitted so the
|
|
418
|
+
// serialized node stays minimal + byte-stable.
|
|
419
|
+
// ---------------------------------------------------------------------------
|
|
420
|
+
function rankingInputsFromConnector(conn) {
|
|
421
|
+
const out = {};
|
|
422
|
+
if (!conn || typeof conn !== 'object') return out;
|
|
423
|
+
if (typeof conn.reach_id === 'string' && conn.reach_id) out.reach_id = conn.reach_id;
|
|
424
|
+
if (typeof conn.sub_mode === 'string' && conn.sub_mode) out.sub_mode = conn.sub_mode;
|
|
425
|
+
if (typeof conn.hierarchy_rank === 'number') out.hierarchy_rank = conn.hierarchy_rank;
|
|
426
|
+
if (typeof conn.posture === 'string' && conn.posture) out.posture = conn.posture;
|
|
427
|
+
if (Array.isArray(conn.sensor_triggers) && conn.sensor_triggers.length) {
|
|
428
|
+
out.sensor_triggers = conn.sensor_triggers.filter((s) => typeof s === 'string');
|
|
429
|
+
}
|
|
430
|
+
if (typeof conn.framework === 'string' && conn.framework) out.framework = conn.framework;
|
|
431
|
+
return out;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// ---------------------------------------------------------------------------
|
|
435
|
+
// buildOperationNode(id, kind, name, conn) -- build a mindrian-operation node
|
|
436
|
+
// (command or agent) that, WHEN it declares a connector, exposes its ranking
|
|
437
|
+
// inputs at the TOP LEVEL (BOG-07): reach_id, sub_mode, hierarchy_rank, posture,
|
|
438
|
+
// sensor_triggers -- plus a chain-provenance block. When there is no connector,
|
|
439
|
+
// the node is name + tier only (no ranking fields). Each field is copied verbatim
|
|
440
|
+
// from the connector as an enum/scalar (Part 8: generic machinery, never user
|
|
441
|
+
// content). A `ranking` block (the Plan 02 shape) is RETAINED alongside the
|
|
442
|
+
// top-level fields for backwards compatibility with any Plan-02 consumer.
|
|
443
|
+
// ---------------------------------------------------------------------------
|
|
444
|
+
function buildOperationNode(id, kind, name, conn) {
|
|
445
|
+
const node = { id, kind, methodology_tier: TIER_OP, name };
|
|
446
|
+
const ranking = rankingInputsFromConnector(conn);
|
|
447
|
+
if (!Object.keys(ranking).length) return node;
|
|
448
|
+
|
|
449
|
+
// Top-level ranking inputs (BOG-07): the nav engine reads these directly from
|
|
450
|
+
// the node without descending into a sub-object.
|
|
451
|
+
if (typeof ranking.reach_id === 'string') node.reach_id = ranking.reach_id;
|
|
452
|
+
if (typeof ranking.sub_mode === 'string') node.sub_mode = ranking.sub_mode;
|
|
453
|
+
if (typeof ranking.hierarchy_rank === 'number') node.hierarchy_rank = ranking.hierarchy_rank;
|
|
454
|
+
if (typeof ranking.posture === 'string') node.posture = ranking.posture;
|
|
455
|
+
if (Array.isArray(ranking.sensor_triggers)) node.sensor_triggers = ranking.sensor_triggers;
|
|
456
|
+
if (typeof ranking.framework === 'string') node.framework = ranking.framework;
|
|
457
|
+
|
|
458
|
+
// Chain provenance (BOG-07 elevated): the framework -> command (OPERATES) ->
|
|
459
|
+
// reach chain + the firing sensor list, so a rejection-reason or a why-block
|
|
460
|
+
// could later cite the FULL chain, not just the score signals. All generic
|
|
461
|
+
// machinery handles (framework name, command surface, reach id, SENS ids).
|
|
462
|
+
const provenance = {};
|
|
463
|
+
if (typeof ranking.framework === 'string') provenance.framework = ranking.framework;
|
|
464
|
+
provenance.command = name;
|
|
465
|
+
if (typeof ranking.reach_id === 'string') provenance.reach_id = ranking.reach_id;
|
|
466
|
+
if (typeof ranking.sub_mode === 'string') provenance.sub_mode = ranking.sub_mode;
|
|
467
|
+
if (Array.isArray(ranking.sensor_triggers)) provenance.firing_sensors = ranking.sensor_triggers;
|
|
468
|
+
node.chain_provenance = provenance;
|
|
469
|
+
|
|
470
|
+
// Retain the Plan 02 ranking block for backwards compatibility.
|
|
471
|
+
node.ranking = ranking;
|
|
472
|
+
return node;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// ---------------------------------------------------------------------------
|
|
476
|
+
// rankReachesForProblem(projection, opts) -- a PURE fixture query proving "a
|
|
477
|
+
// fixture query can rank candidate reaches from the projection alone" (BOG-07
|
|
478
|
+
// acceptance). It reads ONLY the projection (no registry, no Brain, no fs) and
|
|
479
|
+
// returns the candidate reaches ranked. The ranking key is the BEST (lowest)
|
|
480
|
+
// hierarchy_rank of any mindrian-operation node wired to that reach (lower rank
|
|
481
|
+
// wins; mirrors the connector spine's one-reach-per-beat lower-rank-wins
|
|
482
|
+
// arbitration). Ties break deterministically by reach_id ascending. A reach with
|
|
483
|
+
// no wired ranked node sorts last (Infinity rank) but still appears, so the full
|
|
484
|
+
// frozen-6 set is rankable. opts.problemType / opts.stage are accepted for the
|
|
485
|
+
// documented call shape; this fixture ranks by the projection's exposed
|
|
486
|
+
// hierarchy_rank (the deferred nav engine layers problem/stage weighting on top).
|
|
487
|
+
// Returns [{ reach_id, best_rank, wired_count }] in ranked order.
|
|
488
|
+
// ---------------------------------------------------------------------------
|
|
489
|
+
function rankReachesForProblem(projection, opts) {
|
|
490
|
+
void opts; // problemType / stage accepted for the call shape; see header.
|
|
491
|
+
const nodes = projection && Array.isArray(projection.nodes) ? projection.nodes : [];
|
|
492
|
+
const reachIds = nodes
|
|
493
|
+
.filter((n) => n && n.kind === 'reach' && typeof n.name === 'string')
|
|
494
|
+
.map((n) => n.name);
|
|
495
|
+
|
|
496
|
+
const best = new Map();
|
|
497
|
+
const count = new Map();
|
|
498
|
+
for (const id of reachIds) {
|
|
499
|
+
best.set(id, Infinity);
|
|
500
|
+
count.set(id, 0);
|
|
501
|
+
}
|
|
502
|
+
for (const n of nodes) {
|
|
503
|
+
if (!n || n.methodology_tier !== TIER_OP) continue;
|
|
504
|
+
if (typeof n.reach_id !== 'string' || !best.has(n.reach_id)) continue;
|
|
505
|
+
count.set(n.reach_id, count.get(n.reach_id) + 1);
|
|
506
|
+
if (typeof n.hierarchy_rank === 'number' && n.hierarchy_rank < best.get(n.reach_id)) {
|
|
507
|
+
best.set(n.reach_id, n.hierarchy_rank);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
return reachIds
|
|
512
|
+
.map((id) => ({ reach_id: id, best_rank: best.get(id), wired_count: count.get(id) }))
|
|
513
|
+
.sort((a, b) => {
|
|
514
|
+
if (a.best_rank !== b.best_rank) return a.best_rank - b.best_rank;
|
|
515
|
+
return a.reach_id.localeCompare(b.reach_id);
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// ---------------------------------------------------------------------------
|
|
520
|
+
// distinctSubModes(connectorReg) -- the DERIVED sub_mode set: the distinct
|
|
521
|
+
// sub_modes seen across the connector spine. Each becomes a mindrian-operation
|
|
522
|
+
// sub_mode node. Sorted for byte-stability.
|
|
523
|
+
// ---------------------------------------------------------------------------
|
|
524
|
+
function distinctSubModes(connectorReg) {
|
|
525
|
+
const set = new Set();
|
|
526
|
+
const connectors = connectorReg && Array.isArray(connectorReg.connectors)
|
|
527
|
+
? connectorReg.connectors
|
|
528
|
+
: [];
|
|
529
|
+
for (const c of connectors) {
|
|
530
|
+
if (c && typeof c.sub_mode === 'string' && c.sub_mode) set.add(c.sub_mode);
|
|
531
|
+
}
|
|
532
|
+
return Array.from(set).sort((a, b) => a.localeCompare(b));
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// ---------------------------------------------------------------------------
|
|
536
|
+
// makeAddEdge(nodeIds, edges, seen) -- the referential-integrity chokepoint.
|
|
537
|
+
// Returns an addEdge(type, from, to) closure that THROWS if:
|
|
538
|
+
// - type is not in ALLOWED_EDGE_TYPES (an undocumented edge type, BOG-05), or
|
|
539
|
+
// - from or to is absent from nodeIds (a dangling endpoint).
|
|
540
|
+
// Deduplicates on (type, from, to) so a re-declared pair lands once. Mirrors the
|
|
541
|
+
// frozen-bank-membership-throws idiom of lib/core/navigation/edges.cjs writeEdge
|
|
542
|
+
// (which returns instead of throwing; here we throw because a malformed edge in
|
|
543
|
+
// a GENERATED artifact is a build error, not a runtime input error).
|
|
544
|
+
// ---------------------------------------------------------------------------
|
|
545
|
+
// props (optional, 4th arg) may carry the earned-chain scalars { confidence,
|
|
546
|
+
// transform } (Plan 172-15, Canon Part 11 R6 / INV-08). Only `confidence` (a
|
|
547
|
+
// number) and `transform` (a SHORT generic handoff string) are copied onto the
|
|
548
|
+
// edge, mirroring the verified Brain FEEDS_INTO {confidence, transform} schema;
|
|
549
|
+
// any other prop key is IGNORED (the EDGE_FIELD_ALLOWLIST boundary scan would
|
|
550
|
+
// otherwise fail the build -- a key outside the allowlist is a Part 8 breach).
|
|
551
|
+
function makeAddEdge(nodeIds, edges, seen) {
|
|
552
|
+
return function addEdge(type, from, to, props) {
|
|
553
|
+
if (!ALLOWED_EDGE_TYPES.has(type)) {
|
|
554
|
+
throw new Error('addEdge: undocumented edge type ' + JSON.stringify(type));
|
|
555
|
+
}
|
|
556
|
+
if (!nodeIds.has(from)) {
|
|
557
|
+
throw new Error('addEdge: dangling edge endpoint (from) ' + JSON.stringify(from));
|
|
558
|
+
}
|
|
559
|
+
if (!nodeIds.has(to)) {
|
|
560
|
+
throw new Error('addEdge: dangling edge endpoint (to) ' + JSON.stringify(to));
|
|
561
|
+
}
|
|
562
|
+
const key = type + '\n' + from + '\n' + to;
|
|
563
|
+
if (seen.has(key)) return;
|
|
564
|
+
seen.add(key);
|
|
565
|
+
const edge = { type, from, to };
|
|
566
|
+
if (props && typeof props === 'object') {
|
|
567
|
+
if (typeof props.confidence === 'number') edge.confidence = props.confidence;
|
|
568
|
+
if (typeof props.transform === 'string' && props.transform) edge.transform = props.transform;
|
|
569
|
+
}
|
|
570
|
+
edges.push(edge);
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// ---------------------------------------------------------------------------
|
|
575
|
+
// curatedChainEdges(commandReg, ..., addEdge) -- emit CHAINS / FEEDS_INTO /
|
|
576
|
+
// PREREQUISITE edges from command-registry.curated_chains, where present. Each
|
|
577
|
+
// curated_chains entry is { kind, from, to } with kind in CHAIN_KIND_TO_EDGE_TYPE
|
|
578
|
+
// (chain -> CHAINS, feeds_into -> FEEDS_INTO, prerequisite -> PREREQUISITE) and
|
|
579
|
+
// from/to being:
|
|
580
|
+
// - a framework name (framework -> framework), OR
|
|
581
|
+
// - a reach id (reach -> reach, for FEEDS_INTO progressions), OR
|
|
582
|
+
// - a COMMAND / counterpart endpoint (Phase 172-08 cross-class chaining,
|
|
583
|
+
// navigator directive 2026-06-23): an EXPLICIT `command:/mos:<slug>` id
|
|
584
|
+
// (the exact counterpart-node id the projection already carries from Plan
|
|
585
|
+
// 03), so a curated_chains entry may connect a command/pipeline counterpart
|
|
586
|
+
// to a framework -- realizing command -> pipeline -> framework.
|
|
587
|
+
// The from/to strings are mapped to node ids: a bareword known framework name ->
|
|
588
|
+
// framework:<name>, a bareword known reach id -> reach:<id>, an EXPLICIT
|
|
589
|
+
// `command:<slug>` that matches a real command node -> that node id. addEdge
|
|
590
|
+
// THROWS on a dangling endpoint, so a curated_chains entry that references an
|
|
591
|
+
// unknown framework/reach/command STILL FAILS the build (referential integrity
|
|
592
|
+
// is PRESERVED, not weakened: only the set of resolvable endpoint KINDS grows;
|
|
593
|
+
// an endpoint that resolves to no projection node still throws). Returns the
|
|
594
|
+
// count emitted.
|
|
595
|
+
// ---------------------------------------------------------------------------
|
|
596
|
+
function curatedChainEdges(commandReg, frameworkNodeIds, reachNodeIds, commandNodeIds, addEdge) {
|
|
597
|
+
const chains = commandReg && Array.isArray(commandReg.curated_chains)
|
|
598
|
+
? commandReg.curated_chains
|
|
599
|
+
: [];
|
|
600
|
+
const cmdIds = (commandNodeIds && typeof commandNodeIds.has === 'function')
|
|
601
|
+
? commandNodeIds
|
|
602
|
+
: new Set();
|
|
603
|
+
let emitted = 0;
|
|
604
|
+
// Resolve an endpoint string to a node id. An EXPLICIT `command:` prefix
|
|
605
|
+
// resolves against the command counterpart node set (cross-class endpoint);
|
|
606
|
+
// a bareword resolves as a framework name, then a reach id (back-compat). An
|
|
607
|
+
// endpoint that resolves to no node returns the raw string so addEdge throws a
|
|
608
|
+
// clear dangling-endpoint error (referential integrity preserved).
|
|
609
|
+
const resolve = (s) => {
|
|
610
|
+
if (typeof s !== 'string' || !s) return null;
|
|
611
|
+
// Cross-class: an explicit command/counterpart endpoint id.
|
|
612
|
+
if (s.indexOf('command:') === 0) {
|
|
613
|
+
if (cmdIds.has(s)) return s;
|
|
614
|
+
return s; // unknown command counterpart -> addEdge throws (dangling)
|
|
615
|
+
}
|
|
616
|
+
const fwId = 'framework:' + s;
|
|
617
|
+
if (frameworkNodeIds.has(fwId)) return fwId;
|
|
618
|
+
const reachId = 'reach:' + s;
|
|
619
|
+
if (reachNodeIds.has(reachId)) return reachId;
|
|
620
|
+
// Unresolved: return the raw string so addEdge throws a clear dangling error.
|
|
621
|
+
return s;
|
|
622
|
+
};
|
|
623
|
+
for (const c of chains) {
|
|
624
|
+
if (!c || typeof c !== 'object') continue;
|
|
625
|
+
const type = CHAIN_KIND_TO_EDGE_TYPE[c.kind];
|
|
626
|
+
if (!type) {
|
|
627
|
+
throw new Error('curatedChainEdges: unknown chain kind ' + JSON.stringify(c.kind));
|
|
628
|
+
}
|
|
629
|
+
// Carry the earned-chain scalars onto the materialized edge where the source
|
|
630
|
+
// curated_chains entry has them: `confidence` (a curated float) and
|
|
631
|
+
// `transform` (a SHORT generic handoff descriptor). This mirrors the verified
|
|
632
|
+
// Brain FEEDS_INTO {confidence, transform} schema (Plan 172-15, Canon Part 11
|
|
633
|
+
// R6 / INV-08); transform is enum/scalar machinery metadata only (Part 8).
|
|
634
|
+
const props = {};
|
|
635
|
+
if (typeof c.confidence === 'number') props.confidence = c.confidence;
|
|
636
|
+
if (typeof c.transform === 'string' && c.transform) props.transform = c.transform;
|
|
637
|
+
addEdge(type, resolve(c.from), resolve(c.to), props);
|
|
638
|
+
emitted += 1;
|
|
639
|
+
}
|
|
640
|
+
return emitted;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
// ---------------------------------------------------------------------------
|
|
644
|
+
// crossDomainAnalogueEdges(analogues, frameworkNodeIds, addEdge) -- emit one
|
|
645
|
+
// CROSS_DOMAIN_ANALOGUE edge per data/cross-domain-analogues.json analogue pair
|
|
646
|
+
// (the 150.10 seeds). Both endpoints are framework names; the node-derivation
|
|
647
|
+
// union already minted a framework node for each endpoint, so they resolve.
|
|
648
|
+
// addEdge throws if an endpoint somehow does not resolve. Returns the count.
|
|
649
|
+
// ---------------------------------------------------------------------------
|
|
650
|
+
function crossDomainAnalogueEdges(analogues, addEdge) {
|
|
651
|
+
const list = analogues && Array.isArray(analogues.analogues) ? analogues.analogues : [];
|
|
652
|
+
let emitted = 0;
|
|
653
|
+
for (const a of list) {
|
|
654
|
+
if (!a || typeof a !== 'object') continue;
|
|
655
|
+
if (typeof a.from !== 'string' || !a.from) continue;
|
|
656
|
+
if (typeof a.to !== 'string' || !a.to) continue;
|
|
657
|
+
addEdge('CROSS_DOMAIN_ANALOGUE', 'framework:' + a.from, 'framework:' + a.to);
|
|
658
|
+
emitted += 1;
|
|
659
|
+
}
|
|
660
|
+
return emitted;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// ---------------------------------------------------------------------------
|
|
664
|
+
// chainLayerNote(curatedChainCount) -- the top-level generated_note string for
|
|
665
|
+
// the chain layer. When curated_chains is source-empty (zero chaining edges),
|
|
666
|
+
// the note states the chain layer is source-empty pending a populated
|
|
667
|
+
// curated_chains, so the empty chain layer is LEGIBLE not silent (per the plan
|
|
668
|
+
// PLAN-CHECK note). When chains exist, the note reflects the count.
|
|
669
|
+
// ---------------------------------------------------------------------------
|
|
670
|
+
function chainLayerNote(curatedChainCount) {
|
|
671
|
+
if (curatedChainCount === 0) {
|
|
672
|
+
return (
|
|
673
|
+
'Chain layer (CHAINS / FEEDS_INTO / PREREQUISITE) is SOURCE-EMPTY: ' +
|
|
674
|
+
'data/command-registry.json curated_chains is [] (an empty array), so the ' +
|
|
675
|
+
'generator legitimately emits ZERO chaining edges. The closed edge set is a ' +
|
|
676
|
+
'CEILING not a floor; only OPERATES (>=1 per framework-declaring command) and ' +
|
|
677
|
+
'CROSS_DOMAIN_ANALOGUE (one per analogue pair) are hard floors. Populate ' +
|
|
678
|
+
'curated_chains (kind in chain|feeds_into|prerequisite; from/to a framework ' +
|
|
679
|
+
'name or reach id) and regenerate to materialize the chain layer. The empty ' +
|
|
680
|
+
'state is intentional and legible, never fabricated to fill the gap.'
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
return (
|
|
684
|
+
'Chain layer emitted ' + curatedChainCount + ' edge(s) from ' +
|
|
685
|
+
'data/command-registry.json curated_chains (kind -> CHAINS / FEEDS_INTO / ' +
|
|
686
|
+
'PREREQUISITE).'
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
// ---------------------------------------------------------------------------
|
|
691
|
+
// buildProjection() -- the core. Emits { ontology_ref, generated_note, nodes,
|
|
692
|
+
// edges }. The node list is DERIVED from the file walk + the registry framework
|
|
693
|
+
// union + REACH_IDS + the distinct sub_modes (BOG-03 - zero hand-authored node
|
|
694
|
+
// list). EVERY node carries a methodology_tier (BOG-02): framework -> pws; every
|
|
695
|
+
// command / skill / agent / reach / sub_mode -> mindrian-operation. Per-file
|
|
696
|
+
// grain (BOG-04). The edges[] in this plan is the OPERATES scaffold
|
|
697
|
+
// (command -> framework, promoted from the framework_index inverse maps).
|
|
698
|
+
// ---------------------------------------------------------------------------
|
|
699
|
+
function buildProjection() {
|
|
700
|
+
const connectorReg = readJson(CONNECTOR_REGISTRY_PATH) || {};
|
|
701
|
+
const commandReg = readJson(COMMAND_REGISTRY_PATH) || {};
|
|
702
|
+
const analogues = readJson(ANALOGUES_PATH) || {};
|
|
703
|
+
|
|
704
|
+
const sources = listSourceFiles();
|
|
705
|
+
const connBySurface = connectorBySurface(connectorReg);
|
|
706
|
+
|
|
707
|
+
const nodes = [];
|
|
708
|
+
|
|
709
|
+
// command / skill / agent nodes -- per-file (BOG-04), all mindrian-operation.
|
|
710
|
+
// A command/agent that DECLARES A CONNECTOR exposes its ranking inputs at the
|
|
711
|
+
// TOP LEVEL of the node (BOG-07): reach_id, sub_mode, hierarchy_rank, posture,
|
|
712
|
+
// sensor_triggers -- copied verbatim as enum/scalar values from the connector
|
|
713
|
+
// entry (Part 8: generic machinery signals, never user content). It also
|
|
714
|
+
// carries a chain-provenance block (the framework -> command (OPERATES) -> reach
|
|
715
|
+
// chain + the firing sensor list) so the deferred nav engine can both RANK and
|
|
716
|
+
// EXPLAIN (BOG-07 elevated). A skill carries NO connector (D-01): name + tier
|
|
717
|
+
// only, no ranking fields (exempt from the ranking gate; Plan 04 enforces the
|
|
718
|
+
// exemption).
|
|
719
|
+
for (const src of sources) {
|
|
720
|
+
if (src.kind === 'command') {
|
|
721
|
+
const surface = commandSurfaceId(src.base);
|
|
722
|
+
const conn = connBySurface.get(surface);
|
|
723
|
+
nodes.push(buildOperationNode('command:' + surface, 'command', surface, conn));
|
|
724
|
+
} else if (src.kind === 'skill') {
|
|
725
|
+
// Skills carry NO connector frontmatter (D-01): name + tier only.
|
|
726
|
+
nodes.push({
|
|
727
|
+
id: 'skill:' + src.base,
|
|
728
|
+
kind: 'skill',
|
|
729
|
+
methodology_tier: TIER_OP,
|
|
730
|
+
name: src.base,
|
|
731
|
+
});
|
|
732
|
+
} else if (src.kind === 'agent') {
|
|
733
|
+
const surface = 'agent:' + src.base;
|
|
734
|
+
const conn = connBySurface.get(surface);
|
|
735
|
+
nodes.push(buildOperationNode('agent:' + src.base, 'agent', src.base, conn));
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
// framework nodes -- the DERIVED union (command + connector framework_index +
|
|
740
|
+
// analogue endpoints). All pws. Minting the analogue endpoints keeps Wave 3's
|
|
741
|
+
// CROSS_DOMAIN_ANALOGUE edges from dangling.
|
|
742
|
+
const frameworks = distinctFrameworks(commandReg, connectorReg, analogues);
|
|
743
|
+
for (const fw of frameworks) {
|
|
744
|
+
nodes.push({
|
|
745
|
+
id: 'framework:' + fw,
|
|
746
|
+
kind: 'framework',
|
|
747
|
+
methodology_tier: TIER_PWS,
|
|
748
|
+
name: fw,
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
// reach nodes -- the frozen 6 (REACH_IDS), never redefined. All
|
|
753
|
+
// mindrian-operation. hats is one of the 6 and is NOT dropped.
|
|
754
|
+
for (const r of REACH_IDS) {
|
|
755
|
+
nodes.push({
|
|
756
|
+
id: 'reach:' + r,
|
|
757
|
+
kind: 'reach',
|
|
758
|
+
methodology_tier: TIER_OP,
|
|
759
|
+
name: r,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
// sub_mode nodes -- the DERIVED distinct sub_modes from the connector spine.
|
|
764
|
+
// All mindrian-operation.
|
|
765
|
+
for (const sm of distinctSubModes(connectorReg)) {
|
|
766
|
+
nodes.push({
|
|
767
|
+
id: 'sub_mode:' + sm,
|
|
768
|
+
kind: 'sub_mode',
|
|
769
|
+
methodology_tier: TIER_OP,
|
|
770
|
+
name: sm,
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// ---- typed edge layer (BOG-05): the 5 closed types, every edge routed
|
|
775
|
+
// through the addEdge() referential-integrity chokepoint. ----
|
|
776
|
+
const nodeIds = new Set(nodes.map((n) => n.id));
|
|
777
|
+
const frameworkNodeIds = new Set(frameworks.map((fw) => 'framework:' + fw));
|
|
778
|
+
const reachNodeIds = new Set(REACH_IDS.map((r) => 'reach:' + r));
|
|
779
|
+
const commandNodeIds = new Set(
|
|
780
|
+
sources.filter((s) => s.kind === 'command').map((s) => 'command:' + commandSurfaceId(s.base))
|
|
781
|
+
);
|
|
782
|
+
|
|
783
|
+
const edges = [];
|
|
784
|
+
const seenEdge = new Set();
|
|
785
|
+
const addEdge = makeAddEdge(nodeIds, edges, seenEdge);
|
|
786
|
+
|
|
787
|
+
// OPERATES: command -> framework, promoted from the union of the
|
|
788
|
+
// command-registry + connector-registry framework_index inverse maps. The
|
|
789
|
+
// (from, to) pairs are collected + sorted FIRST so the emission order (hence
|
|
790
|
+
// the serialized artifact) is byte-stable; addEdge dedupes + enforces
|
|
791
|
+
// referential integrity.
|
|
792
|
+
const operatesPairs = [];
|
|
793
|
+
for (const reg of [commandReg, connectorReg]) {
|
|
794
|
+
const fi = reg && reg.framework_index;
|
|
795
|
+
if (!fi || typeof fi !== 'object') continue;
|
|
796
|
+
for (const fwName of Object.keys(fi)) {
|
|
797
|
+
const surfaces = Array.isArray(fi[fwName]) ? fi[fwName] : [];
|
|
798
|
+
const toId = 'framework:' + fwName;
|
|
799
|
+
if (!frameworkNodeIds.has(toId)) continue;
|
|
800
|
+
for (const surface of surfaces) {
|
|
801
|
+
if (typeof surface !== 'string' || !surface.startsWith('/mos:')) continue;
|
|
802
|
+
const fromId = 'command:' + surface;
|
|
803
|
+
if (!commandNodeIds.has(fromId)) continue;
|
|
804
|
+
// Join on a newline: node ids contain spaces (framework names like
|
|
805
|
+
// "Jobs to Be Done (JTBD)"), so a space separator would corrupt the
|
|
806
|
+
// split. A newline can never appear in a node id, so it is a safe
|
|
807
|
+
// delimiter for the sort-then-split byte-stability pass.
|
|
808
|
+
operatesPairs.push(fromId + '\n' + toId);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
operatesPairs.sort((a, b) => a.localeCompare(b));
|
|
813
|
+
for (const pair of operatesPairs) {
|
|
814
|
+
const idx = pair.indexOf('\n');
|
|
815
|
+
addEdge('OPERATES', pair.slice(0, idx), pair.slice(idx + 1));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// CHAINS / FEEDS_INTO / PREREQUISITE: from command-registry.curated_chains
|
|
819
|
+
// (EMPTY today -> zero edges + the chain-layer note below). Never fabricated.
|
|
820
|
+
const curatedChainCount = curatedChainEdges(
|
|
821
|
+
commandReg, frameworkNodeIds, reachNodeIds, commandNodeIds, addEdge
|
|
822
|
+
);
|
|
823
|
+
|
|
824
|
+
// CROSS_DOMAIN_ANALOGUE: one edge per cross-domain-analogues.json pair (>=2,
|
|
825
|
+
// the 150.10 seeds). The endpoints are minted framework nodes, so they resolve.
|
|
826
|
+
crossDomainAnalogueEdges(analogues, addEdge);
|
|
827
|
+
|
|
828
|
+
return {
|
|
829
|
+
ontology_ref: 'data/connector-registry.json + data/command-registry.json',
|
|
830
|
+
generated_note: GENERATED_NOTE,
|
|
831
|
+
chain_layer_note: chainLayerNote(curatedChainCount),
|
|
832
|
+
nodes,
|
|
833
|
+
edges,
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// ---------------------------------------------------------------------------
|
|
838
|
+
// serializeProjection(proj) -- deterministic JSON + trailing newline (byte-stable
|
|
839
|
+
// across machines), mirroring build-connector-registry.cjs serializeRegistry.
|
|
840
|
+
// Emits ONLY the serialized fields in a stable key order.
|
|
841
|
+
// ---------------------------------------------------------------------------
|
|
842
|
+
function serializeProjection(proj) {
|
|
843
|
+
const clean = {
|
|
844
|
+
ontology_ref: proj.ontology_ref,
|
|
845
|
+
generated_note: proj.generated_note,
|
|
846
|
+
chain_layer_note: proj.chain_layer_note,
|
|
847
|
+
nodes: proj.nodes,
|
|
848
|
+
edges: proj.edges,
|
|
849
|
+
};
|
|
850
|
+
return JSON.stringify(clean, null, 2) + '\n';
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// ---------------------------------------------------------------------------
|
|
854
|
+
// loadUnwiredAllowlist() -- read data/orchestration-unwired-allowlist.json (the
|
|
855
|
+
// wired-XOR-allowlisted ledger). Returns a Set of allowlisted framework names. A
|
|
856
|
+
// framework in this set is intentionally NOT reach-wired and is EXEMPT from the
|
|
857
|
+
// UN-WIRED leg (BOG-06, Phase 144.1 idiom). Degrades to an empty Set on any read
|
|
858
|
+
// failure (a missing/malformed allowlist means NOTHING is exempted, which is the
|
|
859
|
+
// strict-by-default posture: a real orphan would then fire UN-WIRED rather than
|
|
860
|
+
// be silently waved through). Zero Brain/network (Part 8).
|
|
861
|
+
// ---------------------------------------------------------------------------
|
|
862
|
+
function loadUnwiredAllowlist() {
|
|
863
|
+
const raw = readJson(UNWIRED_ALLOWLIST_PATH);
|
|
864
|
+
const set = new Set();
|
|
865
|
+
if (!Array.isArray(raw)) return set;
|
|
866
|
+
for (const e of raw) {
|
|
867
|
+
if (e && typeof e.framework === 'string' && e.framework) set.add(e.framework);
|
|
868
|
+
}
|
|
869
|
+
return set;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// ---------------------------------------------------------------------------
|
|
873
|
+
// classifyCommandNode(node) -- the command-grained classifier (Phase 172-03,
|
|
874
|
+
// INV-04). Returns 'ranked' | 'excluded' | 'gap' for a command-kind node:
|
|
875
|
+
// ranked -- carries reach_id + hierarchy_rank + posture (a wired counterpart).
|
|
876
|
+
// excluded -- listed in EXCLUDED_COMMANDS with a reason (a first-class
|
|
877
|
+
// conformant terminal state, Canon Part 11 R1; NEVER dark).
|
|
878
|
+
// gap -- a bare command (no reach_id) that is NOT excluded: a dark
|
|
879
|
+
// command that warrants a mindrian-operation counterpart but has
|
|
880
|
+
// none yet. THIS is the inversion of the old :824 early-continue -
|
|
881
|
+
// a bare command no longer silently ships; it surfaces as a gap.
|
|
882
|
+
// A ranked-BUT-excluded command is impossible by construction here (a connector
|
|
883
|
+
// surface declares a reach_id; the utility commands declare none), but ranked
|
|
884
|
+
// wins if both ever held, so the XOR stays a true partition.
|
|
885
|
+
//
|
|
886
|
+
// Phase 172-13 (the navigator-approved "full flip" 2026-06-23) PROPAGATES the
|
|
887
|
+
// connector EXCLUDE decision: a command counterpart whose surface is EXCLUDED in
|
|
888
|
+
// the connector layer (in the connector-coverage-ledger excluded set) is
|
|
889
|
+
// `excluded` in the projection too, even if it is not in the projection-native
|
|
890
|
+
// EXCLUDED_COMMANDS table. The projection-excluded set is therefore the UNION of
|
|
891
|
+
// (a) EXCLUDED_COMMANDS (projection-native reasons: doctor/setup/help) and
|
|
892
|
+
// (b) the connector-excluded command set (deprecated redirects, render/utility
|
|
893
|
+
// surfaces excluded in their own connector frontmatter). `connectorExcluded` is
|
|
894
|
+
// an optional Set override for tests; it defaults to the memoized ledger read.
|
|
895
|
+
// ---------------------------------------------------------------------------
|
|
896
|
+
function classifyCommandNode(node, connectorExcluded) {
|
|
897
|
+
if (!node || node.kind !== 'command') return null;
|
|
898
|
+
if (typeof node.reach_id === 'string' && node.reach_id) return 'ranked';
|
|
899
|
+
if (Object.prototype.hasOwnProperty.call(EXCLUDED_COMMANDS, node.name)) return 'excluded';
|
|
900
|
+
const excludedSet =
|
|
901
|
+
connectorExcluded instanceof Set ? connectorExcluded : connectorExcludedCommands();
|
|
902
|
+
if (excludedSet.has(node.name)) return 'excluded';
|
|
903
|
+
return 'gap';
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// ---------------------------------------------------------------------------
|
|
907
|
+
// commandCoverageReport(projection) -- walk every command-kind node and classify
|
|
908
|
+
// it ranked | excluded | gap (Phase 172-03, INV-04). Returns
|
|
909
|
+
// { commands:[{command, source, state}], counts:{ranked, excluded, gap, total} }
|
|
910
|
+
// sorted by command for determinism. `source` is the command surface file path
|
|
911
|
+
// fragment so the ledger is self-describing. The XOR invariant holds by
|
|
912
|
+
// construction: every command lands in EXACTLY one bucket (classifyCommandNode
|
|
913
|
+
// returns exactly one state), so counts.ranked + counts.excluded + counts.gap
|
|
914
|
+
// === counts.total === the command-node count. Reads ONLY the projection (no
|
|
915
|
+
// Brain, no network; Part 8).
|
|
916
|
+
// ---------------------------------------------------------------------------
|
|
917
|
+
function commandCoverageReport(projection) {
|
|
918
|
+
const nodes = projection && Array.isArray(projection.nodes) ? projection.nodes : [];
|
|
919
|
+
const commands = [];
|
|
920
|
+
const counts = { ranked: 0, excluded: 0, gap: 0, total: 0 };
|
|
921
|
+
for (const n of nodes) {
|
|
922
|
+
if (!n || n.kind !== 'command') continue;
|
|
923
|
+
const state = classifyCommandNode(n);
|
|
924
|
+
counts.total += 1;
|
|
925
|
+
counts[state] += 1;
|
|
926
|
+
// The command base (strip the /mos: prefix) -> commands/<base>.md is the
|
|
927
|
+
// source file. Keep it generic-machinery only (a slug, never user content).
|
|
928
|
+
const base = typeof n.name === 'string' ? n.name.replace(/^\/mos:/, '') : '';
|
|
929
|
+
commands.push({ command: n.name, source: 'commands/' + base + '.md', state });
|
|
930
|
+
}
|
|
931
|
+
commands.sort((a, b) => String(a.command).localeCompare(String(b.command)));
|
|
932
|
+
return { commands, counts };
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
// ---------------------------------------------------------------------------
|
|
936
|
+
// serializeCommandLedger(projection) -- emit data/orchestration-command-ledger
|
|
937
|
+
// .json (Phase 172-03 INV-04), the command-grained wired-XOR-excluded ledger
|
|
938
|
+
// mirroring data/orchestration-unwired-allowlist.json but at the command grain.
|
|
939
|
+
// Shape: { generated_note, counts:{ranked, excluded, gap, total},
|
|
940
|
+
// commands:[{command, source, state}] } sorted by command. Deterministic JSON +
|
|
941
|
+
// trailing newline (byte-stable), so --check can STALE-byte-check it. GENERATED,
|
|
942
|
+
// never hand-authored (BOG-03): the EXCLUDED dispositions come from
|
|
943
|
+
// EXCLUDED_COMMANDS, the ranked/gap split from the projection's command nodes.
|
|
944
|
+
// ---------------------------------------------------------------------------
|
|
945
|
+
function serializeCommandLedger(projection) {
|
|
946
|
+
const { commands, counts } = commandCoverageReport(projection);
|
|
947
|
+
const clean = {
|
|
948
|
+
generated_note:
|
|
949
|
+
'GENERATED by scripts/build-orchestration-projection.cjs (serializeCommandLedger) - ' +
|
|
950
|
+
'do not edit by hand. The command-grained wired-XOR-excluded ledger (Phase 172-03, ' +
|
|
951
|
+
'Canon Part 11 R1/R5): every /mos command is ranked (a wired counterpart), excluded ' +
|
|
952
|
+
'(a utility command with a documented reason, a first-class terminal state, never ' +
|
|
953
|
+
'dark), or gap (a dark command warranting a mindrian-operation counterpart, to be ' +
|
|
954
|
+
'wired in a later 172 wave). Regenerate: node scripts/build-orchestration-projection.cjs',
|
|
955
|
+
counts,
|
|
956
|
+
commands,
|
|
957
|
+
};
|
|
958
|
+
return JSON.stringify(clean, null, 2) + '\n';
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
// ---------------------------------------------------------------------------
|
|
962
|
+
// validateProjection(projection) -- the 3-mode drift taxonomy (D-04, BOG-08).
|
|
963
|
+
// Returns { stale, unwired, unranked }: three categorized arrays of error
|
|
964
|
+
// strings (each empty = that mode is clean). PURE with respect to the Brain:
|
|
965
|
+
// reads ONLY the passed projection + the committed on-disk projection file (for
|
|
966
|
+
// the byte-compare) + the allowlist file + the frozen REACH_IDS require. ZERO
|
|
967
|
+
// Brain/network calls (Part 8). Mirrors validateConnectors in
|
|
968
|
+
// build-connector-registry.cjs (categorized error arrays, exercised directly by
|
|
969
|
+
// the test without spawning a subprocess).
|
|
970
|
+
//
|
|
971
|
+
// STALE -- the serialized regeneration of the LIVE sources differs
|
|
972
|
+
// byte-for-byte from the committed data/brain-orchestration
|
|
973
|
+
// -projection.json (someone edited a surface without
|
|
974
|
+
// regenerating). The passed `projection` is serialized and
|
|
975
|
+
// compared to the on-disk file.
|
|
976
|
+
// UN-WIRED -- FRAMEWORK-GRAINED (plan-check, matches BOG-06 "every framework
|
|
977
|
+
// is reachable"): a FRAMEWORK is missing from nodes[] OR not
|
|
978
|
+
// reachable to one of the 6 frozen REACH_IDS via any
|
|
979
|
+
// OPERATES->reach chain, UNLESS the framework is in
|
|
980
|
+
// data/orchestration-unwired-allowlist.json with a reason
|
|
981
|
+
// (wired-XOR-allowlisted). A framework reachable via a SIBLING
|
|
982
|
+
// command's connector counts as wired. Skills are EXEMPT (D-01):
|
|
983
|
+
// the gate is framework-grained, never a skill-node check.
|
|
984
|
+
// UN-RANKED -- a connector-derived mindrian-operation node (one that declares
|
|
985
|
+
// a reach_id) lacks reach_id, hierarchy_rank, or posture. Skills
|
|
986
|
+
// (name-only, no reach_id) are EXEMPT (D-01).
|
|
987
|
+
//
|
|
988
|
+
// Phase 172-03 (INV-04/05/06) ADDS the command-grained coverage pass. The return
|
|
989
|
+
// gains a fourth array, `command_gaps`: every command-kind node is classified
|
|
990
|
+
// ranked | excluded | gap, and a `gap` (a bare command not in EXCLUDED_COMMANDS)
|
|
991
|
+
// is collected into command_gaps. THIS INVERTS the old early-continue: a bare
|
|
992
|
+
// command is no longer silently skipped - it surfaces as a gap UNLESS excluded.
|
|
993
|
+
// The command-ledger STALE check is ALSO folded in (a hand-edit of
|
|
994
|
+
// data/orchestration-command-ledger.json fires STALE). At this stage command_gaps
|
|
995
|
+
// is reported WARN-only (D-172-e); the hard-FAIL flip is Wave 4 / Plan 172-13.
|
|
996
|
+
// Skills stay EXEMPT from the command pass (they are not command-kind).
|
|
997
|
+
// ---------------------------------------------------------------------------
|
|
998
|
+
function validateProjection(projection) {
|
|
999
|
+
const stale = [];
|
|
1000
|
+
const unwired = [];
|
|
1001
|
+
const unranked = [];
|
|
1002
|
+
const command_gaps = [];
|
|
1003
|
+
|
|
1004
|
+
const proj = projection && typeof projection === 'object' ? projection : { nodes: [], edges: [] };
|
|
1005
|
+
const nodes = Array.isArray(proj.nodes) ? proj.nodes : [];
|
|
1006
|
+
const edges = Array.isArray(proj.edges) ? proj.edges : [];
|
|
1007
|
+
|
|
1008
|
+
const RECOVERY = 'Run: node scripts/build-orchestration-projection.cjs';
|
|
1009
|
+
|
|
1010
|
+
// ---- STALE: byte-compare the serialized projection vs the committed file. ----
|
|
1011
|
+
const serialized = serializeProjection({
|
|
1012
|
+
ontology_ref: proj.ontology_ref,
|
|
1013
|
+
generated_note: proj.generated_note,
|
|
1014
|
+
chain_layer_note: proj.chain_layer_note,
|
|
1015
|
+
nodes,
|
|
1016
|
+
edges,
|
|
1017
|
+
});
|
|
1018
|
+
const onDisk = fs.existsSync(PROJECTION_PATH)
|
|
1019
|
+
? fs.readFileSync(PROJECTION_PATH, 'utf8')
|
|
1020
|
+
: '';
|
|
1021
|
+
if (onDisk !== serialized) {
|
|
1022
|
+
stale.push(
|
|
1023
|
+
'STALE: data/brain-orchestration-projection.json diverges from the ' +
|
|
1024
|
+
'regenerated projection (a surface changed without regenerating). ' +
|
|
1025
|
+
RECOVERY
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
// ---- STALE (command ledger): byte-compare the serialized command ledger vs
|
|
1030
|
+
// the committed data/orchestration-command-ledger.json (Phase 172-03). A
|
|
1031
|
+
// hand-edit of the command ledger out of sync with the projection fires STALE,
|
|
1032
|
+
// exactly as the projection STALE check does for the projection file. ----
|
|
1033
|
+
const ledgerSerialized = serializeCommandLedger(proj);
|
|
1034
|
+
const ledgerOnDisk = fs.existsSync(COMMAND_LEDGER_PATH)
|
|
1035
|
+
? fs.readFileSync(COMMAND_LEDGER_PATH, 'utf8')
|
|
1036
|
+
: '';
|
|
1037
|
+
if (ledgerOnDisk !== ledgerSerialized) {
|
|
1038
|
+
stale.push(
|
|
1039
|
+
'STALE: data/orchestration-command-ledger.json diverges from the ' +
|
|
1040
|
+
'regenerated command ledger (a command surface changed, or the ledger ' +
|
|
1041
|
+
'was hand-edited, without regenerating). ' + RECOVERY
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// ---- UN-WIRED: framework-grained reachability to a frozen reach. ----
|
|
1046
|
+
const allowlist = loadUnwiredAllowlist();
|
|
1047
|
+
const frozenReach = new Set(REACH_IDS);
|
|
1048
|
+
|
|
1049
|
+
// Build the command -> framework (OPERATES) map and the command -> reach map so
|
|
1050
|
+
// a framework is "wired" iff SOME command that OPERATES it ALSO declares a
|
|
1051
|
+
// reach_id in the frozen 6. A framework wired via a sibling command counts.
|
|
1052
|
+
const nodeById = new Map(nodes.map((n) => [n.id, n]));
|
|
1053
|
+
const commandReachById = new Map();
|
|
1054
|
+
for (const n of nodes) {
|
|
1055
|
+
if (n && n.kind === 'command' && typeof n.reach_id === 'string') {
|
|
1056
|
+
commandReachById.set(n.id, n.reach_id);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
// framework id -> does ANY OPERATES-source command reach a frozen reach?
|
|
1060
|
+
const frameworkReaches = new Map();
|
|
1061
|
+
for (const n of nodes) {
|
|
1062
|
+
if (n && n.kind === 'framework') frameworkReaches.set(n.id, false);
|
|
1063
|
+
}
|
|
1064
|
+
for (const e of edges) {
|
|
1065
|
+
if (!e || e.type !== 'OPERATES') continue;
|
|
1066
|
+
const fromReach = commandReachById.get(e.from);
|
|
1067
|
+
if (fromReach && frozenReach.has(fromReach) && frameworkReaches.has(e.to)) {
|
|
1068
|
+
frameworkReaches.set(e.to, true);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
for (const n of nodes) {
|
|
1072
|
+
if (!n || n.kind !== 'framework') continue;
|
|
1073
|
+
if (allowlist.has(n.name)) continue; // wired-XOR-allowlisted
|
|
1074
|
+
if (!frameworkReaches.get(n.id)) {
|
|
1075
|
+
unwired.push(
|
|
1076
|
+
'UN-WIRED: framework "' + n.name + '" (node ' + n.id + ') is not ' +
|
|
1077
|
+
'reachable to any of the 6 frozen reaches via an OPERATES->reach ' +
|
|
1078
|
+
'chain and is not in data/orchestration-unwired-allowlist.json. ' +
|
|
1079
|
+
'Wire a connector (or allowlist it with a reason). ' + RECOVERY
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
void nodeById;
|
|
1084
|
+
|
|
1085
|
+
// ---- UN-RANKED: a connector-derived mindrian-operation node missing ranking
|
|
1086
|
+
// inputs. A node is connector-derived iff it declares a reach_id. Skills carry
|
|
1087
|
+
// no reach_id (D-01) and never enter this loop. ----
|
|
1088
|
+
for (const n of nodes) {
|
|
1089
|
+
if (!n || n.methodology_tier !== TIER_OP) continue;
|
|
1090
|
+
if (typeof n.reach_id !== 'string' || !n.reach_id) continue; // not connector-derived
|
|
1091
|
+
const missing = [];
|
|
1092
|
+
if (typeof n.reach_id !== 'string' || !n.reach_id) missing.push('reach_id');
|
|
1093
|
+
if (typeof n.hierarchy_rank !== 'number') missing.push('hierarchy_rank');
|
|
1094
|
+
if (typeof n.posture !== 'string' || !n.posture) missing.push('posture');
|
|
1095
|
+
if (missing.length) {
|
|
1096
|
+
unranked.push(
|
|
1097
|
+
'UN-RANKED: connector-derived node ' + n.id + ' ("' + n.name + '") is ' +
|
|
1098
|
+
'missing ranking input(s): ' + missing.join(', ') + '. ' + RECOVERY
|
|
1099
|
+
);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
// ---- COMMAND-GAP: the command-grained coverage pass (Phase 172-03,
|
|
1104
|
+
// INV-04/05). INVERTS the old early-continue: every command-kind node is
|
|
1105
|
+
// classified ranked | excluded | gap, and a `gap` (a bare command - no
|
|
1106
|
+
// reach_id - that is NOT in EXCLUDED_COMMANDS) is collected here rather than
|
|
1107
|
+
// silently shipped. A ranked command (carries reach_id) is wired; an excluded
|
|
1108
|
+
// command (in EXCLUDED_COMMANDS, a first-class terminal state) is conformant.
|
|
1109
|
+
// WARN-only at this stage (D-172-e); the hard-FAIL flip is Wave 4 / Plan
|
|
1110
|
+
// 172-13. ----
|
|
1111
|
+
for (const n of nodes) {
|
|
1112
|
+
if (!n || n.kind !== 'command') continue;
|
|
1113
|
+
if (classifyCommandNode(n) === 'gap') {
|
|
1114
|
+
command_gaps.push(
|
|
1115
|
+
'COMMAND-GAP: command "' + n.name + '" (node ' + n.id + ') is a bare ' +
|
|
1116
|
+
'command (no reach_id) and is not excluded in ' +
|
|
1117
|
+
'data/orchestration-command-ledger.json. Wire a connector counterpart ' +
|
|
1118
|
+
'(mindrian-operation, INV-05) or exclude it with a reason. ' + RECOVERY
|
|
1119
|
+
);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
return { stale, unwired, unranked, command_gaps };
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
// ---------------------------------------------------------------------------
|
|
1127
|
+
// runCheck() -- the --check mode. Regenerate the projection from the LIVE
|
|
1128
|
+
// sources in memory, run validateProjection, print each named failure mode +
|
|
1129
|
+
// its recovery line to stderr, and exit non-zero on ANY failure. Exit 0 + an OK
|
|
1130
|
+
// line on a clean repo. Mirrors build-connector-registry.cjs's --check (the
|
|
1131
|
+
// byte-compare + categorized-validation + exit-1 + recovery-line idiom). Makes
|
|
1132
|
+
// ZERO Brain/network calls (Part 8).
|
|
1133
|
+
// ---------------------------------------------------------------------------
|
|
1134
|
+
function runCheck() {
|
|
1135
|
+
const proj = buildProjection();
|
|
1136
|
+
const { stale, unwired, unranked, command_gaps } = validateProjection(proj);
|
|
1137
|
+
// Phase 172-13 (the navigator-approved "full flip" 2026-06-23): command_gaps
|
|
1138
|
+
// is now a HARD FAIL, joining STALE / UN-WIRED / UN-RANKED. A bare command
|
|
1139
|
+
// counterpart that is neither ranked NOR excluded (in EXCLUDED_COMMANDS or
|
|
1140
|
+
// propagated from the connector-excluded set) makes --check exit non-zero. The
|
|
1141
|
+
// flip is safe because Plan 172-16 wired/excluded the baseline and this plan
|
|
1142
|
+
// reconciled the projection to gap=0 FIRST, so a clean repo stays exit 0; only
|
|
1143
|
+
// an accidental-dark counterpart trips it. R2/R9/INV-10 step 3.
|
|
1144
|
+
const all = [...stale, ...unwired, ...unranked, ...command_gaps];
|
|
1145
|
+
if (all.length) {
|
|
1146
|
+
console.error(all.join('\n'));
|
|
1147
|
+
console.error(
|
|
1148
|
+
'Recovery: regenerate the projection, then re-stage it: ' +
|
|
1149
|
+
'node scripts/build-orchestration-projection.cjs'
|
|
1150
|
+
);
|
|
1151
|
+
process.exit(1);
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
console.log('orchestration-projection: OK');
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
// ---------------------------------------------------------------------------
|
|
1158
|
+
// main() -- the default write mode + the --check branch (STALE / UN-WIRED /
|
|
1159
|
+
// UN-RANKED).
|
|
1160
|
+
// ---------------------------------------------------------------------------
|
|
1161
|
+
function main() {
|
|
1162
|
+
const argv = process.argv.slice(2);
|
|
1163
|
+
|
|
1164
|
+
if (argv.includes('--check')) {
|
|
1165
|
+
runCheck();
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
const proj = buildProjection();
|
|
1170
|
+
fs.mkdirSync(DATA_DIR, { recursive: true });
|
|
1171
|
+
fs.writeFileSync(PROJECTION_PATH, serializeProjection(proj));
|
|
1172
|
+
console.log(
|
|
1173
|
+
'Wrote data/brain-orchestration-projection.json (' +
|
|
1174
|
+
proj.nodes.length +
|
|
1175
|
+
' nodes, ' +
|
|
1176
|
+
proj.edges.length +
|
|
1177
|
+
' edges)'
|
|
1178
|
+
);
|
|
1179
|
+
// Phase 172-03: emit the command-grained wired-XOR-excluded ledger alongside
|
|
1180
|
+
// the projection on the default run, so the two stay in lockstep.
|
|
1181
|
+
const ledger = serializeCommandLedger(proj);
|
|
1182
|
+
fs.writeFileSync(COMMAND_LEDGER_PATH, ledger);
|
|
1183
|
+
const ledgerCounts = commandCoverageReport(proj).counts;
|
|
1184
|
+
console.log(
|
|
1185
|
+
'Wrote data/orchestration-command-ledger.json (' +
|
|
1186
|
+
ledgerCounts.ranked + ' ranked, ' +
|
|
1187
|
+
ledgerCounts.excluded + ' excluded, ' +
|
|
1188
|
+
ledgerCounts.gap + ' gap; total ' + ledgerCounts.total + ')'
|
|
1189
|
+
);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
if (require.main === module) {
|
|
1193
|
+
main();
|
|
1194
|
+
} else {
|
|
1195
|
+
module.exports = {
|
|
1196
|
+
listSourceFiles,
|
|
1197
|
+
distinctFrameworks,
|
|
1198
|
+
distinctSubModes,
|
|
1199
|
+
rankingInputsFromConnector,
|
|
1200
|
+
buildOperationNode,
|
|
1201
|
+
rankReachesForProblem,
|
|
1202
|
+
makeAddEdge,
|
|
1203
|
+
curatedChainEdges,
|
|
1204
|
+
crossDomainAnalogueEdges,
|
|
1205
|
+
chainLayerNote,
|
|
1206
|
+
buildProjection,
|
|
1207
|
+
serializeProjection,
|
|
1208
|
+
loadUnwiredAllowlist,
|
|
1209
|
+
validateProjection,
|
|
1210
|
+
classifyCommandNode,
|
|
1211
|
+
commandCoverageReport,
|
|
1212
|
+
serializeCommandLedger,
|
|
1213
|
+
NODE_KINDS,
|
|
1214
|
+
EDGE_TYPES,
|
|
1215
|
+
ALLOWED_EDGE_TYPES,
|
|
1216
|
+
EXCLUDED_COMMANDS,
|
|
1217
|
+
CHAIN_KIND_TO_EDGE_TYPE,
|
|
1218
|
+
NODE_FIELD_ALLOWLIST,
|
|
1219
|
+
EDGE_FIELD_ALLOWLIST,
|
|
1220
|
+
};
|
|
1221
|
+
}
|