@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { technologyValue } from '../technology-registry.js';
|
|
2
|
+
import { fileExistsByRead } from '../../core/shared/fs.js';
|
|
2
3
|
// engine/detectors/mfe-detector.ts — Micro-frontend and signals detection (SPEC-017 tech-debt)
|
|
3
4
|
// Detects Islands Architecture, Module Federation, Single-SPA, Nx MFE, Reactive Signals.
|
|
4
5
|
import { readFile } from 'node:fs/promises';
|
|
@@ -64,14 +65,14 @@ async function collectAllDeps(projectPath) {
|
|
|
64
65
|
}
|
|
65
66
|
async function detectIslands(projectPath, deps) {
|
|
66
67
|
// Astro: astro.config.mjs / .ts / .js
|
|
67
|
-
const hasAstroConfig = (await
|
|
68
|
-
(await
|
|
69
|
-
(await
|
|
68
|
+
const hasAstroConfig = (await fileExistsByRead(join(projectPath, 'astro.config.mjs'))) ||
|
|
69
|
+
(await fileExistsByRead(join(projectPath, 'astro.config.ts'))) ||
|
|
70
|
+
(await fileExistsByRead(join(projectPath, 'astro.config.js')));
|
|
70
71
|
if (hasAstroConfig || deps.has(technologyValue('technology-astro-23661e'))) {
|
|
71
72
|
return { framework: technologyValue('technology-astro-23661e') };
|
|
72
73
|
}
|
|
73
74
|
// Fresh (Deno): fresh.config.ts
|
|
74
|
-
if (await
|
|
75
|
+
if (await fileExistsByRead(join(projectPath, 'fresh.config.ts'))) {
|
|
75
76
|
return { framework: 'fresh' };
|
|
76
77
|
}
|
|
77
78
|
return { framework: undefined };
|
|
@@ -151,13 +152,4 @@ function detectSignals(deps) {
|
|
|
151
152
|
}
|
|
152
153
|
return detected;
|
|
153
154
|
}
|
|
154
|
-
async function fileExists(filePath) {
|
|
155
|
-
try {
|
|
156
|
-
await readFile(filePath, 'utf-8');
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
catch {
|
|
160
|
-
return false;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
155
|
//# sourceMappingURL=mfe-detector.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { technologyValue } from '../technology-registry.js';
|
|
2
|
+
import { fileExistsByRead } from '../../core/shared/fs.js';
|
|
2
3
|
// engine/detectors/monitoring-detector.ts — Monitoring/observability stack detection (SPEC-026a)
|
|
3
4
|
// Detects Prometheus, Datadog, New Relic, OpenTelemetry, CloudWatch, Sentry, and more.
|
|
4
5
|
import { readFile } from 'node:fs/promises';
|
|
@@ -184,7 +185,7 @@ async function isToolDetected(projectPath, signal, deps, envContent, foundFiles)
|
|
|
184
185
|
if (signal.configFiles) {
|
|
185
186
|
/* v8 ignore start */
|
|
186
187
|
for (const f of signal.configFiles) {
|
|
187
|
-
if (await
|
|
188
|
+
if (await fileExistsByRead(join(projectPath, f))) {
|
|
188
189
|
foundFiles.push(f);
|
|
189
190
|
return true;
|
|
190
191
|
}
|
|
@@ -256,14 +257,4 @@ async function safeGlob(projectPath, pattern) {
|
|
|
256
257
|
return [];
|
|
257
258
|
}
|
|
258
259
|
}
|
|
259
|
-
async function fileExists(filePath) {
|
|
260
|
-
try {
|
|
261
|
-
await readFile(filePath, 'utf-8');
|
|
262
|
-
return true;
|
|
263
|
-
/* v8 ignore next 2 */
|
|
264
|
-
}
|
|
265
|
-
catch {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
260
|
//# sourceMappingURL=monitoring-detector.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MonorepoTool, MonorepoDetectionResult } from '../../types/index.js';
|
|
2
2
|
export type { MonorepoTool, MonorepoDetectionResult };
|
|
3
|
+
/** File existence check — returns true if file is accessible */
|
|
3
4
|
/**
|
|
4
5
|
* Detect which monorepo tool (if any) is used in the given project directory.
|
|
5
6
|
*
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
// engine/detectors/monorepo-detector.ts — Monorepo tool detection
|
|
2
2
|
// SPEC-004 tech-debt: Nx, Turborepo, Bazel, Rush, Moon monorepo detection
|
|
3
|
-
import { access } from 'node:fs/promises';
|
|
4
3
|
import { join } from 'node:path';
|
|
4
|
+
import { fileExists } from '../../core/shared/fs.js';
|
|
5
5
|
/** File existence check — returns true if file is accessible */
|
|
6
|
-
async function fileExists(filePath) {
|
|
7
|
-
try {
|
|
8
|
-
await access(filePath);
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
6
|
/**
|
|
16
7
|
* Detect which monorepo tool (if any) is used in the given project directory.
|
|
17
8
|
*
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { glob } from 'glob';
|
|
6
|
+
import { fileExistsByRead } from '../../core/shared/fs.js';
|
|
6
7
|
// === Detection signals ===
|
|
7
8
|
/** Explicit top-level files that indicate Nomad is configured. */
|
|
8
9
|
const NOMAD_EXPLICIT_PATHS = ['nomad.hcl', 'nomad.json'];
|
|
@@ -25,13 +26,13 @@ const NOMAD_TASK_PATTERN = 'task "';
|
|
|
25
26
|
export async function detectNomad(projectPath) {
|
|
26
27
|
// Check explicit top-level Nomad config files
|
|
27
28
|
for (const p of NOMAD_EXPLICIT_PATHS) {
|
|
28
|
-
if (await
|
|
29
|
+
if (await fileExistsByRead(join(projectPath, p))) {
|
|
29
30
|
return true;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
// Check Nomad directories
|
|
33
34
|
for (const dir of NOMAD_DIRS) {
|
|
34
|
-
if (await
|
|
35
|
+
if (await fileExistsByRead(join(projectPath, dir))) {
|
|
35
36
|
return true;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
@@ -79,15 +80,6 @@ async function globMatch(projectPath, pattern) {
|
|
|
79
80
|
return [];
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
async function fileExists(filePath) {
|
|
83
|
-
try {
|
|
84
|
-
await readFile(filePath, 'utf-8');
|
|
85
|
-
return true;
|
|
86
|
-
}
|
|
87
|
-
catch {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
83
|
async function fileContainsAny(filePath, jobPatterns, taskPattern) {
|
|
92
84
|
try {
|
|
93
85
|
const content = await readFile(filePath, 'utf-8');
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { readFileOrNull } from '../../core/shared/fs.js';
|
|
2
|
+
export { readFileOrNull };
|
|
1
3
|
/** npm package names that indicate OTel is installed */
|
|
2
4
|
export declare const OTEL_NPM_PACKAGES: string[];
|
|
3
5
|
/** Python package patterns (requirements.txt, pyproject.toml) */
|
|
@@ -10,7 +12,6 @@ export declare const OTEL_RUST_CRATE: "opentelemetry";
|
|
|
10
12
|
export declare const OTEL_JAVA_PATTERN: "opentelemetry";
|
|
11
13
|
/** Dependencies that indicate a project might need OTel (async workers, HTTP clients) */
|
|
12
14
|
export declare const MULTISERVICE_DEPS: string[];
|
|
13
|
-
export declare function readFileOrNull(filePath: string): Promise<string | null>;
|
|
14
15
|
export declare function readPackageDeps(projectPath: string): Promise<{
|
|
15
16
|
deps: Record<string, string>;
|
|
16
17
|
devDeps: Record<string, string>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { technologyValue } from '../technology-registry.js';
|
|
2
2
|
// engine/detectors/otel-ecosystem-detectors.ts — SPEC-044
|
|
3
3
|
// Per-ecosystem OTel detection helpers extracted from otel-detector.ts.
|
|
4
|
-
import { readFile } from 'node:fs/promises';
|
|
5
4
|
import { join } from 'node:path';
|
|
5
|
+
import { readFileOrNull } from '../../core/shared/fs.js';
|
|
6
|
+
export { readFileOrNull };
|
|
6
7
|
// === OTel package patterns per ecosystem ===
|
|
7
8
|
/** npm package names that indicate OTel is installed */
|
|
8
9
|
export const OTEL_NPM_PACKAGES = [
|
|
@@ -35,15 +36,6 @@ export const MULTISERVICE_DEPS = [
|
|
|
35
36
|
'amqplib',
|
|
36
37
|
'nats',
|
|
37
38
|
];
|
|
38
|
-
// === Shared helper ===
|
|
39
|
-
export async function readFileOrNull(filePath) {
|
|
40
|
-
try {
|
|
41
|
-
return await readFile(filePath, 'utf-8');
|
|
42
|
-
}
|
|
43
|
-
catch {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
39
|
export async function readPackageDeps(projectPath) {
|
|
48
40
|
const content = await readFileOrNull(join(projectPath, 'package.json'));
|
|
49
41
|
if (!content) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
// Planu — HTML document wrapper with inline CSS for executive summary
|
|
2
3
|
const CSS = `
|
|
3
4
|
@page { margin: 2cm; size: A4; }
|
|
@@ -47,11 +48,4 @@ ${bodyContent}
|
|
|
47
48
|
</body>
|
|
48
49
|
</html>`;
|
|
49
50
|
}
|
|
50
|
-
function escapeHtml(str) {
|
|
51
|
-
return str
|
|
52
|
-
.replace(/&/g, '&')
|
|
53
|
-
.replace(/</g, '<')
|
|
54
|
-
.replace(/>/g, '>')
|
|
55
|
-
.replace(/"/g, '"');
|
|
56
|
-
}
|
|
57
51
|
//# sourceMappingURL=html-template.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
2
3
|
function statusToBadgeClass(status) {
|
|
3
4
|
switch (status) {
|
|
@@ -142,11 +143,4 @@ export function buildTimelineSection(svgContent) {
|
|
|
142
143
|
export function buildFooterSection() {
|
|
143
144
|
return `<div class="footer">Generated by Planu — ${new Date().toUTCString()}</div>`;
|
|
144
145
|
}
|
|
145
|
-
function escapeHtml(str) {
|
|
146
|
-
return str
|
|
147
|
-
.replace(/&/g, '&')
|
|
148
|
-
.replace(/</g, '<')
|
|
149
|
-
.replace(/>/g, '>')
|
|
150
|
-
.replace(/"/g, '"');
|
|
151
|
-
}
|
|
152
146
|
//# sourceMappingURL=section-builders.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getCdnUrl } from '../../../config/version-defaults.js';
|
|
2
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
2
3
|
/**
|
|
3
4
|
* Render an array of SpecDiagrams as HTML sections with Mermaid pre blocks.
|
|
4
5
|
* Uses Mermaid.js CDN for client-side rendering with raw code fallback.
|
|
@@ -30,11 +31,4 @@ export function getMermaidScript() {
|
|
|
30
31
|
</script>
|
|
31
32
|
<noscript><style>.mermaid { white-space: pre; font-family: monospace; background: #f3f4f6; padding: 16px; border-radius: 8px; }</style></noscript>`;
|
|
32
33
|
}
|
|
33
|
-
function escapeHtml(str) {
|
|
34
|
-
return str
|
|
35
|
-
.replace(/&/g, '&')
|
|
36
|
-
.replace(/</g, '<')
|
|
37
|
-
.replace(/>/g, '>')
|
|
38
|
-
.replace(/"/g, '"');
|
|
39
|
-
}
|
|
40
34
|
//# sourceMappingURL=mermaid-renderer.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
const STATUS_COLORS = {
|
|
2
3
|
draft: { bg: '#e5e7eb', fg: '#374151' },
|
|
3
4
|
review: { bg: '#dbeafe', fg: '#1d4ed8' },
|
|
@@ -299,11 +300,4 @@ function metricCard(value, label) {
|
|
|
299
300
|
<div class="metric-label">${escapeHtml(label)}</div>
|
|
300
301
|
</div>`;
|
|
301
302
|
}
|
|
302
|
-
function escapeHtml(str) {
|
|
303
|
-
return str
|
|
304
|
-
.replace(/&/g, '&')
|
|
305
|
-
.replace(/</g, '<')
|
|
306
|
-
.replace(/>/g, '>')
|
|
307
|
-
.replace(/"/g, '"');
|
|
308
|
-
}
|
|
309
303
|
//# sourceMappingURL=spec-section-builders.js.map
|
|
@@ -2,6 +2,7 @@ import { extractPerSpecData } from './spec-data-extractor.js';
|
|
|
2
2
|
import { buildSpecHeaderSection, buildAffectedFilesSection, buildArchDecisionsSection, buildSpecFooterSection, buildImpactAnalysisSection, buildEstimationReasoningSection, buildLivingSpecSection, buildAcceptanceCriteriaSection, } from './spec-section-builders.js';
|
|
3
3
|
import { renderMermaidDiagrams, getMermaidScript } from './mermaid-renderer.js';
|
|
4
4
|
import { wrapPerSpecHtml } from './html-wrapper.js';
|
|
5
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
5
6
|
/**
|
|
6
7
|
* Generate a self-contained HTML technical report for a single spec.
|
|
7
8
|
* Includes: header, scope, diagrams, impact analysis, affected files,
|
|
@@ -57,11 +58,4 @@ function buildScopeSection(scope, target, gitBranch) {
|
|
|
57
58
|
${gitBranch ? `<p><strong>Branch:</strong> <code>${escapeHtml(gitBranch)}</code></p>` : ''}
|
|
58
59
|
</div>`;
|
|
59
60
|
}
|
|
60
|
-
function escapeHtml(str) {
|
|
61
|
-
return str
|
|
62
|
-
.replace(/&/g, '&')
|
|
63
|
-
.replace(/</g, '<')
|
|
64
|
-
.replace(/>/g, '>')
|
|
65
|
-
.replace(/"/g, '"');
|
|
66
|
-
}
|
|
67
61
|
//# sourceMappingURL=technical-report.js.map
|
|
@@ -8,6 +8,7 @@ import { computeVelocity } from './data-aggregators/velocity-aggregator.js';
|
|
|
8
8
|
import { computeBurndown } from './data-aggregators/burndown-aggregator.js';
|
|
9
9
|
import { detectBottlenecks } from './data-aggregators/bottleneck-detector.js';
|
|
10
10
|
import { computeAccuracy } from './data-aggregators/accuracy-aggregator.js';
|
|
11
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
11
12
|
/**
|
|
12
13
|
* Generate the full analytics.html page for the Planu portal.
|
|
13
14
|
* Returns an HTML string ready to write to disk.
|
|
@@ -202,13 +203,6 @@ function mapToPieSlices(counts) {
|
|
|
202
203
|
color: CHART_COLORS[i % CHART_COLORS.length] ?? '#e94560',
|
|
203
204
|
}));
|
|
204
205
|
}
|
|
205
|
-
function escapeHtml(str) {
|
|
206
|
-
return str
|
|
207
|
-
.replace(/&/g, '&')
|
|
208
|
-
.replace(/</g, '<')
|
|
209
|
-
.replace(/>/g, '>')
|
|
210
|
-
.replace(/"/g, '"');
|
|
211
|
-
}
|
|
212
206
|
const ANALYTICS_CSS = `
|
|
213
207
|
.analytics-main {
|
|
214
208
|
max-width: 1100px;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { buildNavbar } from './portal-navbar.js';
|
|
2
2
|
import { getPortalThemeCSS } from './portal-theme.js';
|
|
3
|
-
|
|
4
|
-
return s
|
|
5
|
-
.replace(/&/g, '&')
|
|
6
|
-
.replace(/</g, '<')
|
|
7
|
-
.replace(/>/g, '>')
|
|
8
|
-
.replace(/"/g, '"');
|
|
9
|
-
}
|
|
3
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
10
4
|
const TECH_ICONS = {
|
|
11
5
|
typescript: '🔷',
|
|
12
6
|
javascript: '🟡',
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { buildNavbar } from './portal-navbar.js';
|
|
2
2
|
import { getPortalThemeCSS } from './portal-theme.js';
|
|
3
|
-
|
|
4
|
-
return s
|
|
5
|
-
.replace(/&/g, '&')
|
|
6
|
-
.replace(/</g, '<')
|
|
7
|
-
.replace(/>/g, '>')
|
|
8
|
-
.replace(/"/g, '"');
|
|
9
|
-
}
|
|
3
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
10
4
|
function formatDate(dateStr) {
|
|
11
5
|
try {
|
|
12
6
|
const d = new Date(dateStr);
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { buildNavbar } from './portal-navbar.js';
|
|
2
2
|
import { getPortalThemeCSS } from './portal-theme.js';
|
|
3
3
|
import { buildDecisionTimeline, DECISION_TIMELINE_CSS } from './decision-timeline-builder.js';
|
|
4
|
-
|
|
5
|
-
return s
|
|
6
|
-
.replace(/&/g, '&')
|
|
7
|
-
.replace(/</g, '<')
|
|
8
|
-
.replace(/>/g, '>')
|
|
9
|
-
.replace(/"/g, '"');
|
|
10
|
-
}
|
|
4
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
11
5
|
const CATEGORY_COLORS = {
|
|
12
6
|
architecture: '#7c3aed',
|
|
13
7
|
stack: '#2563eb',
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
return s
|
|
3
|
-
.replace(/&/g, '&')
|
|
4
|
-
.replace(/</g, '<')
|
|
5
|
-
.replace(/>/g, '>')
|
|
6
|
-
.replace(/"/g, '"');
|
|
7
|
-
}
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
8
2
|
const CATEGORY_COLORS = {
|
|
9
3
|
architecture: '#7c3aed', // purple
|
|
10
4
|
stack: '#2563eb', // blue
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
const COLUMNS = [
|
|
2
3
|
{ key: 'draft', label: 'Draft' },
|
|
3
4
|
{ key: 'review', label: 'Review' },
|
|
@@ -77,13 +78,6 @@ function buildCard(spec) {
|
|
|
77
78
|
${tags ? `<div class="kanban-card-tags">${tags}</div>` : ''}
|
|
78
79
|
</div>`;
|
|
79
80
|
}
|
|
80
|
-
function escapeHtml(str) {
|
|
81
|
-
return str
|
|
82
|
-
.replace(/&/g, '&')
|
|
83
|
-
.replace(/</g, '<')
|
|
84
|
-
.replace(/>/g, '>')
|
|
85
|
-
.replace(/"/g, '"');
|
|
86
|
-
}
|
|
87
81
|
const KANBAN_CSS = `
|
|
88
82
|
.kanban-board {
|
|
89
83
|
display: grid;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
function getBreadcrumbCss() {
|
|
2
3
|
return `
|
|
3
4
|
.planu-breadcrumbs {
|
|
@@ -48,13 +49,6 @@ function getBreadcrumbCss() {
|
|
|
48
49
|
.planu-breadcrumbs, .planu-spec-nav { display: none !important; }
|
|
49
50
|
}`;
|
|
50
51
|
}
|
|
51
|
-
function escapeHtml(str) {
|
|
52
|
-
return str
|
|
53
|
-
.replace(/&/g, '&')
|
|
54
|
-
.replace(/</g, '<')
|
|
55
|
-
.replace(/>/g, '>')
|
|
56
|
-
.replace(/"/g, '"');
|
|
57
|
-
}
|
|
58
52
|
/**
|
|
59
53
|
* Build a breadcrumb trail.
|
|
60
54
|
* Last item is rendered as plain text (current page); all others are links.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
const PAGE_CARDS = [
|
|
2
3
|
{
|
|
3
4
|
key: 'proposal',
|
|
@@ -131,13 +132,6 @@ function getLandingCardsCss() {
|
|
|
131
132
|
.planu-cards-grid { grid-template-columns: repeat(2, 1fr); }
|
|
132
133
|
}`;
|
|
133
134
|
}
|
|
134
|
-
function escapeHtml(str) {
|
|
135
|
-
return str
|
|
136
|
-
.replace(/&/g, '&')
|
|
137
|
-
.replace(/</g, '<')
|
|
138
|
-
.replace(/>/g, '>')
|
|
139
|
-
.replace(/"/g, '"');
|
|
140
|
-
}
|
|
141
135
|
/**
|
|
142
136
|
* Build the Quick Links section rendered between the navbar and the spec table
|
|
143
137
|
* in planu/index.html. Cards that aren't yet generated are rendered greyed out.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
/** All portal pages in display order */
|
|
2
3
|
export const NAV_ITEMS = [
|
|
3
4
|
{ key: 'dashboard', label: 'Dashboard', filename: 'index.html', icon: '📋' },
|
|
@@ -99,13 +100,6 @@ const NAVBAR_CSS = `
|
|
|
99
100
|
function getNavbarCss() {
|
|
100
101
|
return NAVBAR_CSS;
|
|
101
102
|
}
|
|
102
|
-
function escapeHtml(str) {
|
|
103
|
-
return str
|
|
104
|
-
.replace(/&/g, '&')
|
|
105
|
-
.replace(/</g, '<')
|
|
106
|
-
.replace(/>/g, '>')
|
|
107
|
-
.replace(/"/g, '"');
|
|
108
|
-
}
|
|
109
103
|
/**
|
|
110
104
|
* Build a horizontal portal navbar.
|
|
111
105
|
*
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Order matches the navbar display order.
|
|
4
4
|
*/
|
|
5
5
|
export declare const DETECTABLE_PAGES: Record<string, string>;
|
|
6
|
+
/**
|
|
7
|
+
* Check whether a single file exists on disk (non-throwing).
|
|
8
|
+
*/
|
|
6
9
|
/**
|
|
7
10
|
* Detect which portal pages currently exist inside planu/.
|
|
8
11
|
* Returns an array of page keys (e.g. ['proposal', 'executive-summary']).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Planu — Detects which portal pages exist on disk in planu/
|
|
2
|
-
import { access } from 'node:fs/promises';
|
|
3
2
|
import { join } from 'node:path';
|
|
3
|
+
import { fileExists } from '../../../core/shared/fs.js';
|
|
4
4
|
/**
|
|
5
5
|
* All detectable portal page keys mapped to their filenames within planu/.
|
|
6
6
|
* Order matches the navbar display order.
|
|
@@ -18,15 +18,6 @@ export const DETECTABLE_PAGES = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Check whether a single file exists on disk (non-throwing).
|
|
20
20
|
*/
|
|
21
|
-
async function fileExists(filePath) {
|
|
22
|
-
try {
|
|
23
|
-
await access(filePath);
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
21
|
/**
|
|
31
22
|
* Detect which portal pages currently exist inside planu/.
|
|
32
23
|
* Returns an array of page keys (e.g. ['proposal', 'executive-summary']).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Planu — Portal regenerator: auto-regen pages when stores change (SPEC-146)
|
|
2
2
|
import { mkdir, writeFile } 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 } from '../../../storage/base-store.js';
|
|
5
6
|
import { getAffectedPages } from './dirty-flag-map.js';
|
|
6
7
|
import { withAudit } from '../../../engine/autopilot/audit-logger.js';
|
|
@@ -71,6 +72,7 @@ export async function regeneratePages(projectPath, changedStores) {
|
|
|
71
72
|
async function generatePage(projectPath, page) {
|
|
72
73
|
const projectId = hashProjectPath(projectPath);
|
|
73
74
|
try {
|
|
75
|
+
// eslint-disable-next-line no-restricted-syntax -- grandfathered layer violation, remediation SPEC-1661 SPEC-1662 SPEC-1663
|
|
74
76
|
const { listSpecs } = await import('../../../storage/spec-store.js');
|
|
75
77
|
const specs = await listSpecs(projectId);
|
|
76
78
|
return await dispatchPageGenerator(projectPath, page, specs);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
const IMPACT_LEVELS = ['low', 'medium', 'high', 'very_high', 'critical'];
|
|
2
3
|
const PROB_LEVELS = [20, 40, 60, 80, 100];
|
|
3
4
|
const CATEGORY_COLORS = {
|
|
@@ -74,13 +75,6 @@ function circleSizeFromUsd(usd) {
|
|
|
74
75
|
}
|
|
75
76
|
return 24;
|
|
76
77
|
}
|
|
77
|
-
function escapeHtml(s) {
|
|
78
|
-
return s
|
|
79
|
-
.replace(/&/g, '&')
|
|
80
|
-
.replace(/</g, '<')
|
|
81
|
-
.replace(/>/g, '>')
|
|
82
|
-
.replace(/"/g, '"');
|
|
83
|
-
}
|
|
84
78
|
function buildGridCells() {
|
|
85
79
|
const cells = [];
|
|
86
80
|
for (let row = 0; row < 5; row++) {
|
|
@@ -2,13 +2,7 @@ import { buildNavbar } from './portal-navbar.js';
|
|
|
2
2
|
import { getPortalThemeCSS } from './portal-theme.js';
|
|
3
3
|
import { buildRiskMatrixSvg } from './risk-matrix-svg.js';
|
|
4
4
|
import { buildRiskGaugeSvg } from './risk-gauge-svg.js';
|
|
5
|
-
|
|
6
|
-
return s
|
|
7
|
-
.replace(/&/g, '&')
|
|
8
|
-
.replace(/</g, '<')
|
|
9
|
-
.replace(/>/g, '>')
|
|
10
|
-
.replace(/"/g, '"');
|
|
11
|
-
}
|
|
5
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
12
6
|
const STATUS_BADGE = {
|
|
13
7
|
identified: 'planu-badge-muted',
|
|
14
8
|
mitigating: 'planu-badge-info',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getPortalThemeCSS } from './portal-theme.js';
|
|
2
2
|
import { buildNavbar } from './portal-navbar.js';
|
|
3
3
|
import { buildGanttChart } from '../proposal/proposal-gantt-builder.js';
|
|
4
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
4
5
|
/**
|
|
5
6
|
* Generate the full roadmap.html page for the Planu portal.
|
|
6
7
|
* Returns an HTML string ready to write to disk.
|
|
@@ -116,13 +117,6 @@ function buildMilestonesSection(specs) {
|
|
|
116
117
|
return `<div class="milestone-timeline">${items.join('\n')}</div>`;
|
|
117
118
|
}
|
|
118
119
|
// --- Helpers ---
|
|
119
|
-
function escapeHtml(str) {
|
|
120
|
-
return str
|
|
121
|
-
.replace(/&/g, '&')
|
|
122
|
-
.replace(/</g, '<')
|
|
123
|
-
.replace(/>/g, '>')
|
|
124
|
-
.replace(/"/g, '"');
|
|
125
|
-
}
|
|
126
120
|
const ROADMAP_CSS = `
|
|
127
121
|
.roadmap-main {
|
|
128
122
|
max-width: 1100px;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
const PHASE_COLORS = [
|
|
2
3
|
'#7c3aed',
|
|
3
4
|
'#0891b2',
|
|
@@ -116,11 +117,4 @@ ${ganttRows.join('\n')}
|
|
|
116
117
|
</div>`;
|
|
117
118
|
}
|
|
118
119
|
// Internal helper
|
|
119
|
-
function escapeHtml(str) {
|
|
120
|
-
return str
|
|
121
|
-
.replace(/&/g, '&')
|
|
122
|
-
.replace(/</g, '<')
|
|
123
|
-
.replace(/>/g, '>')
|
|
124
|
-
.replace(/"/g, '"');
|
|
125
|
-
}
|
|
126
120
|
//# sourceMappingURL=proposal-gantt-builder.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
1
2
|
/**
|
|
2
3
|
* Build a responsive KPI grid with large value + small label per card.
|
|
3
4
|
* Uses CSS class `.kpi-grid` and `.kpi-card` from proposal-themes.ts.
|
|
@@ -22,11 +23,4 @@ export function buildKpiGrid(kpis) {
|
|
|
22
23
|
return `<div class="kpi-grid">${cards}</div>`;
|
|
23
24
|
}
|
|
24
25
|
// Internal helper
|
|
25
|
-
function escapeHtml(str) {
|
|
26
|
-
return str
|
|
27
|
-
.replace(/&/g, '&')
|
|
28
|
-
.replace(/</g, '<')
|
|
29
|
-
.replace(/>/g, '>')
|
|
30
|
-
.replace(/"/g, '"');
|
|
31
|
-
}
|
|
32
26
|
//# sourceMappingURL=proposal-kpi-builder.js.map
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { t } from './proposal-i18n.js';
|
|
2
|
-
|
|
3
|
-
return str
|
|
4
|
-
.replace(/&/g, '&')
|
|
5
|
-
.replace(/</g, '<')
|
|
6
|
-
.replace(/>/g, '>')
|
|
7
|
-
.replace(/"/g, '"');
|
|
8
|
-
}
|
|
2
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
9
3
|
function sectionTitle(icon, text) {
|
|
10
4
|
return `<h2 class="section-title"><span class="icon">${icon}</span>${escapeHtml(text)}</h2>`;
|
|
11
5
|
}
|
|
@@ -269,7 +263,7 @@ export function buildScorecardSection(items, title = 'Scorecard') {
|
|
|
269
263
|
<span class="score-delta ${totalDelta > 0 ? 'delta-positive' : totalDelta < 0 ? 'delta-negative' : 'delta-neutral'}">${totalSign}${String(totalDelta)}</span>
|
|
270
264
|
</div>`;
|
|
271
265
|
return `<section>
|
|
272
|
-
${sectionTitle('📈',
|
|
266
|
+
${sectionTitle('📈', title)}
|
|
273
267
|
<div class="kpi-grid">
|
|
274
268
|
${cards.join('\n ')}
|
|
275
269
|
${totalCard}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { buildGanttChart } from './proposal-gantt-builder.js';
|
|
2
2
|
import { buildKpiGrid } from './proposal-kpi-builder.js';
|
|
3
3
|
import { t } from './proposal-i18n.js';
|
|
4
|
+
import { escapeHtml } from '../../../core/shared/strings.js';
|
|
4
5
|
// ── Internal helpers ──────────────────────────────────────────────────────────
|
|
5
|
-
function escapeHtml(str) {
|
|
6
|
-
return str
|
|
7
|
-
.replace(/&/g, '&')
|
|
8
|
-
.replace(/</g, '<')
|
|
9
|
-
.replace(/>/g, '>')
|
|
10
|
-
.replace(/"/g, '"');
|
|
11
|
-
}
|
|
12
6
|
function sectionTitle(icon, text) {
|
|
13
7
|
return `<h2 class="section-title"><span class="icon">${icon}</span>${escapeHtml(text)}</h2>`;
|
|
14
8
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* HTML templates for the static docs site generator.
|
|
3
3
|
* Provides layout, CSS, navigation, and shared HTML utilities.
|
|
4
4
|
*/
|
|
5
|
+
import { escapeHtml } from '../../core/shared/strings.js';
|
|
5
6
|
// eslint-disable-next-line max-lines-per-function -- CSS template is inherently long
|
|
6
7
|
export function getStyles() {
|
|
7
8
|
return `
|
|
@@ -346,13 +347,6 @@ export function renderSearchScript() {
|
|
|
346
347
|
});
|
|
347
348
|
})();`;
|
|
348
349
|
}
|
|
349
|
-
function escapeHtml(text) {
|
|
350
|
-
return text
|
|
351
|
-
.replace(/&/g, '&')
|
|
352
|
-
.replace(/</g, '<')
|
|
353
|
-
.replace(/>/g, '>')
|
|
354
|
-
.replace(/"/g, '"');
|
|
355
|
-
}
|
|
356
350
|
function escapeAttr(text) {
|
|
357
351
|
return escapeHtml(text).replace(/'/g, ''');
|
|
358
352
|
}
|