peaks-loop 4.1.0 → 4.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/CHANGELOG.md +75 -0
- package/README-en.md +4 -4
- package/README.md +25 -4
- package/bin/node-floor.mjs +59 -0
- package/bin/peaks.js +13 -0
- package/config/eslint/tsconfig.lint.json +2 -1
- package/dist/cli/cli-helpers.d.ts +0 -1
- package/dist/cli/cli-helpers.js +0 -1
- package/dist/cli/commands/_cli-error-envelope.js +0 -3
- package/dist/cli/commands/_register.js +2 -2
- package/dist/cli/commands/adapter-commands-s2a.d.ts +0 -1
- package/dist/cli/commands/adapter-commands.d.ts +0 -1
- package/dist/cli/commands/api-diff-commands.d.ts +0 -1
- package/dist/cli/commands/api-diff-commands.js +0 -1
- package/dist/cli/commands/audit-commands.js +21 -24
- package/dist/cli/commands/autonomous-swarm-commands.js +0 -1
- package/dist/cli/commands/bee-commands.d.ts +0 -2
- package/dist/cli/commands/bee-commands.js +0 -2
- package/dist/cli/commands/best-practice-scan-command.d.ts +0 -1
- package/dist/cli/commands/best-practice-scan-helpers.js +0 -1
- package/dist/cli/commands/changeset-commands.d.ts +0 -2
- package/dist/cli/commands/changeset-commands.js +0 -2
- package/dist/cli/commands/code-commands.d.ts +0 -3
- package/dist/cli/commands/code-commands.js +0 -3
- package/dist/cli/commands/code-gate-command.d.ts +0 -1
- package/dist/cli/commands/code-gate-command.js +0 -1
- package/dist/cli/commands/code-job-shape-commands-read-job-shape.d.ts +0 -1
- package/dist/cli/commands/code-job-shape-commands-read-job-shape.js +0 -1
- package/dist/cli/commands/code-job-shape-commands.d.ts +0 -2
- package/dist/cli/commands/code-job-shape-commands.js +0 -3
- package/dist/cli/commands/code-mode-gate-commands.d.ts +0 -2
- package/dist/cli/commands/code-mode-gate-commands.js +0 -3
- package/dist/cli/commands/code-mode-gate-should-pause-command.js +1 -5
- package/dist/cli/commands/code-mode-gate-should-pause-envelope.d.ts +0 -1
- package/dist/cli/commands/code-mode-gate-should-pause-envelope.js +0 -2
- package/dist/cli/commands/code-mode-status-command.d.ts +0 -1
- package/dist/cli/commands/code-mode-status-command.js +0 -1
- package/dist/cli/commands/code-orchestrator-can-do.d.ts +0 -1
- package/dist/cli/commands/code-orchestrator-can-do.js +0 -1
- package/dist/cli/commands/code-run-command.js +0 -1
- package/dist/cli/commands/code-runtime-commands.d.ts +0 -3
- package/dist/cli/commands/code-runtime-commands.js +0 -15
- package/dist/cli/commands/codegraph-command-runtime.d.ts +6 -0
- package/dist/cli/commands/codegraph-command-runtime.js +19 -7
- package/dist/cli/commands/codegraph-commands.js +20 -193
- package/dist/cli/commands/codegraph-init-command.d.ts +8 -0
- package/dist/cli/commands/codegraph-init-command.js +162 -0
- package/dist/cli/commands/codegraph-status-command.js +5 -6
- package/dist/cli/commands/comments-commands.d.ts +14 -0
- package/dist/cli/commands/comments-commands.js +96 -0
- package/dist/cli/commands/compact-command.d.ts +0 -1
- package/dist/cli/commands/compact-command.js +0 -4
- package/dist/cli/commands/container-commands.d.ts +0 -1
- package/dist/cli/commands/container-commands.js +0 -1
- package/dist/cli/commands/context-commands.d.ts +0 -1
- package/dist/cli/commands/context-commands.js +0 -1
- package/dist/cli/commands/core/doctor-command.d.ts +0 -1
- package/dist/cli/commands/core/doctor-command.js +0 -9
- package/dist/cli/commands/core/memory-command.js +10 -1
- package/dist/cli/commands/core/session-command.js +0 -14
- package/dist/cli/commands/core/skill-command.js +1 -10
- package/dist/cli/commands/core/standards-command.js +1 -1
- package/dist/cli/commands/core-artifact-commands.d.ts +0 -1
- package/dist/cli/commands/core-artifact-commands.js +0 -1
- package/dist/cli/commands/cron-commands-actions.d.ts +0 -1
- package/dist/cli/commands/cron-commands-actions.js +0 -2
- package/dist/cli/commands/cron-commands-schedule.d.ts +0 -3
- package/dist/cli/commands/cron-commands-schedule.js +0 -1
- package/dist/cli/commands/cron-commands.d.ts +0 -1
- package/dist/cli/commands/cron-commands.js +0 -2
- package/dist/cli/commands/cron-scheduler-commands.d.ts +0 -1
- package/dist/cli/commands/cron-scheduler-commands.js +0 -1
- package/dist/cli/commands/cron-scheduler-persist.d.ts +0 -5
- package/dist/cli/commands/cron-scheduler-persist.js +0 -5
- package/dist/cli/commands/dashboard-summary.d.ts +0 -1
- package/dist/cli/commands/dispatch-commands.d.ts +0 -1
- package/dist/cli/commands/dispatch-commands.js +10 -37
- package/dist/cli/commands/dispatch-from-dag.js +0 -4
- package/dist/cli/commands/doctor/invoke-from-code.js +0 -1
- package/dist/cli/commands/e2e-verify.d.ts +0 -1
- package/dist/cli/commands/ecc-commands.d.ts +16 -22
- package/dist/cli/commands/ecc-commands.js +38 -26
- package/dist/cli/commands/evolution-commands.d.ts +0 -1
- package/dist/cli/commands/evolution-commands.js +0 -1
- package/dist/cli/commands/feedback-commands.d.ts +0 -1
- package/dist/cli/commands/feedback-commands.js +0 -2
- package/dist/cli/commands/fixture-commands.d.ts +0 -2
- package/dist/cli/commands/fresh-context-commands.d.ts +0 -1
- package/dist/cli/commands/gate-commands-enforce.d.ts +0 -3
- package/dist/cli/commands/gate-commands-enforce.js +0 -4
- package/dist/cli/commands/gate-commands.js +0 -2
- package/dist/cli/commands/governance-classify-contract-commands.d.ts +0 -3
- package/dist/cli/commands/governance-classify-contract-commands.js +0 -4
- package/dist/cli/commands/heartbeat-commands-action.js +0 -6
- package/dist/cli/commands/heartbeat-commands-validation.d.ts +0 -2
- package/dist/cli/commands/heartbeat-commands-validation.js +0 -2
- package/dist/cli/commands/heartbeat-commands.d.ts +0 -1
- package/dist/cli/commands/heartbeat-commands.js +0 -1
- package/dist/cli/commands/hooks-commands.js +0 -11
- package/dist/cli/commands/ide-commands.d.ts +0 -1
- package/dist/cli/commands/job-add-slice-command.d.ts +0 -2
- package/dist/cli/commands/job-add-slice-command.js +0 -2
- package/dist/cli/commands/job-commands.js +0 -4
- package/dist/cli/commands/lease-metrics-commands.d.ts +0 -1
- package/dist/cli/commands/lease-metrics-commands.js +0 -1
- package/dist/cli/commands/lease-stats-commands.d.ts +0 -1
- package/dist/cli/commands/lease-stats-commands.js +0 -1
- package/dist/cli/commands/log-commands.d.ts +0 -2
- package/dist/cli/commands/log-commands.js +0 -3
- package/dist/cli/commands/loop-eval-commands.js +0 -3
- package/dist/cli/commands/memory-commands.d.ts +0 -1
- package/dist/cli/commands/memory-commands.js +0 -1
- package/dist/cli/commands/observability-commands.d.ts +0 -6
- package/dist/cli/commands/observability-commands.js +0 -6
- package/dist/cli/commands/outer-cache-commands.js +0 -2
- package/dist/cli/commands/playwright-commands.d.ts +0 -1
- package/dist/cli/commands/playwright-commands.js +0 -1
- package/dist/cli/commands/polyrepo-commands.d.ts +0 -1
- package/dist/cli/commands/prd-commands.d.ts +0 -1
- package/dist/cli/commands/prd-commands.js +8 -4
- package/dist/cli/commands/preferences-commands.js +0 -2
- package/dist/cli/commands/primer-command.d.ts +0 -1
- package/dist/cli/commands/primer-command.js +0 -1
- package/dist/cli/commands/project-commands.js +0 -1
- package/dist/cli/commands/qa-commands.d.ts +0 -1
- package/dist/cli/commands/qa-commands.js +0 -2
- package/dist/cli/commands/release-commands.js +0 -9
- package/dist/cli/commands/request-commands.d.ts +0 -1
- package/dist/cli/commands/request-commands.js +0 -10
- package/dist/cli/commands/request-format-helpers.d.ts +0 -1
- package/dist/cli/commands/request-format-helpers.js +0 -2
- package/dist/cli/commands/runtime-commands.d.ts +0 -1
- package/dist/cli/commands/sc-commands.js +0 -1
- package/dist/cli/commands/session-24h-mode.d.ts +0 -1
- package/dist/cli/commands/session-24h-mode.js +0 -2
- package/dist/cli/commands/session-checkpoint-command.d.ts +0 -1
- package/dist/cli/commands/session-checkpoint-command.js +0 -1
- package/dist/cli/commands/session-resume-command.d.ts +0 -1
- package/dist/cli/commands/session-resume-command.js +0 -1
- package/dist/cli/commands/shadcn-commands.js +0 -2
- package/dist/cli/commands/share-commands.d.ts +0 -3
- package/dist/cli/commands/share-commands.js +0 -13
- package/dist/cli/commands/skill-search-commands.d.ts +0 -2
- package/dist/cli/commands/slice-commands.js +0 -2
- package/dist/cli/commands/slice-integrate-commands.js +0 -1
- package/dist/cli/commands/spill-demo-command.d.ts +0 -1
- package/dist/cli/commands/statusline-commands.js +0 -4
- package/dist/cli/commands/sub-agent/detached.js +0 -2
- package/dist/cli/commands/sub-agent-commands.d.ts +0 -3
- package/dist/cli/commands/sub-agent-shared.d.ts +0 -8
- package/dist/cli/commands/sub-agent-shared.js +0 -5
- package/dist/cli/commands/sub-agent-shutdown-commands.d.ts +0 -1
- package/dist/cli/commands/tech-commands.d.ts +0 -4
- package/dist/cli/commands/tech-commands.js +0 -4
- package/dist/cli/commands/vendor-detect.d.ts +0 -3
- package/dist/cli/commands/vendor-detect.js +0 -2
- package/dist/cli/commands/verdict-aggregate-command.d.ts +0 -1
- package/dist/cli/commands/verdict-aggregate-command.js +0 -7
- package/dist/cli/commands/vm-commands.d.ts +0 -1
- package/dist/cli/commands/vm-commands.js +5 -29
- package/dist/cli/commands/vm-hypervisor-probe.d.ts +27 -0
- package/dist/cli/commands/vm-hypervisor-probe.js +78 -0
- package/dist/cli/commands/vm-status-command.d.ts +3 -0
- package/dist/cli/commands/vm-status-command.js +50 -0
- package/dist/cli/commands/wave-plan-commands.d.ts +0 -1
- package/dist/cli/commands/web-lifecycle-commands.d.ts +0 -1
- package/dist/cli/commands/workflow-commands.js +0 -14
- package/dist/cli/commands/workflow-plan-commands-actions.js +0 -2
- package/dist/cli/commands/workflow-plan-commands-session.js +0 -2
- package/dist/cli/commands/workflow-plan-commands.d.ts +0 -1
- package/dist/cli/commands/workspace/clean-command.d.ts +0 -1
- package/dist/cli/commands/workspace/clean-command.js +0 -1
- package/dist/cli/commands/workspace/helpers.d.ts +0 -1
- package/dist/cli/commands/workspace/helpers.js +0 -1
- package/dist/cli/commands/workspace/init-command.d.ts +0 -6
- package/dist/cli/commands/workspace/init-command.js +0 -17
- package/dist/cli/commands/workspace/migrate-command.d.ts +0 -2
- package/dist/cli/commands/workspace/migrate-command.js +0 -2
- package/dist/cli/commands/workspace/reconcile-command.d.ts +0 -2
- package/dist/cli/commands/workspace/reconcile-command.js +0 -3
- package/dist/cli/commands/workspace-commands.d.ts +0 -2
- package/dist/cli/commands/workspace-commands.js +0 -4
- package/dist/cli/commands/worktree-auth-commands.d.ts +0 -1
- package/dist/cli/commands/worktree-auth-commands.js +0 -1
- package/dist/cli/commands/worktree-auth-grant-command.d.ts +0 -1
- package/dist/cli/commands/worktree-auth-grant-command.js +0 -1
- package/dist/cli/commands/worktree-auth-manage-commands.d.ts +0 -1
- package/dist/cli/commands/worktree-auth-manage-commands.js +0 -1
- package/dist/cli/commands/worktree-lease-commands.js +0 -1
- package/dist/cli/program.js +4 -16
- package/dist/reporters/bdd-reporter.js +0 -1
- package/dist/services/24h-mode/auto-engage.d.ts +0 -1
- package/dist/services/24h-mode/auto-engage.js +0 -1
- package/dist/services/24h-mode/decider.d.ts +0 -3
- package/dist/services/24h-mode/decider.js +0 -3
- package/dist/services/24h-mode/index.d.ts +0 -2
- package/dist/services/24h-mode/index.js +0 -2
- package/dist/services/24h-mode/state.d.ts +0 -1
- package/dist/services/24h-mode/state.js +0 -1
- package/dist/services/24h-mode/store.d.ts +0 -1
- package/dist/services/24h-mode/store.js +0 -1
- package/dist/services/adapter/adapter-registry.js +0 -1
- package/dist/services/artifacts/artifact-prerequisites.d.ts +0 -5
- package/dist/services/artifacts/artifact-prerequisites.js +0 -19
- package/dist/services/artifacts/artifact-templates.d.ts +0 -1
- package/dist/services/artifacts/artifact-templates.js +0 -1
- package/dist/services/artifacts/request-artifact-service.d.ts +0 -5
- package/dist/services/artifacts/request-artifact-service.js +0 -12
- package/dist/services/artifacts/request-artifact-state-helpers.d.ts +0 -1
- package/dist/services/artifacts/request-artifact-state-helpers.js +0 -1
- package/dist/services/audit/artifact-writer.d.ts +0 -1
- package/dist/services/audit/artifact-writer.js +0 -1
- package/dist/services/audit/decision-writer.js +3 -1
- package/dist/services/audit/enforcer-liveness.js +0 -1
- package/dist/services/audit/enforcers/active-skill-resolver.d.ts +0 -2
- package/dist/services/audit/enforcers/active-skill-resolver.js +0 -2
- package/dist/services/audit/red-line-audit-input.d.ts +11 -0
- package/dist/services/audit/red-line-audit-input.js +103 -0
- package/dist/services/audit/red-line-catalog-p2-a-bee-runtime.d.ts +0 -1
- package/dist/services/audit/red-line-catalog-p2-a.js +0 -9
- package/dist/services/audit/types.d.ts +0 -2
- package/dist/services/audit/types.js +0 -2
- package/dist/services/audit-independent/perf-audit-service.d.ts +0 -2
- package/dist/services/audit-independent/security-audit-service.d.ts +0 -5
- package/dist/services/audit-independent/security-audit-service.js +0 -2
- package/dist/services/autonomous-swarm/autonomous-swarm-service.d.ts +0 -5
- package/dist/services/autonomous-swarm/autonomous-swarm-service.js +0 -5
- package/dist/services/best-practice/language-detector.js +0 -1
- package/dist/services/best-practice/output-formatter.d.ts +0 -1
- package/dist/services/best-practice/scan-orchestrator.d.ts +0 -1
- package/dist/services/capability-audit-service/types.d.ts +1 -3
- package/dist/services/capability-guard-runner/contracts/J08.js +2 -2
- package/dist/services/changeset/changeset-check-service.d.ts +0 -3
- package/dist/services/changeset/changeset-check-service.js +0 -3
- package/dist/services/classify/classify-service.d.ts +0 -1
- package/dist/services/classify/classify-service.js +0 -1
- package/dist/services/classify/classify-types.d.ts +0 -1
- package/dist/services/classify/classify-types.js +0 -1
- package/dist/services/code/auto-compact-lifecycle.d.ts +0 -11
- package/dist/services/code/auto-compact-lifecycle.js +0 -10
- package/dist/services/code/auto-compact-modes.d.ts +0 -3
- package/dist/services/code/auto-compact-modes.js +0 -3
- package/dist/services/code/auto-compact-orchestrator.d.ts +0 -9
- package/dist/services/code/auto-compact-orchestrator.js +0 -29
- package/dist/services/code/batch-heartbeat-poller.js +0 -1
- package/dist/services/code/compact-event-settle.js +0 -1
- package/dist/services/code/dag-orchestrator.d.ts +0 -1
- package/dist/services/code/dag-orchestrator.js +0 -1
- package/dist/services/code/mode-gate-types.d.ts +1 -3
- package/dist/services/code/mode-gate-types.js +0 -2
- package/dist/services/code/mode-gate.d.ts +0 -5
- package/dist/services/code/mode-gate.js +1 -14
- package/dist/services/code/orchestrator-can-do-advisories.d.ts +0 -2
- package/dist/services/code/orchestrator-can-do-advisories.js +0 -5
- package/dist/services/code/orchestrator-can-do.d.ts +0 -4
- package/dist/services/code/orchestrator-can-do.js +0 -3
- package/dist/services/code/status-line-renderer.js +0 -1
- package/dist/services/code/user-touchpoint-classifier.js +0 -7
- package/dist/services/code-review/ecc-bridge.d.ts +6 -7
- package/dist/services/codegraph/codegraph-autorefresh.js +6 -4
- package/dist/services/codegraph/codegraph-backend-advice.d.ts +26 -0
- package/dist/services/codegraph/codegraph-backend-advice.js +166 -0
- package/dist/services/codegraph/codegraph-config-repair-writer.d.ts +0 -24
- package/dist/services/codegraph/codegraph-config-repair-writer.js +32 -73
- package/dist/services/codegraph/codegraph-exclude-integrity.d.ts +14 -6
- package/dist/services/codegraph/codegraph-exclude-integrity.js +24 -14
- package/dist/services/codegraph/codegraph-exclude-reconciler.d.ts +9 -2
- package/dist/services/codegraph/codegraph-exclude-reconciler.js +87 -18
- package/dist/services/codegraph/codegraph-exclude-repair.d.ts +9 -61
- package/dist/services/codegraph/codegraph-exclude-repair.js +67 -139
- package/dist/services/codegraph/codegraph-foreign-removal.d.ts +21 -0
- package/dist/services/codegraph/codegraph-foreign-removal.js +77 -0
- package/dist/services/codegraph/codegraph-index-integrity.d.ts +12 -25
- package/dist/services/codegraph/codegraph-index-integrity.js +84 -23
- package/dist/services/codegraph/codegraph-preflight-service.js +15 -6
- package/dist/services/codegraph/codegraph-project-config.d.ts +35 -0
- package/dist/services/codegraph/codegraph-project-config.js +90 -0
- package/dist/services/codegraph/codegraph-service.d.ts +1 -2
- package/dist/services/codegraph/codegraph-service.js +11 -11
- package/dist/services/codegraph/codegraph-upstream-layout.d.ts +24 -0
- package/dist/services/codegraph/codegraph-upstream-layout.js +85 -0
- package/dist/services/comments/citation-rules.d.ts +154 -0
- package/dist/services/comments/citation-rules.js +241 -0
- package/dist/services/comments/comment-audit.d.ts +68 -0
- package/dist/services/comments/comment-audit.js +121 -0
- package/dist/services/comments/comment-citations.d.ts +66 -0
- package/dist/services/comments/comment-citations.js +184 -0
- package/dist/services/comments/comment-hygiene.d.ts +105 -0
- package/dist/services/comments/comment-hygiene.js +170 -0
- package/dist/services/comments/comment-prune.d.ts +88 -0
- package/dist/services/comments/comment-prune.js +196 -0
- package/dist/services/comments/comment-spans.d.ts +30 -0
- package/dist/services/comments/comment-spans.js +266 -0
- package/dist/services/comments/prune-apply.d.ts +82 -0
- package/dist/services/comments/prune-apply.js +217 -0
- package/dist/services/comments/repo-path-probe.d.ts +43 -0
- package/dist/services/comments/repo-path-probe.js +78 -0
- package/dist/services/compact/decision-tables.d.ts +0 -2
- package/dist/services/compact/decision-tables.js +0 -2
- package/dist/services/compact/request-transition-hook.js +0 -2
- package/dist/services/compact-history/compact-history-service.d.ts +0 -2
- package/dist/services/compact-history/compact-history-service.js +0 -1
- package/dist/services/compact-statusline/compact-lifecycle-store.js +0 -2
- package/dist/services/compact-statusline/compact-lifecycle-types.d.ts +0 -1
- package/dist/services/compact-statusline/compact-statusline-service.js +0 -4
- package/dist/services/config/config-rollback.js +0 -1
- package/dist/services/config/config-safety.d.ts +0 -1
- package/dist/services/config/config-safety.js +0 -1
- package/dist/services/config/config-service.d.ts +0 -1
- package/dist/services/config/config-service.js +0 -1
- package/dist/services/config/model-routing.d.ts +0 -3
- package/dist/services/config/model-routing.js +0 -5
- package/dist/services/container/container-lease.d.ts +0 -1
- package/dist/services/container/container-lease.js +0 -1
- package/dist/services/context/artifact-meta.js +0 -1
- package/dist/services/context/auto-compact-dispatcher-input.d.ts +0 -3
- package/dist/services/context/auto-compact-dispatcher.js +0 -14
- package/dist/services/context/auto-compact-reader-input.d.ts +0 -1
- package/dist/services/context/auto-compact-reader.d.ts +0 -2
- package/dist/services/context/auto-compact-reader.js +0 -7
- package/dist/services/context/auto-compact-types.d.ts +0 -11
- package/dist/services/context/auto-compact-types.js +0 -1
- package/dist/services/context/build-dispatch-system-prompt.d.ts +11 -29
- package/dist/services/context/build-dispatch-system-prompt.js +8 -27
- package/dist/services/context/codegraph-unavailable-block.d.ts +38 -0
- package/dist/services/context/codegraph-unavailable-block.js +77 -0
- package/dist/services/context/context-audit-hint.d.ts +0 -1
- package/dist/services/context/context-audit-hint.js +0 -1
- package/dist/services/context/context-audit.d.ts +0 -1
- package/dist/services/context/context-audit.js +0 -1
- package/dist/services/context/harness-window-config.d.ts +0 -4
- package/dist/services/context/harness-window-config.js +0 -4
- package/dist/services/context/main-session-monitor.d.ts +0 -2
- package/dist/services/context/main-session-monitor.js +0 -2
- package/dist/services/context/memory-index-reader.d.ts +0 -2
- package/dist/services/context/memory-index-reader.js +0 -1
- package/dist/services/context/memory-preflight-config.d.ts +0 -1
- package/dist/services/context/memory-preflight-service.d.ts +0 -1
- package/dist/services/context/memory-preflight-service.js +0 -3
- package/dist/services/context/memory-preflight-support.d.ts +0 -5
- package/dist/services/context/post-compact-reinjection.d.ts +0 -1
- package/dist/services/context/post-compact-reinjection.js +0 -1
- package/dist/services/context/summary-view.d.ts +0 -1
- package/dist/services/context/summary-view.js +0 -1
- package/dist/services/crystallization/crystallization-service.d.ts +5 -11
- package/dist/services/crystallization/crystallization-service.js +3 -11
- package/dist/services/crystallization/crystallization-store.d.ts +6 -6
- package/dist/services/dispatch/await-batch-helpers.js +0 -3
- package/dist/services/dispatch/await-batch.d.ts +0 -1
- package/dist/services/dispatch/await-batch.js +0 -4
- package/dist/services/dispatch/batch-counter.js +0 -1
- package/dist/services/dispatch/conflict-replay.d.ts +0 -1
- package/dist/services/dispatch/conflict-replay.js +0 -1
- package/dist/services/dispatch/contract-store.d.ts +0 -2
- package/dist/services/dispatch/contract-store.js +0 -2
- package/dist/services/dispatch/dispatch-record-input-types.d.ts +0 -2
- package/dist/services/dispatch/dispatch-record-types.d.ts +0 -10
- package/dist/services/dispatch/dispatch-record-upgrade-fields.js +0 -7
- package/dist/services/dispatch/dispatch-record-upgrade-guards.js +0 -2
- package/dist/services/dispatch/dispatch-record-writer.d.ts +0 -5
- package/dist/services/dispatch/dispatch-record-writer.js +0 -21
- package/dist/services/dispatch/dispatch-sub-agent.d.ts +0 -1
- package/dist/services/dispatch/dispatch-sub-agent.js +0 -1
- package/dist/services/dispatch/e2e-fixtures.js +0 -1
- package/dist/services/dispatch/file-overlap-wave-planner.d.ts +0 -1
- package/dist/services/dispatch/file-overlap-wave-planner.js +0 -1
- package/dist/services/dispatch/isolation-lease.d.ts +0 -2
- package/dist/services/dispatch/isolation-lease.js +0 -2
- package/dist/services/dispatch/service-shutdown.js +0 -1
- package/dist/services/dispatch/session-capsule.js +0 -1
- package/dist/services/dispatch/slice-dag-types.d.ts +0 -1
- package/dist/services/dispatch/slice-dag.js +0 -2
- package/dist/services/dispatch/stage-enum.d.ts +0 -1
- package/dist/services/dispatch/stage-enum.js +0 -1
- package/dist/services/dispatch/startup-timeout.d.ts +0 -1
- package/dist/services/dispatch/sub-agent-batch-await.js +0 -3
- package/dist/services/dispatch/sub-agent-dispatcher-types.d.ts +0 -1
- package/dist/services/dispatch/sub-agent-dispatcher.js +0 -2
- package/dist/services/dispatch/test-tool-detection.d.ts +0 -3
- package/dist/services/dispatch/test-tool-detection.js +0 -2
- package/dist/services/doctor/doctor-service/checks/codegraph-capability.js +19 -12
- package/dist/services/doctor/doctor-service/checks/codegraph-index-integrity.js +1 -2
- package/dist/services/doctor/doctor-service/checks/l3-memory-health.d.ts +0 -2
- package/dist/services/doctor/doctor-service/checks/l3-memory-health.js +0 -2
- package/dist/services/doctor/doctor-service/checks/l3-orphan-sessions.d.ts +0 -1
- package/dist/services/doctor/doctor-service/checks/l3-orphan-sessions.js +0 -1
- package/dist/services/doctor/doctor-service/checks/multi-binary-drift.d.ts +0 -1
- package/dist/services/doctor/doctor-service/checks/multi-binary-drift.js +0 -3
- package/dist/services/doctor/doctor-service/checks/workspace-layout.js +0 -2
- package/dist/services/doctor/doctor-service/index.d.ts +0 -1
- package/dist/services/doctor/doctor-service/index.js +0 -1
- package/dist/services/doctor/doctor-service/plugin-registry.d.ts +0 -2
- package/dist/services/doctor/doctor-service/plugin-registry.js +0 -2
- package/dist/services/doctor/doctor-service/probe-types.d.ts +0 -4
- package/dist/services/doctor/doctor-service/report/final-summary.d.ts +0 -1
- package/dist/services/doctor/doctor-service/report/final-summary.js +0 -1
- package/dist/services/doctor/doctor-service/types.d.ts +0 -5
- package/dist/services/doctor/doctor-service/types.js +0 -1
- package/dist/services/doctor/doctor-service.d.ts +0 -1
- package/dist/services/doctor/doctor-service.js +0 -2
- package/dist/services/env/shell-probe.js +0 -1
- package/dist/services/evidence/evidence-generator.js +0 -8
- package/dist/services/evolution/evolution-constraints.d.ts +0 -2
- package/dist/services/evolution/evolution-constraints.js +0 -2
- package/dist/services/evolution/evolution-service.d.ts +2 -12
- package/dist/services/evolution/evolution-service.js +0 -9
- package/dist/services/evolution/evolution-store.d.ts +6 -8
- package/dist/services/evolution/evolution-store.js +1 -3
- package/dist/services/evolution/evolution-types.d.ts +0 -2
- package/dist/services/evolution/evolution-types.js +0 -6
- package/dist/services/evolution/independent-evaluator-runner.d.ts +0 -3
- package/dist/services/evolution/independent-evaluator-runner.js +0 -1
- package/dist/services/evolution/regression-skeptic-runner.d.ts +0 -1
- package/dist/services/feedback/feedback-promotion-service.d.ts +0 -8
- package/dist/services/feedback/feedback-promotion-service.js +0 -10
- package/dist/services/feedback/promotion-artifact-evidence.d.ts +0 -1
- package/dist/services/feedback/promotion-artifact-evidence.js +0 -1
- package/dist/services/final-review/final-review-evidence-budget.d.ts +0 -3
- package/dist/services/final-review/final-review-evidence-budget.js +0 -5
- package/dist/services/final-review/final-review-evidence-sources.d.ts +0 -1
- package/dist/services/final-review/final-review-evidence-sources.js +0 -1
- package/dist/services/final-review/final-review-output-budget.d.ts +0 -1
- package/dist/services/final-review/final-review-output-budget.js +0 -3
- package/dist/services/final-review/final-review-service.d.ts +0 -1
- package/dist/services/final-review/final-review-service.js +0 -1
- package/dist/services/fixture/fixture-capture-service.js +0 -1
- package/dist/services/fixture/fixture-sanitize-service.d.ts +0 -3
- package/dist/services/fixture/fixture-sanitize-service.js +0 -3
- package/dist/services/fresh-context/config.js +0 -1
- package/dist/services/fresh-context/fresh-context-block.js +0 -1
- package/dist/services/fresh-context/trigger-scan.d.ts +0 -1
- package/dist/services/fresh-context/trigger-scan.js +0 -1
- package/dist/services/fuzzy-matching/fzf-pick-service.d.ts +0 -1
- package/dist/services/fuzzy-matching/fzf-pick-service.js +0 -1
- package/dist/services/handoff/handoff-parser.d.ts +0 -1
- package/dist/services/handoff/handoff-parser.js +0 -1
- package/dist/services/handoff/handoff-types.d.ts +0 -1
- package/dist/services/handoff/handoff-types.js +0 -1
- package/dist/services/handoff/handoff-writer.d.ts +0 -1
- package/dist/services/handoff/handoff-writer.js +0 -1
- package/dist/services/hooks/auto-compact-hook-install.d.ts +0 -1
- package/dist/services/hooks/auto-compact-hook-install.js +0 -1
- package/dist/services/hooks/output.d.ts +0 -1
- package/dist/services/hooks/output.js +0 -1
- package/dist/services/hooks/pre-tool-code-gate.d.ts +0 -1
- package/dist/services/hooks/pre-tool-code-gate.js +0 -1
- package/dist/services/hooks/presence-marker-detector.js +0 -1
- package/dist/services/hooks/worktree-authorization-gate.d.ts +0 -3
- package/dist/services/hooks/worktree-authorization-gate.js +0 -1
- package/dist/services/ide/adapters/claude-code-adapter.d.ts +0 -5
- package/dist/services/ide/adapters/claude-code-adapter.js +0 -11
- package/dist/services/ide/adapters/qoder-adapter.d.ts +0 -3
- package/dist/services/ide/adapters/qoder-adapter.js +0 -5
- package/dist/services/ide/adapters/tongyi-lingma-adapter.d.ts +0 -2
- package/dist/services/ide/adapters/tongyi-lingma-adapter.js +0 -2
- package/dist/services/ide/adapters/trae-adapter.d.ts +0 -3
- package/dist/services/ide/adapters/trae-adapter.js +3 -6
- package/dist/services/ide/adapters/zcode-adapter.js +0 -2
- package/dist/services/ide/current-model-detector.js +0 -1
- package/dist/services/ide/hook-protocol.d.ts +0 -2
- package/dist/services/ide/hook-protocol.js +0 -2
- package/dist/services/ide/ide-compact-types.d.ts +0 -7
- package/dist/services/ide/ide-types.d.ts +0 -12
- package/dist/services/ide/resource-profile.d.ts +0 -1
- package/dist/services/job/job-commit-verification.d.ts +0 -2
- package/dist/services/job/job-commit-verification.js +0 -2
- package/dist/services/job/job-orchestrator.d.ts +0 -1
- package/dist/services/job/job-orchestrator.js +0 -1
- package/dist/services/job/job-progress-store.d.ts +0 -2
- package/dist/services/job/job-progress-store.js +0 -3
- package/dist/services/job/job-types.js +0 -1
- package/dist/services/job-snapshot/snapshot.js +0 -1
- package/dist/services/karpathy-cost/karpathy-cost-check-service.js +0 -1
- package/dist/services/legacy/legacy-detector.js +0 -1
- package/dist/services/log/log-commands-service.d.ts +0 -2
- package/dist/services/log/log-commands-service.js +0 -2
- package/dist/services/log/logger.d.ts +0 -1
- package/dist/services/log/logger.js +0 -1
- package/dist/services/log/redact.d.ts +0 -1
- package/dist/services/log/redact.js +0 -1
- package/dist/services/log/retention.d.ts +0 -17
- package/dist/services/log/retention.js +0 -18
- package/dist/services/loop/loop-bee-relation-service.d.ts +3 -3
- package/dist/services/loop/loop-bee-relation-service.js +14 -13
- package/dist/services/loop/loop-bee-relation-store.d.ts +9 -10
- package/dist/services/loop/loop-bee-relation-store.js +1 -2
- package/dist/services/loop/loop-bee-relation-types.d.ts +1 -1
- package/dist/services/loop/loop-bee-relation-types.js +1 -1
- package/dist/services/loop/loop-release-service.d.ts +3 -3
- package/dist/services/loop/loop-release-service.js +1 -1
- package/dist/services/loop/loop-release-store.d.ts +6 -7
- package/dist/services/loop/loop-release-store.js +0 -1
- package/dist/services/loop/monotonic-guard.d.ts +0 -1
- package/dist/services/loop/monotonic-guard.js +0 -1
- package/dist/services/memory/memory-ingest-service.js +0 -1
- package/dist/services/memory/project-context-service.d.ts +0 -1
- package/dist/services/memory/project-context-service.js +0 -1
- package/dist/services/memory/project-memory-service/index/reindex.d.ts +0 -2
- package/dist/services/memory/project-memory-service/index/reindex.js +0 -1
- package/dist/services/memory/project-memory-service/index/search.d.ts +0 -1
- package/dist/services/memory/project-memory-service/index/search.js +0 -1
- package/dist/services/memory/project-memory-service/index.d.ts +1 -1
- package/dist/services/memory/project-memory-service/index.js +1 -1
- package/dist/services/memory/project-memory-service/memory-kinds.d.ts +0 -1
- package/dist/services/memory/project-memory-service/memory-kinds.js +0 -1
- package/dist/services/memory/project-memory-service/parsers/frontmatter.d.ts +0 -1
- package/dist/services/memory/project-memory-service/parsers/frontmatter.js +0 -1
- package/dist/services/memory/project-memory-service/store/atomic-write.d.ts +19 -7
- package/dist/services/memory/project-memory-service/store/atomic-write.js +120 -26
- package/dist/services/memory/project-memory-service.js +0 -1
- package/dist/services/mode/mode-enforcement.js +0 -1
- package/dist/services/mode/mode-status-service.d.ts +0 -2
- package/dist/services/mode/mode-status-service.js +0 -2
- package/dist/services/observability/aggregation.d.ts +0 -4
- package/dist/services/observability/aggregation.js +0 -6
- package/dist/services/observability/observability-schema.js +0 -1
- package/dist/services/observability/observability-service.d.ts +0 -5
- package/dist/services/observability/observability-service.js +0 -4
- package/dist/services/observability/report-formatter.d.ts +0 -2
- package/dist/services/observability/report-formatter.js +0 -2
- package/dist/services/openspec/artifact-boundary.d.ts +0 -4
- package/dist/services/openspec/artifact-boundary.js +0 -4
- package/dist/services/openspec/coverage-evidence-reader.d.ts +0 -1
- package/dist/services/openspec/coverage-evidence-reader.js +0 -1
- package/dist/services/polyrepo/polyrepo-dispatcher.js +0 -1
- package/dist/services/polyrepo/polyrepo-scanner.js +0 -1
- package/dist/services/polyrepo/polyrepo-service.js +0 -1
- package/dist/services/polyrepo/polyrepo-types.d.ts +0 -1
- package/dist/services/prd/best-practice-auto-trigger.d.ts +0 -2
- package/dist/services/prd/best-practice-auto-trigger.js +0 -2
- package/dist/services/prd/gate-evidence-derivation.d.ts +0 -4
- package/dist/services/prd/gate-evidence-derivation.js +0 -5
- package/dist/services/prd/handoff-auto-regen.js +0 -5
- package/dist/services/prd/handoff-frontmatter-shape.d.ts +0 -2
- package/dist/services/prd/handoff-frontmatter-shape.js +0 -2
- package/dist/services/prd/handoff-frontmatter.d.ts +0 -1
- package/dist/services/prd/handoff-frontmatter.js +61 -2
- package/dist/services/prd/handoff-gate-evidence.d.ts +0 -1
- package/dist/services/prd/handoff-gate-evidence.js +12 -12
- package/dist/services/prd/handoff-path-resolution.d.ts +0 -7
- package/dist/services/prd/handoff-path-resolution.js +0 -10
- package/dist/services/prd/handoff-service.d.ts +11 -3
- package/dist/services/prd/handoff-service.js +11 -3
- package/dist/services/prd/handoff-types.d.ts +33 -3
- package/dist/services/prd/handoff-types.js +0 -1
- package/dist/services/prd/project-scan-bootstrap-service.d.ts +0 -1
- package/dist/services/prd/project-scan-bootstrap-service.js +0 -4
- package/dist/services/prd/project-scan-types.d.ts +0 -1
- package/dist/services/prd/project-scan-types.js +0 -1
- package/dist/services/preferences/preferences-service.d.ts +0 -1
- package/dist/services/preferences/preferences-service.js +0 -5
- package/dist/services/preferences/preferences-types.d.ts +0 -14
- package/dist/services/preferences/preferences-types.js +0 -4
- package/dist/services/progress/progress-service.js +0 -1
- package/dist/services/qa/bdd-test-style-verifier.d.ts +0 -1
- package/dist/services/qa/bdd-test-style-verifier.js +0 -1
- package/dist/services/qa/browser-event-logger.d.ts +0 -1
- package/dist/services/qa/browser-event-logger.js +0 -1
- package/dist/services/qa/browser-restart-detector.d.ts +0 -1
- package/dist/services/qa/browser-restart-detector.js +0 -1
- package/dist/services/qa/browser-reuse-hint.d.ts +0 -1
- package/dist/services/qa/browser-reuse-hint.js +0 -1
- package/dist/services/qa/qa-business-review-state.js +0 -2
- package/dist/services/qa/screenshot-archive-service.d.ts +0 -1
- package/dist/services/qa/screenshot-archive-service.js +0 -1
- package/dist/services/rd/impl.js +0 -1
- package/dist/services/rd/rd-service.d.ts +0 -5
- package/dist/services/rd/rd-service.js +0 -5
- package/dist/services/rd/reviewer-dispatch-policy.d.ts +0 -4
- package/dist/services/rd/reviewer-dispatch-policy.js +0 -4
- package/dist/services/rd/standards-diagnostic.js +0 -1
- package/dist/services/rd/tactical-stage.js +0 -1
- package/dist/services/rd-swarm/rd-swarm-types.d.ts +0 -1
- package/dist/services/rd-swarm/rd-swarm-types.js +0 -1
- package/dist/services/recommendations/installed-capability-detector.d.ts +5 -6
- package/dist/services/recommendations/installed-capability-detector.js +11 -11
- package/dist/services/release/version-precheck-service.d.ts +0 -2
- package/dist/services/release/version-precheck-service.js +0 -3
- package/dist/services/retrospective/retrospective-index.d.ts +0 -1
- package/dist/services/retrospective/retrospective-index.js +0 -1
- package/dist/services/retrospective/retrospective-show.d.ts +0 -1
- package/dist/services/retrospective/retrospective-show.js +0 -1
- package/dist/services/reviewer/model-family.js +0 -1
- package/dist/services/reviewer/reviewer-config.js +0 -1
- package/dist/services/reviewer/reviewer-service.d.ts +0 -1
- package/dist/services/reviewer/reviewer-service.js +0 -3
- package/dist/services/reviewer/selection-strategies.js +0 -1
- package/dist/services/runtime/runtime-detector.js +0 -1
- package/dist/services/runtime/runtime-service.d.ts +0 -2
- package/dist/services/runtime/vendor-adapter.d.ts +0 -7
- package/dist/services/runtime/vendors/claude-code.js +0 -1
- package/dist/services/runtime/vendors/codex.js +0 -1
- package/dist/services/runtime/vendors/copilot.js +0 -1
- package/dist/services/sc/sc-service.js +0 -6
- package/dist/services/scan/acceptance-coverage-service.js +0 -2
- package/dist/services/scan/api-diff-recorded.d.ts +0 -1
- package/dist/services/scan/api-diff-recorded.js +0 -1
- package/dist/services/scan/api-diff-service.d.ts +0 -1
- package/dist/services/scan/api-diff-service.js +0 -1
- package/dist/services/scan/api-diff-types.d.ts +0 -1
- package/dist/services/scan/api-diff-types.js +0 -1
- package/dist/services/scan/archetype-detection.d.ts +37 -0
- package/dist/services/scan/archetype-detection.js +175 -2
- package/dist/services/scan/archetype-service.js +36 -23
- package/dist/services/scan/file-size-policy.d.ts +0 -1
- package/dist/services/scan/file-size-policy.js +0 -5
- package/dist/services/scan/file-size-scan.d.ts +0 -1
- package/dist/services/scan/scan-types.d.ts +9 -0
- package/dist/services/security/safe-settings-path.js +0 -1
- package/dist/services/session/binding-store.d.ts +0 -4
- package/dist/services/session/binding-store.js +0 -7
- package/dist/services/session/caller-binding-service.d.ts +0 -6
- package/dist/services/session/caller-binding-service.js +0 -4
- package/dist/services/session/caller-id-types.d.ts +0 -3
- package/dist/services/session/caller-id-types.js +0 -2
- package/dist/services/session/getSessionDir.js +0 -1
- package/dist/services/session/index.js +0 -1
- package/dist/services/session/platform-fallbacks.d.ts +0 -3
- package/dist/services/session/platform-fallbacks.js +0 -3
- package/dist/services/session/resolve-caller-id.d.ts +0 -2
- package/dist/services/session/resolve-caller-id.js +0 -2
- package/dist/services/session/session-binding-bridge.d.ts +0 -2
- package/dist/services/session/session-binding-bridge.js +0 -15
- package/dist/services/session/session-checkpoint-service.d.ts +0 -1
- package/dist/services/session/session-checkpoint-service.js +0 -1
- package/dist/services/session/session-manager.d.ts +0 -8
- package/dist/services/session/session-manager.js +0 -19
- package/dist/services/session/session-resume-service.d.ts +0 -1
- package/dist/services/session/session-resume-service.js +0 -1
- package/dist/services/share/bundle-reader.d.ts +2 -5
- package/dist/services/share/bundle-reader.js +6 -8
- package/dist/services/share/bundle-writer.d.ts +2 -2
- package/dist/services/skill/resume-detector.js +0 -3
- package/dist/services/skill/skill-scheduler.d.ts +0 -1
- package/dist/services/skill/skill-scheduler.js +0 -1
- package/dist/services/skill/skill-search-service.d.ts +0 -2
- package/dist/services/skill/skill-search-service.js +0 -2
- package/dist/services/skillhub/release-diff.d.ts +2 -2
- package/dist/services/skillhub/release-export.d.ts +2 -2
- package/dist/services/skillhub/release-gc-blobs.d.ts +2 -2
- package/dist/services/skillhub/release-import.d.ts +2 -2
- package/dist/services/skillhub/release-import.js +2 -1
- package/dist/services/skillhub/release-retain.d.ts +2 -2
- package/dist/services/skillhub/release-retain.js +2 -1
- package/dist/services/skillhub/sqlite-store.d.ts +3 -3
- package/dist/services/skillhub/sqlite-store.js +4 -5
- package/dist/services/skills/hooks-codegate-superpowers.d.ts +0 -3
- package/dist/services/skills/hooks-codegate-superpowers.js +0 -14
- package/dist/services/skills/hooks-settings-service.d.ts +0 -2
- package/dist/services/skills/hooks-settings-service.js +0 -6
- package/dist/services/skills/presence-lease-service.d.ts +0 -1
- package/dist/services/skills/presence-lease-service.js +0 -1
- package/dist/services/skills/session-start-hook-constants.d.ts +0 -4
- package/dist/services/skills/session-start-hook-constants.js +0 -4
- package/dist/services/skills/skill-presence-service.d.ts +0 -8
- package/dist/services/skills/skill-presence-service.js +0 -13
- package/dist/services/skills/skill-statusline-model.d.ts +0 -6
- package/dist/services/skills/skill-statusline-model.js +1 -4
- package/dist/services/skills/skill-statusline-renderer.d.ts +0 -1
- package/dist/services/skills/skill-statusline-renderer.js +0 -12
- package/dist/services/skills/skill-statusline-service.js +0 -6
- package/dist/services/skills/skill-statusline-sid-suffix.d.ts +0 -2
- package/dist/services/skills/skill-statusline-sid-suffix.js +0 -2
- package/dist/services/skills/statusline-palette.d.ts +0 -2
- package/dist/services/skills/statusline-palette.js +0 -3
- package/dist/services/slice/slice-archive-service.js +0 -1
- package/dist/services/slice/slice-benchmark-service.d.ts +0 -1
- package/dist/services/slice/slice-benchmark-service.js +0 -1
- package/dist/services/slice/slice-check-service.js +0 -6
- package/dist/services/slice/slice-check-types.d.ts +0 -1
- package/dist/services/slice/slice-pick-service.d.ts +0 -1
- package/dist/services/slice/slice-pick-service.js +0 -1
- package/dist/services/slice/slice-review-state.js +0 -2
- package/dist/services/sqlite/sqlite-driver.d.ts +118 -0
- package/dist/services/sqlite/sqlite-driver.js +159 -0
- package/dist/services/standards/ide-aware-standards-service.d.ts +0 -2
- package/dist/services/standards/ide-aware-standards-service.js +0 -1
- package/dist/services/standards/loop-engineering-readiness-lint.d.ts +0 -1
- package/dist/services/standards/loop-engineering-readiness-lint.js +0 -1
- package/dist/services/standards/migrate-claude-rules-service.js +0 -3
- package/dist/services/standards/migrate-service.d.ts +0 -1
- package/dist/services/standards/migrate-service.js +0 -1
- package/dist/services/standards/missing-standards-detector.d.ts +0 -2
- package/dist/services/standards/missing-standards-detector.js +0 -3
- package/dist/services/standards/project-standards-service.d.ts +0 -1
- package/dist/services/standards/project-standards-service.js +0 -1
- package/dist/services/standards/standards-render.d.ts +0 -1
- package/dist/services/standards/standards-render.js +0 -1
- package/dist/services/standards/ui-library-dispatch-block.d.ts +0 -1
- package/dist/services/standards/ui-library-dispatch-block.js +0 -1
- package/dist/services/tech/tech-change-id-service.d.ts +0 -7
- package/dist/services/tech/tech-change-id-service.js +0 -7
- package/dist/services/tech/tech-service.js +0 -5
- package/dist/services/verdict/envelope-parsers.d.ts +0 -2
- package/dist/services/verdict/envelope-parsers.js +0 -2
- package/dist/services/verdict/envelopes.d.ts +0 -1
- package/dist/services/vm/vm-lease.js +0 -1
- package/dist/services/web/aria-node.d.ts +0 -1
- package/dist/services/web/bounded-output.d.ts +0 -1
- package/dist/services/web/bounded-output.js +0 -1
- package/dist/services/web/browser-acquire.js +0 -1
- package/dist/services/web/browser-cache-probe.js +0 -1
- package/dist/services/web/browser-session-manager.js +0 -1
- package/dist/services/web/daemon-entry.js +0 -1
- package/dist/services/web/daemon-registry.js +0 -1
- package/dist/services/web/daemon-supervisor.d.ts +4 -3
- package/dist/services/web/daemon-supervisor.js +4 -4
- package/dist/services/web/playwright-loader.js +0 -1
- package/dist/services/web/playwright-types.d.ts +0 -1
- package/dist/services/web/snapshot-pruner.js +0 -1
- package/dist/services/web/untrusted-envelope.d.ts +0 -1
- package/dist/services/web/web-artifact-paths.js +0 -1
- package/dist/services/web/web-client.d.ts +0 -1
- package/dist/services/web/web-daemon-service.js +0 -1
- package/dist/services/web/web-fallback.d.ts +0 -1
- package/dist/services/web/web-fallback.js +0 -1
- package/dist/services/web/web-install-service.js +0 -1
- package/dist/services/web/web-login-profile.js +0 -1
- package/dist/services/web/web-protocol.d.ts +0 -1
- package/dist/services/web/web-protocol.js +0 -1
- package/dist/services/web/web-status-report.js +0 -1
- package/dist/services/workflow/artifact-paths.js +0 -3
- package/dist/services/workflow/autonomous-resume-writer.js +0 -2
- package/dist/services/workflow/pipeline-verify-gate-support.d.ts +0 -5
- package/dist/services/workflow/pipeline-verify-gate-support.js +0 -11
- package/dist/services/workflow/pipeline-verify-service.d.ts +0 -2
- package/dist/services/workflow/pipeline-verify-service.js +0 -15
- package/dist/services/workflow/pipeline-verify-types.d.ts +0 -10
- package/dist/services/workflow/pipeline-verify-types.js +0 -2
- package/dist/services/workflow/plan-reader.d.ts +0 -1
- package/dist/services/workflow/plan-reader.js +0 -5
- package/dist/services/workflow/plan-refresher.js +0 -2
- package/dist/services/workflow/plan-trigger-detector.d.ts +0 -2
- package/dist/services/workflow/plan-trigger-detector.js +0 -3
- package/dist/services/workflow/workflow-autonomous-resume-helpers.js +0 -5
- package/dist/services/workflow/workflow-autonomous-service.js +0 -2
- package/dist/services/workflow/workflow-autonomous-types.d.ts +0 -2
- package/dist/services/workflow/workflow-autonomous-types.js +0 -2
- package/dist/services/workflow/workflow-graph-types.d.ts +0 -1
- package/dist/services/workflow/workflow-graph-types.js +0 -1
- package/dist/services/workflow/workflow-router-service.js +0 -4
- package/dist/services/workflow/workflow-skip-service.d.ts +0 -1
- package/dist/services/workflow/workflow-skip-service.js +0 -1
- package/dist/services/workflow/workflow-spec-lint.d.ts +0 -2
- package/dist/services/workflow/workflow-spec-lint.js +0 -2
- package/dist/services/workflow/workflow-spec-types.d.ts +0 -1
- package/dist/services/workflow/workflow-spec-types.js +0 -1
- package/dist/services/workflow/workflow-spec-yaml.d.ts +0 -2
- package/dist/services/workflow/workflow-spec-yaml.js +0 -2
- package/dist/services/workflow/workflow-spec.js +0 -1
- package/dist/services/workflow/workflow-state-store.js +0 -1
- package/dist/services/workspace/claude-settings-template.d.ts +0 -4
- package/dist/services/workspace/claude-settings-template.js +0 -4
- package/dist/services/workspace/generated-artifacts-stamp.d.ts +2 -2
- package/dist/services/workspace/generated-artifacts-stamp.js +2 -2
- package/dist/services/workspace/migrate-1-4-1-service.d.ts +0 -1
- package/dist/services/workspace/migrate-1-4-1-service.js +0 -1
- package/dist/services/workspace/migrate-service.js +0 -8
- package/dist/services/workspace/migrate-types.d.ts +0 -4
- package/dist/services/workspace/migrate-types.js +0 -1
- package/dist/services/workspace/reconcile-migrate.d.ts +0 -3
- package/dist/services/workspace/reconcile-migrate.js +0 -5
- package/dist/services/workspace/reconcile-service.d.ts +0 -3
- package/dist/services/workspace/reconcile-service.js +0 -7
- package/dist/services/workspace/reconcile-types.d.ts +0 -5
- package/dist/services/workspace/sid-naming-guard.d.ts +0 -1
- package/dist/services/workspace/sid-naming-guard.js +0 -1
- package/dist/services/workspace/templates/project-scan/index.d.ts +0 -3
- package/dist/services/workspace/templates/project-scan/index.js +0 -3
- package/dist/services/workspace/workspace-claude-settings-materializer.d.ts +0 -1
- package/dist/services/workspace/workspace-claude-settings-materializer.js +0 -4
- package/dist/services/workspace/workspace-service.d.ts +0 -7
- package/dist/services/workspace/workspace-service.js +1 -17
- package/dist/services/worktree/playwright-profile.js +0 -1
- package/dist/services/worktree/worktree-lease-types.d.ts +0 -1
- package/dist/services/worktree/worktree-lease-types.js +0 -1
- package/dist/services/worktree/worktree-lease.d.ts +0 -2
- package/dist/services/worktree/worktree-lease.js +0 -2
- package/dist/shared/format-md-compact.d.ts +0 -2
- package/dist/shared/format-md-compact.js +0 -2
- package/dist/shared/incrementing-number.d.ts +0 -1
- package/dist/shared/incrementing-number.js +0 -1
- package/dist/shared/path-utils.d.ts +0 -1
- package/dist/shared/path-utils.js +0 -1
- package/dist/shared/runtime-root.d.ts +0 -1
- package/dist/shared/runtime-root.js +0 -1
- package/dist/shared/stale-policy.d.ts +0 -1
- package/dist/shared/stale-policy.js +0 -1
- package/package.json +12 -10
- package/scripts/canonical-store-link.mjs +296 -0
- package/scripts/canonical-store-prune.mjs +131 -0
- package/scripts/canonical-store.mjs +298 -0
- package/scripts/install-skills.mjs +175 -560
- package/skills/bee/peaks-qa/references/reading-handoff-frontmatter.md +3 -1
- package/skills/bee/peaks-rd/references/parallel-review-fanout.md +1 -1
- package/skills/bee/peaks-rd/references/rd-fanout-contracts.md +3 -2
- package/skills/bee/peaks-rd/references/writing-handoff-frontmatter.md +29 -7
- package/skills/peaks-audit/SKILL.md +3 -3
- package/skills/peaks-code/references/frontend-only-mode.md +2 -2
- package/skills/peaks-code/references/startup-sequence.md +0 -4
- package/dist/cli/commands/upgrade-commands.d.ts +0 -25
- package/dist/cli/commands/upgrade-commands.js +0 -154
- package/dist/services/codegraph/codegraph-include-reconciler.d.ts +0 -10
- package/dist/services/codegraph/codegraph-include-reconciler.js +0 -160
- package/dist/services/upgrade/1x-detector-service.d.ts +0 -7
- package/dist/services/upgrade/1x-detector-service.js +0 -96
- package/dist/services/upgrade/gitignore-migrate-service.d.ts +0 -56
- package/dist/services/upgrade/gitignore-migrate-service.js +0 -170
- package/dist/services/upgrade/upgrade-service.d.ts +0 -81
- package/dist/services/upgrade/upgrade-service.js +0 -428
- package/skills/peaks-code/references/step-0-55-1x-detection.md +0 -83
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AC-3 — IDE-aware compact dispatcher.
|
|
3
2
|
*
|
|
4
3
|
* Reads the active IDE's `IdeAdapter.compact` profile and dispatches
|
|
5
4
|
* compact via the adapter-declared pathway. No hard-coded IDE names
|
|
@@ -23,13 +22,11 @@
|
|
|
23
22
|
* returns `ok: false` with `message: 'noop'`.
|
|
24
23
|
* Used by legacy / unverified adapters.
|
|
25
24
|
*
|
|
26
|
-
* rid-031 (2026-07-28): `shell-exec` pathway is DEPRECATED. Real
|
|
27
25
|
* callers must use `ide-native` (main session) or
|
|
28
26
|
* `llm-self-compress`. No host CLI spawn occurs; the `case
|
|
29
27
|
* 'shell-exec':` branch logs a deprecation warning and returns the
|
|
30
28
|
* same envelope shape.
|
|
31
29
|
*
|
|
32
|
-
* Slice 2026-09-12-auto-compact-vendor-neutrality (defect #2 of the QA
|
|
33
30
|
* pass): the paragraph above used to justify keeping that branch with
|
|
34
31
|
* "the 2 currently-passing tests" it named by path and line (`:58` of
|
|
35
32
|
* one file, `:102` of another, asserting `pathway: 'shell-exec'`).
|
|
@@ -37,7 +34,6 @@
|
|
|
37
34
|
* deleted by `f17aa377 test(rebuild): delete 559 legacy unit tests and
|
|
38
35
|
* reset vitest config`, and `grep -rn "shell-exec" tests/` now returns
|
|
39
36
|
* nothing — no test in this repo asserts `pathway: 'shell-exec'`. The
|
|
40
|
-
* branch is retained for the rid-031 ENVELOPE CONTRACT itself
|
|
41
37
|
* (`pathway` is part of `CompactDispatchResult` and is echoed to
|
|
42
38
|
* `peaks code auto-compact` callers), not for a test. Deleting it is a
|
|
43
39
|
* contract change, deliberately out of this slice.
|
|
@@ -61,12 +57,10 @@ export async function dispatchIdeCompact(input) {
|
|
|
61
57
|
// See auto-compact-reader.ts for the IdeKind→IdeId cast rationale.
|
|
62
58
|
const ideId = (detected === 'unknown' ? 'claude-code' : detected);
|
|
63
59
|
const adapter = getAdapter(ideId);
|
|
64
|
-
// Slice 2026-06-28-code-mode-bypass-fix (defect #4): default to
|
|
65
60
|
// `'main'` so the orchestrator's auto-compact actually compresses
|
|
66
61
|
// the main-session context. The orchestrator passes `'sub-agent'`
|
|
67
62
|
// explicitly when a sub-agent shell dispatches the call.
|
|
68
63
|
const target = input.target ?? 'main';
|
|
69
|
-
// Slice 2026-09-12-auto-compact-vendor-neutrality — the up-front
|
|
70
64
|
// `target === 'main' && ideId !== 'claude-code'` refusal is GONE.
|
|
71
65
|
//
|
|
72
66
|
// It decided by adapter NAME what the adapter's own profile already
|
|
@@ -104,11 +98,8 @@ export async function dispatchIdeCompact(input) {
|
|
|
104
98
|
const pathway = profile.compactPathway;
|
|
105
99
|
switch (pathway) {
|
|
106
100
|
case 'shell-exec':
|
|
107
|
-
// rid-031 (2026-07-28): `shell-exec` pathway is DEPRECATED.
|
|
108
101
|
// No host CLI spawn occurs. The case marker is preserved for the
|
|
109
|
-
// rid-031 envelope contract (callers read `pathway`), NOT for a
|
|
110
102
|
// test — see this file's header, defect #2 of the 2026-09-12 QA
|
|
111
|
-
// pass: the tests the previous comment named were deleted by
|
|
112
103
|
// f17aa377 and no test asserts `pathway: 'shell-exec'` now.
|
|
113
104
|
// Real callers must use `ide-native` (main session) or
|
|
114
105
|
// `llm-self-compress`.
|
|
@@ -128,7 +119,6 @@ export async function dispatchIdeCompact(input) {
|
|
|
128
119
|
message: `shell-exec pathway is deprecated; no host CLI spawn for command '${profile.compactCommand}'. Use ide-native for main-session runner.`
|
|
129
120
|
};
|
|
130
121
|
case 'ide-native':
|
|
131
|
-
// Slice 2026-07-02-auto-compact-zero-pause: write the auto-compact
|
|
132
122
|
// PreToolUse hook into the IDE's MACHINE-LOCAL settings layer,
|
|
133
123
|
// resolved from the adapter (`settings.dirName` +
|
|
134
124
|
// `settings.localSettingsFileName`) — never from a path literal
|
|
@@ -146,9 +136,7 @@ export async function dispatchIdeCompact(input) {
|
|
|
146
136
|
// child claude process and the sub-agent's own runner doesn't
|
|
147
137
|
// get a PreToolUse hook installed in the wrong place.
|
|
148
138
|
if (target === 'sub-agent') {
|
|
149
|
-
// rid-031 (2026-07-28): legacy shell-spawn fallback is
|
|
150
139
|
// DEPRECATED. No host CLI spawn occurs. The envelope is
|
|
151
|
-
// returned with `pathway: 'shell-exec'` to preserve the rid-031
|
|
152
140
|
// contract for callers that read `pathway` (sub-agent shells
|
|
153
141
|
// historically relied on this path). The test the previous
|
|
154
142
|
// comment named was deleted by f17aa377 — see this file's
|
|
@@ -197,7 +185,6 @@ export async function dispatchIdeCompact(input) {
|
|
|
197
185
|
}
|
|
198
186
|
}
|
|
199
187
|
/**
|
|
200
|
-
* Slice 2026-07-02-auto-compact-zero-pause: implement the
|
|
201
188
|
* `ide-native` pathway. Writes the auto-compact PreToolUse hook
|
|
202
189
|
* into the IDE's MACHINE-LOCAL settings file (idempotent; the
|
|
203
190
|
* install service is a no-op if the hook is already present). On
|
|
@@ -205,7 +192,6 @@ export async function dispatchIdeCompact(input) {
|
|
|
205
192
|
* `peaks code auto-compact` which in-band spawns the adapter's
|
|
206
193
|
* declared compact command against the CURRENT runner session.
|
|
207
194
|
*
|
|
208
|
-
* Slice 2026-09-12-auto-compact-vendor-neutrality: the settings path
|
|
209
195
|
* AND the echoed `ide` are read off the adapter, so this function no
|
|
210
196
|
* longer names a vendor. An adapter that declares
|
|
211
197
|
* `compactPathway: 'ide-native'` and its own `settings` location gets
|
|
@@ -18,7 +18,6 @@ export interface ReadContextPercentInput {
|
|
|
18
18
|
readonly outerSessionId?: string | undefined;
|
|
19
19
|
readonly env?: NodeJS.ProcessEnv | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* Slice 2026-07-31-rid-002: explicit byte count from `--prompt-size <bytes>`.
|
|
22
21
|
* When set to a finite non-negative number, short-circuits the entire
|
|
23
22
|
* env / statusline / transcript chain with `source: 'user-overridden'`.
|
|
24
23
|
* Mac escape hatch — some IDEs (e.g. Claude Code on macOS) do NOT
|
|
@@ -14,7 +14,6 @@ export type { ReadContextPercentInput };
|
|
|
14
14
|
* so this module names no IDE and no settings literal — the vendor-neutrality
|
|
15
15
|
* guard's shape-3 rule applies to every registry consumer, and this is one.
|
|
16
16
|
*
|
|
17
|
-
* Slice 2026-09-13-auto-compact-trigger-ownership.
|
|
18
17
|
*/
|
|
19
18
|
export declare function resolveHarnessWindowLocation(input: {
|
|
20
19
|
readonly projectRoot: string;
|
|
@@ -55,7 +54,6 @@ export declare function resolveHarnessRatioWindow(state: HarnessWindowReadResult
|
|
|
55
54
|
* Materialize a window into the harness's own settings, so the number
|
|
56
55
|
* peaks-loop divides by and the number the harness compacts against are one
|
|
57
56
|
* value rather than two resolutions (slice
|
|
58
|
-
* 2026-09-13-auto-compact-trigger-ownership).
|
|
59
57
|
*
|
|
60
58
|
* The caller passes the denominator it JUST USED (`probe.capacityTokens`), not
|
|
61
59
|
* a re-derived one — that is what makes the two sides structurally identical.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AC-1 — auto context-percent probe.
|
|
3
2
|
*
|
|
4
3
|
* Reads the current AI CLI context-fill ratio without requiring the
|
|
5
4
|
* LLM to pass `--prompt-size <bytes>` manually. Strategy: ask the
|
|
@@ -43,7 +42,6 @@ import { isHarnessWindowInRange, parseHarnessWindowTokens, readHarnessWindow, sy
|
|
|
43
42
|
* so this module names no IDE and no settings literal — the vendor-neutrality
|
|
44
43
|
* guard's shape-3 rule applies to every registry consumer, and this is one.
|
|
45
44
|
*
|
|
46
|
-
* Slice 2026-09-13-auto-compact-trigger-ownership.
|
|
47
45
|
*/
|
|
48
46
|
export function resolveHarnessWindowLocation(input) {
|
|
49
47
|
const env = input.env ?? process.env;
|
|
@@ -98,7 +96,6 @@ export function readHarnessWindowState(input) {
|
|
|
98
96
|
export function resolveHarnessRatioWindow(state) {
|
|
99
97
|
if (state === null)
|
|
100
98
|
return undefined;
|
|
101
|
-
// E1 (rid 2026-09-13-defects-e): a value outside the band the harness accepts
|
|
102
99
|
// is not a window, however well-formed an integer it is — the harness ignores
|
|
103
100
|
// or caps it, so handing it over here would make the ratio's denominator a
|
|
104
101
|
// number the harness is not compacting on. This is the read half of the same
|
|
@@ -121,7 +118,6 @@ export function resolveHarnessRatioWindow(state) {
|
|
|
121
118
|
* Materialize a window into the harness's own settings, so the number
|
|
122
119
|
* peaks-loop divides by and the number the harness compacts against are one
|
|
123
120
|
* value rather than two resolutions (slice
|
|
124
|
-
* 2026-09-13-auto-compact-trigger-ownership).
|
|
125
121
|
*
|
|
126
122
|
* The caller passes the denominator it JUST USED (`probe.capacityTokens`), not
|
|
127
123
|
* a re-derived one — that is what makes the two sides structurally identical.
|
|
@@ -196,7 +192,6 @@ export function readContextPercent(input) {
|
|
|
196
192
|
};
|
|
197
193
|
}
|
|
198
194
|
if (adapter.compact) {
|
|
199
|
-
// Slice 2026-09-13-auto-compact-trigger-ownership: the window peaks-loop
|
|
200
195
|
// configured for the harness, read from the adapter's declared settings
|
|
201
196
|
// path + key. `null` (no knob declared, or the key absent) leaves the
|
|
202
197
|
// adapter's chain byte-identical to before this slice.
|
|
@@ -222,7 +217,6 @@ export function readContextPercent(input) {
|
|
|
222
217
|
// transcript probe. When it returns a probe, honor it; otherwise
|
|
223
218
|
// fall through to conservative-fallback.
|
|
224
219
|
//
|
|
225
|
-
// Slice 2026-09-09-context-window-override: the generic reader also
|
|
226
220
|
// hands the adapter the raw `context.windowTokens` config override, so
|
|
227
221
|
// the adapter's window resolver can prefer an explicit user value over
|
|
228
222
|
// its model-name heuristics (the env override arrives via `env`).
|
|
@@ -232,7 +226,6 @@ export function readContextPercent(input) {
|
|
|
232
226
|
outerSessionId: input.outerSessionId,
|
|
233
227
|
env,
|
|
234
228
|
configWindowTokens: readContextWindowTokensOverride(input.projectRoot),
|
|
235
|
-
// Slice 2026-09-13-auto-compact-trigger-ownership: hand the adapter the
|
|
236
229
|
// window peaks-loop configured for the harness, so the ratio it reports
|
|
237
230
|
// divides by the very number the harness compacts against — plus whether
|
|
238
231
|
// peaks-loop is the one that wrote it, so the adapter may self-correct
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto-compact shared types (v2.13.0 AC-1..AC-4).
|
|
3
2
|
*
|
|
4
3
|
* Two-tier threshold model — peaks-loop is project-aware and the LLM
|
|
5
4
|
* is the decision-maker:
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
* provides the toolkit; the LLM picks the moment. At 0.95 peaks-loop
|
|
29
28
|
* requests the compact outright and says it is waiting.
|
|
30
29
|
*
|
|
31
|
-
* Slice 2026-09-13-auto-compact-trigger-ownership corrected two claims that
|
|
32
30
|
* used to head this file: the red line does NOT "refuse to dispatch any
|
|
33
31
|
* further sub-agent" (peaks-loop has no way to compact a running session, so
|
|
34
32
|
* such a refusal gated nothing and deadlocked the runner), and the window
|
|
@@ -55,7 +53,6 @@ export interface ConvergencePlan {
|
|
|
55
53
|
readonly nextActions: readonly string[];
|
|
56
54
|
readonly resumeHint: string;
|
|
57
55
|
}
|
|
58
|
-
/** Per-IDE compact pathway chosen by AC-3. */
|
|
59
56
|
export interface CompactDispatchResult {
|
|
60
57
|
readonly ok: boolean;
|
|
61
58
|
readonly ide: string;
|
|
@@ -71,7 +68,6 @@ export interface CompactDispatchResult {
|
|
|
71
68
|
* alias and its record cannot drift apart into two lists.
|
|
72
69
|
*
|
|
73
70
|
* `redLineGated` → `redLineRequested` (slice
|
|
74
|
-
* 2026-09-13-auto-compact-trigger-ownership): nothing was ever gated. See
|
|
75
71
|
* `redLineGated` on the dispatch branches for why the alias is kept rather
|
|
76
72
|
* than deleted.
|
|
77
73
|
*/
|
|
@@ -101,7 +97,6 @@ export type AutoCompactResult = {
|
|
|
101
97
|
*/
|
|
102
98
|
readonly decision: 'below-threshold' | 'in-flight-batch' | 'already-armed' | 'unresolved-session';
|
|
103
99
|
/**
|
|
104
|
-
* rid `2026-09-14-compact-dispatch-backoff`, `already-armed` only: the
|
|
105
100
|
* ratio the open run was dispatched at, and its id. `ratio` above is the
|
|
106
101
|
* LIVE reading — the pair is what keeps "it is still high" legible after
|
|
107
102
|
* the backoff drops the per-probe rows: the ask is at `armedAtRatio`, and
|
|
@@ -110,7 +105,6 @@ export type AutoCompactResult = {
|
|
|
110
105
|
readonly armedAtRatio?: number;
|
|
111
106
|
readonly armedRunId?: string;
|
|
112
107
|
/**
|
|
113
|
-
* Slice 2026-09-13-auto-compact-trigger-ownership: what syncing the
|
|
114
108
|
* harness auto-compact window did on this probe. `null` = the active
|
|
115
109
|
* adapter declares no such knob. Present so the write is VISIBLE —
|
|
116
110
|
* the harness reports an override silently, so peaks-loop must not.
|
|
@@ -129,7 +123,6 @@ export type AutoCompactResult = {
|
|
|
129
123
|
readonly convergencePlan?: ConvergencePlan;
|
|
130
124
|
readonly dispatch?: CompactDispatchResult;
|
|
131
125
|
/**
|
|
132
|
-
* Slice 2026-06-28-code-mode-bypass-fix (defect #4): which
|
|
133
126
|
* session the compact targeted. `'main'` (default) means the
|
|
134
127
|
* main-session Claude Code window will fire `/compact` on its
|
|
135
128
|
* next turn; `'sub-agent'` means the dispatcher shell-spawned
|
|
@@ -137,7 +130,6 @@ export type AutoCompactResult = {
|
|
|
137
130
|
*/
|
|
138
131
|
readonly target?: 'main' | 'sub-agent';
|
|
139
132
|
/**
|
|
140
|
-
* Slice 2026-07-28 (rid-027): which mode's threshold table
|
|
141
133
|
* was used. Defaults to `'standard'` (0.85/0.95). `'partial'`
|
|
142
134
|
* (0.70/0.85) is selected when 24h mode is active or the
|
|
143
135
|
* caller passes `--mode partial`.
|
|
@@ -148,7 +140,6 @@ export type AutoCompactResult = {
|
|
|
148
140
|
* the harness to compact.
|
|
149
141
|
*
|
|
150
142
|
* Renamed from `redLineGated` in slice
|
|
151
|
-
* 2026-09-13-auto-compact-trigger-ownership: nothing is gated. The
|
|
152
143
|
* old name asserted a block peaks-loop cannot enforce (it has no
|
|
153
144
|
* executor for a running session), and acting on that assertion is
|
|
154
145
|
* what deadlocked the runner.
|
|
@@ -194,7 +185,6 @@ export type AutoCompactResult = {
|
|
|
194
185
|
};
|
|
195
186
|
};
|
|
196
187
|
/**
|
|
197
|
-
* Probe shape returned by AC-1 (`readContextPercent`). The source
|
|
198
188
|
* field tells callers how the ratio was obtained (env-var, statusline
|
|
199
189
|
* poller, IDE hook, conservative fallback) so the CLI can show
|
|
200
190
|
* "context % (source: statusline-poll)" and the LLM can trust it.
|
|
@@ -245,7 +235,6 @@ export interface ContextPercentProbe {
|
|
|
245
235
|
* - `default` — 200K safe default
|
|
246
236
|
* Undefined for byte / percent sources (`user-overridden`, `${ideId}-env`,
|
|
247
237
|
* `statusline-poll`), which have no token window. Slice
|
|
248
|
-
* 2026-09-09-context-window-override: lets a wrong window be diagnosed in
|
|
249
238
|
* one read instead of guessing which heuristic fired.
|
|
250
239
|
*/
|
|
251
240
|
readonly capacitySource?: string;
|
|
@@ -8,7 +8,6 @@ export { AUTO_COMPACT_SOFT_WARN_RATIO, AUTO_COMPACT_AUTO_FIRE_RATIO, AUTO_COMPAC
|
|
|
8
8
|
* alias and its record cannot drift apart into two lists.
|
|
9
9
|
*
|
|
10
10
|
* `redLineGated` → `redLineRequested` (slice
|
|
11
|
-
* 2026-09-13-auto-compact-trigger-ownership): nothing was ever gated. See
|
|
12
11
|
* `redLineGated` on the dispatch branches for why the alias is kept rather
|
|
13
12
|
* than deleted.
|
|
14
13
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* buildDispatchSystemPrompt — pure-function prompt composer for sub-agent dispatch.
|
|
3
3
|
*
|
|
4
|
-
* Slice 2026-07-22-orchestrator-memory-preflight (Task 5). The orchestrator
|
|
5
4
|
* dispatch flow (`src/cli/commands/dispatch-commands.ts`) calls
|
|
6
5
|
* `MemoryPreflightService.fetchBlock` and feeds the result into this builder
|
|
7
6
|
* so the memory block, when available, is prepended BEFORE the task brief.
|
|
@@ -19,7 +18,6 @@ export interface DispatchPromptInput {
|
|
|
19
18
|
taskBody: string;
|
|
20
19
|
memoryBlock: MemoryPreflightResult;
|
|
21
20
|
/**
|
|
22
|
-
* Slice 2026-07-29-context-evaluation-accuracy: the live
|
|
23
21
|
* context-fill probe. When provided, the composer prepends
|
|
24
22
|
* a `## Context window` block with the authoritative ratio so
|
|
25
23
|
* the dispatched sub-agent does NOT estimate context from
|
|
@@ -29,21 +27,19 @@ export interface DispatchPromptInput {
|
|
|
29
27
|
*/
|
|
30
28
|
contextProbe?: ContextPercentProbe | null;
|
|
31
29
|
/**
|
|
32
|
-
* Slice 2026-09-03-codegraph-preread (Option A): pre-composed
|
|
33
30
|
* `## Codegraph structure` markdown block, read from the codegraph
|
|
34
31
|
* index BEFORE the RD sub-agent's task body is composed so the RD
|
|
35
32
|
* plans against real module/file topology, not LLM memory.
|
|
36
33
|
*
|
|
37
34
|
* - `undefined` → no codegraph block (legacy callers unchanged).
|
|
38
|
-
* - `null` → codegraph was attempted
|
|
39
|
-
* renders
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
35
|
+
* - `null` → codegraph was attempted and no reason was obtained; the
|
|
36
|
+
* composer renders the fallback that SAYS the reason is missing.
|
|
37
|
+
* - `string` → the structure block, or the preflight's failure NOTE when the
|
|
38
|
+
* index could not be read — the composer turns the note into an unavailable
|
|
39
|
+
* block that QUOTES it, so the reason cannot be dropped on its own.
|
|
43
40
|
*/
|
|
44
41
|
codegraphBlock?: string | null;
|
|
45
42
|
/**
|
|
46
|
-
* Slice 2026-09-06-ui-lib-dispatch-priority: pre-composed
|
|
47
43
|
* `## Project stack` markdown block, rendered from the detected
|
|
48
44
|
* project context (component library + CSS framework + build tool) by
|
|
49
45
|
* the dispatch site BEFORE the sub-agent's task body is composed so
|
|
@@ -57,7 +53,6 @@ export interface DispatchPromptInput {
|
|
|
57
53
|
*/
|
|
58
54
|
projectStackBlock?: string | null;
|
|
59
55
|
/**
|
|
60
|
-
* Slice 2026-09-07-search-first-preflight: the orchestrator-synthesized
|
|
61
56
|
* `## Fresh context` block (≤5 binding directives from a Context7 →
|
|
62
57
|
* WebSearch preflight), read from `.peaks/_runtime/<sessionId>/fresh-context.md`.
|
|
63
58
|
*
|
|
@@ -69,7 +64,6 @@ export interface DispatchPromptInput {
|
|
|
69
64
|
*/
|
|
70
65
|
freshContextBlock?: string | null;
|
|
71
66
|
/**
|
|
72
|
-
* Slice 2026-09-10-dispatch-token-and-swarm §4: session capsule
|
|
73
67
|
* published by the orchestrator through `peaks sub-agent share`.
|
|
74
68
|
*
|
|
75
69
|
* - `undefined` / `null` → no capsule pointer, no precedence line
|
|
@@ -86,7 +80,6 @@ export interface DispatchPromptInput {
|
|
|
86
80
|
} | null;
|
|
87
81
|
}
|
|
88
82
|
/**
|
|
89
|
-
* Slice 2026-07-29-worktree-l1: Layer 1 of the 3-layer worktree governance
|
|
90
83
|
* defence. The block below is prepended to every sub-agent dispatch system
|
|
91
84
|
* prompt so the LLM sees the superpowers-chain refusal BEFORE any task
|
|
92
85
|
* content. The block mirrors the prose in
|
|
@@ -100,16 +93,13 @@ export interface DispatchPromptInput {
|
|
|
100
93
|
* orchestrator synthesizes a prompt without reading the per-role
|
|
101
94
|
* template (the orchestrator may run peaks-rd on a different rid and
|
|
102
95
|
* reuse the task body verbatim).
|
|
103
|
-
* - Pure-function design (slice 2026-07-22) makes the appended block
|
|
104
96
|
* trivially testable.
|
|
105
97
|
*
|
|
106
|
-
* Fallback note: until rid-L2-extended ships `peaks worktree spawn`, the
|
|
107
98
|
* fallback path is `peaks worktree auth grant --rid <id> --reason <text>
|
|
108
99
|
* --ttl <5m>` (already shipped). Update the prose once `spawn` lands.
|
|
109
100
|
*/
|
|
110
101
|
export declare const L1_WORKTREE_GOVERNANCE_BLOCK = "## Superpowers chain refusal (L1 worktree governance \u2014 locked 2026-07-29)\n\nYou MUST NOT follow the superpowers chain for worktree decisions:\n\n- superpowers:brainstorming \u2192 superpowers:writing-plans \u2192\n superpowers:subagent-driven-development \u2192 superpowers:using-git-worktrees\n\nThat chain ends with `git worktree add` (superpowers:using-git-worktrees SKILL.md line 96), which bypasses peaks-loop's L2 hook gate and L3 IDE `permissions.deny`. L3 denial is NOT sufficient \u2014 by then the chain has already taught raw `git worktree add`.\n\nFor worktree operations, use ONLY:\n\n- `peaks worktree spawn --rid <rid> --ttl <duration> --purpose <text>` (after rid-L2-extended ships)\n- until then: `peaks worktree auth grant --rid <id> --reason <text> --ttl <5m>`\n\nSuperpowers skills remain REFERENCE material for brainstorming / planning techniques, but MUST NOT be used as a workflow. peaks-rd's own PRD/RD artifacts (`.peaks/_runtime/<sessionId>/rd/requests/<rid>.md`) are authoritative.\n\nIf the upstream superpowers chain suggests raw `git worktree add`:\n\n1. STOP\n2. Re-author the plan as a peaks-rd artifact\n3. Continue with `peaks worktree spawn` (or the auth-grant fallback)\n";
|
|
111
102
|
/**
|
|
112
|
-
* Slice 2026-08-01-subagent-merge-and-e2e (Task 8): the dispatch
|
|
113
103
|
* system prompt gains three lifecycle rules. The sub-agent must:
|
|
114
104
|
*
|
|
115
105
|
* 1. Register any long-lived local process it starts (vite dev,
|
|
@@ -135,7 +125,6 @@ export declare const L1_WORKTREE_GOVERNANCE_BLOCK = "## Superpowers chain refusa
|
|
|
135
125
|
*/
|
|
136
126
|
export declare const LIFECYCLE_RULES = "## Sub-agent lifecycle rules (locked 2026-08-01)\n\n- If you start a long-lived local service (vite dev, mock API, docker container, etc.), register it with `peaks sub-agent shutdown register --pid <pid> --name <label>` before you exit; the parent session best-effort-kills it before merge-back.\n- Do NOT run E2E. The parent session runs Playwright verification once after merge-back (Task 10); your E2E work is duplicate effort.\n- Do NOT call `git merge`, `git pull`, `git rebase`, or `peaks worktree release`. The parent session owns the merge-back step.\n";
|
|
137
127
|
/**
|
|
138
|
-
* Slice 2026-09-10-context-audit-and-discipline (Slice C): cap the sub-agent's
|
|
139
128
|
* FINAL report.
|
|
140
129
|
*
|
|
141
130
|
* Why (measured, session 2026-09-07-session-245530): 20 sub-agent final
|
|
@@ -151,7 +140,6 @@ export declare const LIFECYCLE_RULES = "## Sub-agent lifecycle rules (locked 202
|
|
|
151
140
|
*/
|
|
152
141
|
export declare const REPORT_CAP_BLOCK = "## Final report cap (mandatory)\n\nYour FINAL report to the parent MUST be \u2264 40 lines and \u2264 2 KB. Write any longer detail into the artifact file you already own \u2014 the parent can `Read` that file for the full detail, so nothing is lost. The report itself MUST still carry: changed files (one line each), the exact commands you ran, pass/fail counts, tsc status, and any blocker. Do NOT paste file contents, full tool output, or logs into the report.\n";
|
|
153
142
|
/**
|
|
154
|
-
* Slice 2026-09-10-fact-force-gate-adaptation: stand IN FRONT of an external
|
|
155
143
|
* `PreToolUse` gate instead of explaining its denial after the fact.
|
|
156
144
|
*
|
|
157
145
|
* ECC (a third-party plugin under `~/.claude/plugins/`) registers
|
|
@@ -187,20 +175,16 @@ export declare function renderFactForceGateBlock(): string;
|
|
|
187
175
|
/**
|
|
188
176
|
* Compose the system-prompt body for a sub-agent dispatch.
|
|
189
177
|
*
|
|
190
|
-
* 2026-09-10-dispatch-block-d (Option D): the composer owns the Test Tool
|
|
191
178
|
* Detection injection — ONE unified block for every role, prepended first.
|
|
192
179
|
* Callers MUST NOT prepend `formatTestToolDetection()` themselves or the
|
|
193
180
|
* block is injected twice.
|
|
194
181
|
*
|
|
195
|
-
* Byte-identical degradation contract (slice 2026-07-22-orchestrator-memory-preflight
|
|
196
182
|
* controller brief): when the memory block is unavailable, the composed body is
|
|
197
183
|
* exactly `formatTestToolDetection() + "\n\n" + L1 + "\n" + LIFECYCLE +
|
|
198
184
|
* "\n" + REPORT_CAP + "\n" + FACT_FORCE_GATE + "\n" + contextBlock + taskBody`, so the unavailable
|
|
199
185
|
* branch MUST return `taskBody` unwrapped (NOT a `# title\n\n` wrap).
|
|
200
186
|
* (REPORT_CAP joined the stable prefix in slice
|
|
201
|
-
* 2026-09-10-context-audit-and-discipline, Slice C.)
|
|
202
187
|
* The contract holds for callers that do not pass `codegraphBlock` (all
|
|
203
|
-
* non-RD roles). Slice 2026-09-03-codegraph-preread deliberately inserts a
|
|
204
188
|
* codegraph structure block (or its fail-soft unavailable note) for RD
|
|
205
189
|
* dispatches between the context window and the memory/task content.
|
|
206
190
|
*
|
|
@@ -208,20 +192,19 @@ export declare function renderFactForceGateBlock(): string;
|
|
|
208
192
|
* `## Project memory …` always sits above the task brief (never pushed below
|
|
209
193
|
* it).
|
|
210
194
|
*
|
|
211
|
-
* Slice 2026-07-29-worktree-l1: every branch prepends the L1 worktree
|
|
212
195
|
* governance block BEFORE the memory block / task body. The block is the
|
|
213
196
|
* first thing the dispatched sub-agent sees, so the superpowers-chain
|
|
214
197
|
* refusal is in scope before any task-specific prose arrives.
|
|
215
198
|
*/
|
|
216
199
|
export declare function buildDispatchSystemPrompt(input: DispatchPromptInput): string;
|
|
217
200
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
201
|
+
* the truly reasonless fallback: rendered only when the caller passes `null`,
|
|
202
|
+
* i.e. a codegraph was attempted and NOTHING was learned about why it failed.
|
|
203
|
+
* It must never stand in for a reason that exists, which is why its text says
|
|
204
|
+
* the reason was not obtained rather than the bare "unavailable" that reads
|
|
205
|
+
* exactly like the success line it replaced.
|
|
223
206
|
*/
|
|
224
|
-
export declare const CODEGRAPH_UNAVAILABLE_BLOCK
|
|
207
|
+
export declare const CODEGRAPH_UNAVAILABLE_BLOCK: string;
|
|
225
208
|
/** Binding phrases every dispatch prompt must contain, for every role. */
|
|
226
209
|
export declare const BINDING_RULE_TOKENS: readonly string[];
|
|
227
210
|
/**
|
|
@@ -232,7 +215,6 @@ export declare const BINDING_RULE_TOKENS: readonly string[];
|
|
|
232
215
|
* runner without asking the user as a last resort, and prefer
|
|
233
216
|
* `peaks test <file>` because it resolves the local binary Windows-aware.
|
|
234
217
|
*
|
|
235
|
-
* 2026-09-10-dispatch-block-d (Option D): there is no role split any more,
|
|
236
218
|
* so this set is asserted IDENTICALLY for every role. The runner EXAMPLES
|
|
237
219
|
* were removed as part of the unification — they were never rules.
|
|
238
220
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatTestToolDetection } from '../dispatch/test-tool-detection.js';
|
|
2
|
+
import { resolveCodegraphBlock } from './codegraph-unavailable-block.js';
|
|
2
3
|
/**
|
|
3
|
-
* Slice 2026-07-29-worktree-l1: Layer 1 of the 3-layer worktree governance
|
|
4
4
|
* defence. The block below is prepended to every sub-agent dispatch system
|
|
5
5
|
* prompt so the LLM sees the superpowers-chain refusal BEFORE any task
|
|
6
6
|
* content. The block mirrors the prose in
|
|
@@ -14,10 +14,8 @@ import { formatTestToolDetection } from '../dispatch/test-tool-detection.js';
|
|
|
14
14
|
* orchestrator synthesizes a prompt without reading the per-role
|
|
15
15
|
* template (the orchestrator may run peaks-rd on a different rid and
|
|
16
16
|
* reuse the task body verbatim).
|
|
17
|
-
* - Pure-function design (slice 2026-07-22) makes the appended block
|
|
18
17
|
* trivially testable.
|
|
19
18
|
*
|
|
20
|
-
* Fallback note: until rid-L2-extended ships `peaks worktree spawn`, the
|
|
21
19
|
* fallback path is `peaks worktree auth grant --rid <id> --reason <text>
|
|
22
20
|
* --ttl <5m>` (already shipped). Update the prose once `spawn` lands.
|
|
23
21
|
*/
|
|
@@ -44,7 +42,6 @@ If the upstream superpowers chain suggests raw \`git worktree add\`:
|
|
|
44
42
|
3. Continue with \`peaks worktree spawn\` (or the auth-grant fallback)
|
|
45
43
|
`;
|
|
46
44
|
/**
|
|
47
|
-
* Slice 2026-08-01-subagent-merge-and-e2e (Task 8): the dispatch
|
|
48
45
|
* system prompt gains three lifecycle rules. The sub-agent must:
|
|
49
46
|
*
|
|
50
47
|
* 1. Register any long-lived local process it starts (vite dev,
|
|
@@ -75,7 +72,6 @@ export const LIFECYCLE_RULES = `## Sub-agent lifecycle rules (locked 2026-08-01)
|
|
|
75
72
|
- Do NOT call \`git merge\`, \`git pull\`, \`git rebase\`, or \`peaks worktree release\`. The parent session owns the merge-back step.
|
|
76
73
|
`;
|
|
77
74
|
/**
|
|
78
|
-
* Slice 2026-09-10-context-audit-and-discipline (Slice C): cap the sub-agent's
|
|
79
75
|
* FINAL report.
|
|
80
76
|
*
|
|
81
77
|
* Why (measured, session 2026-09-07-session-245530): 20 sub-agent final
|
|
@@ -94,7 +90,6 @@ export const REPORT_CAP_BLOCK = `## Final report cap (mandatory)
|
|
|
94
90
|
Your FINAL report to the parent MUST be ≤ 40 lines and ≤ 2 KB. Write any longer detail into the artifact file you already own — the parent can \`Read\` that file for the full detail, so nothing is lost. The report itself MUST still carry: changed files (one line each), the exact commands you ran, pass/fail counts, tsc status, and any blocker. Do NOT paste file contents, full tool output, or logs into the report.
|
|
95
91
|
`;
|
|
96
92
|
/**
|
|
97
|
-
* Slice 2026-09-10-fact-force-gate-adaptation: stand IN FRONT of an external
|
|
98
93
|
* `PreToolUse` gate instead of explaining its denial after the fact.
|
|
99
94
|
*
|
|
100
95
|
* ECC (a third-party plugin under `~/.claude/plugins/`) registers
|
|
@@ -137,20 +132,16 @@ export function renderFactForceGateBlock() {
|
|
|
137
132
|
/**
|
|
138
133
|
* Compose the system-prompt body for a sub-agent dispatch.
|
|
139
134
|
*
|
|
140
|
-
* 2026-09-10-dispatch-block-d (Option D): the composer owns the Test Tool
|
|
141
135
|
* Detection injection — ONE unified block for every role, prepended first.
|
|
142
136
|
* Callers MUST NOT prepend `formatTestToolDetection()` themselves or the
|
|
143
137
|
* block is injected twice.
|
|
144
138
|
*
|
|
145
|
-
* Byte-identical degradation contract (slice 2026-07-22-orchestrator-memory-preflight
|
|
146
139
|
* controller brief): when the memory block is unavailable, the composed body is
|
|
147
140
|
* exactly `formatTestToolDetection() + "\n\n" + L1 + "\n" + LIFECYCLE +
|
|
148
141
|
* "\n" + REPORT_CAP + "\n" + FACT_FORCE_GATE + "\n" + contextBlock + taskBody`, so the unavailable
|
|
149
142
|
* branch MUST return `taskBody` unwrapped (NOT a `# title\n\n` wrap).
|
|
150
143
|
* (REPORT_CAP joined the stable prefix in slice
|
|
151
|
-
* 2026-09-10-context-audit-and-discipline, Slice C.)
|
|
152
144
|
* The contract holds for callers that do not pass `codegraphBlock` (all
|
|
153
|
-
* non-RD roles). Slice 2026-09-03-codegraph-preread deliberately inserts a
|
|
154
145
|
* codegraph structure block (or its fail-soft unavailable note) for RD
|
|
155
146
|
* dispatches between the context window and the memory/task content.
|
|
156
147
|
*
|
|
@@ -158,18 +149,15 @@ export function renderFactForceGateBlock() {
|
|
|
158
149
|
* `## Project memory …` always sits above the task brief (never pushed below
|
|
159
150
|
* it).
|
|
160
151
|
*
|
|
161
|
-
* Slice 2026-07-29-worktree-l1: every branch prepends the L1 worktree
|
|
162
152
|
* governance block BEFORE the memory block / task body. The block is the
|
|
163
153
|
* first thing the dispatched sub-agent sees, so the superpowers-chain
|
|
164
154
|
* refusal is in scope before any task-specific prose arrives.
|
|
165
155
|
*/
|
|
166
156
|
export function buildDispatchSystemPrompt(input) {
|
|
167
157
|
const { taskBody, memoryBlock, contextProbe, codegraphBlock, projectStackBlock, freshContextBlock, capsule } = input;
|
|
168
|
-
// 2026-09-10-dispatch-block-d (Option D): ONE Test Tool Detection block
|
|
169
158
|
// for every role — the composer owns the injection so callers MUST NOT
|
|
170
159
|
// prepend `formatTestToolDetection()` themselves (double injection).
|
|
171
160
|
const testToolText = `${formatTestToolDetection()}\n\n`;
|
|
172
|
-
// 2026-09-10-fact-force-gate-adaptation: always-on, both branches.
|
|
173
161
|
const factForceGateText = renderFactForceGateBlock();
|
|
174
162
|
const contextBlock = renderContextBlock(contextProbe ?? null);
|
|
175
163
|
const codegraphText = renderCodegraphBlock(codegraphBlock);
|
|
@@ -182,7 +170,6 @@ export function buildDispatchSystemPrompt(input) {
|
|
|
182
170
|
return `${testToolText}${L1_WORKTREE_GOVERNANCE_BLOCK}\n${LIFECYCLE_RULES}\n${REPORT_CAP_BLOCK}\n${factForceGateText}${contextBlock}${codegraphText}${projectStackText}${freshContextText}${capsuleText}${taskBody}`;
|
|
183
171
|
}
|
|
184
172
|
/**
|
|
185
|
-
* Slice 2026-09-10-dispatch-token-and-swarm §4 — session capsule pointer.
|
|
186
173
|
*
|
|
187
174
|
* QUALITY GUARD: the capsule is BACKGROUND only. The precedence line below
|
|
188
175
|
* is part of the contract, not decoration — anything the sub-agent must
|
|
@@ -195,13 +182,13 @@ function renderCapsulePointer(capsule) {
|
|
|
195
182
|
return `## Shared session capsule (advisory background)\nBackground facts already established by the orchestrator (${capsule.bytes} bytes): read them with \`peaks sub-agent shared-read --batch ${capsule.batchId} --key ${capsule.key}\`. This capsule is ADVISORY BACKGROUND ONLY — it is not a task. Your task spec below is authoritative and wins on any conflict; anything you must act on is stated inline there.\n\n`;
|
|
196
183
|
}
|
|
197
184
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
185
|
+
* the truly reasonless fallback: rendered only when the caller passes `null`,
|
|
186
|
+
* i.e. a codegraph was attempted and NOTHING was learned about why it failed.
|
|
187
|
+
* It must never stand in for a reason that exists, which is why its text says
|
|
188
|
+
* the reason was not obtained rather than the bare "unavailable" that reads
|
|
189
|
+
* exactly like the success line it replaced.
|
|
203
190
|
*/
|
|
204
|
-
export const CODEGRAPH_UNAVAILABLE_BLOCK =
|
|
191
|
+
export const CODEGRAPH_UNAVAILABLE_BLOCK = resolveCodegraphBlock(null);
|
|
205
192
|
/**
|
|
206
193
|
* Render the codegraph insertion for a dispatch prompt.
|
|
207
194
|
*
|
|
@@ -218,8 +205,7 @@ export const CODEGRAPH_UNAVAILABLE_BLOCK = '## Codegraph structure\n\ncodegraph
|
|
|
218
205
|
function renderCodegraphBlock(codegraphBlock) {
|
|
219
206
|
if (codegraphBlock === undefined)
|
|
220
207
|
return '';
|
|
221
|
-
|
|
222
|
-
return `${text.replace(/\s+$/, '')}\n\n`;
|
|
208
|
+
return `${resolveCodegraphBlock(codegraphBlock).replace(/\s+$/, '')}\n\n`;
|
|
223
209
|
}
|
|
224
210
|
/**
|
|
225
211
|
* Render the project-stack insertion for a dispatch prompt.
|
|
@@ -255,7 +241,6 @@ function renderFreshContextBlock(freshContextBlock) {
|
|
|
255
241
|
return `${freshContextBlock.replace(/\s+$/, '')}\n\n`;
|
|
256
242
|
}
|
|
257
243
|
/**
|
|
258
|
-
* Slice 2026-07-29-context-evaluation-accuracy: emit a
|
|
259
244
|
* `## Context window` block with the authoritative ratio so the
|
|
260
245
|
* dispatched sub-agent does not estimate from message length.
|
|
261
246
|
*
|
|
@@ -300,7 +285,6 @@ No context-fill probe was captured before this dispatch. To evaluate context pre
|
|
|
300
285
|
`;
|
|
301
286
|
}
|
|
302
287
|
/* ──────────────────────────────────────────────────────────────────────────
|
|
303
|
-
* Slice 2026-09-10-dispatch-token-and-swarm §1 — rule-presence guard.
|
|
304
288
|
*
|
|
305
289
|
* The compression + role-scoping in this file is allowed to shorten prose.
|
|
306
290
|
* It is NOT allowed to drop a binding rule. These token sets are the
|
|
@@ -330,14 +314,12 @@ export const BINDING_RULE_TOKENS = [
|
|
|
330
314
|
'do NOT estimate yourself',
|
|
331
315
|
'`peaks code context-now`',
|
|
332
316
|
'`verdict: red-line`',
|
|
333
|
-
// final report cap (Slice 2026-09-10-context-audit-and-discipline, Slice C)
|
|
334
317
|
'## Final report cap (mandatory)',
|
|
335
318
|
'≤ 40 lines and ≤ 2 KB',
|
|
336
319
|
'the parent can `Read` that file for the full detail',
|
|
337
320
|
'changed files (one line each)',
|
|
338
321
|
'pass/fail counts',
|
|
339
322
|
'tsc status',
|
|
340
|
-
// fact-forcing gate (slice 2026-09-10-fact-force-gate-adaptation)
|
|
341
323
|
'## Read before you edit (Fact-Forcing Gate)',
|
|
342
324
|
'Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on it',
|
|
343
325
|
'every path OUTSIDE `.peaks/**`',
|
|
@@ -362,7 +344,6 @@ export const BINDING_RULE_TOKENS = [
|
|
|
362
344
|
* runner without asking the user as a last resort, and prefer
|
|
363
345
|
* `peaks test <file>` because it resolves the local binary Windows-aware.
|
|
364
346
|
*
|
|
365
|
-
* 2026-09-10-dispatch-block-d (Option D): there is no role split any more,
|
|
366
347
|
* so this set is asserted IDENTICALLY for every role. The runner EXAMPLES
|
|
367
348
|
* were removed as part of the unification — they were never rules.
|
|
368
349
|
*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Opens every codegraph block; the discriminator between a block and a bare note. */
|
|
2
|
+
export declare const CODEGRAPH_BLOCK_HEADING = "## Codegraph structure";
|
|
3
|
+
/** The sentence shared by the reasonless fallback and the reason-bearing block. */
|
|
4
|
+
export declare const CODEGRAPH_PROCEEDING = "codegraph unavailable \u2014 proceeding on project-scan only.";
|
|
5
|
+
/**
|
|
6
|
+
* The sentence the TRULY reasonless fallback renders.
|
|
7
|
+
*
|
|
8
|
+
* Load-bearing, not decoration: the pre-fix block said only "codegraph
|
|
9
|
+
* unavailable", which is byte-for-byte what a reader saw whether upstream printed
|
|
10
|
+
* `unable to open database file` or printed nothing at all. Naming the missing
|
|
11
|
+
* reason makes "no reason exists" a claim the reader can check, and leaves "a
|
|
12
|
+
* reason exists but the dispatch dropped it" with nowhere to hide.
|
|
13
|
+
*/
|
|
14
|
+
export declare const CODEGRAPH_REASON_MISSING = "No failure reason was obtained from the codegraph preflight.";
|
|
15
|
+
/** Opens the reason-bearing variant; asserted absent whenever no reason exists. */
|
|
16
|
+
export declare const CODEGRAPH_REASON_SENTENCE = "Reason reported by the codegraph preflight: ";
|
|
17
|
+
/**
|
|
18
|
+
* Render the block for an unavailable codegraph. `note` is the preflight's own
|
|
19
|
+
* failure note, quoted rather than paraphrased — the point is that the next
|
|
20
|
+
* reader sees `unable to open database file` instead of re-deriving it.
|
|
21
|
+
*
|
|
22
|
+
* The quote is whitespace-collapsed to one line so a multi-line upstream summary
|
|
23
|
+
* cannot forge a markdown heading further down the prompt; it is otherwise
|
|
24
|
+
* verbatim, upstream's own SGR color included. Rewriting the failure text here
|
|
25
|
+
* would put peaks-loop's words where the cause belongs.
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderCodegraphUnavailableBlock(note?: string | null): string;
|
|
28
|
+
/**
|
|
29
|
+
* The ONE place a `codegraphBlock` value becomes text.
|
|
30
|
+
*
|
|
31
|
+
* - `null` (preflight ran, no reason obtained) → the explicit fallback.
|
|
32
|
+
* - a string already opening with the heading → the pre-composed structure
|
|
33
|
+
* block, verbatim.
|
|
34
|
+
* - any other string → an unavailable block quoting it as the reported reason.
|
|
35
|
+
* `buildCodegraphPreflightBlock`'s `{ available: false, note }` arm is the only
|
|
36
|
+
* production producer of that shape.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveCodegraphBlock(value: string | null): string;
|