@planu/cli 5.3.68 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/dist/.planu-build.json +1 -1
- package/dist/cli/commands/install.d.ts +2 -15
- package/dist/config/skill-templates/planu-dogfood-bug.md +43 -0
- package/dist/config/skill-templates/planu-implement.md +42 -0
- package/dist/config/skill-templates/planu-review.md +47 -0
- package/dist/core/shared/fs.d.ts +11 -0
- package/dist/core/shared/fs.js +90 -0
- package/dist/core/shared/strings.d.ts +3 -0
- package/dist/core/shared/strings.js +13 -0
- package/dist/engine/actuals/git-analyzer.js +1 -1
- package/dist/engine/actuals/progress-parser.js +1 -3
- package/dist/engine/agent-handoff-store.js +1 -0
- package/dist/engine/agent-squad/dispatcher.js +1 -0
- package/dist/engine/agent-telemetry.js +1 -0
- package/dist/engine/auth/config.js +1 -0
- package/dist/engine/auto-updater/atomic-upgrade.js +1 -0
- package/dist/engine/auto-updater/index.js +1 -0
- package/dist/engine/autopilot/action-registry.js +20 -0
- package/dist/engine/autopilot/audit-logger.js +1 -0
- package/dist/engine/autopilot/bootstrap.js +9 -2
- package/dist/engine/autopilot/complete-loop.js +4 -0
- package/dist/engine/autopilot/crash-shield-rate-limiter.js +1 -0
- package/dist/engine/autopilot/event-bus.js +1 -0
- package/dist/engine/autopilot/state-updater.js +6 -0
- package/dist/engine/browser-validator.js +1 -3
- package/dist/engine/build-tool-detector.js +1 -8
- package/dist/engine/bundle-installer.js +2 -10
- package/dist/engine/cascade-hooks/core/append-releases.js +1 -0
- package/dist/engine/cascade-hooks/core/write-session-json.js +2 -2
- package/dist/engine/cascade-hooks/hooks/dispatch-hook-event.hook.d.ts +3 -1
- package/dist/engine/cascade-hooks/hooks/dispatch-hook-event.hook.js +12 -3
- package/dist/engine/cascade-hooks/hooks/estimate-calibration.hook.js +1 -0
- package/dist/engine/cascade-hooks/hooks/housekeeping-on-done.hook.js +2 -0
- package/dist/engine/cascade-hooks/hooks/implementing-kickoff.hook.js +5 -1
- package/dist/engine/cascade-hooks/hooks/lesson-drift.hook.js +1 -0
- package/dist/engine/cascade-hooks/hooks/orchestration-plan.hook.js +1 -0
- package/dist/engine/cascade-hooks/hooks/session-context.hook.js +4 -2
- package/dist/engine/cascade-hooks/hooks/slack-notify.hook.js +1 -0
- package/dist/engine/cascade-hooks/hooks/status-json.hook.js +2 -0
- package/dist/engine/cascade-hooks/hooks/velocity-profile.hook.js +2 -0
- package/dist/engine/cascade-hooks/runner.js +2 -0
- package/dist/engine/cascade-hooks/state-drift-detector.js +2 -0
- package/dist/engine/checkpoint/checkpoint-manager.js +2 -0
- package/dist/engine/checkpoint/policy-engine.js +1 -0
- package/dist/engine/ci-generator/stack-detector.js +2 -10
- package/dist/engine/clarification-gate/token-store.js +1 -0
- package/dist/engine/claude-config-auditor/claudemd-auditor.js +2 -10
- package/dist/engine/claude-config-auditor/settings-auditor.js +2 -10
- package/dist/engine/client-detection.js +2 -10
- package/dist/engine/compliance/auto-remediator.js +1 -0
- package/dist/engine/compliance/evidence-builder.d.ts +2 -2
- package/dist/engine/compliance/framework-catalog.d.ts +6 -6
- package/dist/engine/compliance/gap-analyzer.d.ts +2 -2
- package/dist/engine/config-health/build-tool-checker.js +1 -9
- package/dist/engine/config-health/ci-commands-collector.d.ts +2 -1
- package/dist/engine/config-health/ci-commands-collector.js +2 -9
- package/dist/engine/config-health/go-checker.js +1 -9
- package/dist/engine/config-health/mcp-config-checker.js +2 -10
- package/dist/engine/config-health/python-checker.js +1 -9
- package/dist/engine/config-health/rust-checker.js +1 -9
- package/dist/engine/config-health/ts-checker-scripts.js +1 -9
- package/dist/engine/config-health/ts-checker.js +1 -9
- package/dist/engine/context-artifacts/store.js +1 -0
- package/dist/engine/context-md-generator.js +1 -0
- package/dist/engine/context-orchestrator/index.js +2 -0
- package/dist/engine/convention-scanner/convention-parser.js +2 -9
- package/dist/engine/cost-guardrails.js +1 -0
- package/dist/engine/cost-tracking/ledger.js +1 -0
- package/dist/engine/criterion-identity.js +1 -1
- package/dist/engine/dashboard/data-loader.js +1 -0
- package/dist/engine/dashboard/drift-score.js +2 -0
- package/dist/engine/dashboard/spec-updater.d.ts +3 -1
- package/dist/engine/dashboard/spec-updater.js +9 -2
- package/dist/engine/dashboard/templates-layout.d.ts +2 -2
- package/dist/engine/dashboard/templates-layout.js +2 -9
- package/dist/engine/data-projects-gc/gc-runner.js +2 -4
- package/dist/engine/deleter/audit-logger.js +1 -0
- package/dist/engine/deleter/core.js +6 -0
- package/dist/engine/deleter/trash-manager.js +1 -0
- package/dist/engine/desktop-detector.js +1 -9
- package/dist/engine/detection-utils.d.ts +2 -1
- package/dist/engine/detection-utils.js +3 -10
- package/dist/engine/detectors/advanced-framework-detector/helpers.d.ts +3 -2
- package/dist/engine/detectors/advanced-framework-detector/helpers.js +3 -17
- package/dist/engine/detectors/cicd-detector.js +2 -10
- package/dist/engine/detectors/css-framework-detector.js +2 -10
- package/dist/engine/detectors/deployment-detector.js +3 -12
- package/dist/engine/detectors/frontend-perf-detector.js +2 -10
- package/dist/engine/detectors/gitops-detector.js +3 -11
- package/dist/engine/detectors/idp-detector.js +1 -3
- package/dist/engine/detectors/k3s-detector.js +3 -11
- package/dist/engine/detectors/llm-detector/file-readers.d.ts +2 -1
- package/dist/engine/detectors/llm-detector/file-readers.js +2 -9
- package/dist/engine/detectors/mfe-detector.js +5 -13
- package/dist/engine/detectors/monitoring-detector.js +2 -11
- package/dist/engine/detectors/monorepo-detector.d.ts +1 -0
- package/dist/engine/detectors/monorepo-detector.js +1 -10
- package/dist/engine/detectors/nomad-detector.js +3 -11
- package/dist/engine/detectors/otel-ecosystem-detectors.d.ts +2 -1
- package/dist/engine/detectors/otel-ecosystem-detectors.js +2 -10
- package/dist/engine/doc-generator/executive-summary/html-template.js +1 -7
- package/dist/engine/doc-generator/executive-summary/section-builders.js +1 -7
- package/dist/engine/doc-generator/per-spec-report/mermaid-renderer.js +1 -7
- package/dist/engine/doc-generator/per-spec-report/spec-section-builders.js +1 -7
- package/dist/engine/doc-generator/per-spec-report/technical-report.js +1 -7
- package/dist/engine/doc-generator/portal/analytics-page.js +1 -7
- package/dist/engine/doc-generator/portal/architecture-page.js +1 -7
- package/dist/engine/doc-generator/portal/changelog-page.js +1 -7
- package/dist/engine/doc-generator/portal/decision-page.js +1 -7
- package/dist/engine/doc-generator/portal/decision-timeline-builder.js +1 -7
- package/dist/engine/doc-generator/portal/kanban-view-builder.js +1 -7
- package/dist/engine/doc-generator/portal/portal-breadcrumbs.js +1 -7
- package/dist/engine/doc-generator/portal/portal-landing-cards.js +1 -7
- package/dist/engine/doc-generator/portal/portal-navbar.js +1 -7
- package/dist/engine/doc-generator/portal/portal-page-detector.d.ts +3 -0
- package/dist/engine/doc-generator/portal/portal-page-detector.js +1 -10
- package/dist/engine/doc-generator/portal/portal-regenerator.js +2 -0
- package/dist/engine/doc-generator/portal/risk-matrix-svg.js +1 -7
- package/dist/engine/doc-generator/portal/risk-page.js +1 -7
- package/dist/engine/doc-generator/portal/roadmap-page.js +1 -7
- package/dist/engine/doc-generator/proposal/proposal-gantt-builder.js +1 -7
- package/dist/engine/doc-generator/proposal/proposal-kpi-builder.js +1 -7
- package/dist/engine/doc-generator/proposal/proposal-section-builders-advanced.js +2 -8
- package/dist/engine/doc-generator/proposal/proposal-section-builders.js +1 -7
- package/dist/engine/docs-site-generator/html-templates.js +1 -7
- package/dist/engine/docs-site-generator/markdown-renderer.js +1 -7
- package/dist/engine/drift/violation-resolver.js +2 -0
- package/dist/engine/dynamic-knowledge/knowledge-cache.js +1 -0
- package/dist/engine/ecosystem-absorber/knowledge-cache.js +1 -0
- package/dist/engine/edge-db-detector.js +1 -10
- package/dist/engine/escalator/retry-counter.js +1 -0
- package/dist/engine/evidence-gates/artifact-reader.js +1 -0
- package/dist/engine/evidence-gates/evidence-autofill.js +1 -0
- package/dist/engine/evidence-gates/evidence-skeletons.js +1 -0
- package/dist/engine/evidence-gates/reconciliation-freshness.js +1 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.js +1 -0
- package/dist/engine/execution/job-runtime.js +2 -0
- package/dist/engine/execution/validate-job-executor.d.ts +1 -1
- package/dist/engine/execution/validate-job-executor.js +3 -0
- package/dist/engine/execution/validate-job-payload.js +1 -0
- package/dist/engine/execution/validate-worker-thread.js +1 -0
- package/dist/engine/facilitate/context-loader.js +1 -0
- package/dist/engine/figma/change-detector.d.ts +1 -8
- package/dist/engine/figma/code-connect-fetcher.d.ts +1 -7
- package/dist/engine/figma/design-enricher.d.ts +1 -17
- package/dist/engine/figma/design-enricher.js +0 -1
- package/dist/engine/figma/e2e-generator.d.ts +1 -23
- package/dist/engine/figma/flow-analyzer.d.ts +1 -11
- package/dist/engine/figma/frame-extractor.d.ts +1 -11
- package/dist/engine/figma/frame-extractor.js +3 -0
- package/dist/engine/figma/multi-file-manager.d.ts +1 -6
- package/dist/engine/figma/spec-generator.js +2 -0
- package/dist/engine/figma/thumbnail-fetcher.d.ts +1 -1
- package/dist/engine/figma/token-extractor.d.ts +1 -6
- package/dist/engine/figma/token-extractor.js +0 -1
- package/dist/engine/figma/version-tracker.d.ts +1 -7
- package/dist/engine/figma/version-tracker.js +0 -1
- package/dist/engine/figma/visual-qa.d.ts +5 -19
- package/dist/engine/figma/visual-qa.js +1 -2
- package/dist/engine/figma/webhook-manager.d.ts +1 -7
- package/dist/engine/frontmatter-sha/reseal.js +1 -0
- package/dist/engine/frontmatter-sha/verify-terminal.js +1 -0
- package/dist/engine/git-hook-injector.js +2 -10
- package/dist/engine/github/quality-dimensions.js +1 -3
- package/dist/engine/global-rules-manager.js +2 -3
- package/dist/engine/handoff-artifacts/implementation-review-reader.js +1 -0
- package/dist/engine/handoff-artifacts/io.js +2 -0
- package/dist/engine/handoff-packager.js +2 -1
- package/dist/engine/health/auto-fixer.js +1 -0
- package/dist/engine/hooks/context-injector.js +1 -0
- package/dist/engine/hooks-reconciler.js +1 -8
- package/dist/engine/impact-detector/index.js +2 -9
- package/dist/engine/implementation-contract/common.js +1 -3
- package/dist/engine/implementation-contract/evaluator.js +1 -3
- package/dist/engine/keyword-matcher/boundary.d.ts +2 -7
- package/dist/engine/keyword-matcher/boundary.js +2 -14
- package/dist/engine/lifecycle-reconciliation-io.js +1 -0
- package/dist/engine/lifecycle-reconciliation.js +3 -0
- package/dist/engine/local-first/detector.js +1 -9
- package/dist/engine/marketplace-fetcher/cache.js +2 -0
- package/dist/engine/marketplace-fetcher/index.js +1 -0
- package/dist/engine/mcp-config/mcp-config-writer.js +2 -10
- package/dist/engine/migrations/remove-commercial-state.js +2 -0
- package/dist/engine/mobile-detector-shared.d.ts +1 -1
- package/dist/engine/mobile-detector-shared.js +2 -9
- package/dist/engine/multi-channel-notifier.js +1 -0
- package/dist/engine/multi-teammate-review/disagreement-counter.js +1 -0
- package/dist/engine/multi-teammate-review/panel-orchestrator.js +1 -0
- package/dist/engine/onboarding-engine.js +1 -9
- package/dist/engine/permissions-merger/stack-detectors.js +2 -10
- package/dist/engine/pii-detector/core.js +1 -3
- package/dist/engine/platform-engineering/dx-analyzer.js +1 -10
- package/dist/engine/platform-engineering/idp-detector.js +2 -10
- package/dist/engine/project-dna/ai-tool-detector.js +2 -10
- package/dist/engine/project-dna/stack-detector.js +2 -10
- package/dist/engine/project-graph/builder.js +11 -2
- package/dist/engine/project-graph/cache.d.ts +5 -2
- package/dist/engine/project-graph/cache.js +174 -34
- package/dist/engine/project-graph/extractors/decision-store-extractor.js +1 -0
- package/dist/engine/project-graph/freshness-projection.js +3 -0
- package/dist/engine/project-graph/query.js +14 -11
- package/dist/engine/project-health-checker.js +2 -6
- package/dist/engine/provider-adapters/shared/spec-loader.js +1 -0
- package/dist/engine/quality-gates/gate-evaluator.js +1 -3
- package/dist/engine/react-detector.js +6 -14
- package/dist/engine/reconcile/apply-changes.js +1 -3
- package/dist/engine/registry/core.js +1 -0
- package/dist/engine/registry/loader.js +2 -0
- package/dist/engine/release/postmortem-generator.js +1 -0
- package/dist/engine/release/rollback-runner.d.ts +2 -2
- package/dist/engine/release/stuck-spec-detector.js +7 -0
- package/dist/engine/release-pipeline/release-spec-closer.js +3 -0
- package/dist/engine/rules-reconciler.d.ts +1 -1
- package/dist/engine/rules-reconciler.js +2 -9
- package/dist/engine/safety/atomic-writer.js +1 -0
- package/dist/engine/safety/cross-process-lock.js +2 -0
- package/dist/engine/safety/file-mutex.js +1 -0
- package/dist/engine/safety/lock-lease-store.js +1 -0
- package/dist/engine/safety/lock-scavenger.js +2 -0
- package/dist/engine/saga/transition-cascade.js +3 -0
- package/dist/engine/scan-project/index.js +1 -0
- package/dist/engine/scan-project/module-discoverer.js +1 -9
- package/dist/engine/schema-parity-auditor/handler-checker.js +1 -3
- package/dist/engine/schema-parity-auditor/index.js +1 -3
- package/dist/engine/schema-parity-auditor/type-checker.js +1 -3
- package/dist/engine/self-healing/strategies/coverage-fix.js +2 -10
- package/dist/engine/session-context-generator.d.ts +8 -0
- package/dist/engine/session-context-generator.js +33 -23
- package/dist/engine/session-state/session-artifact-refresher.d.ts +7 -0
- package/dist/engine/session-state/session-artifact-refresher.js +140 -0
- package/dist/engine/session-state/writer.d.ts +3 -0
- package/dist/engine/session-state/writer.js +35 -17
- package/dist/engine/shared-agent-memory.js +1 -0
- package/dist/engine/skill-adapter/index.js +3 -0
- package/dist/engine/skill-bootstrap/registry-fetcher.js +1 -0
- package/dist/engine/skill-bootstrap/skill-writer.js +2 -9
- package/dist/engine/skill-bootstrap/stack-matcher.js +1 -9
- package/dist/engine/skill-discovery/multi-agent-writer.d.ts +1 -0
- package/dist/engine/skill-discovery/multi-agent-writer.js +1 -9
- package/dist/engine/skill-generator/workflow-skill-generator.js +1 -0
- package/dist/engine/skill-registry/ttl-refresh.js +2 -0
- package/dist/engine/spec-audit/index.js +2 -0
- package/dist/engine/spec-audit/report-writer.js +1 -0
- package/dist/engine/spec-coverage/core.js +1 -0
- package/dist/engine/spec-decomposer/analyzer.js +1 -11
- package/dist/engine/spec-dependency-graph/dot-exporter.d.ts +1 -1
- package/dist/engine/spec-dependency-graph/graph-builder.d.ts +1 -20
- package/dist/engine/spec-dependency-graph/superseded-set.d.ts +1 -1
- package/dist/engine/spec-diff-engine.js +1 -7
- package/dist/engine/spec-format/read-technical-section.js +1 -3
- package/dist/engine/spec-format/replace-section.js +1 -3
- package/dist/engine/spec-format/spec-id.d.ts +9 -1
- package/dist/engine/spec-format/spec-id.js +24 -3
- package/dist/engine/spec-format/unified-spec-builder.js +1 -3
- package/dist/engine/spec-migrator/canonical-deduplicator.js +2 -0
- package/dist/engine/spec-observability/tracker.js +1 -0
- package/dist/engine/spec-registry/adapter.js +2 -10
- package/dist/engine/spec-registry/validator.d.ts +1 -0
- package/dist/engine/spec-registry/validator.js +1 -9
- package/dist/engine/spec-state-machine/transition-spec.js +1 -0
- package/dist/engine/spec-templates/custom-loader.js +1 -0
- package/dist/engine/stack-auditor/build-tool-auditor.js +1 -9
- package/dist/engine/staleness/stale-implementing.js +5 -14
- package/dist/engine/status-reconciler/index.js +4 -1
- package/dist/engine/structural-memory/helpers.js +1 -0
- package/dist/engine/supply-chain/slsa-checker.js +1 -9
- package/dist/engine/tdd-enforcer/stub-artifact-path.js +1 -0
- package/dist/engine/telemetry/health-checker.js +1 -0
- package/dist/engine/telemetry/telemetry-store.js +1 -0
- package/dist/engine/token-optimizer/response-cache.js +1 -3
- package/dist/engine/tool-groups/group-manager.js +2 -0
- package/dist/engine/update-notifier.js +1 -0
- package/dist/engine/validation/approved-spec-portability.js +1 -0
- package/dist/engine/validation/durable-validation.js +1 -0
- package/dist/engine/validation/validation-freshness.js +2 -0
- package/dist/engine/validation/validation-receipt.js +1 -0
- package/dist/engine/validation/validation-submission.d.ts +1 -1
- package/dist/engine/validation-evidence-ledger.js +1 -0
- package/dist/engine/validator/deep-code-checker.js +1 -3
- package/dist/engine/validator/executable-evidence.d.ts +1 -14
- package/dist/engine/validator/scope-resolver.d.ts +2 -2
- package/dist/engine/validator/spec-compliance-runner.d.ts +1 -31
- package/dist/engine/validator/validation-report-writer.js +1 -1
- package/dist/engine/validator.d.ts +1 -1
- package/dist/engine/validator.js +1 -0
- package/dist/engine/velocity/measure-velocity.js +2 -0
- package/dist/engine/version-resolver.js +1 -0
- package/dist/engine/workers/handlers/auto-drift.js +3 -0
- package/dist/engine/workspace-manager.js +4 -0
- package/dist/hosts/gemini/config-scaffold.js +2 -10
- package/dist/storage/approval-operation-lock.js +1 -0
- package/dist/storage/auto-promoter-config-store.js +1 -0
- package/dist/storage/autopilot-log-store.js +1 -0
- package/dist/storage/base-store.js +1 -0
- package/dist/storage/checkpoint-store.js +1 -0
- package/dist/storage/feedback-remote.js +1 -0
- package/dist/storage/gaps-log.js +1 -0
- package/dist/storage/global-projects-store.js +1 -0
- package/dist/storage/global-store.js +1 -0
- package/dist/storage/knowledge-store/sessions.js +2 -0
- package/dist/storage/migrations/canonical-storage.js +42 -18
- package/dist/storage/project-drift-store.js +1 -0
- package/dist/storage/project-identity.js +1 -0
- package/dist/storage/project-resolver.js +1 -17
- package/dist/storage/runtime-db.d.ts +2 -20
- package/dist/storage/runtime-db.js +2 -9
- package/dist/storage/semantic-index-store.js +1 -0
- package/dist/storage/sentry-store.js +1 -0
- package/dist/storage/session-state-store.js +1 -0
- package/dist/storage/spec-store.d.ts +7 -0
- package/dist/storage/spec-store.js +21 -1
- package/dist/storage/status-store/atomic-status-write.js +1 -0
- package/dist/storage/status-store/file-lock.js +1 -0
- package/dist/storage/status-store/self-healing.js +1 -0
- package/dist/storage/storage-bundle.d.ts +12 -2
- package/dist/storage/supabase-store.js +1 -0
- package/dist/storage/technology-selection-store.js +1 -0
- package/dist/storage/trash-store.d.ts +2 -4
- package/dist/storage/trash-store.js +2 -15
- package/dist/storage/vector-store/json-fallback.js +1 -0
- package/dist/storage/vector-store/migrator.js +1 -0
- package/dist/storage/vector-store/sqlite-adapter.js +1 -0
- package/dist/tools/audit-claude-config.js +1 -10
- package/dist/tools/check-readiness.js +104 -30
- package/dist/tools/clarify-requirements/multiple-choice.d.ts +3 -3
- package/dist/tools/configure-oauth-handler.js +1 -0
- package/dist/tools/create-skill.js +11 -9
- package/dist/tools/create-spec-helpers.d.ts +1 -3
- package/dist/tools/create-spec-helpers.js +1 -8
- package/dist/tools/create-spec.js +1 -13
- package/dist/tools/dashboard.js +5 -0
- package/dist/tools/github-pr-handler.js +1 -0
- package/dist/tools/github-release-handler.d.ts +1 -0
- package/dist/tools/github-release-handler.js +4 -3
- package/dist/tools/graph-specs.d.ts +1 -1
- package/dist/tools/heal-spec-docs.js +1 -3
- package/dist/tools/init-project/git-setup.d.ts +2 -2
- package/dist/tools/init-project/host-assets-writer.js +9 -10
- package/dist/tools/init-project/lifecycle-helpers.d.ts +2 -2
- package/dist/tools/init-project/lint-scaffolder.js +2 -10
- package/dist/tools/init-project/stack-detector.d.ts +2 -2
- package/dist/tools/reconcile-interactive-question-hooks.d.ts +2 -2
- package/dist/tools/register-sdd-tools.js +1 -0
- package/dist/tools/safe-handler.js +1 -0
- package/dist/tools/schemas/spec-id.d.ts +1 -6
- package/dist/tools/schemas/spec-id.js +1 -16
- package/dist/tools/tool-entry.d.ts +2 -2
- package/dist/tools/tool-entry.js +1 -1
- package/dist/tools/tool-registry/core-tools.d.ts +2 -2
- package/dist/tools/tool-registry/deprecated-stubs.d.ts +3 -3
- package/dist/tools/tool-registry/deprecated-stubs.js +1 -1
- package/dist/tools/triage-request.d.ts +2 -2
- package/dist/tools/update-status/approval-gates.d.ts +2 -2
- package/dist/tools/update-status/approval-gates.js +1 -0
- package/dist/tools/update-status/dod-gates.d.ts +1 -1
- package/dist/tools/update-status/done-receipt-verifier.d.ts +1 -1
- package/dist/tools/update-status/side-effects.js +5 -0
- package/dist/tools/update-status-actions.js +28 -40
- package/dist/tools/validate-graph-coverage.js +14 -2
- package/dist/tools/validate.js +2 -0
- package/dist/transports/middleware/types.d.ts +3 -3
- package/dist/types/atomic-upgrade.d.ts +1 -1
- package/dist/types/cascade-hooks.d.ts +3 -0
- package/dist/types/dashboard.d.ts +4 -1
- package/dist/types/durable-job.d.ts +20 -0
- package/dist/types/durable-job.js +9 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/installation.d.ts +16 -0
- package/dist/types/installation.js +2 -0
- package/dist/types/project-knowledge-graph.d.ts +11 -0
- package/dist/types/session-checkpoint.d.ts +16 -0
- package/dist/types/spec-dependency-graph.d.ts +21 -0
- package/dist/types/spec-dependency-graph.js +2 -0
- package/dist/types/universal-rules/index.d.ts +1 -0
- package/dist/types/validation-evidence.d.ts +45 -0
- package/package.json +16 -16
- package/planu-plugin.json +1 -1
- package/dist/types/storage-bundle.d.ts +0 -13
- package/dist/types/storage-bundle.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,81 @@
|
|
|
1
|
+
## [5.4.0] - 2026-08-29
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
- feat(SPEC-1672): install phase skills with managed-by ownership marker on init hosts
|
|
5
|
+
|
|
6
|
+
### Chores
|
|
7
|
+
- chore(deps): upgrade stryker to v10 majors
|
|
8
|
+
- chore(deps): update 13 patch/minor dependencies and adapt readFile mock casts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [5.3.69] - 2026-08-29
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
- feat(SPEC-1674): tail or skip oversized operational graph sources instead of throwing
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
- fix(SPEC-1674): include warnings in graph coverage test fixtures
|
|
18
|
+
- fix(SPEC-1669): fail closed on ambiguous spec discovery, real validator in tests
|
|
19
|
+
- fix(SPEC-1669): quarantine journals via atomic rename, test via init_project
|
|
20
|
+
- fix(SPEC-1669): re-discover canonical spec.md when the readiness index is stale
|
|
21
|
+
- fix(SPEC-1669): quarantine stale terminal migration journals instead of throwing
|
|
22
|
+
- fix(SPEC-1673): capture nested vitest child output instead of inheriting stdio
|
|
23
|
+
- fix(SPEC-1673): serialize load-sensitive test suites into a dedicated vitest project
|
|
24
|
+
- fix(SPEC-1670): accept Next.js route group and dynamic segment characters in ownership paths
|
|
25
|
+
- fix(SPEC-1674): harden oversized-source handling per implementation review
|
|
26
|
+
- fix(SPEC-1674): surface persisted oversized graph sources as validate warnings
|
|
27
|
+
- fix(SPEC-1674): thread oversizedSources through the build result, artifact, and query slice
|
|
28
|
+
- fix(SPEC-1664): include backtick in criterion identity punctuation normalization
|
|
29
|
+
- fix(SPEC-1661): guarantee cascade-hook wiring in lean release process
|
|
30
|
+
- fix(SPEC-1660): grandfather full-allowlist and dynamic-import violations
|
|
31
|
+
- fix(SPEC-1660): full allowlist, subpath fix, dynamic imports, exemption scope
|
|
32
|
+
- fix(SPEC-1660): grandfather existing layer-boundary violations
|
|
33
|
+
- fix(SPEC-1660): enforce merged layer and status-write import rules per scope
|
|
34
|
+
- fix(SPEC-1320): serialize legacy session writers behind the paired refresher
|
|
35
|
+
- fix(SPEC-1320): derive both session artifacts from one serialized active-spec snapshot
|
|
36
|
+
|
|
37
|
+
### Refactoring
|
|
38
|
+
- refactor(SPEC-1663): relocate DurableJobRecord/SpecGraph/validation-evidence types into src/types
|
|
39
|
+
- refactor(SPEC-1663): rename divergent tools-cluster types off shared names
|
|
40
|
+
- refactor(SPEC-1663): figma cluster imports canonical types, renames divergent thumbnail/visual-qa shapes
|
|
41
|
+
- refactor(SPEC-1663): rename divergent ToolHandler/SkipReason/RollbackStep off shared names
|
|
42
|
+
- refactor(SPEC-1663): rename divergent compliance catalog types off shared names
|
|
43
|
+
- refactor(SPEC-1663): index.d.ts trio re-exports FileHash/FileMetadata/SpecAnnotation from types/
|
|
44
|
+
- refactor(SPEC-1662): readFileOrNull — migrate 4 sites found by strengthened meta test
|
|
45
|
+
- refactor(SPEC-1662): apply review fixes — enoent code check, meta-test coverage, comment cleanup
|
|
46
|
+
- refactor(SPEC-1662): readFileSafe family — consolidate into src/core/shared
|
|
47
|
+
- refactor(SPEC-1662): escapeRegex family — consolidate into src/core/shared
|
|
48
|
+
- refactor(SPEC-1662): escapeHtml — consolidate into src/core/shared
|
|
49
|
+
- refactor(SPEC-1662): fileExists/pathExists — consolidate into src/core/shared
|
|
50
|
+
- refactor(SPEC-1662): setup — create src/core/shared and allow engine/storage/tools to import it
|
|
51
|
+
- refactor(SPEC-1661): invert hook dispatch via injected handler; add layer-inversion tests
|
|
52
|
+
- refactor(SPEC-1661): invert dashboard status update via injected handler
|
|
53
|
+
- refactor(SPEC-1661): consolidate generateSpecId and spec-id schema in engine
|
|
54
|
+
- refactor(SPEC-1661): remove now-unused src/types/storage-bundle.ts
|
|
55
|
+
- refactor(SPEC-1661): break types->storage inversion in StorageBundle
|
|
56
|
+
- refactor(SPEC-1661): move InstallationRecord/InstallationManifest into types
|
|
57
|
+
|
|
58
|
+
### Chores
|
|
59
|
+
- chore: scope mutation gate to mutated-range suites via dedicated vitest config
|
|
60
|
+
- chore(SPEC-1669/1670): record approval and implementing transitions
|
|
61
|
+
- chore(SPEC-1674): record done transition and release pending entry
|
|
62
|
+
- chore(SPEC-1674): transition to implementing
|
|
63
|
+
- chore(SPEC-1663): record done transition and session context
|
|
64
|
+
- chore(SPEC-1663): record implementing transition
|
|
65
|
+
- chore(SPEC-1662): record done transition and session artifacts
|
|
66
|
+
- chore(SPEC-1662): record implementing transition
|
|
67
|
+
- chore(SPEC-1664): record done transition and session artifacts
|
|
68
|
+
- chore(SPEC-1664): record implementing transition
|
|
69
|
+
- chore(SPEC-1661): record done transition and session artifacts
|
|
70
|
+
- chore(SPEC-1661): record implementing transition
|
|
71
|
+
- chore(SPEC-1660): record done transition and session artifacts
|
|
72
|
+
- chore(SPEC-1660): record implementing transition
|
|
73
|
+
- chore(SPEC-1660): reconcile ownership format and risk section for handoff gate
|
|
74
|
+
- chore: absorb post-done session state
|
|
75
|
+
- chore(SPEC-1320): record done transition
|
|
76
|
+
- chore(SPEC-1320): record implementing transition and fix stale verification command
|
|
77
|
+
|
|
78
|
+
|
|
1
79
|
## [5.3.68] - 2026-08-28
|
|
2
80
|
|
|
3
81
|
### Features
|
package/dist/.planu-build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"commit":"
|
|
1
|
+
{"schemaVersion":1,"commit":"1224d53c6195e75033a881982ac489bc4f2619f3"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CliCommand } from '../../types/cli.js';
|
|
2
|
+
import type { InstallationManifest, InstallationRecord } from '../../types/installation.js';
|
|
2
3
|
interface McpEntry {
|
|
3
4
|
command: string;
|
|
4
5
|
args: string[];
|
|
@@ -26,21 +27,7 @@ interface ToolDefinition {
|
|
|
26
27
|
projectScopePath: string | null;
|
|
27
28
|
format: 'standard' | 'zed';
|
|
28
29
|
}
|
|
29
|
-
export
|
|
30
|
-
host: string;
|
|
31
|
-
configPath: string;
|
|
32
|
-
format: ToolDefinition['format'];
|
|
33
|
-
scope: 'user' | 'project';
|
|
34
|
-
package: string;
|
|
35
|
-
version: string;
|
|
36
|
-
offline: boolean;
|
|
37
|
-
installedAt: string;
|
|
38
|
-
}
|
|
39
|
-
export interface InstallationManifest {
|
|
40
|
-
schemaVersion: 1;
|
|
41
|
-
updatedAt: string;
|
|
42
|
-
installations: InstallationRecord[];
|
|
43
|
-
}
|
|
30
|
+
export type { InstallationRecord, InstallationManifest } from '../../types/installation.js';
|
|
44
31
|
declare function buildMcpEntry(): McpEntry;
|
|
45
32
|
declare function readJsonFile(filePath: string): ToolConfig;
|
|
46
33
|
declare function hasPlanuEntry(config: ToolConfig, format: ToolDefinition['format']): boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planu-dogfood-bug
|
|
3
|
+
description: File a bug spec the moment a Planu tool is observed behaving wrong, silent, or stale while using Planu — never deferred to a backlog or a code TODO.
|
|
4
|
+
triggers:
|
|
5
|
+
- planu bug
|
|
6
|
+
- this tool is wrong
|
|
7
|
+
- unexpected planu output
|
|
8
|
+
- planu returned stale data
|
|
9
|
+
- dogfood bug
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
managed-by: planu
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# /planu-dogfood-bug — File a Dogfood Bug Immediately
|
|
15
|
+
|
|
16
|
+
## When to invoke
|
|
17
|
+
|
|
18
|
+
Use this skill the moment a Planu MCP tool returns wrong, stale, silent, or irrelevant output while it is being used for its own SDD lifecycle. Invoke it in the same turn the bug is observed — never later.
|
|
19
|
+
|
|
20
|
+
**Trigger phrases**: "this tool is wrong", "unexpected Planu output", "Planu returned stale data", "dogfood bug"
|
|
21
|
+
|
|
22
|
+
## How it works
|
|
23
|
+
|
|
24
|
+
The normative tool-call sequence for this phase:
|
|
25
|
+
|
|
26
|
+
1. **Create the spec now** — call `create_spec` in the same turn the bug is observed, with:
|
|
27
|
+
- **Reproducer** — exact tool call, exact response observed, exact expected response
|
|
28
|
+
- **Root cause hypothesis** — pointer to file path and line number in `src/` where the bug likely lives
|
|
29
|
+
- BDD acceptance criteria carrying `FILES:`, `FUNCTIONS:`, and `TEST:` markers per scenario
|
|
30
|
+
- Files to create/modify with exact paths
|
|
31
|
+
- Implementation order scoped for a cheap implementer
|
|
32
|
+
2. **Move to review** — call `update_status(review)` so the bug enters the normal spec lifecycle, then continue the original task
|
|
33
|
+
|
|
34
|
+
## Anti-patterns
|
|
35
|
+
|
|
36
|
+
- **Never defer to a backlog** — "I'll note this for later" is not acceptable; file the spec in the same turn
|
|
37
|
+
- **Never leave a code TODO** — code TODOs rot; the tracked spec is the only durable record of the bug
|
|
38
|
+
- Treating a bug as "too small for a spec" — every dogfood bug becomes a spec, regardless of size
|
|
39
|
+
- Filing multiple observed bugs sequentially instead of in parallel `create_spec` calls in one message
|
|
40
|
+
|
|
41
|
+
## Ownership
|
|
42
|
+
|
|
43
|
+
This skill is managed by Planu (`managed-by: planu` in its frontmatter). Removing that marker forks the skill from Planu's updates — future `init_project` runs will treat it as user-owned and stop refreshing it.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planu-implement
|
|
3
|
+
description: Implement an approved Planu spec — packages the handoff contract, moves the spec to implementing, and works in an isolated worktree with revert-proof tests and no narrative comments.
|
|
4
|
+
triggers:
|
|
5
|
+
- implement the spec
|
|
6
|
+
- start implementing
|
|
7
|
+
- build this spec
|
|
8
|
+
- begin implementation
|
|
9
|
+
- implement this feature
|
|
10
|
+
version: 1.0.0
|
|
11
|
+
managed-by: planu
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# /planu-implement — Implement an Approved Spec
|
|
15
|
+
|
|
16
|
+
## When to invoke
|
|
17
|
+
|
|
18
|
+
Use this skill once a spec is `approved` and implementation is about to begin.
|
|
19
|
+
|
|
20
|
+
**Trigger phrases**: "implement the spec", "start implementing", "build this spec", "begin implementation"
|
|
21
|
+
|
|
22
|
+
## How it works
|
|
23
|
+
|
|
24
|
+
The normative tool-call sequence for this phase:
|
|
25
|
+
|
|
26
|
+
1. **Package the handoff** — call `package_handoff` to build the operating contract for the implementer: objective, BDD acceptance criteria, files to modify/create, ownership, test plan, risks, out-of-scope, current state, next action. Persist it outside chat history
|
|
27
|
+
2. **Move to implementing** — call `update_status(implementing)` only after the handoff package exists
|
|
28
|
+
3. **Isolate the work** — implement inside an isolated git worktree created from the current base branch, never on the shared checkout
|
|
29
|
+
4. **Write revert-proof tests** — for every guard or fix, write the test first, revert the source change and watch the test fail, then restore the source and confirm it passes. Report the observed failure output, not just the final green run
|
|
30
|
+
5. **No narrative comments** — code is self-documenting; no step-by-step comments, no `(SPEC-NNNN: ...)` rationale blocks, no TODO/FIXME markers
|
|
31
|
+
6. **Validate** — call `validate` when implementation is complete and inspect the completed job's `structuredContent`, not the initial acknowledgement
|
|
32
|
+
|
|
33
|
+
## Anti-patterns
|
|
34
|
+
|
|
35
|
+
- Implementing directly on the shared checkout instead of an isolated worktree
|
|
36
|
+
- Reporting a new test as passing evidence without ever having watched it fail against the unfixed source
|
|
37
|
+
- Leaving narrative comments, TODO markers, or deferred-work notes in the code
|
|
38
|
+
- Treating the initial `validate` acknowledgement as a pass — only a `completed` job's result is authoritative
|
|
39
|
+
|
|
40
|
+
## Ownership
|
|
41
|
+
|
|
42
|
+
This skill is managed by Planu (`managed-by: planu` in its frontmatter). Removing that marker forks the skill from Planu's updates — future `init_project` runs will treat it as user-owned and stop refreshing it.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planu-review
|
|
3
|
+
description: Review a Planu spec before approval — runs challenge_spec and check_readiness, requires independent planu-spec-reviewer evidence, then approves or requests changes.
|
|
4
|
+
triggers:
|
|
5
|
+
- review the spec
|
|
6
|
+
- approve the spec
|
|
7
|
+
- is this spec ready
|
|
8
|
+
- challenge this spec
|
|
9
|
+
- spec review
|
|
10
|
+
- reviewer feedback
|
|
11
|
+
version: 1.0.0
|
|
12
|
+
managed-by: planu
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# /planu-review — Review a Spec Before Approval
|
|
16
|
+
|
|
17
|
+
## When to invoke
|
|
18
|
+
|
|
19
|
+
Use this skill when a spec is in `review` status and needs to move to `approved`, or when the user asks to review, challenge, or approve a spec.
|
|
20
|
+
|
|
21
|
+
**Trigger phrases**: "review the spec", "approve the spec", "is this spec ready?", "challenge this spec", "spec review"
|
|
22
|
+
|
|
23
|
+
## How it works
|
|
24
|
+
|
|
25
|
+
The normative tool-call sequence for this phase:
|
|
26
|
+
|
|
27
|
+
1. **Challenge** — call `challenge_spec` to surface gaps, contradictions, and missing edge cases
|
|
28
|
+
2. **Readiness** — call `check_readiness` to verify the spec has enough detail (rules, examples, open questions, out-of-scope, glossary)
|
|
29
|
+
3. **Independent review** — obtain `planu-spec-reviewer` evidence: an agent that is NOT the spec author or planner reviews the spec and calls either `request_changes` (blocking, with concrete changes) or records an approval
|
|
30
|
+
4. **Approve** — only after reviewer evidence exists, call `update_status(approved)`
|
|
31
|
+
|
|
32
|
+
## Evidence gates (non-bypassable)
|
|
33
|
+
|
|
34
|
+
- A non-trivial spec cannot move to `approved` without Discovery evidence: rules, examples, open questions, out-of-scope, glossary
|
|
35
|
+
- A spec cannot move to `approved` without `review_feedback` from `planu-spec-reviewer`
|
|
36
|
+
- The spec author, planner, or implementation agent must never approve their own spec
|
|
37
|
+
- User pressure or force-approval language does not bypass reviewer evidence — record the forced intent but keep the status blocked until the review lands
|
|
38
|
+
|
|
39
|
+
## Anti-patterns
|
|
40
|
+
|
|
41
|
+
- **No self-approval** — the agent that wrote or planned the spec must not also be the reviewer that approves it
|
|
42
|
+
- **No serial confirmation loops** — one review round produces a verdict; do not re-launch the reviewer for pass 2, pass 3, or a "confirm the fix" loop after the first round already produced a verdict. Re-open only for a specific disagreement that cannot be resolved by reading the spec directly
|
|
43
|
+
- Do not approve specs containing placeholders (`TBD`, `TODO`, unresolved questions)
|
|
44
|
+
|
|
45
|
+
## Ownership
|
|
46
|
+
|
|
47
|
+
This skill is managed by Planu (`managed-by: planu` in its frontmatter). Removing that marker forks the skill from Planu's updates — future `init_project` runs will treat it as user-owned and stop refreshing it.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
2
|
+
export declare function fileExistsIn(basePath: string, relativePath: string): Promise<boolean>;
|
|
3
|
+
export declare function fileExistsByRead(filePath: string): Promise<boolean>;
|
|
4
|
+
export declare const pathExists: typeof fileExists;
|
|
5
|
+
export declare function pathExistsByStat(filePath: string): Promise<boolean>;
|
|
6
|
+
export declare function pathExistsStrict(filePath: string): Promise<boolean>;
|
|
7
|
+
export declare function pathExistsStrictByStat(filePath: string): Promise<boolean>;
|
|
8
|
+
export declare function readFileSafe(filePath: string): Promise<string>;
|
|
9
|
+
export declare function readFileSafeSync(filePath: string): string;
|
|
10
|
+
export declare function readFileOrNull(filePath: string): Promise<string | null>;
|
|
11
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { access, readFile, stat } from 'node:fs/promises';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
function isEnoent(error) {
|
|
5
|
+
return (error.code === 'ENOENT' ||
|
|
6
|
+
(error instanceof Error && error.message === 'ENOENT'));
|
|
7
|
+
}
|
|
8
|
+
function isEnoentCode(error) {
|
|
9
|
+
return error.code === 'ENOENT';
|
|
10
|
+
}
|
|
11
|
+
export async function fileExists(filePath) {
|
|
12
|
+
try {
|
|
13
|
+
await access(filePath);
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export async function fileExistsIn(basePath, relativePath) {
|
|
21
|
+
return fileExists(join(basePath, relativePath));
|
|
22
|
+
}
|
|
23
|
+
export async function fileExistsByRead(filePath) {
|
|
24
|
+
try {
|
|
25
|
+
await readFile(filePath, 'utf-8');
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export const pathExists = fileExists;
|
|
33
|
+
export async function pathExistsByStat(filePath) {
|
|
34
|
+
try {
|
|
35
|
+
await stat(filePath);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export async function pathExistsStrict(filePath) {
|
|
43
|
+
try {
|
|
44
|
+
await access(filePath);
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (isEnoent(error)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export async function pathExistsStrictByStat(filePath) {
|
|
55
|
+
try {
|
|
56
|
+
await stat(filePath);
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (isEnoentCode(error)) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export async function readFileSafe(filePath) {
|
|
67
|
+
try {
|
|
68
|
+
return await readFile(filePath, 'utf-8');
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return '';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export function readFileSafeSync(filePath) {
|
|
75
|
+
try {
|
|
76
|
+
return readFileSync(filePath, 'utf-8');
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return '';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export async function readFileOrNull(filePath) {
|
|
83
|
+
try {
|
|
84
|
+
return await readFile(filePath, 'utf-8');
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const REGEX_METACHARACTERS = /[.*+?^${}()|[\]\\]/g;
|
|
2
|
+
export function escapeRegex(str) {
|
|
3
|
+
return str.replace(REGEX_METACHARACTERS, '\\$&');
|
|
4
|
+
}
|
|
5
|
+
export function escapeHtml(str) {
|
|
6
|
+
return str
|
|
7
|
+
.replace(/&/g, '&')
|
|
8
|
+
.replace(/</g, '<')
|
|
9
|
+
.replace(/>/g, '>')
|
|
10
|
+
.replace(/"/g, '"')
|
|
11
|
+
.replace(/'/g, ''');
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Planu — engine/actuals/git-analyzer.ts (SPEC-061)
|
|
2
2
|
// Derives actuals from git log history for a given spec.
|
|
3
3
|
import { execFileSync } from 'node:child_process';
|
|
4
|
-
import { isCanonicalSpecId } from '
|
|
4
|
+
import { isCanonicalSpecId } from '../spec-format/spec-id.js';
|
|
5
5
|
const MAX_SESSION_GAP_MS = 2 * 60 * 60 * 1000; // 2 hours
|
|
6
6
|
const REVIEW_HOURS_RATIO = 0.15;
|
|
7
7
|
const MINIMUM_DEV_HOURS = 1;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// engine/agent-handoff-store.ts — SPEC-639: handoff.json protocol for agent teams
|
|
2
2
|
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
4
5
|
import { hashProjectPath, projectDataDir } from '../storage/base-store.js';
|
|
5
6
|
function handoffPath(projectPath, specId) {
|
|
6
7
|
return join(projectDataDir(hashProjectPath(projectPath)), 'team', specId, 'handoff.json');
|
|
@@ -3,6 +3,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
import { resolveAgents } from '../agent-router.js';
|
|
6
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
6
7
|
import { appendSquadRun, getSquadConfig } from '../../storage/agent-squad-store.js';
|
|
7
8
|
const CONFIG_DIR = join(dirname(fileURLToPath(import.meta.url)), '../../config');
|
|
8
9
|
async function loadRegistry() {
|
|
@@ -3,6 +3,7 @@ import { appendFile, stat, readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
|
3
3
|
import { createReadStream } from 'node:fs';
|
|
4
4
|
import { createInterface } from 'node:readline';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
6
7
|
import { hashProjectPath, projectDataDir } from '../storage/base-store.js';
|
|
7
8
|
const MAX_FILE_BYTES = 1024 * 1024; // 1 MB
|
|
8
9
|
const PRUNE_AGE_MS = 30 * 24 * 60 * 60 * 1000; // 30 days
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// Persists to the canonical config root. Never persists tokens.
|
|
4
4
|
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
5
5
|
import { join } from 'node:path';
|
|
6
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
6
7
|
import { resolveStorageLayout } from '../../storage/storage-layout.js';
|
|
7
8
|
const CONFIG_DIR = resolveStorageLayout().config;
|
|
8
9
|
const CONFIG_PATH = join(CONFIG_DIR, 'auth-config.json');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { readFile, rm } from 'node:fs/promises';
|
|
2
2
|
import { isAbsolute } from 'node:path';
|
|
3
3
|
import { atomicWriteFile } from '../safety/atomic-write-file.js';
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
4
5
|
import { readInstallationManifest, } from '../../cli/commands/install.js';
|
|
5
6
|
import { buildPinnedEntry } from './config-patcher.js';
|
|
6
7
|
import { stageAndVerifyRelease } from './release-verifier.js';
|
|
@@ -5,6 +5,7 @@ import { detectPlanuInstall } from './config-detector.js';
|
|
|
5
5
|
import { buildPinnedEntry } from './config-patcher.js';
|
|
6
6
|
import { fetchLatestVersion } from './npm-registry.js';
|
|
7
7
|
import { PLANU_VERSION } from '../../config/version.js';
|
|
8
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
8
9
|
import { resolveStorageLayout } from '../../storage/storage-layout.js';
|
|
9
10
|
import { upgradeInventoriedAdapters } from './atomic-upgrade.js';
|
|
10
11
|
export { upgradeInventoriedAdapters } from './atomic-upgrade.js';
|
|
@@ -79,6 +79,7 @@ const ACTION_HANDLERS = {
|
|
|
79
79
|
if (!ctx.specId) {
|
|
80
80
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
81
81
|
}
|
|
82
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
82
83
|
const { handleSuggestCriteria } = await import('../../tools/domain-criteria-handler.js');
|
|
83
84
|
const result = await handleSuggestCriteria({
|
|
84
85
|
projectId: ctx.projectId,
|
|
@@ -91,6 +92,7 @@ const ACTION_HANDLERS = {
|
|
|
91
92
|
};
|
|
92
93
|
}),
|
|
93
94
|
detect_contradictions: wrapHandler('detect_contradictions', async (ctx) => {
|
|
95
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
94
96
|
const { specStore } = await import('../../storage/index.js');
|
|
95
97
|
const { detectContradictions } = await import('../contradiction-detector.js');
|
|
96
98
|
const specs = await specStore.listSpecs(ctx.projectId);
|
|
@@ -116,6 +118,7 @@ const ACTION_HANDLERS = {
|
|
|
116
118
|
if (!ctx.specId) {
|
|
117
119
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
118
120
|
}
|
|
121
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
119
122
|
const { handleChallengeSpec } = await import('../../tools/challenge-spec.js');
|
|
120
123
|
const result = await handleChallengeSpec({
|
|
121
124
|
projectPath: ctx.projectPath,
|
|
@@ -131,6 +134,7 @@ const ACTION_HANDLERS = {
|
|
|
131
134
|
if (!ctx.specId) {
|
|
132
135
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
133
136
|
}
|
|
137
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
134
138
|
const { handleSpecQualityScore } = await import('../../tools/spec-quality-score-handler.js');
|
|
135
139
|
const result = await handleSpecQualityScore({
|
|
136
140
|
projectPath: ctx.projectPath,
|
|
@@ -146,6 +150,7 @@ const ACTION_HANDLERS = {
|
|
|
146
150
|
if (!ctx.specId) {
|
|
147
151
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
148
152
|
}
|
|
153
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
149
154
|
const { handleOrchestrateAgents } = await import('../../tools/orchestrate-agents-handler.js');
|
|
150
155
|
const result = await handleOrchestrateAgents({
|
|
151
156
|
projectPath: ctx.projectPath,
|
|
@@ -163,11 +168,13 @@ const ACTION_HANDLERS = {
|
|
|
163
168
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
164
169
|
}
|
|
165
170
|
// TDD scaffold needs specPath — resolve from specId
|
|
171
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
166
172
|
const { specStore } = await import('../../storage/index.js');
|
|
167
173
|
const spec = await specStore.getSpec(ctx.projectId, ctx.specId);
|
|
168
174
|
if (!spec?.specPath) {
|
|
169
175
|
return { success: false, summary: `Spec ${ctx.specId} has no specPath`, durationMs: 0 };
|
|
170
176
|
}
|
|
177
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
171
178
|
const { handleTddScaffold } = await import('../../tools/tdd-scaffold-handler.js');
|
|
172
179
|
const result = await handleTddScaffold({
|
|
173
180
|
projectPath: ctx.projectPath,
|
|
@@ -198,6 +205,7 @@ const ACTION_HANDLERS = {
|
|
|
198
205
|
};
|
|
199
206
|
}),
|
|
200
207
|
generate_changelog: wrapHandler('generate_changelog', async (ctx) => {
|
|
208
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
201
209
|
const { specStore } = await import('../../storage/index.js');
|
|
202
210
|
const specs = await specStore.listSpecs(ctx.projectId);
|
|
203
211
|
const { generateChangelog } = await import('../doc-generator/support-generators.js');
|
|
@@ -205,6 +213,7 @@ const ACTION_HANDLERS = {
|
|
|
205
213
|
// Generated changelog is returned to callers; strict Planu mode forbids planu/CHANGELOG.md.
|
|
206
214
|
const { writeFile, mkdir } = await import('node:fs/promises');
|
|
207
215
|
const { join } = await import('node:path');
|
|
216
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
208
217
|
const { projectDataDir } = await import('../../storage/base-store.js');
|
|
209
218
|
const changelogPath = join(projectDataDir(ctx.projectId), 'generated', 'CHANGELOG.md');
|
|
210
219
|
await mkdir(join(projectDataDir(ctx.projectId), 'generated'), { recursive: true });
|
|
@@ -237,6 +246,7 @@ const ACTION_HANDLERS = {
|
|
|
237
246
|
};
|
|
238
247
|
}),
|
|
239
248
|
log_lesson: wrapHandler('log_lesson', async (ctx) => {
|
|
249
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
240
250
|
const { addLesson } = await import('../../storage/lessons-store.js');
|
|
241
251
|
// drift:detected events (auto-drift.ts) are project-wide and carry no
|
|
242
252
|
// ctx.specId; fall back to the payload's specIds so the lesson stays
|
|
@@ -264,6 +274,7 @@ const ACTION_HANDLERS = {
|
|
|
264
274
|
}),
|
|
265
275
|
// ── B.2: spec:created triggers ──────────────────────────────────────────────
|
|
266
276
|
heal_spec_docs: wrapHandler('heal_spec_docs', async (ctx) => {
|
|
277
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
267
278
|
const { handleHealSpecDocs } = await import('../../tools/heal-spec-docs.js');
|
|
268
279
|
// SPEC-579: pass specId so cascade-triggered healing scopes to the changing
|
|
269
280
|
// spec only, instead of mass-rewriting all technical.md files in the project.
|
|
@@ -278,6 +289,7 @@ const ACTION_HANDLERS = {
|
|
|
278
289
|
};
|
|
279
290
|
}),
|
|
280
291
|
similar_problems_finder: wrapHandler('similar_problems_finder', async (ctx) => {
|
|
292
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
281
293
|
const { handleSimilarProblemsFinder } = await import('../../tools/knowledge-base-handler.js');
|
|
282
294
|
const result = await handleSimilarProblemsFinder({
|
|
283
295
|
projectPath: ctx.projectPath,
|
|
@@ -294,6 +306,7 @@ const ACTION_HANDLERS = {
|
|
|
294
306
|
if (!ctx.specId) {
|
|
295
307
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
296
308
|
}
|
|
309
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
297
310
|
const { specStore } = await import('../../storage/index.js');
|
|
298
311
|
const spec = await specStore.getSpec(ctx.projectId, ctx.specId);
|
|
299
312
|
if (!spec) {
|
|
@@ -309,6 +322,7 @@ const ACTION_HANDLERS = {
|
|
|
309
322
|
};
|
|
310
323
|
}),
|
|
311
324
|
run_spec_lint: wrapHandler('run_spec_lint', async (ctx) => {
|
|
325
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
312
326
|
const { handleRunSpecLint } = await import('../../tools/spec-lint-handler.js');
|
|
313
327
|
const result = await handleRunSpecLint({
|
|
314
328
|
projectPath: ctx.projectPath,
|
|
@@ -341,6 +355,7 @@ const ACTION_HANDLERS = {
|
|
|
341
355
|
if (!ctx.specId) {
|
|
342
356
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
343
357
|
}
|
|
358
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
344
359
|
const { handleSpecHealthCheck } = await import('../../tools/validation-loop-handler.js');
|
|
345
360
|
const result = await handleSpecHealthCheck({
|
|
346
361
|
projectPath: ctx.projectPath,
|
|
@@ -353,6 +368,7 @@ const ACTION_HANDLERS = {
|
|
|
353
368
|
};
|
|
354
369
|
}),
|
|
355
370
|
check_parallel_safety: wrapHandler('check_parallel_safety', async (ctx) => {
|
|
371
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
356
372
|
const { handleCheckParallelSafety } = await import('../../tools/parallel-safety-handler.js');
|
|
357
373
|
const result = handleCheckParallelSafety({ projectPath: ctx.projectPath });
|
|
358
374
|
return {
|
|
@@ -366,6 +382,7 @@ const ACTION_HANDLERS = {
|
|
|
366
382
|
if (!ctx.specId) {
|
|
367
383
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
368
384
|
}
|
|
385
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
369
386
|
const { handleAutoFixValidation } = await import('../../tools/auto-fix-validation.js');
|
|
370
387
|
const result = await handleAutoFixValidation({
|
|
371
388
|
projectPath: ctx.projectPath,
|
|
@@ -380,6 +397,7 @@ const ACTION_HANDLERS = {
|
|
|
380
397
|
};
|
|
381
398
|
}),
|
|
382
399
|
calibrate_estimates: wrapHandler('calibrate_estimates', async (ctx) => {
|
|
400
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
383
401
|
const { handleCalibrateEstimates } = await import('../../tools/estimation-accuracy-handler.js');
|
|
384
402
|
const result = await handleCalibrateEstimates({
|
|
385
403
|
projectPath: ctx.projectPath,
|
|
@@ -394,6 +412,7 @@ const ACTION_HANDLERS = {
|
|
|
394
412
|
if (!ctx.specId) {
|
|
395
413
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
396
414
|
}
|
|
415
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
397
416
|
const { specStore } = await import('../../storage/index.js');
|
|
398
417
|
const spec = await specStore.getSpec(ctx.projectId, ctx.specId);
|
|
399
418
|
const specPath = spec?.specPath ?? ctx.specId;
|
|
@@ -410,6 +429,7 @@ const ACTION_HANDLERS = {
|
|
|
410
429
|
if (!ctx.specId) {
|
|
411
430
|
return { success: false, summary: 'No specId', durationMs: 0 };
|
|
412
431
|
}
|
|
432
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
413
433
|
const { handleGenerateEdgeTests } = await import('../../tools/tdd-handler.js');
|
|
414
434
|
const result = await handleGenerateEdgeTests({
|
|
415
435
|
projectPath: ctx.projectPath,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// engine/autopilot/audit-logger.ts — SPEC-468: Persistent audit log for autopilot cascade actions
|
|
2
2
|
import { appendFile, readFile, mkdir, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
+
// eslint-disable-next-line no-restricted-imports -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
4
5
|
import { hashProjectPath, projectDataDir } from '../../storage/base-store.js';
|
|
5
6
|
const MAX_LINES = 1000;
|
|
6
7
|
/** Fire-and-forget write. Never blocks. */
|
|
@@ -32,6 +32,7 @@ function registerImplementingCascadeListener() {
|
|
|
32
32
|
onAutopilotEvent('spec:status:implementing', (event) => {
|
|
33
33
|
void (async () => {
|
|
34
34
|
try {
|
|
35
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
35
36
|
const { handleRecommendModel } = await import('../../tools/recommend-model-handler.js');
|
|
36
37
|
handleRecommendModel({ specId: event.specId });
|
|
37
38
|
}
|
|
@@ -39,7 +40,9 @@ function registerImplementingCascadeListener() {
|
|
|
39
40
|
/* best-effort */
|
|
40
41
|
}
|
|
41
42
|
try {
|
|
42
|
-
const { handleContextWindowStatus } =
|
|
43
|
+
const { handleContextWindowStatus } =
|
|
44
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
45
|
+
await import('../../tools/context-manager-handler.js');
|
|
43
46
|
await handleContextWindowStatus({ projectPath: event.projectPath });
|
|
44
47
|
}
|
|
45
48
|
catch {
|
|
@@ -81,6 +84,7 @@ function registerPluginInstalledListener() {
|
|
|
81
84
|
if (!Array.isArray(pluginIds) || pluginIds.length === 0) {
|
|
82
85
|
return;
|
|
83
86
|
}
|
|
87
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
84
88
|
const { handleManagePlugins } = await import('../../tools/manage-plugins-handler.js');
|
|
85
89
|
for (const pluginId of pluginIds) {
|
|
86
90
|
if (typeof pluginId !== 'string') {
|
|
@@ -108,7 +112,10 @@ function registerSemanticIndexRefreshListener() {
|
|
|
108
112
|
onAutopilotEvent('spec:created', (event) => {
|
|
109
113
|
void (async () => {
|
|
110
114
|
try {
|
|
111
|
-
const { getOrCreateBackend } =
|
|
115
|
+
const { getOrCreateBackend } =
|
|
116
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
117
|
+
await import('../../storage/vector-store/backend-factory.js');
|
|
118
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
112
119
|
const { SemanticIndexStore } = await import('../../storage/semantic-index-store.js');
|
|
113
120
|
const backend = await getOrCreateBackend(event.projectId);
|
|
114
121
|
const allDocs = await backend.getAll();
|