sneakoscope 6.0.3 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -12
- package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +18 -14
- package/dist/bin/sks-dispatch.js +2 -4
- package/dist/cli/args.js +2 -0
- package/dist/cli/command-manifest-lite.js +2 -3
- package/dist/cli/command-registry.js +3 -4
- package/dist/cli/help-fast.js +1 -1
- package/dist/cli/install-helpers.js +348 -763
- package/dist/cli/install-tool-helpers.js +287 -0
- package/dist/cli/router.js +91 -6
- package/dist/commands/codex-lb.js +188 -53
- package/dist/commands/codex.js +44 -5
- package/dist/commands/doctor.js +302 -46
- package/dist/commands/tmux.js +5 -1
- package/dist/commands/versioning.js +7 -0
- package/dist/commands/zellij-monitor-pane.js +2 -0
- package/dist/commands/zellij-viewport-pane.js +3 -1
- package/dist/commands/zellij.js +1 -1
- package/dist/config/skills-manifest.json +59 -59
- package/dist/core/agent-bridge/agent-manifest.js +48 -0
- package/dist/core/agents/agent-central-ledger.js +9 -0
- package/dist/core/agents/agent-cleanup-executor.js +334 -41
- package/dist/core/agents/agent-cleanup.js +20 -1
- package/dist/core/agents/agent-command-surface.js +3 -1
- package/dist/core/agents/agent-effort-policy.js +30 -38
- package/dist/core/agents/agent-janitor.js +9 -10
- package/dist/core/agents/agent-namespace-safety.js +56 -0
- package/dist/core/agents/agent-orchestrator.js +25 -3
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-plan.js +100 -21
- package/dist/core/agents/agent-role-config.js +43 -49
- package/dist/core/agents/agent-runner-codex-exec.js +18 -3
- package/dist/core/agents/agent-runner-process.js +1 -0
- package/dist/core/agents/agent-schema.js +3 -2
- package/dist/core/agents/fast-mode-policy.js +3 -5
- package/dist/core/agents/native-cli-session-swarm.js +1 -1
- package/dist/core/agents/native-worker-backend-router.js +2 -1
- package/dist/core/agents/work-partition/repo-inventory.js +68 -7
- package/dist/core/agents/zellij-right-lane-cockpit.js +2 -2
- package/dist/core/code-structure.js +5 -4
- package/dist/core/codex/agent-config-file-repair.js +94 -193
- package/dist/core/codex/codex-cli-update.js +723 -0
- package/dist/core/codex/codex-config-guard.js +38 -11
- package/dist/core/codex/codex-project-config-policy.js +3 -6
- package/dist/core/codex/codex-startup-config-postcheck.js +52 -42
- package/dist/core/codex-adapter.js +35 -22
- package/dist/core/codex-app/codex-agent-role-sync.js +13 -54
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
- package/dist/core/codex-app/codex-app-launcher.js +48 -17
- package/dist/core/codex-app/codex-app-restart.js +23 -2
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
- package/dist/core/codex-app/sks-menubar.js +136 -5
- package/dist/core/codex-app.js +35 -14
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
- package/dist/core/codex-compat/codex-release-manifest.js +6 -6
- package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +29 -12
- package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
- package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
- package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
- package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
- package/dist/core/codex-control/codex-0139-web-search-probe.js +28 -14
- package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
- package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
- package/dist/core/codex-control/codex-lb-launch-recovery.js +278 -0
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
- package/dist/core/codex-control/codex-reliability-shield.js +93 -30
- package/dist/core/codex-control/codex-sdk-adapter.js +96 -13
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
- package/dist/core/codex-control/codex-task-runner.js +62 -9
- package/dist/core/codex-control/python-codex-sdk-adapter.js +30 -3
- package/dist/core/codex-exec-output-schema.js +35 -6
- package/dist/core/codex-lb/codex-lb-env.js +30 -1
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +291 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +31 -38
- package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -1
- package/dist/core/codex-native/core-skill-manifest.js +8 -4
- package/dist/core/codex-native/native-capability-postcheck.js +16 -8
- package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
- package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
- package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +305 -0
- package/dist/core/commands/agent-bridge-command.js +23 -2
- package/dist/core/commands/agent-command.js +38 -5
- package/dist/core/commands/basic-cli.js +77 -30
- package/dist/core/commands/command-utils.js +1 -1
- package/dist/core/commands/gc-command.js +27 -4
- package/dist/core/commands/image-ux-review-command.js +55 -24
- package/dist/core/commands/mad-sks-command.js +182 -137
- package/dist/core/commands/naruto-command.js +643 -1153
- package/dist/core/commands/pipeline-command.js +1 -0
- package/dist/core/commands/research-command.js +293 -231
- package/dist/core/commands/run-command.js +100 -23
- package/dist/core/commands/team-command.js +2 -3
- package/dist/core/commands/team-legacy-observe-command.js +94 -359
- package/dist/core/commands/wiki-command.js +179 -83
- package/dist/core/computer-use-live-evidence.js +166 -3
- package/dist/core/computer-use-status.js +5 -2
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
- package/dist/core/daemon/sksd-hook-daemon.js +171 -28
- package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
- package/dist/core/db-safety.js +2 -2
- package/dist/core/decision-lattice.js +6 -6
- package/dist/core/dfix/verification-selector.js +6 -4
- package/dist/core/doctor/browser-use-repair.js +54 -13
- package/dist/core/doctor/codex-0139-doctor.js +3 -2
- package/dist/core/doctor/codex-startup-config-repair.js +8 -3
- package/dist/core/doctor/computer-use-repair.js +28 -39
- package/dist/core/doctor/doctor-codex-startup-repair.js +24 -149
- package/dist/core/doctor/doctor-context7-repair.js +1 -1
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
- package/dist/core/doctor/imagegen-repair.js +47 -12
- package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
- package/dist/core/feature-fixture-executor.js +71 -7
- package/dist/core/feature-fixture-runner.js +53 -12
- package/dist/core/feature-fixtures.js +47 -14
- package/dist/core/feature-registry.js +53 -58
- package/dist/core/fsx.js +54 -6
- package/dist/core/harness-conflicts.js +19 -10
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
- package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
- package/dist/core/hooks-runtime/hook-io.js +14 -4
- package/dist/core/hooks-runtime/light-turn.js +70 -0
- package/dist/core/hooks-runtime/payload-signals.js +270 -0
- package/dist/core/hooks-runtime/team-digest.js +0 -1
- package/dist/core/hooks-runtime/tool-output-quarantine.js +93 -0
- package/dist/core/hooks-runtime.js +418 -250
- package/dist/core/image/image-artifact-path-contract.js +8 -6
- package/dist/core/image/image-artifact-registry.js +5 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
- package/dist/core/imagegen/imagegen-capability.js +10 -13
- package/dist/core/imagegen/require-imagegen.js +37 -11
- package/dist/core/init/skills.js +16 -30
- package/dist/core/init.js +144 -36
- package/dist/core/managed-assets/managed-assets-manifest.js +417 -14
- package/dist/core/mission.js +24 -1
- package/dist/core/naruto/naruto-work-graph.js +70 -4
- package/dist/core/ops/reporting.js +3 -0
- package/dist/core/pipeline-internals/runtime-core.js +578 -180
- package/dist/core/pipeline-internals/runtime-gates.js +191 -49
- package/dist/core/ppt/style-tokens.js +1 -1
- package/dist/core/ppt-review/index.js +1 -1
- package/dist/core/ppt-review/slide-exporter.js +23 -17
- package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
- package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
- package/dist/core/preflight/parallel-preflight-engine.js +50 -1
- package/dist/core/product-design-plugin.js +2 -2
- package/dist/core/proof/route-finalizer.js +1 -1
- package/dist/core/proof/route-proof-gate.js +7 -2
- package/dist/core/proof-field.js +3 -3
- package/dist/core/provider/model-router.js +38 -32
- package/dist/core/recallpulse/policy.js +12 -28
- package/dist/core/recallpulse.js +11 -6
- package/dist/core/release/gate-manifest.js +18 -12
- package/dist/core/release/gate-pack-manifest.js +1 -1
- package/dist/core/release/npm-pack-proof.js +247 -0
- package/dist/core/release/package-dist-snapshot.js +151 -0
- package/dist/core/release/package-size-budget.js +5 -0
- package/dist/core/release/release-authorization-snapshot.js +115 -0
- package/dist/core/release/release-gate-affected-selector.js +15 -3
- package/dist/core/release/release-gate-cache-v2.js +30 -0
- package/dist/core/release/release-gate-contract.js +161 -0
- package/dist/core/release/release-gate-dag.js +44 -3
- package/dist/core/release/release-gate-hermetic-env.js +28 -17
- package/dist/core/release/release-real-contract.js +496 -0
- package/dist/core/release-parallel-full-coverage.js +31 -143
- package/dist/core/research/claim-evidence-matrix.js +41 -6
- package/dist/core/research/experiment-plan.js +14 -10
- package/dist/core/research/falsification.js +9 -2
- package/dist/core/research/implementation-blueprint-densifier.js +82 -60
- package/dist/core/research/implementation-blueprint.js +32 -26
- package/dist/core/research/mock-result.js +122 -11
- package/dist/core/research/replication-pack.js +15 -8
- package/dist/core/research/research-adversarial-review.js +1068 -0
- package/dist/core/research/research-claim-builder.js +69 -17
- package/dist/core/research/research-claim-synthesizer.js +343 -0
- package/dist/core/research/research-cycle-runner.js +53 -3
- package/dist/core/research/research-falsification-runner.js +176 -0
- package/dist/core/research/research-final-reviewer.js +44 -125
- package/dist/core/research/research-realistic-report.js +14 -6
- package/dist/core/research/research-review-artifact-digest.js +66 -0
- package/dist/core/research/research-source-evidence.js +144 -0
- package/dist/core/research/research-source-layer-catalog.js +68 -0
- package/dist/core/research/research-source-ledger-merge.js +250 -12
- package/dist/core/research/research-source-shards.js +26 -70
- package/dist/core/research/research-stage-runner.js +237 -247
- package/dist/core/research/research-super-search.js +184 -0
- package/dist/core/research/research-synthesis-prompt.js +20 -1
- package/dist/core/research/research-synthesis-writer.js +86 -5
- package/dist/core/research/research-work-graph.js +25 -18
- package/dist/core/research/source-quality-report.js +21 -0
- package/dist/core/research.js +429 -280
- package/dist/core/retention/retention-budget.js +25 -6
- package/dist/core/retention.js +980 -101
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/dollar-manifest-lite.js +11 -11
- package/dist/core/routes/evidence.js +4 -4
- package/dist/core/routes/ppt-policy.js +1 -1
- package/dist/core/routes.js +92 -64
- package/dist/core/runtime/task-profile.js +66 -0
- package/dist/core/runtime/verification-budget.js +12 -0
- package/dist/core/secret-redaction.js +4 -0
- package/dist/core/security/high-risk-contracts.js +6 -6
- package/dist/core/stop-gate/stop-gate-check.js +49 -12
- package/dist/core/subagents/agent-catalog.js +215 -0
- package/dist/core/subagents/model-policy.js +118 -0
- package/dist/core/subagents/naruto-help-contract.js +40 -0
- package/dist/core/subagents/official-subagent-config.js +488 -0
- package/dist/core/subagents/official-subagent-preparation.js +251 -0
- package/dist/core/subagents/official-subagent-prompt.js +137 -0
- package/dist/core/subagents/official-subagent-runner.js +129 -0
- package/dist/core/subagents/subagent-evidence.js +663 -0
- package/dist/core/subagents/terminology.js +16 -0
- package/dist/core/subagents/thread-budget.js +21 -0
- package/dist/core/subagents/triwiki-attention.js +65 -0
- package/dist/core/super-search/runtime-helpers.js +173 -19
- package/dist/core/super-search/runtime.js +140 -15
- package/dist/core/super-search/source-records.js +49 -8
- package/dist/core/team-review-policy.js +15 -0
- package/dist/core/triwiki/code-pack.js +8 -2
- package/dist/core/triwiki/triwiki-cache-key.js +108 -29
- package/dist/core/triwiki/triwiki-module-card.js +1 -1
- package/dist/core/triwiki-attention.js +13 -6
- package/dist/core/triwiki-provenance.js +274 -0
- package/dist/core/triwiki-runtime.js +21 -7
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +187 -61
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
- package/dist/core/update-check.js +23 -15
- package/dist/core/version-manager.js +51 -1
- package/dist/core/version.js +1 -1
- package/dist/core/wiki-coordinate.js +128 -12
- package/dist/core/work-order-ledger.js +208 -10
- package/dist/core/zellij/zellij-command.js +12 -1
- package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
- package/dist/core/zellij/zellij-fake-adapter.js +3 -1
- package/dist/core/zellij/zellij-launcher.js +51 -21
- package/dist/core/zellij/zellij-layout-builder.js +14 -5
- package/dist/core/zellij/zellij-official-subagent-activity.js +477 -0
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +264 -0
- package/dist/core/zellij/zellij-pane-proof.js +32 -6
- package/dist/core/zellij/zellij-slot-pane-renderer.js +17 -5
- package/dist/core/zellij/zellij-slot-telemetry.js +15 -3
- package/dist/core/zellij/zellij-ui-mode.js +1 -1
- package/dist/core/zellij/zellij-viewport-binder.js +3 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
- package/dist/scripts/agent-fast-mode-default-check.js +48 -29
- package/dist/scripts/agent-role-config-repair-check.js +34 -15
- package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
- package/dist/scripts/all-feature-deep-completion-check.js +14 -4
- package/dist/scripts/architecture-guard-check.js +8 -1
- package/dist/scripts/build-dist.js +17 -5
- package/dist/scripts/canonical-test-runner.js +188 -0
- package/dist/scripts/check-command-module-budget.js +38 -16
- package/dist/scripts/check-legacy-free.js +1 -1
- package/dist/scripts/check-route-modularity.js +0 -1
- package/dist/scripts/check-ts-contracts.js +1 -1
- package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
- package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
- package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
- package/dist/scripts/codex-0144-capability-check.js +21 -0
- package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
- package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
- package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
- package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
- package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
- package/dist/scripts/codex-app-provider-model-ui-check.js +53 -19
- package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
- package/dist/scripts/codex-control-all-pipelines-check.js +7 -3
- package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +27 -0
- package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
- package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
- package/dist/scripts/codex-model-metadata-check.js +1 -1
- package/dist/scripts/codex-native-agent-role-content-check.js +15 -7
- package/dist/scripts/codex-native-repair-transaction-check.js +3 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +7 -4
- package/dist/scripts/codex-sdk-research-pipeline-check.js +30 -8
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
- package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
- package/dist/scripts/db-route-materialization-check.js +33 -0
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +4 -2
- package/dist/scripts/doctor-codex-startup-repair-check.js +47 -25
- package/dist/scripts/doctor-context7-repair-check.js +2 -1
- package/dist/scripts/doctor-fix-production-blackbox.js +12 -2
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
- package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +9 -3
- package/dist/scripts/doctor-startup-config-repair-check.js +13 -3
- package/dist/scripts/install-update-preserves-config-check.js +7 -2
- package/dist/scripts/legacy-gate-inventory-check.js +7 -5
- package/dist/scripts/legacy-strong-inventory-check.js +7 -5
- package/dist/scripts/legacy-upgrade-matrix-check.js +4 -4
- package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +173 -13
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +165 -6
- package/dist/scripts/managed-role-manifest-parity-check.js +5 -4
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
- package/dist/scripts/naruto-codex-e2e-check.js +14 -7
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +4 -201
- package/dist/scripts/npm-publish-performance-check.js +20 -12
- package/dist/scripts/official-subagent-workflow-check.js +145 -0
- package/dist/scripts/package-published-contract-check.js +6 -20
- package/dist/scripts/packlist-performance-check.js +17 -3
- package/dist/scripts/parallel-verification-engine-check.js +2 -2
- package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
- package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
- package/dist/scripts/prepublish-release-check-or-fast.js +23 -86
- package/dist/scripts/product-design-plugin-routing-check.js +1 -1
- package/dist/scripts/release-affected-selector-check.js +74 -1
- package/dist/scripts/release-check-stamp.js +324 -239
- package/dist/scripts/release-dag-full-coverage-check.js +7 -15
- package/dist/scripts/release-dynamic-presets-check.js +10 -1
- package/dist/scripts/release-gate-dag-runner-check.js +3 -3
- package/dist/scripts/release-gate-dag-runner.js +35 -11
- package/dist/scripts/release-gate-existence-audit.js +1 -2
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-parallel-full-coverage-check.js +12 -6
- package/dist/scripts/release-parallel-speed-budget-check.js +18 -2
- package/dist/scripts/release-real-check.js +390 -157
- package/dist/scripts/release-registry-check.js +61 -16
- package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
- package/dist/scripts/research-blueprint-densifier-check.js +2 -2
- package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +11 -7
- package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/seo-geo-route-identity-check.js +30 -4
- package/dist/scripts/sizecheck.js +4 -4
- package/dist/scripts/sks-1-11-gate-lib.js +53 -6
- package/dist/scripts/sks-3-1-4-directive-check-lib.js +8 -2
- package/dist/scripts/sks-3-1-5-directive-check-lib.js +3 -2
- package/dist/scripts/sks-3-1-6-directive-check-lib.js +5 -3
- package/dist/scripts/sks-menubar-install-check.js +8 -0
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +16 -6
- package/dist/scripts/trust-fixture-check.js +32 -10
- package/dist/scripts/write-build-manifest.js +2 -1
- package/dist/scripts/wrongness-fixture-check.js +1 -1
- package/dist/scripts/zellij-layout-valid-check.js +36 -11
- package/dist/scripts/zellij-pane-proof-check.js +33 -2
- package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
- package/dist/scripts/zellij-real-session-launch-check.js +76 -5
- package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +3 -3
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1486 -0
- package/package.json +32 -19
- package/release-gates.v2.json +4060 -0
- package/runtime-required-scripts.json +9 -0
- package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
- package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
- package/dist/commands/db.js +0 -6
- package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
- package/dist/core/commands/db-command.js +0 -146
- package/dist/core/research/prompt.js +0 -15
- package/dist/scripts/agent-native-release-gate.js +0 -274
- package/dist/scripts/codex-0142-capability-check.js +0 -21
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/command-performance-scorecard-check.js +0 -204
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
- package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
- package/dist/scripts/gate-timing-check.js +0 -16
- package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
- package/dist/scripts/performance-baseline-check.js +0 -12
- package/dist/scripts/performance-improvement-report-check.js +0 -58
- package/dist/scripts/release-parallel-check.js +0 -389
- package/dist/scripts/release-runner-efficiency-check.js +0 -15
- package/dist/scripts/retention-long-run-smoke-check.js +0 -299
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
|
@@ -1,158 +1,46 @@
|
|
|
1
1
|
import { nowIso } from './fsx.js';
|
|
2
|
-
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'architecture:guard',
|
|
8
|
-
'runtime:dist-parity',
|
|
9
|
-
'routes:proof-artifact-structure',
|
|
10
|
-
'agent:codex-app-cockpit',
|
|
11
|
-
'agent:janitor',
|
|
12
|
-
'agent:multi-project-isolation',
|
|
13
|
-
'verification:parallel-engine',
|
|
14
|
-
'typecheck',
|
|
15
|
-
'schema:check',
|
|
16
|
-
'release:metadata',
|
|
17
|
-
'release:readiness'
|
|
18
|
-
]);
|
|
19
|
-
export const RELEASE_1_18_REQUIRED_GATES = Object.freeze([
|
|
20
|
-
'super-search:provider-interface',
|
|
21
|
-
'source-intelligence:policy',
|
|
22
|
-
'source-intelligence:all-modes',
|
|
23
|
-
'codex-web:adapter',
|
|
24
|
-
'goal-mode:official-default',
|
|
25
|
-
'agent:main-no-scout',
|
|
26
|
-
'agent:worker-scout-limited',
|
|
27
|
-
'agent:background-terminals',
|
|
28
|
-
'agent:zellij-runtime',
|
|
29
|
-
'agent:dynamic-pool',
|
|
30
|
-
'agent:backfill-replenishment',
|
|
31
|
-
'agent:scheduler-proof',
|
|
32
|
-
'agent:session-generation',
|
|
33
|
-
'agent:terminal-generations',
|
|
34
|
-
'mad-sks:zellij-launch',
|
|
35
|
-
'agent:dynamic-cockpit',
|
|
36
|
-
'agent:source-intelligence-propagation',
|
|
37
|
-
'agent:goal-mode-propagation',
|
|
38
|
-
'agent:visual-consistency',
|
|
39
|
-
'release:parallel-full-coverage',
|
|
40
|
-
'priority:full-closure',
|
|
41
|
-
'release:native-agent-backend',
|
|
42
|
-
'agent:legacy-multiagent-removed',
|
|
43
|
-
'all-features:completion',
|
|
44
|
-
'all-features:deep-completion',
|
|
45
|
-
'json-schema:recursive-check',
|
|
46
|
-
'evidence:flagship-coverage',
|
|
47
|
-
'image-fidelity:check',
|
|
48
|
-
'imagegen:capability',
|
|
49
|
-
'imagegen:gpt-image-2-request-validator',
|
|
50
|
-
'ux-review:run-wires-imagegen',
|
|
51
|
-
'ux-review:extract-wires-real-extractor',
|
|
52
|
-
'ux-review:patch-diff-recheck',
|
|
53
|
-
'ux-review:imagegen-blackbox',
|
|
54
|
-
'ux-review:real-loop-fixture',
|
|
55
|
-
'ux-review:generate-callouts-fixture',
|
|
56
|
-
'ux-review:extract-real-callouts-fixture',
|
|
57
|
-
'ux-review:patch-handoff-fixture',
|
|
58
|
-
'ux-review:recapture-recheck-fixture',
|
|
59
|
-
'ux-review:no-text-fallback',
|
|
60
|
-
'ux-review:no-fake-callouts',
|
|
61
|
-
'ux-review:image-voxel-relations',
|
|
62
|
-
'ppt:imagegen-review-fixture',
|
|
63
|
-
'ppt:full-e2e-blackbox',
|
|
64
|
-
'ppt:full-e2e-artifact-graph',
|
|
65
|
-
'ppt:real-export-adapter',
|
|
66
|
-
'ppt:real-imagegen-wiring',
|
|
67
|
-
'ppt:reexport-rereview',
|
|
68
|
-
'ppt:imagegen-blackbox',
|
|
69
|
-
'ux-ppt:structured-extraction',
|
|
70
|
-
'ppt:slide-export-fixture',
|
|
71
|
-
'ppt:no-text-fallback',
|
|
72
|
-
'ppt:no-mock-as-real',
|
|
73
|
-
'ppt:issue-extraction-fixture',
|
|
74
|
-
'ppt:image-voxel-relations',
|
|
75
|
-
'ppt:proof-trust-fixture',
|
|
76
|
-
'dfix:fixture',
|
|
77
|
-
'dfix:fast-kernel',
|
|
78
|
-
'dfix:blackbox-fast',
|
|
79
|
-
'dfix:performance',
|
|
80
|
-
'dfix:patch-handoff',
|
|
81
|
-
'dfix:verification-recommendation',
|
|
82
|
-
'dfix:verification',
|
|
83
|
-
'hooks:strict-subset-check',
|
|
84
|
-
'hooks:latest-schema-check',
|
|
85
|
-
'hooks:trust-state-check',
|
|
86
|
-
'hooks:trust-warning-zero',
|
|
87
|
-
'hooks:subagent-events-check',
|
|
88
|
-
'hooks:no-unsupported-handlers',
|
|
89
|
-
'hooks:actual-parity-check',
|
|
90
|
-
'hooks:actual-parity-v2',
|
|
91
|
-
'hooks:official-hash-parity',
|
|
92
|
-
'hooks:official-hash-oracle',
|
|
93
|
-
'hooks:managed-install-fixture',
|
|
94
|
-
'hooks:runtime-replay-warning-zero',
|
|
95
|
-
'hooks:runtime-replay-warning-zero-v2',
|
|
96
|
-
'codex-lb:persistence-truth',
|
|
97
|
-
'codex-lb:setup-truthfulness',
|
|
98
|
-
'computer-use:visual-route-fixture',
|
|
99
|
-
'computer-use:live-evidence',
|
|
100
|
-
'codex:0.133-compat',
|
|
101
|
-
'codex:output-schema-fixture',
|
|
102
|
-
'codex:exec-syntax-parity',
|
|
103
|
-
'codex:0.133-official-compat',
|
|
104
|
-
'flagship:proof-graph-v3',
|
|
105
|
-
'flagship:proof-graph-v4',
|
|
106
|
-
'mad-sks:permission-model',
|
|
107
|
-
'mad-sks:immutable-harness',
|
|
108
|
-
'mad-sks:write-guard',
|
|
109
|
-
'mad-sks:audit-proof',
|
|
110
|
-
'mad-sks:no-harness-modification',
|
|
111
|
-
'mad-sks:actual-executor',
|
|
112
|
-
'mad-sks:file-write-executor',
|
|
113
|
-
'mad-sks:shell-executor',
|
|
114
|
-
'mad-sks:package-executor',
|
|
115
|
-
'mad-sks:service-executor',
|
|
116
|
-
'mad-sks:db-executor',
|
|
117
|
-
'mad-sks:rollback-apply',
|
|
118
|
-
'mad-sks:live-guard-smoke',
|
|
119
|
-
'mad-sks:executor-proof-graph',
|
|
120
|
-
'memory-summary:rebuild-check',
|
|
121
|
-
'loop-blocker:check',
|
|
122
|
-
'docs:truthfulness',
|
|
123
|
-
'official-docs:compat',
|
|
124
|
-
'blackbox:matrix:contract',
|
|
125
|
-
'test:blackbox',
|
|
126
|
-
'rust:check',
|
|
127
|
-
'rust:smoke',
|
|
128
|
-
'release:dist-freshness',
|
|
129
|
-
'perf:gate'
|
|
130
|
-
]);
|
|
2
|
+
import { RELEASE_GATE_CONTRACT_IDS, releaseGateContractSnapshot } from './release/release-gate-contract.js';
|
|
3
|
+
export const RELEASE_PARALLEL_FULL_COVERAGE_SCHEMA = 'sks.release-parallel-full-coverage.v2';
|
|
4
|
+
// Compatibility export: the independent, versioned contract is now the full
|
|
5
|
+
// release preset, not a self-authorizing critical subset.
|
|
6
|
+
export const RELEASE_DAG_CRITICAL_GATES = RELEASE_GATE_CONTRACT_IDS;
|
|
131
7
|
export function evaluateReleaseParallelFullCoverage(currentGateIds) {
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
8
|
+
const raw = currentGateIds.map(String).filter(Boolean);
|
|
9
|
+
const current = [...new Set(raw)].sort();
|
|
10
|
+
const contract = releaseGateContractSnapshot();
|
|
11
|
+
const missingCritical = contract.ids.filter((gate) => !current.includes(gate));
|
|
12
|
+
const unexpectedGates = current.filter((gate) => !contract.ids.includes(gate));
|
|
13
|
+
const duplicateGateIds = [...new Set(raw.filter((id, index) => raw.indexOf(id) !== index))].sort();
|
|
135
14
|
const independentGroups = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
15
|
+
release_integrity: current.filter((gate) => /^(?:architecture:|policy:|release:|typecheck$|schema:check$)/.test(gate)),
|
|
16
|
+
official_subagents: current.filter((gate) => /official-subagent|native-agent|naruto:/.test(gate)),
|
|
17
|
+
runtime_recovery: current.filter((gate) => /codex-lb|runtime-recovery|responses:/.test(gate)),
|
|
18
|
+
feature_closure: current.filter((gate) => /all-features|feature|research:/.test(gate))
|
|
140
19
|
};
|
|
141
20
|
return {
|
|
142
21
|
schema: RELEASE_PARALLEL_FULL_COVERAGE_SCHEMA,
|
|
143
22
|
generated_at: nowIso(),
|
|
144
|
-
ok:
|
|
145
|
-
|
|
23
|
+
ok: current.length > 0
|
|
24
|
+
&& current.length <= 200
|
|
25
|
+
&& missingCritical.length === 0
|
|
26
|
+
&& unexpectedGates.length === 0
|
|
27
|
+
&& duplicateGateIds.length === 0,
|
|
28
|
+
authoritative_source: 'src/core/release/release-gate-contract.ts',
|
|
29
|
+
manifest_source: 'release-gates.v2.json',
|
|
30
|
+
release_gate_contract: contract,
|
|
31
|
+
legacy_runner_snapshot_retired: true,
|
|
32
|
+
critical_gate_count: RELEASE_DAG_CRITICAL_GATES.length,
|
|
146
33
|
current_gate_count: current.length,
|
|
147
|
-
previous_gate_snapshot: [...RELEASE_1_17_GATE_SNAPSHOT],
|
|
148
34
|
current_gate_list: current,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
35
|
+
missing_critical_gates: missingCritical,
|
|
36
|
+
unexpected_release_gates: unexpectedGates,
|
|
37
|
+
duplicate_gate_ids: duplicateGateIds,
|
|
38
|
+
gate_budget_ok: current.length > 0 && current.length <= 200,
|
|
39
|
+
coverage_regression: missingCritical.length > 0 || unexpectedGates.length > 0,
|
|
152
40
|
independent_groups: independentGroups,
|
|
153
41
|
speedup_summary: {
|
|
154
42
|
parallel_groups: Object.values(independentGroups).filter((rows) => rows.length > 0).length,
|
|
155
|
-
|
|
43
|
+
execution_model: 'manifest-backed parallel DAG'
|
|
156
44
|
}
|
|
157
45
|
};
|
|
158
46
|
}
|
|
@@ -34,11 +34,6 @@ export function validateClaimEvidenceMatrix(matrix, sourceLedger = null, falsifi
|
|
|
34
34
|
const normalized = normalizeClaimEvidenceMatrix(matrix);
|
|
35
35
|
const claimIds = new Set(normalized.claims.map((claim) => claim.id));
|
|
36
36
|
const sourceIds = sourceIdSet(sourceLedger);
|
|
37
|
-
const counterIds = new Set([
|
|
38
|
-
...Array.from(sourceIds).filter((id) => /counter/i.test(id)),
|
|
39
|
-
...(Array.isArray(sourceLedger?.counterevidence_sources) ? sourceLedger.counterevidence_sources.map((row) => String(row?.id || '')).filter(Boolean) : []),
|
|
40
|
-
...(Array.isArray(falsificationLedger?.cases) ? falsificationLedger.cases.flatMap((row) => [row?.id, ...(Array.isArray(row?.counterevidence_source_ids) ? row.counterevidence_source_ids : []), ...(Array.isArray(row?.source_ids) ? row.source_ids : [])]).map(String).filter(Boolean) : [])
|
|
41
|
-
]);
|
|
42
37
|
const blockers = [];
|
|
43
38
|
for (const id of normalized.key_claim_ids)
|
|
44
39
|
if (!claimIds.has(id))
|
|
@@ -53,8 +48,25 @@ export function validateClaimEvidenceMatrix(matrix, sourceLedger = null, falsifi
|
|
|
53
48
|
if (!sourceIds.has(sourceId))
|
|
54
49
|
blockers.push(`claim_source_unknown:${claim.id}:${sourceId}`);
|
|
55
50
|
for (const counterId of claim.counterevidence_ids)
|
|
56
|
-
if (!
|
|
51
|
+
if (!sourceIds.has(counterId))
|
|
57
52
|
blockers.push(`claim_counterevidence_unknown:${claim.id}:${counterId}`);
|
|
53
|
+
const linkedCounterIds = new Set(claim.counterevidence_links
|
|
54
|
+
.filter((link) => link.target_claim_id === claim.id && link.contradiction_rationale.trim())
|
|
55
|
+
.map((link) => link.source_id));
|
|
56
|
+
for (const counterId of claim.counterevidence_ids) {
|
|
57
|
+
if (!linkedCounterIds.has(counterId))
|
|
58
|
+
blockers.push(`claim_counterevidence_link_missing:${claim.id}:${counterId}`);
|
|
59
|
+
}
|
|
60
|
+
for (const link of claim.counterevidence_links) {
|
|
61
|
+
if (link.target_claim_id !== claim.id)
|
|
62
|
+
blockers.push(`claim_counterevidence_target_mismatch:${claim.id}:${link.source_id}`);
|
|
63
|
+
if (!sourceIds.has(link.source_id))
|
|
64
|
+
blockers.push(`claim_counterevidence_link_source_unknown:${claim.id}:${link.source_id}`);
|
|
65
|
+
if (!claim.counterevidence_ids.includes(link.source_id))
|
|
66
|
+
blockers.push(`claim_counterevidence_link_unlisted:${claim.id}:${link.source_id}`);
|
|
67
|
+
if (!link.contradiction_rationale.trim())
|
|
68
|
+
blockers.push(`claim_counterevidence_rationale_missing:${claim.id}:${link.source_id}`);
|
|
69
|
+
}
|
|
58
70
|
if (claim.claim_type === 'hypothesis' && !claim.test_or_probe.trim())
|
|
59
71
|
blockers.push(`hypothesis_probe_missing:${claim.id}`);
|
|
60
72
|
}
|
|
@@ -99,6 +111,11 @@ export function buildClaimEvidenceMatrixFromLedgers(input = {}) {
|
|
|
99
111
|
importance: index < 2 ? 'critical' : 'high',
|
|
100
112
|
source_ids: sourceIds.length ? sourceIds : fallbackSourceIds.slice(0, 2),
|
|
101
113
|
counterevidence_ids: counterIds.length ? counterIds : fallbackCounterIds.slice(0, 1),
|
|
114
|
+
counterevidence_links: (counterIds.length ? counterIds : fallbackCounterIds.slice(0, 1)).map((sourceId) => ({
|
|
115
|
+
source_id: sourceId,
|
|
116
|
+
target_claim_id: id,
|
|
117
|
+
contradiction_rationale: `The structured counterevidence row challenges ${id}.`
|
|
118
|
+
})),
|
|
102
119
|
triangulation: {
|
|
103
120
|
source_layers: sourceLayersForSourceIds(input.sourceLedger, sourceIds.length ? sourceIds : fallbackSourceIds),
|
|
104
121
|
independent_confirmation_count: Math.max(1, sourceIds.length || fallbackSourceIds.length),
|
|
@@ -131,6 +148,7 @@ function normalizeClaim(value) {
|
|
|
131
148
|
source_ids: normalizeStringList(value?.source_ids),
|
|
132
149
|
local_evidence_ids: normalizeStringList(value?.local_evidence_ids),
|
|
133
150
|
counterevidence_ids: normalizeStringList(value?.counterevidence_ids),
|
|
151
|
+
counterevidence_links: normalizeCounterevidenceLinks(value?.counterevidence_links),
|
|
134
152
|
triangulation: {
|
|
135
153
|
source_layers: normalizeStringList(value?.triangulation?.source_layers),
|
|
136
154
|
independent_confirmation_count: Math.max(0, Math.floor(Number(value?.triangulation?.independent_confirmation_count || 0))),
|
|
@@ -141,6 +159,23 @@ function normalizeClaim(value) {
|
|
|
141
159
|
test_or_probe: String(value?.test_or_probe || '').trim()
|
|
142
160
|
};
|
|
143
161
|
}
|
|
162
|
+
function normalizeCounterevidenceLinks(value) {
|
|
163
|
+
const rows = Array.isArray(value) ? value : [];
|
|
164
|
+
const seen = new Set();
|
|
165
|
+
return rows.map((row) => ({
|
|
166
|
+
source_id: String(row?.source_id || '').trim(),
|
|
167
|
+
target_claim_id: String(row?.target_claim_id || '').trim(),
|
|
168
|
+
contradiction_rationale: String(row?.contradiction_rationale || '').trim()
|
|
169
|
+
})).filter((row) => {
|
|
170
|
+
if (!row.source_id || !row.target_claim_id || !row.contradiction_rationale)
|
|
171
|
+
return false;
|
|
172
|
+
const key = `${row.source_id}\0${row.target_claim_id}`;
|
|
173
|
+
if (seen.has(key))
|
|
174
|
+
return false;
|
|
175
|
+
seen.add(key);
|
|
176
|
+
return true;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
144
179
|
function sourceIdSet(sourceLedger) {
|
|
145
180
|
return new Set([
|
|
146
181
|
...(Array.isArray(sourceLedger?.sources) ? sourceLedger.sources : []),
|
|
@@ -2,23 +2,27 @@ import path from 'node:path';
|
|
|
2
2
|
import { nowIso, readJson, writeJsonAtomic, writeTextAtomic } from '../fsx.js';
|
|
3
3
|
export const EXPERIMENT_PLAN_JSON_ARTIFACT = 'experiment-plan.json';
|
|
4
4
|
export const EXPERIMENT_PLAN_MARKDOWN_ARTIFACT = 'experiment-plan.md';
|
|
5
|
-
export function defaultExperimentPlan(plan = null) {
|
|
5
|
+
export function defaultExperimentPlan(plan = null, opts = {}) {
|
|
6
6
|
const prompt = String(plan?.prompt || 'research mission');
|
|
7
|
+
const claims = Array.isArray(opts.claimMatrix?.claims) ? opts.claimMatrix.claims : [];
|
|
8
|
+
const primaryClaim = claims.find((claim) => claim.importance === 'critical' || claim.importance === 'high') || claims[0];
|
|
9
|
+
const hypothesis = String(primaryClaim?.claim || prompt).trim();
|
|
10
|
+
const primaryClaimId = String(primaryClaim?.id || 'primary-hypothesis');
|
|
7
11
|
return {
|
|
8
12
|
schema: 'sks.research-experiment-plan.v1',
|
|
9
13
|
generated_at: nowIso(),
|
|
10
14
|
prompt,
|
|
11
|
-
hypothesis:
|
|
15
|
+
hypothesis: `Under the stated boundary conditions, the evidence-backed claim “${hypothesis}” should produce an observable result that distinguishes it from a simpler alternative explanation.`,
|
|
12
16
|
steps: [
|
|
13
|
-
{ id: 'E1', action:
|
|
14
|
-
{ id: 'E2', action: '
|
|
15
|
-
{ id: 'E3', action: '
|
|
16
|
-
{ id: 'E4', action: '
|
|
17
|
-
{ id: 'E5', action: '
|
|
17
|
+
{ id: 'E1', action: `Operationalize ${primaryClaimId}: define the measurable outcome, units or decision rule, population/system boundary, and the observation window.`, expected_evidence: ['claim-evidence-matrix.json'] },
|
|
18
|
+
{ id: 'E2', action: 'Choose a baseline or null explanation that could plausibly produce the same observation, and record confounders before collecting results.', expected_evidence: ['falsification-ledger.json'] },
|
|
19
|
+
{ id: 'E3', action: 'Reproduce the strongest supporting evidence with the same inputs or an explicitly documented equivalent data source.', expected_evidence: ['source-ledger.json'] },
|
|
20
|
+
{ id: 'E4', action: 'Run the cheapest decisive falsification probe and preserve negative, null, or contradictory outcomes instead of filtering them out.', expected_evidence: ['falsification-ledger.json'] },
|
|
21
|
+
{ id: 'E5', action: 'Compare the observation with the acceptance threshold, update confidence, and publish the procedure, artifacts, and unresolved limitations for independent replication.', expected_evidence: ['replication-pack.json', 'research-report.md'] }
|
|
18
22
|
],
|
|
19
|
-
metrics: ['
|
|
20
|
-
controls: ['
|
|
21
|
-
acceptance_threshold:
|
|
23
|
+
metrics: ['primary_outcome', 'effect_or_difference_from_baseline', 'uncertainty_interval_or_decision_margin', 'replication_success', 'falsification_result'],
|
|
24
|
+
controls: ['explicit_null_or_baseline', 'same_boundary_conditions', 'counterevidence_preserved'],
|
|
25
|
+
acceptance_threshold: `Retain ${primaryClaimId} only if the decisive observation exceeds the predeclared decision margin, survives the recorded counterevidence, and is independently reproducible; otherwise downgrade or reject it.`
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
export function validateExperimentPlan(experimentPlan = null, contract = null) {
|
|
@@ -9,10 +9,17 @@ export function validateFalsificationCoverage(falsificationLedger = null, contra
|
|
|
9
9
|
&& entry.source_ids.length > 0
|
|
10
10
|
&& String(entry?.next_decisive_test || '').trim();
|
|
11
11
|
});
|
|
12
|
+
const unresolved = [
|
|
13
|
+
...(Array.isArray(falsificationLedger?.unresolved_failures) ? falsificationLedger.unresolved_failures : []),
|
|
14
|
+
...cases.filter((entry) => ['weakened', 'refuted', 'inconclusive'].includes(String(entry?.result || ''))).map((entry) => `${entry?.target_claim || entry?.claim_id || entry?.id}:${entry?.result}`)
|
|
15
|
+
].map(String).filter(Boolean);
|
|
16
|
+
const ledgerBlockers = Array.isArray(falsificationLedger?.blockers) ? falsificationLedger.blockers.map(String).filter(Boolean) : [];
|
|
12
17
|
const blockers = [
|
|
13
18
|
...(cases.length < minCases ? ['falsification_cases_below_contract'] : []),
|
|
14
|
-
...(completeCases.length < minCases ? ['falsification_cases_incomplete'] : [])
|
|
19
|
+
...(completeCases.length < minCases ? ['falsification_cases_incomplete'] : []),
|
|
20
|
+
...unresolved.map((entry) => `falsification_unresolved:${entry}`),
|
|
21
|
+
...ledgerBlockers
|
|
15
22
|
];
|
|
16
|
-
return { ok: blockers.length === 0, blockers, cases: cases.length, complete_cases: completeCases.length, min_cases: minCases };
|
|
23
|
+
return { ok: blockers.length === 0, blockers: [...new Set(blockers)], cases: cases.length, complete_cases: completeCases.length, min_cases: minCases };
|
|
17
24
|
}
|
|
18
25
|
//# sourceMappingURL=falsification.js.map
|
|
@@ -5,19 +5,68 @@ import { defaultImplementationBlueprint } from './implementation-blueprint.js';
|
|
|
5
5
|
export async function densifyImplementationBlueprint(input) {
|
|
6
6
|
const fileMap = await repositoryFileMap(input.root);
|
|
7
7
|
const likelyFiles = likelyTargetFiles(fileMap, input.plan, input.claimMatrix);
|
|
8
|
-
const possibleNewFiles = possibleNewResearchFiles(fileMap);
|
|
9
8
|
const base = input.existingBlueprint || defaultImplementationBlueprint(input.plan);
|
|
10
9
|
const claims = Array.isArray(input.claimMatrix?.claims) ? input.claimMatrix.claims : [];
|
|
11
10
|
const keyClaimIds = Array.isArray(input.claimMatrix?.key_claim_ids) ? input.claimMatrix.key_claim_ids : claims.slice(0, 8).map((claim) => claim.id);
|
|
11
|
+
const prompt = String(input.plan?.prompt || base.prompt || '');
|
|
12
|
+
const repositoryScoped = likelyFiles.length >= 3 && repositoryIntent(prompt, claims);
|
|
13
|
+
const evidenceArtifacts = ['research-plan.json', 'source-ledger.json', 'claim-evidence-matrix.json', 'falsification-ledger.json', 'research-report.md', String(input.plan?.artifacts?.research_paper || input.plan?.paper_artifact || 'research-paper.md')];
|
|
14
|
+
if (!repositoryScoped) {
|
|
15
|
+
const sections = [
|
|
16
|
+
section('problem', 'Research Question And Boundary', `The validation handoff addresses “${prompt}” without converting a general scientific or strategic question into an SKS code-maintenance task. It preserves ${keyClaimIds.length} key claim ids, distinguishes facts from hypotheses, and treats missing evidence as a blocker rather than inventing a repository patch.`, keyClaimIds, evidenceArtifacts.slice(0, 4), ['The question, scope boundary, and disallowed overclaims are explicit.']),
|
|
17
|
+
section('decision', 'Surviving Decision', `Carry forward only claims that remain source-linked after counterevidence and falsification. The handoff is a research-validation plan, not an implementation promise; any claim that lacks independent confirmation is downgraded or removed before the final paper is used.`, keyClaimIds, evidenceArtifacts.slice(1, 5), ['Every retained key claim has known source ids and a decisive probe.']),
|
|
18
|
+
section('architecture', 'Evidence Structure', `Organize the result as a dependency chain from source ledger to semantic claim matrix, falsification cases, experiment steps, manuscript synthesis, and independent adversarial review. Each downstream conclusion must remain traceable to the upstream source and claim identifiers.`, keyClaimIds, evidenceArtifacts, ['No conclusion bypasses source, claim, and falsification artifacts.']),
|
|
19
|
+
section('interfaces', 'Inputs And Outputs', `Inputs are the research question, source locators/content notes, claim-evidence links, and explicit counterevidence. Outputs are a dated paper, an experiment plan, a replication pack, and a list of unresolved limitations that another researcher can independently inspect.`, keyClaimIds, evidenceArtifacts, ['Inputs and outputs are named with reproducible artifact paths.']),
|
|
20
|
+
section('data_contracts', 'Evidence Contracts', `Each source retains locator, publisher or author, date, credibility, hydrated notes or content hash, and semantic claim links. Each claim retains supporting and undermining source ids, confidence, falsifiability, and the next decisive test; context-only sources never count as support.`, keyClaimIds, ['source-ledger.json', 'claim-evidence-matrix.json'], ['High and critical claims cannot pass on titles, snippets, or duplicated identifiers alone.']),
|
|
21
|
+
section('execution_plan', 'Step By Step Validation', `1. Reproduce the strongest supporting source for each key claim.\n2. Reproduce the strongest counterevidence and check source independence.\n3. Execute or specify the cheapest decisive falsification test.\n4. Compare observed results with the acceptance threshold.\n5. Downgrade, refute, or retain the claim and update the paper with remaining uncertainty.`, keyClaimIds, ['falsification-ledger.json', 'experiment-plan.json', 'replication-pack.json'], ['Every step produces evidence that can change the claim verdict.']),
|
|
22
|
+
section('verification_plan', 'Independent Verification', `Use three composite reviewers that independently cover source integrity and claim linkage, methodology and formal validity, and falsification and replication feasibility. Verification passes only when every reviewer has a distinct completed official thread outcome and no critical, major, minor, or required revision remains.`, keyClaimIds, ['research-adversarial-review.json', 'research-adversarial-convergence.json'], ['Three distinct evidence-correlated reviewer outcomes approve with zero open objections.']),
|
|
23
|
+
section('risks_and_rollbacks', 'Risks, Retractions, And Rollback', `Primary risks are false triangulation, topic drift, publication or novelty overclaim, inaccessible evidence, and an experiment that cannot distinguish the proposed mechanism from a simpler explanation. Rollback means withdrawing the affected claim, restoring the previous manuscript snapshot, and recording the failed assumption in the ledger.`, keyClaimIds, ['research-honest-mode.json', 'research-revision-ledger.json'], ['Unsupported claims are withdrawn without weakening evidence gates.'])
|
|
24
|
+
];
|
|
25
|
+
return {
|
|
26
|
+
...base,
|
|
27
|
+
schema: 'sks.research-implementation-blueprint.v1',
|
|
28
|
+
generated_at: nowIso(),
|
|
29
|
+
prompt,
|
|
30
|
+
implementation_allowed_in_research: false,
|
|
31
|
+
handoff_route: 'research_validation',
|
|
32
|
+
handoff_type: 'research_validation',
|
|
33
|
+
repository_aware: false,
|
|
34
|
+
domain_research: true,
|
|
35
|
+
existing_files: evidenceArtifacts,
|
|
36
|
+
possible_new_files: [],
|
|
37
|
+
validation_targets: keyClaimIds.length ? keyClaimIds : ['supporting evidence', 'counterevidence', 'falsification result', 'replication feasibility'],
|
|
38
|
+
api_schema_changes: [],
|
|
39
|
+
test_commands: [
|
|
40
|
+
'procedure: reproduce supporting evidence from source-ledger.json',
|
|
41
|
+
'procedure: run the decisive falsification test from experiment-plan.json',
|
|
42
|
+
'procedure: independently audit claim links and unresolved objections'
|
|
43
|
+
],
|
|
44
|
+
rollback_steps: [
|
|
45
|
+
'Withdraw or downgrade claims that fail reproduction or falsification.',
|
|
46
|
+
'Restore the prior source-linked manuscript and record the invalidated assumption.'
|
|
47
|
+
],
|
|
48
|
+
parallel_work_decomposition: [
|
|
49
|
+
'Lane A supporting-evidence reproduction.',
|
|
50
|
+
'Lane B counterevidence and alternative explanations.',
|
|
51
|
+
'Lane C falsification and experiment design.',
|
|
52
|
+
'Lane D citation, logic, and replication audit.'
|
|
53
|
+
],
|
|
54
|
+
sections,
|
|
55
|
+
dependencies: ['source-ledger.json', 'claim-evidence-matrix.json', 'falsification-ledger.json'],
|
|
56
|
+
out_of_scope: ['Repository source mutation during $Research runs.', 'Guaranteed novelty, genius-level quality, or publication acceptance.'],
|
|
57
|
+
open_questions: []
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const possibleNewFiles = [];
|
|
12
61
|
const sections = [
|
|
13
|
-
section('problem', 'Problem', `
|
|
14
|
-
section('decision', 'Decision', 'Use
|
|
15
|
-
section('architecture', 'Architecture',
|
|
16
|
-
section('interfaces', 'API And Schema Changes',
|
|
17
|
-
section('data_contracts', 'Data Contracts', '
|
|
18
|
-
section('execution_plan', 'Step By Step Implementation', implementationSteps(likelyFiles
|
|
19
|
-
section('verification_plan', 'Verification Plan', 'Run the
|
|
20
|
-
section('risks_and_rollbacks', 'Risks And Rollbacks', '
|
|
62
|
+
section('problem', 'Problem', `The repository-scoped handoff addresses “${prompt}” and preserves ${keyClaimIds.length} source-linked key claims before implementation. It names only files whose paths match the research question or claim language and avoids substituting generic SKS Research internals.`, keyClaimIds, likelyFiles.slice(0, 8), ['Every proposed file is relevant to the stated repository problem.']),
|
|
63
|
+
section('decision', 'Decision', 'Use the smallest repository change that follows from the surviving evidence, while keeping Research itself read-only. If the evidence does not justify a code change, return a blocked implementation handoff instead of inventing one.', keyClaimIds, likelyFiles.slice(0, 8), ['The decision is traceable to key claim and source ids.']),
|
|
64
|
+
section('architecture', 'Architecture', `Map the proposed behavior through the relevant current modules: ${likelyFiles.slice(0, 12).join(', ')}. Preserve existing ownership boundaries, remove duplicate paths only when current references prove they are dead, and keep integration parent-owned.`, keyClaimIds, likelyFiles, ['Module ownership and dependency impact are explicit.']),
|
|
65
|
+
section('interfaces', 'API And Schema Changes', 'List only interfaces, commands, schemas, or configuration fields required by the supported claim. Compatibility shims remain only when an active public caller exists; otherwise the implementation route may remove them with focused tests.', keyClaimIds, likelyFiles, ['Public and internal compatibility effects are enumerated.']),
|
|
66
|
+
section('data_contracts', 'Data Contracts', 'Carry source and claim identifiers into acceptance criteria so implementation cannot pass on artifact existence alone. State failure, ambiguity, stale evidence, and rollback behavior for every changed contract.', keyClaimIds, likelyFiles, ['Success and failure schemas are both covered.']),
|
|
67
|
+
section('execution_plan', 'Step By Step Implementation', implementationSteps(likelyFiles).join('\n'), keyClaimIds, likelyFiles, ['Each numbered step has bounded files and a decision-relevant check.']),
|
|
68
|
+
section('verification_plan', 'Verification Plan', 'Run the smallest affected type, unit, integration, or contract checks that could change the implementation decision. Reserve release-wide checks for the release route and do not repeat clean builds inside a development loop.', keyClaimIds, likelyFiles, ['Verification is scoped, non-duplicative, and tied to changed behavior.']),
|
|
69
|
+
section('risks_and_rollbacks', 'Risks And Rollbacks', 'Risks include overgeneralizing research evidence, changing unrelated files, preserving dead compatibility code, and claiming success from stale proof. Roll back the bounded implementation patch and restore the prior contract if the affected checks or read-back evidence fail.', keyClaimIds, likelyFiles, ['Rollback paths and invalidation conditions are explicit.'])
|
|
21
70
|
];
|
|
22
71
|
return {
|
|
23
72
|
...base,
|
|
@@ -26,35 +75,30 @@ export async function densifyImplementationBlueprint(input) {
|
|
|
26
75
|
prompt: input.plan?.prompt || base.prompt || '',
|
|
27
76
|
implementation_allowed_in_research: false,
|
|
28
77
|
handoff_route: '$Naruto',
|
|
78
|
+
handoff_type: 'repository_implementation',
|
|
29
79
|
repository_aware: true,
|
|
80
|
+
domain_research: false,
|
|
30
81
|
existing_files: likelyFiles,
|
|
31
82
|
possible_new_files: possibleNewFiles,
|
|
83
|
+
validation_targets: keyClaimIds,
|
|
32
84
|
api_schema_changes: [
|
|
33
|
-
'
|
|
34
|
-
'ResearchSourceShardOutput contract for source layer partials.',
|
|
35
|
-
'Codex/GPT final reviewer merged with static review.'
|
|
85
|
+
'Only evidence-supported public or internal contracts named in the sections above.'
|
|
36
86
|
],
|
|
37
87
|
test_commands: [
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'npm run codex-sdk:research-pipeline',
|
|
42
|
-
'npm run release:check'
|
|
88
|
+
'affected typecheck for the named files',
|
|
89
|
+
'focused unit or contract tests for the changed behavior',
|
|
90
|
+
'one integration or read-back check that exercises the supported claim'
|
|
43
91
|
],
|
|
44
92
|
rollback_steps: [
|
|
45
93
|
'Revert only the files listed in the follow-up patch plan.',
|
|
46
|
-
'Restore
|
|
47
|
-
'
|
|
94
|
+
'Restore the previous public/internal contract when the affected verification fails.',
|
|
95
|
+
'Record which research assumption was invalidated before retrying.'
|
|
48
96
|
],
|
|
49
97
|
parallel_work_decomposition: [
|
|
50
|
-
'WS-A
|
|
51
|
-
'WS-B
|
|
52
|
-
'WS-C
|
|
53
|
-
'WS-D
|
|
54
|
-
'WS-E final reviewer.',
|
|
55
|
-
'WS-F blackbox gates and release DAG.',
|
|
56
|
-
'WS-G CLI/docs.',
|
|
57
|
-
'WS-H integration and verification.'
|
|
98
|
+
'WS-A contract and architecture review.',
|
|
99
|
+
'WS-B bounded implementation in disjoint files.',
|
|
100
|
+
'WS-C focused test and failure-path review.',
|
|
101
|
+
'WS-D parent integration, rollback, and final verification.'
|
|
58
102
|
],
|
|
59
103
|
sections,
|
|
60
104
|
dependencies: ['claim-evidence-matrix.json', 'source-ledger.json', 'falsification-ledger.json'],
|
|
@@ -69,36 +113,15 @@ async function repositoryFileMap(root) {
|
|
|
69
113
|
function likelyTargetFiles(files, plan, claimMatrix) {
|
|
70
114
|
const promptTerms = new Set(String(plan?.prompt || '').toLowerCase().split(/[^a-z0-9]+/).filter((term) => term.length > 3));
|
|
71
115
|
const guidanceTerms = new Set((Array.isArray(claimMatrix?.claims) ? claimMatrix.claims : []).flatMap((claim) => String(claim?.claim || '').toLowerCase().split(/[^a-z0-9]+/)).filter((term) => term.length > 5));
|
|
72
|
-
const preferred = [
|
|
73
|
-
'src/core/research/research-cycle-runner.ts',
|
|
74
|
-
'src/core/research/research-stage-runner.ts',
|
|
75
|
-
'src/core/research/research-work-graph.ts',
|
|
76
|
-
'src/core/commands/research-command.ts',
|
|
77
|
-
'src/core/research/claim-evidence-matrix.ts',
|
|
78
|
-
'src/core/research/implementation-blueprint.ts',
|
|
79
|
-
'src/core/research/research-final-reviewer.ts',
|
|
80
|
-
'package.json',
|
|
81
|
-
'release-gates.v2.json',
|
|
82
|
-
'docs/research-pipeline.md',
|
|
83
|
-
'docs/research-artifacts.md',
|
|
84
|
-
'docs/research-implementation-handoff.md'
|
|
85
|
-
].filter((file) => files.includes(file));
|
|
86
116
|
const matched = files.filter((file) => {
|
|
87
117
|
const lower = file.toLowerCase();
|
|
88
|
-
return
|
|
118
|
+
return [...promptTerms, ...guidanceTerms].some((term) => lower.includes(term));
|
|
89
119
|
}).slice(0, 30);
|
|
90
|
-
return [...new Set(
|
|
120
|
+
return [...new Set(matched)].slice(0, 40);
|
|
91
121
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'src/core/research/research-source-ledger-merge.ts',
|
|
96
|
-
'src/core/research/research-claim-builder.ts',
|
|
97
|
-
'src/core/research/implementation-blueprint-densifier.ts',
|
|
98
|
-
'src/scripts/research-stage-cycle-runtime-blackbox.ts',
|
|
99
|
-
'src/scripts/research-short-report-rejection-check.ts',
|
|
100
|
-
'schemas/research/research-source-shard.schema.json'
|
|
101
|
-
].filter((file) => !files.includes(file));
|
|
122
|
+
function repositoryIntent(prompt, claims) {
|
|
123
|
+
const text = `${prompt}\n${claims.map((claim) => String(claim?.claim || '')).join('\n')}`;
|
|
124
|
+
return /\b(?:code|repository|repo|package|module|function|class|api|cli|command|config|schema|test|bug|implementation|refactor|migration|release|deploy|typescript|javascript|rust|python)\b|(?:코드|저장소|리포지토리|패키지|모듈|함수|클래스|명령|설정|스키마|테스트|버그|구현|리팩터|마이그레이션|배포)/i.test(text);
|
|
102
125
|
}
|
|
103
126
|
function section(id, title, detail, claimIds, targetPaths, acceptanceChecks) {
|
|
104
127
|
return {
|
|
@@ -111,14 +134,13 @@ function section(id, title, detail, claimIds, targetPaths, acceptanceChecks) {
|
|
|
111
134
|
acceptance_checks: acceptanceChecks
|
|
112
135
|
};
|
|
113
136
|
}
|
|
114
|
-
function implementationSteps(existingFiles
|
|
137
|
+
function implementationSteps(existingFiles) {
|
|
115
138
|
return [
|
|
116
|
-
`1.
|
|
117
|
-
|
|
118
|
-
'3.
|
|
119
|
-
'4.
|
|
120
|
-
'5.
|
|
121
|
-
'6. Run the directive final checklist and record any hard blocker instead of claiming completion.'
|
|
139
|
+
`1. Inspect the current contract and references in: ${existingFiles.slice(0, 8).join(', ')}.`,
|
|
140
|
+
'2. Seal one bounded change whose behavior is directly supported by the claim-evidence matrix.',
|
|
141
|
+
'3. Remove or consolidate duplicate code only after current imports, commands, and generated surfaces prove it is unused.',
|
|
142
|
+
'4. Run affected checks for the changed contract, including a failure-path or ambiguity case.',
|
|
143
|
+
'5. Integrate parent-owned results, record rollback conditions, and leave unsupported follow-up work blocked.'
|
|
122
144
|
];
|
|
123
145
|
}
|
|
124
146
|
//# sourceMappingURL=implementation-blueprint-densifier.js.map
|