prizmkit 1.1.100 → 1.1.101
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/bin/create-prizmkit.js +4 -4
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/.env.example +3 -3
- package/bundled/dev-pipeline/README.md +110 -90
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/cli.py +27 -0
- package/bundled/dev-pipeline/prizmkit_runtime/__init__.py +13 -0
- package/bundled/dev-pipeline/prizmkit_runtime/__main__.py +9 -0
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +193 -0
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +313 -0
- package/bundled/dev-pipeline/prizmkit_runtime/compat.py +32 -0
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +410 -0
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +478 -0
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +734 -0
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +256 -0
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +109 -0
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +110 -0
- package/bundled/dev-pipeline/prizmkit_runtime/processes.py +373 -0
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +389 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +51 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +179 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +345 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +118 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +187 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +147 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +422 -0
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +552 -0
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +71 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +38 -23
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +20 -5
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +39 -0
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +7 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +12 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +13 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +13 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
- package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +9 -30
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +15 -7
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +42 -29
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +41 -39
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +4 -0
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +4 -0
- package/bundled/dev-pipeline/tests/test_auto_skip.py +436 -14
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +104 -0
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +40 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1138 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +1045 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +29 -34
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +6 -5
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +29 -35
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +7 -6
- package/bundled/skills/feature-workflow/SKILL.md +3 -6
- package/bundled/skills/recovery-workflow/SKILL.md +23 -32
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +29 -35
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +7 -6
- package/bundled/skills/refactor-workflow/SKILL.md +3 -6
- package/bundled/templates/hooks/commit-intent.json +2 -2
- package/bundled/templates/hooks/diff-prizm-docs.py +226 -0
- package/bundled/templates/hooks/prizm-pre-commit.py +45 -0
- package/bundled/templates/hooks/validate-prizm-docs.py +240 -0
- package/package.json +1 -1
- package/src/config.js +33 -12
- package/src/index.js +3 -6
- package/src/manifest.js +3 -2
- package/src/metadata.js +7 -18
- package/src/prompts.js +0 -12
- package/src/runtimes.js +18 -11
- package/src/scaffold.js +133 -116
- package/src/upgrade.js +1 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +0 -500
- package/bundled/dev-pipeline/launch-feature-daemon.sh +0 -657
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +0 -502
- package/bundled/dev-pipeline/lib/branch.sh +0 -326
- package/bundled/dev-pipeline/lib/common.sh +0 -1476
- package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
- package/bundled/dev-pipeline/reset-bug.sh +0 -425
- package/bundled/dev-pipeline/reset-feature.sh +0 -436
- package/bundled/dev-pipeline/reset-refactor.sh +0 -423
- package/bundled/dev-pipeline/run-bugfix.sh +0 -1430
- package/bundled/dev-pipeline/run-feature.sh +0 -1718
- package/bundled/dev-pipeline/run-recovery.sh +0 -648
- package/bundled/dev-pipeline/run-refactor.sh +0 -1463
- package/bundled/dev-pipeline/tests/test-path-resolution.sh +0 -100
- package/bundled/dev-pipeline-windows/.env.example +0 -36
- package/bundled/dev-pipeline-windows/README.md +0 -30
- package/bundled/dev-pipeline-windows/SCHEMA_ANALYSIS.md +0 -533
- package/bundled/dev-pipeline-windows/assets/feature-list-example.json +0 -146
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +0 -137
- package/bundled/dev-pipeline-windows/launch-bugfix-daemon.ps1 +0 -9
- package/bundled/dev-pipeline-windows/launch-feature-daemon.ps1 +0 -9
- package/bundled/dev-pipeline-windows/launch-refactor-daemon.ps1 +0 -9
- package/bundled/dev-pipeline-windows/lib/branch.ps1 +0 -235
- package/bundled/dev-pipeline-windows/lib/common.ps1 +0 -991
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -1051
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -121
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -10
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -10
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -10
- package/bundled/dev-pipeline-windows/run-bugfix.ps1 +0 -9
- package/bundled/dev-pipeline-windows/run-feature.ps1 +0 -9
- package/bundled/dev-pipeline-windows/run-recovery.ps1 +0 -179
- package/bundled/dev-pipeline-windows/run-refactor.ps1 +0 -9
- package/bundled/dev-pipeline-windows/scripts/check-session-status.py +0 -301
- package/bundled/dev-pipeline-windows/scripts/continuation.py +0 -374
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2279
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -763
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -841
- package/bundled/dev-pipeline-windows/scripts/init-bugfix-pipeline.py +0 -316
- package/bundled/dev-pipeline-windows/scripts/init-dev-team.py +0 -134
- package/bundled/dev-pipeline-windows/scripts/init-pipeline.py +0 -382
- package/bundled/dev-pipeline-windows/scripts/init-refactor-pipeline.py +0 -399
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1362
- package/bundled/dev-pipeline-windows/scripts/patch-completion-notes.py +0 -191
- package/bundled/dev-pipeline-windows/scripts/prizmkit-test-gate.py +0 -446
- package/bundled/dev-pipeline-windows/scripts/update-bug-status.py +0 -1121
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1789
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1327
- package/bundled/dev-pipeline-windows/scripts/utils.py +0 -542
- package/bundled/dev-pipeline-windows/templates/agent-prompts/critic-plan-challenge.md +0 -7
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-fix.md +0 -7
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-implement.md +0 -65
- package/bundled/dev-pipeline-windows/templates/agent-prompts/dev-resume.md +0 -5
- package/bundled/dev-pipeline-windows/templates/agent-prompts/reviewer-review.md +0 -7
- package/bundled/dev-pipeline-windows/templates/bootstrap-prompt.md +0 -73
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier1.md +0 -589
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +0 -710
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +0 -791
- package/bundled/dev-pipeline-windows/templates/bug-fix-list-schema.json +0 -263
- package/bundled/dev-pipeline-windows/templates/bugfix-bootstrap-prompt.md +0 -326
- package/bundled/dev-pipeline-windows/templates/feature-list-schema.json +0 -237
- package/bundled/dev-pipeline-windows/templates/refactor-bootstrap-prompt.md +0 -340
- package/bundled/dev-pipeline-windows/templates/refactor-list-schema.json +0 -270
- package/bundled/dev-pipeline-windows/templates/sections/ac-verification-checklist.md +0 -7
- package/bundled/dev-pipeline-windows/templates/sections/checkpoint-system.md +0 -91
- package/bundled/dev-pipeline-windows/templates/sections/context-budget-rules.md +0 -34
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-agent.md +0 -10
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-full.md +0 -12
- package/bundled/dev-pipeline-windows/templates/sections/critical-paths-lite.md +0 -7
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-agent.md +0 -8
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-full.md +0 -9
- package/bundled/dev-pipeline-windows/templates/sections/directory-convention-lite.md +0 -6
- package/bundled/dev-pipeline-windows/templates/sections/failure-capture.md +0 -21
- package/bundled/dev-pipeline-windows/templates/sections/feature-context.md +0 -21
- package/bundled/dev-pipeline-windows/templates/sections/log-size-awareness.md +0 -41
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-auto.md +0 -283
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification-opencli.md +0 -112
- package/bundled/dev-pipeline-windows/templates/sections/phase-browser-verification.md +0 -168
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit-full.md +0 -82
- package/bundled/dev-pipeline-windows/templates/sections/phase-commit.md +0 -75
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-agent-suffix.md +0 -23
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-base.md +0 -14
- package/bundled/dev-pipeline-windows/templates/sections/phase-context-snapshot-lite-suffix.md +0 -19
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +0 -63
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan.md +0 -42
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-agent.md +0 -44
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-full.md +0 -59
- package/bundled/dev-pipeline-windows/templates/sections/phase-implement-lite.md +0 -39
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-agent.md +0 -27
- package/bundled/dev-pipeline-windows/templates/sections/phase-plan-lite.md +0 -27
- package/bundled/dev-pipeline-windows/templates/sections/phase-prizmkit-test.md +0 -39
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-agent.md +0 -35
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +0 -35
- package/bundled/dev-pipeline-windows/templates/sections/phase-specify-plan-full.md +0 -73
- package/bundled/dev-pipeline-windows/templates/sections/phase0-init.md +0 -13
- package/bundled/dev-pipeline-windows/templates/sections/phase0-test-baseline.md +0 -21
- package/bundled/dev-pipeline-windows/templates/sections/session-context.md +0 -5
- package/bundled/dev-pipeline-windows/templates/sections/subagent-timeout-recovery.md +0 -6
- package/bundled/dev-pipeline-windows/templates/sections/task-contract.md +0 -34
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-agent.md +0 -48
- package/bundled/dev-pipeline-windows/templates/sections/test-failure-recovery-lite.md +0 -48
- package/bundled/dev-pipeline-windows/templates/session-status-schema.json +0 -83
- package/bundled/skills-windows/app-planner/SKILL.md +0 -296
- package/bundled/skills-windows/app-planner/assets/app-design-guide.md +0 -101
- package/bundled/skills-windows/app-planner/references/architecture-decisions.md +0 -52
- package/bundled/skills-windows/app-planner/references/brainstorm-guide.md +0 -101
- package/bundled/skills-windows/app-planner/references/frontend-design-guide.md +0 -71
- package/bundled/skills-windows/app-planner/references/infrastructure-convention-discovery.md +0 -108
- package/bundled/skills-windows/app-planner/references/project-brief-guide.md +0 -82
- package/bundled/skills-windows/app-planner/references/project-conventions-discovery.md +0 -59
- package/bundled/skills-windows/app-planner/references/project-state-detection.md +0 -90
- package/bundled/skills-windows/app-planner/references/red-team-checklist.md +0 -40
- package/bundled/skills-windows/app-planner/references/rules/backend/derivation-rules.md +0 -619
- package/bundled/skills-windows/app-planner/references/rules/backend/fixed-rules.md +0 -285
- package/bundled/skills-windows/app-planner/references/rules/backend/question-bank.md +0 -249
- package/bundled/skills-windows/app-planner/references/rules/backend/question-manifest.json +0 -46
- package/bundled/skills-windows/app-planner/references/rules/backend/template.md +0 -173
- package/bundled/skills-windows/app-planner/references/rules/database/derivation-rules.md +0 -382
- package/bundled/skills-windows/app-planner/references/rules/database/fixed-rules.md +0 -211
- package/bundled/skills-windows/app-planner/references/rules/database/question-bank.md +0 -184
- package/bundled/skills-windows/app-planner/references/rules/database/question-manifest.json +0 -39
- package/bundled/skills-windows/app-planner/references/rules/database/template.md +0 -158
- package/bundled/skills-windows/app-planner/references/rules/frontend/derivation-rules.md +0 -820
- package/bundled/skills-windows/app-planner/references/rules/frontend/fixed-rules.md +0 -188
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-bank.md +0 -319
- package/bundled/skills-windows/app-planner/references/rules/frontend/question-manifest.json +0 -51
- package/bundled/skills-windows/app-planner/references/rules/frontend/template.md +0 -339
- package/bundled/skills-windows/app-planner/references/rules/mobile/derivation-rules.md +0 -649
- package/bundled/skills-windows/app-planner/references/rules/mobile/fixed-rules.md +0 -290
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-bank.md +0 -232
- package/bundled/skills-windows/app-planner/references/rules/mobile/question-manifest.json +0 -47
- package/bundled/skills-windows/app-planner/references/rules/mobile/template.md +0 -175
- package/bundled/skills-windows/app-planner/references/rules-configuration.md +0 -46
- package/bundled/skills-windows/bug-fix-workflow/SKILL.md +0 -379
- package/bundled/skills-windows/bug-fix-workflow/references/bug-diagnosis.md +0 -41
- package/bundled/skills-windows/bug-planner/SKILL.md +0 -402
- package/bundled/skills-windows/bug-planner/assets/bug-confirmation-template.md +0 -43
- package/bundled/skills-windows/bug-planner/references/critic-and-verification.md +0 -44
- package/bundled/skills-windows/bug-planner/references/error-recovery.md +0 -73
- package/bundled/skills-windows/bug-planner/references/input-formats.md +0 -53
- package/bundled/skills-windows/bug-planner/references/schema-validation.md +0 -25
- package/bundled/skills-windows/bug-planner/references/severity-rules.md +0 -16
- package/bundled/skills-windows/bug-planner/scripts/validate-bug-list.py +0 -322
- package/bundled/skills-windows/bugfix-pipeline-launcher/SKILL.md +0 -304
- package/bundled/skills-windows/bugfix-pipeline-launcher/references/configuration.md +0 -84
- package/bundled/skills-windows/feature-pipeline-launcher/SKILL.md +0 -381
- package/bundled/skills-windows/feature-pipeline-launcher/references/configuration.md +0 -67
- package/bundled/skills-windows/feature-pipeline-launcher/scripts/preflight-check.py +0 -462
- package/bundled/skills-windows/feature-planner/SKILL.md +0 -397
- package/bundled/skills-windows/feature-planner/assets/evaluation-guide.md +0 -64
- package/bundled/skills-windows/feature-planner/assets/planning-guide.md +0 -214
- package/bundled/skills-windows/feature-planner/references/browser-interaction.md +0 -59
- package/bundled/skills-windows/feature-planner/references/completeness-review.md +0 -57
- package/bundled/skills-windows/feature-planner/references/decomposition-patterns.md +0 -75
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +0 -90
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +0 -112
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +0 -85
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +0 -1020
- package/bundled/skills-windows/feature-workflow/SKILL.md +0 -374
- package/bundled/skills-windows/feature-workflow/references/brainstorm-guide.md +0 -137
- package/bundled/skills-windows/prizm-kit/SKILL.md +0 -93
- package/bundled/skills-windows/prizmkit-code-review/SKILL.md +0 -161
- package/bundled/skills-windows/prizmkit-code-review/references/dev-agent-prompt.md +0 -30
- package/bundled/skills-windows/prizmkit-code-review/references/review-report-template.md +0 -31
- package/bundled/skills-windows/prizmkit-code-review/references/reviewer-agent-prompt.md +0 -66
- package/bundled/skills-windows/prizmkit-code-review/scripts/check_loop.py +0 -186
- package/bundled/skills-windows/prizmkit-committer/SKILL.md +0 -89
- package/bundled/skills-windows/prizmkit-deploy/SKILL.md +0 -444
- package/bundled/skills-windows/prizmkit-deploy/references/ci-cd-workflows.md +0 -115
- package/bundled/skills-windows/prizmkit-deploy/references/cloud-platform-deploy.md +0 -93
- package/bundled/skills-windows/prizmkit-deploy/references/data-safety-examples.md +0 -120
- package/bundled/skills-windows/prizmkit-deploy/references/database-setup.md +0 -46
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-config-schema.md +0 -148
- package/bundled/skills-windows/prizmkit-deploy/references/deploy-history-schema.md +0 -62
- package/bundled/skills-windows/prizmkit-deploy/references/deployment-modes.md +0 -50
- package/bundled/skills-windows/prizmkit-deploy/references/direct-upload.md +0 -26
- package/bundled/skills-windows/prizmkit-deploy/references/dns-setup.md +0 -42
- package/bundled/skills-windows/prizmkit-deploy/references/docker-deploy.md +0 -31
- package/bundled/skills-windows/prizmkit-deploy/references/firewall-setup.md +0 -37
- package/bundled/skills-windows/prizmkit-deploy/references/live-validation-notes.md +0 -21
- package/bundled/skills-windows/prizmkit-deploy/references/nginx-blue-green.md +0 -59
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-bootstrap-flow.md +0 -49
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-execution-flow.md +0 -41
- package/bundled/skills-windows/prizmkit-deploy/references/ssh-takeover.md +0 -20
- package/bundled/skills-windows/prizmkit-deploy/references/ssl-setup.md +0 -56
- package/bundled/skills-windows/prizmkit-implement/SKILL.md +0 -71
- package/bundled/skills-windows/prizmkit-init/SKILL.md +0 -356
- package/bundled/skills-windows/prizmkit-init/assets/project-brief-template.md +0 -82
- package/bundled/skills-windows/prizmkit-init/references/config-schema.md +0 -70
- package/bundled/skills-windows/prizmkit-init/references/rules/layer-detection.md +0 -41
- package/bundled/skills-windows/prizmkit-init/references/tech-stack-catalog.md +0 -13
- package/bundled/skills-windows/prizmkit-init/references/update-supplement.md +0 -9
- package/bundled/skills-windows/prizmkit-plan/SKILL.md +0 -102
- package/bundled/skills-windows/prizmkit-plan/assets/plan-template.md +0 -115
- package/bundled/skills-windows/prizmkit-plan/assets/spec-template.md +0 -73
- package/bundled/skills-windows/prizmkit-plan/references/clarify-guide.md +0 -67
- package/bundled/skills-windows/prizmkit-plan/references/examples.md +0 -85
- package/bundled/skills-windows/prizmkit-plan/references/verification-checklist.md +0 -60
- package/bundled/skills-windows/prizmkit-prizm-docs/SKILL.md +0 -129
- package/bundled/skills-windows/prizmkit-prizm-docs/assets/prizm-docs-format.md +0 -613
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-init.md +0 -45
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-rebuild.md +0 -15
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-status.md +0 -14
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-update.md +0 -19
- package/bundled/skills-windows/prizmkit-prizm-docs/references/op-validate.md +0 -17
- package/bundled/skills-windows/prizmkit-retrospective/SKILL.md +0 -87
- package/bundled/skills-windows/prizmkit-retrospective/references/knowledge-injection-steps.md +0 -50
- package/bundled/skills-windows/prizmkit-retrospective/references/structural-sync-steps.md +0 -43
- package/bundled/skills-windows/prizmkit-test/SKILL.md +0 -227
- package/bundled/skills-windows/prizmkit-test/references/boundary-coverage-protocol.md +0 -220
- package/bundled/skills-windows/prizmkit-test/references/examples.md +0 -143
- package/bundled/skills-windows/prizmkit-test/references/service-boundary-test-catalog.md +0 -225
- package/bundled/skills-windows/prizmkit-test/references/test-generation-steps.md +0 -109
- package/bundled/skills-windows/prizmkit-test/references/test-report-template.md +0 -111
- package/bundled/skills-windows/prizmkit-test/scripts/validate_boundary_report.py +0 -347
- package/bundled/skills-windows/recovery-workflow/SKILL.md +0 -355
- package/bundled/skills-windows/recovery-workflow/evals/evals.json +0 -46
- package/bundled/skills-windows/recovery-workflow/references/detection.md +0 -58
- package/bundled/skills-windows/recovery-workflow/scripts/detect-recovery-state.py +0 -544
- package/bundled/skills-windows/refactor-pipeline-launcher/SKILL.md +0 -346
- package/bundled/skills-windows/refactor-pipeline-launcher/references/configuration.md +0 -72
- package/bundled/skills-windows/refactor-planner/SKILL.md +0 -398
- package/bundled/skills-windows/refactor-planner/assets/planning-guide.md +0 -292
- package/bundled/skills-windows/refactor-planner/references/behavior-preservation.md +0 -301
- package/bundled/skills-windows/refactor-planner/references/fast-path.md +0 -59
- package/bundled/skills-windows/refactor-planner/references/planning-phases.md +0 -135
- package/bundled/skills-windows/refactor-planner/references/refactor-scoping-guide.md +0 -221
- package/bundled/skills-windows/refactor-planner/scripts/validate-and-generate-refactor.py +0 -858
- package/bundled/skills-windows/refactor-workflow/SKILL.md +0 -343
- package/bundled/skills-windows/refactor-workflow/references/brainstorm-guide.md +0 -116
- package/bundled/templates/hooks/diff-prizm-docs.sh +0 -158
- package/bundled/templates/hooks/prizm-pre-commit.sh +0 -108
- package/bundled/templates/hooks/validate-prizm-docs.sh +0 -139
|
@@ -1,657 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# ============================================================
|
|
5
|
-
# dev-pipeline/launch-feature-daemon.sh - Daemon wrapper for run-feature.sh
|
|
6
|
-
#
|
|
7
|
-
# Manages run-feature.sh as a background daemon process with PID tracking,
|
|
8
|
-
# log consolidation, and lifecycle commands.
|
|
9
|
-
#
|
|
10
|
-
# Usage:
|
|
11
|
-
# ./launch-feature-daemon.sh start [.prizmkit/plans/feature-list.json] [--mode <mode>] [--env "KEY=VAL ..."]
|
|
12
|
-
# ./launch-feature-daemon.sh stop
|
|
13
|
-
# ./launch-feature-daemon.sh status
|
|
14
|
-
# ./launch-feature-daemon.sh logs [--lines N] [--follow]
|
|
15
|
-
# ./launch-feature-daemon.sh restart [.prizmkit/plans/feature-list.json] [--mode <mode>] [--env "KEY=VAL ..."]
|
|
16
|
-
#
|
|
17
|
-
# NOTE:
|
|
18
|
-
# In AI skill sessions, always use this daemon wrapper.
|
|
19
|
-
# Do NOT call `run-feature.sh run ...` directly, because foreground sessions may be killed by CLI timeout.
|
|
20
|
-
#
|
|
21
|
-
# Files managed:
|
|
22
|
-
# .prizmkit/state/features/.pipeline.pid - PID of the background run-feature.sh process
|
|
23
|
-
# .prizmkit/state/features/pipeline-daemon.log - Consolidated stdout+stderr from run-feature.sh
|
|
24
|
-
# ============================================================
|
|
25
|
-
|
|
26
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
27
|
-
|
|
28
|
-
# Source shared common helpers (exports PIPELINE_DIR/PRIZMKIT_DIR/PROJECT_ROOT)
|
|
29
|
-
source "$SCRIPT_DIR/lib/common.sh"
|
|
30
|
-
|
|
31
|
-
STATE_DIR="${PRIZMKIT_DIR}/state/features"
|
|
32
|
-
PID_FILE="$STATE_DIR/.pipeline.pid"
|
|
33
|
-
LOG_FILE="$STATE_DIR/pipeline-daemon.log"
|
|
34
|
-
RUN_SCRIPT="$SCRIPT_DIR/run-feature.sh"
|
|
35
|
-
|
|
36
|
-
# Colors
|
|
37
|
-
RED='\033[0;31m'
|
|
38
|
-
GREEN='\033[0;32m'
|
|
39
|
-
YELLOW='\033[1;33m'
|
|
40
|
-
BLUE='\033[0;34m'
|
|
41
|
-
BOLD='\033[1m'
|
|
42
|
-
NC='\033[0m'
|
|
43
|
-
|
|
44
|
-
log_info() { echo -e "${BLUE}[INFO]${NC} $*" >&2; }
|
|
45
|
-
log_warn() { echo -e "${YELLOW}[WARN]${NC} $*" >&2; }
|
|
46
|
-
log_error() { echo -e "${RED}[ERROR]${NC} $*" >&2; }
|
|
47
|
-
log_success() { echo -e "${GREEN}[OK]${NC} $*" >&2; }
|
|
48
|
-
|
|
49
|
-
# ============================================================
|
|
50
|
-
# Helpers
|
|
51
|
-
# ============================================================
|
|
52
|
-
|
|
53
|
-
# Check if pipeline process is alive
|
|
54
|
-
# Returns 0 if alive, 1 if dead/no PID file
|
|
55
|
-
is_running() {
|
|
56
|
-
if [[ ! -f "$PID_FILE" ]]; then
|
|
57
|
-
return 1
|
|
58
|
-
fi
|
|
59
|
-
local pid
|
|
60
|
-
pid=$(cat "$PID_FILE" 2>/dev/null) || return 1
|
|
61
|
-
if [[ -z "$pid" ]]; then
|
|
62
|
-
return 1
|
|
63
|
-
fi
|
|
64
|
-
if kill -0 "$pid" 2>/dev/null; then
|
|
65
|
-
return 0
|
|
66
|
-
else
|
|
67
|
-
return 1
|
|
68
|
-
fi
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
# Get PID from file (or empty string)
|
|
72
|
-
get_pid() {
|
|
73
|
-
if [[ -f "$PID_FILE" ]]; then
|
|
74
|
-
cat "$PID_FILE" 2>/dev/null || echo ""
|
|
75
|
-
else
|
|
76
|
-
echo ""
|
|
77
|
-
fi
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
# Clean stale PID file
|
|
81
|
-
clean_stale_pid() {
|
|
82
|
-
if [[ -f "$PID_FILE" ]]; then
|
|
83
|
-
local pid
|
|
84
|
-
pid=$(get_pid)
|
|
85
|
-
if [[ -n "$pid" ]] && ! kill -0 "$pid" 2>/dev/null; then
|
|
86
|
-
rm -f "$PID_FILE"
|
|
87
|
-
log_warn "Cleaned stale PID file (process $pid no longer running)"
|
|
88
|
-
fi
|
|
89
|
-
fi
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
# ============================================================
|
|
93
|
-
# start: Launch run-feature.sh in background
|
|
94
|
-
# ============================================================
|
|
95
|
-
|
|
96
|
-
cmd_start() {
|
|
97
|
-
local feature_list=""
|
|
98
|
-
local env_overrides=""
|
|
99
|
-
local mode_override=""
|
|
100
|
-
local features_filter=""
|
|
101
|
-
local critic_enabled=""
|
|
102
|
-
|
|
103
|
-
# Parse arguments
|
|
104
|
-
while [[ $# -gt 0 ]]; do
|
|
105
|
-
case "$1" in
|
|
106
|
-
--env)
|
|
107
|
-
shift
|
|
108
|
-
if [[ $# -eq 0 ]]; then
|
|
109
|
-
log_error "--env requires a value (e.g. --env \"MAX_RETRIES=5\")"
|
|
110
|
-
exit 1
|
|
111
|
-
fi
|
|
112
|
-
env_overrides="$1"
|
|
113
|
-
shift
|
|
114
|
-
;;
|
|
115
|
-
--mode)
|
|
116
|
-
shift
|
|
117
|
-
if [[ $# -eq 0 ]]; then
|
|
118
|
-
log_error "--mode requires a value (lite|standard|full)"
|
|
119
|
-
exit 1
|
|
120
|
-
fi
|
|
121
|
-
case "$1" in
|
|
122
|
-
lite|standard|full)
|
|
123
|
-
mode_override="$1"
|
|
124
|
-
;;
|
|
125
|
-
*)
|
|
126
|
-
log_error "Invalid mode: $1 (must be lite, standard, or full)"
|
|
127
|
-
exit 1
|
|
128
|
-
;;
|
|
129
|
-
esac
|
|
130
|
-
shift
|
|
131
|
-
;;
|
|
132
|
-
--features)
|
|
133
|
-
shift
|
|
134
|
-
if [[ $# -eq 0 ]]; then
|
|
135
|
-
log_error "--features requires a value (e.g. --features F-001,F-003 or --features F-001:F-010)"
|
|
136
|
-
exit 1
|
|
137
|
-
fi
|
|
138
|
-
features_filter="$1"
|
|
139
|
-
shift
|
|
140
|
-
;;
|
|
141
|
-
--critic)
|
|
142
|
-
critic_enabled="true"
|
|
143
|
-
shift
|
|
144
|
-
;;
|
|
145
|
-
--no-critic)
|
|
146
|
-
critic_enabled="false"
|
|
147
|
-
shift
|
|
148
|
-
;;
|
|
149
|
-
*)
|
|
150
|
-
feature_list="$1"
|
|
151
|
-
shift
|
|
152
|
-
;;
|
|
153
|
-
esac
|
|
154
|
-
done
|
|
155
|
-
|
|
156
|
-
# Default feature list
|
|
157
|
-
if [[ -z "$feature_list" ]]; then
|
|
158
|
-
feature_list="$PRIZMKIT_DIR/plans/feature-list.json"
|
|
159
|
-
fi
|
|
160
|
-
|
|
161
|
-
# Resolve to absolute path
|
|
162
|
-
if [[ ! "$feature_list" = /* ]]; then
|
|
163
|
-
feature_list="$(cd "$(dirname "$feature_list")" 2>/dev/null && pwd)/$(basename "$feature_list")"
|
|
164
|
-
fi
|
|
165
|
-
|
|
166
|
-
# Validate feature list
|
|
167
|
-
if [[ ! -f "$feature_list" ]]; then
|
|
168
|
-
log_error "Feature list not found: $feature_list"
|
|
169
|
-
log_error "Run the feature-planner skill first to generate .prizmkit/plans/feature-list.json"
|
|
170
|
-
exit 2
|
|
171
|
-
fi
|
|
172
|
-
|
|
173
|
-
# Validate run-feature.sh exists
|
|
174
|
-
if [[ ! -x "$RUN_SCRIPT" ]]; then
|
|
175
|
-
log_error "run-feature.sh not found or not executable: $RUN_SCRIPT"
|
|
176
|
-
exit 2
|
|
177
|
-
fi
|
|
178
|
-
|
|
179
|
-
# Clean stale PID if needed
|
|
180
|
-
clean_stale_pid
|
|
181
|
-
|
|
182
|
-
# Check if already running
|
|
183
|
-
if is_running; then
|
|
184
|
-
local pid
|
|
185
|
-
pid=$(get_pid)
|
|
186
|
-
log_error "Pipeline is already running (PID: $pid)"
|
|
187
|
-
log_error "Use './launch-feature-daemon.sh stop' first, or './launch-feature-daemon.sh restart'"
|
|
188
|
-
exit 1
|
|
189
|
-
fi
|
|
190
|
-
|
|
191
|
-
# Ensure state directory exists
|
|
192
|
-
mkdir -p "$STATE_DIR"
|
|
193
|
-
|
|
194
|
-
# Build environment prefix
|
|
195
|
-
local env_cmd=""
|
|
196
|
-
local env_parts=""
|
|
197
|
-
if [[ -n "$env_overrides" ]]; then
|
|
198
|
-
env_parts="$env_overrides"
|
|
199
|
-
fi
|
|
200
|
-
if [[ -n "$mode_override" ]]; then
|
|
201
|
-
env_parts="${env_parts:+$env_parts }PIPELINE_MODE=$mode_override"
|
|
202
|
-
fi
|
|
203
|
-
if [[ -n "${critic_enabled:-}" ]]; then
|
|
204
|
-
env_parts="${env_parts:+$env_parts }ENABLE_CRITIC=$critic_enabled"
|
|
205
|
-
fi
|
|
206
|
-
if [[ -n "$env_parts" ]]; then
|
|
207
|
-
env_cmd="env $env_parts"
|
|
208
|
-
fi
|
|
209
|
-
|
|
210
|
-
# Record start time
|
|
211
|
-
local start_time
|
|
212
|
-
start_time=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
|
|
213
|
-
|
|
214
|
-
# Rotate log if over 50 MB
|
|
215
|
-
if [[ -f "$LOG_FILE" ]]; then
|
|
216
|
-
local log_bytes
|
|
217
|
-
log_bytes=$(wc -c < "$LOG_FILE" 2>/dev/null | tr -d ' ')
|
|
218
|
-
if [[ "$log_bytes" -gt 52428800 ]]; then
|
|
219
|
-
mv "$LOG_FILE" "${LOG_FILE}.$(date -u '+%Y%m%dT%H%M%S').bak"
|
|
220
|
-
log_info "Log rotated (was $((log_bytes / 1048576))MB): ${LOG_FILE}.bak"
|
|
221
|
-
fi
|
|
222
|
-
fi
|
|
223
|
-
|
|
224
|
-
# Launch run-feature.sh in background, fully detached
|
|
225
|
-
log_info "Launching pipeline..."
|
|
226
|
-
log_info "Feature list: $feature_list"
|
|
227
|
-
log_info "Log file: $LOG_FILE"
|
|
228
|
-
if [[ -n "$features_filter" ]]; then
|
|
229
|
-
log_info "Features filter: $features_filter"
|
|
230
|
-
fi
|
|
231
|
-
if [[ -n "$mode_override" ]]; then
|
|
232
|
-
log_info "Mode: $mode_override"
|
|
233
|
-
fi
|
|
234
|
-
if [[ -n "$env_overrides" ]]; then
|
|
235
|
-
log_info "Environment overrides: $env_overrides"
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
# Write a separator to the log file
|
|
239
|
-
{
|
|
240
|
-
echo ""
|
|
241
|
-
echo "================================================================"
|
|
242
|
-
echo " Pipeline Daemon Started: $start_time"
|
|
243
|
-
echo " Feature list: $feature_list"
|
|
244
|
-
if [[ -n "$features_filter" ]]; then
|
|
245
|
-
echo " Features filter: $features_filter"
|
|
246
|
-
fi
|
|
247
|
-
if [[ -n "$mode_override" ]]; then
|
|
248
|
-
echo " Mode: $mode_override"
|
|
249
|
-
fi
|
|
250
|
-
if [[ -n "$env_overrides" ]]; then
|
|
251
|
-
echo " Environment: $env_overrides"
|
|
252
|
-
fi
|
|
253
|
-
echo "================================================================"
|
|
254
|
-
echo ""
|
|
255
|
-
} >> "$LOG_FILE"
|
|
256
|
-
|
|
257
|
-
# Unset CLAUDECODE to allow spawning nested Claude Code sessions.
|
|
258
|
-
# When this daemon is launched from within a Claude Code session, the env var
|
|
259
|
-
# is inherited and blocks child claude processes with "nested sessions" error.
|
|
260
|
-
unset CLAUDECODE 2>/dev/null || true
|
|
261
|
-
|
|
262
|
-
# Build features flag
|
|
263
|
-
local features_flag=""
|
|
264
|
-
if [[ -n "$features_filter" ]]; then
|
|
265
|
-
features_flag="--features $features_filter"
|
|
266
|
-
fi
|
|
267
|
-
|
|
268
|
-
# Launch with nohup + disown for full detachment
|
|
269
|
-
if [[ -n "$env_cmd" ]]; then
|
|
270
|
-
nohup $env_cmd "$RUN_SCRIPT" run "$feature_list" $features_flag >> "$LOG_FILE" 2>&1 &
|
|
271
|
-
else
|
|
272
|
-
nohup "$RUN_SCRIPT" run "$feature_list" $features_flag >> "$LOG_FILE" 2>&1 &
|
|
273
|
-
fi
|
|
274
|
-
local pipeline_pid=$!
|
|
275
|
-
disown "$pipeline_pid" 2>/dev/null || true
|
|
276
|
-
|
|
277
|
-
# Write PID file (atomic)
|
|
278
|
-
echo "$pipeline_pid" > "${PID_FILE}.tmp"
|
|
279
|
-
mv "${PID_FILE}.tmp" "$PID_FILE"
|
|
280
|
-
|
|
281
|
-
# Write start metadata (atomic)
|
|
282
|
-
python3 -c "
|
|
283
|
-
import json, sys, os
|
|
284
|
-
pid, started_at, feature_list, env_overrides, log_file, state_dir, mode = int(sys.argv[1]), sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7]
|
|
285
|
-
data = {
|
|
286
|
-
'pid': pid,
|
|
287
|
-
'started_at': started_at,
|
|
288
|
-
'feature_list': feature_list,
|
|
289
|
-
'env_overrides': env_overrides,
|
|
290
|
-
'mode': mode,
|
|
291
|
-
'log_file': log_file
|
|
292
|
-
}
|
|
293
|
-
target = os.path.join(state_dir, '.pipeline-meta.json')
|
|
294
|
-
tmp = target + '.tmp'
|
|
295
|
-
with open(tmp, 'w') as f:
|
|
296
|
-
json.dump(data, f, indent=2)
|
|
297
|
-
os.replace(tmp, target)
|
|
298
|
-
" "$pipeline_pid" "$start_time" "$feature_list" "$env_overrides" "$LOG_FILE" "$STATE_DIR" "$mode_override" 2>/dev/null || true
|
|
299
|
-
|
|
300
|
-
# Wait briefly and verify
|
|
301
|
-
sleep 2
|
|
302
|
-
if is_running; then
|
|
303
|
-
log_success "Pipeline started successfully (PID: $pipeline_pid)"
|
|
304
|
-
log_info "Monitor logs: ./launch-feature-daemon.sh logs --follow"
|
|
305
|
-
log_info "Check status: ./launch-feature-daemon.sh status"
|
|
306
|
-
|
|
307
|
-
# Output JSON on stdout for programmatic consumption
|
|
308
|
-
echo "{\"success\": true, \"pid\": $pipeline_pid, \"log_file\": \"$LOG_FILE\", \"started_at\": \"$start_time\"}"
|
|
309
|
-
else
|
|
310
|
-
log_error "Pipeline process died immediately after launch"
|
|
311
|
-
log_error "Check log for errors: tail -20 $LOG_FILE"
|
|
312
|
-
rm -f "$PID_FILE"
|
|
313
|
-
exit 1
|
|
314
|
-
fi
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
# ============================================================
|
|
318
|
-
# stop: Gracefully stop the pipeline
|
|
319
|
-
# ============================================================
|
|
320
|
-
|
|
321
|
-
cmd_stop() {
|
|
322
|
-
if [[ ! -f "$PID_FILE" ]]; then
|
|
323
|
-
log_info "Pipeline is not running (no PID file)"
|
|
324
|
-
echo '{"success": true, "message": "not running"}'
|
|
325
|
-
return 0
|
|
326
|
-
fi
|
|
327
|
-
|
|
328
|
-
local pid
|
|
329
|
-
pid=$(get_pid)
|
|
330
|
-
|
|
331
|
-
if [[ -z "$pid" ]]; then
|
|
332
|
-
log_info "Pipeline is not running (empty PID file)"
|
|
333
|
-
rm -f "$PID_FILE"
|
|
334
|
-
echo '{"success": true, "message": "not running"}'
|
|
335
|
-
return 0
|
|
336
|
-
fi
|
|
337
|
-
|
|
338
|
-
if ! kill -0 "$pid" 2>/dev/null; then
|
|
339
|
-
log_info "Pipeline is not running (process $pid already exited)"
|
|
340
|
-
rm -f "$PID_FILE"
|
|
341
|
-
echo '{"success": true, "message": "already exited"}'
|
|
342
|
-
return 0
|
|
343
|
-
fi
|
|
344
|
-
|
|
345
|
-
log_info "Stopping pipeline (PID: $pid)..."
|
|
346
|
-
|
|
347
|
-
# Kill the entire process group to include child processes (claude-internal, etc.)
|
|
348
|
-
# First try SIGTERM to the process group (negative PID)
|
|
349
|
-
kill -TERM -- -"$pid" 2>/dev/null || kill -TERM "$pid" 2>/dev/null || true
|
|
350
|
-
|
|
351
|
-
# Wait up to 30 seconds for graceful exit
|
|
352
|
-
local waited=0
|
|
353
|
-
while [[ $waited -lt 30 ]]; do
|
|
354
|
-
if ! kill -0 "$pid" 2>/dev/null; then
|
|
355
|
-
break
|
|
356
|
-
fi
|
|
357
|
-
sleep 1
|
|
358
|
-
waited=$((waited + 1))
|
|
359
|
-
done
|
|
360
|
-
|
|
361
|
-
# Force kill if still alive (process group first, then individual)
|
|
362
|
-
if kill -0 "$pid" 2>/dev/null; then
|
|
363
|
-
log_warn "Process did not exit after 30s, sending SIGKILL..."
|
|
364
|
-
kill -9 -- -"$pid" 2>/dev/null || kill -9 "$pid" 2>/dev/null || true
|
|
365
|
-
sleep 1
|
|
366
|
-
fi
|
|
367
|
-
|
|
368
|
-
rm -f "$PID_FILE"
|
|
369
|
-
|
|
370
|
-
if ! kill -0 "$pid" 2>/dev/null; then
|
|
371
|
-
log_success "Pipeline stopped"
|
|
372
|
-
echo "{\"success\": true, \"pid\": $pid, \"message\": \"stopped\"}"
|
|
373
|
-
else
|
|
374
|
-
log_error "Failed to stop pipeline (PID: $pid)"
|
|
375
|
-
echo "{\"success\": false, \"pid\": $pid, \"message\": \"failed to stop\"}"
|
|
376
|
-
exit 1
|
|
377
|
-
fi
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
# ============================================================
|
|
381
|
-
# status: Check pipeline status
|
|
382
|
-
# ============================================================
|
|
383
|
-
|
|
384
|
-
cmd_status() {
|
|
385
|
-
clean_stale_pid
|
|
386
|
-
|
|
387
|
-
if ! is_running; then
|
|
388
|
-
log_info "Pipeline is not running"
|
|
389
|
-
|
|
390
|
-
# Check if log file exists for last run info
|
|
391
|
-
if [[ -f "$LOG_FILE" ]]; then
|
|
392
|
-
local log_size
|
|
393
|
-
log_size=$(wc -c < "$LOG_FILE" 2>/dev/null | tr -d ' ')
|
|
394
|
-
log_info "Last log: $LOG_FILE ($((log_size / 1024))KB)"
|
|
395
|
-
fi
|
|
396
|
-
|
|
397
|
-
# Show feature-level progress from last run if metadata exists
|
|
398
|
-
if [[ -f "$STATE_DIR/.pipeline-meta.json" ]]; then
|
|
399
|
-
local last_feature_list
|
|
400
|
-
last_feature_list=$(python3 -c "
|
|
401
|
-
import json, sys
|
|
402
|
-
with open(sys.argv[1]) as f:
|
|
403
|
-
print(json.load(f).get('feature_list', ''))
|
|
404
|
-
" "$STATE_DIR/.pipeline-meta.json" 2>/dev/null || echo "")
|
|
405
|
-
|
|
406
|
-
if [[ -n "$last_feature_list" && -f "$last_feature_list" ]]; then
|
|
407
|
-
echo "" >&2
|
|
408
|
-
log_info "Last run feature progress:"
|
|
409
|
-
python3 "$SCRIPT_DIR/scripts/update-feature-status.py" \
|
|
410
|
-
--feature-list "$last_feature_list" \
|
|
411
|
-
--state-dir "$STATE_DIR" \
|
|
412
|
-
--action status >&2 2>/dev/null || true
|
|
413
|
-
echo "" >&2
|
|
414
|
-
fi
|
|
415
|
-
fi
|
|
416
|
-
|
|
417
|
-
echo '{"running": false}'
|
|
418
|
-
return 1
|
|
419
|
-
fi
|
|
420
|
-
|
|
421
|
-
local pid
|
|
422
|
-
pid=$(get_pid)
|
|
423
|
-
|
|
424
|
-
# Gather metadata
|
|
425
|
-
local log_size_kb=0
|
|
426
|
-
if [[ -f "$LOG_FILE" ]]; then
|
|
427
|
-
local log_size
|
|
428
|
-
log_size=$(wc -c < "$LOG_FILE" 2>/dev/null | tr -d ' ')
|
|
429
|
-
log_size_kb=$((log_size / 1024))
|
|
430
|
-
fi
|
|
431
|
-
|
|
432
|
-
local started_at=""
|
|
433
|
-
local feature_list_path=""
|
|
434
|
-
if [[ -f "$STATE_DIR/.pipeline-meta.json" ]]; then
|
|
435
|
-
started_at=$(python3 -c "
|
|
436
|
-
import json, sys
|
|
437
|
-
with open(sys.argv[1]) as f:
|
|
438
|
-
print(json.load(f).get('started_at', ''))
|
|
439
|
-
" "$STATE_DIR/.pipeline-meta.json" 2>/dev/null || echo "")
|
|
440
|
-
feature_list_path=$(python3 -c "
|
|
441
|
-
import json, sys
|
|
442
|
-
with open(sys.argv[1]) as f:
|
|
443
|
-
print(json.load(f).get('feature_list', ''))
|
|
444
|
-
" "$STATE_DIR/.pipeline-meta.json" 2>/dev/null || echo "")
|
|
445
|
-
fi
|
|
446
|
-
|
|
447
|
-
log_success "Pipeline is running (PID: $pid)"
|
|
448
|
-
if [[ -n "$started_at" ]]; then
|
|
449
|
-
log_info "Started at: $started_at"
|
|
450
|
-
fi
|
|
451
|
-
if [[ -n "$feature_list_path" ]]; then
|
|
452
|
-
log_info "Feature list: $feature_list_path"
|
|
453
|
-
fi
|
|
454
|
-
log_info "Log file: $LOG_FILE (${log_size_kb}KB)"
|
|
455
|
-
|
|
456
|
-
# Show feature-level progress if feature list is available
|
|
457
|
-
if [[ -n "$feature_list_path" && -f "$feature_list_path" ]]; then
|
|
458
|
-
echo "" >&2
|
|
459
|
-
python3 "$SCRIPT_DIR/scripts/update-feature-status.py" \
|
|
460
|
-
--feature-list "$feature_list_path" \
|
|
461
|
-
--state-dir "$STATE_DIR" \
|
|
462
|
-
--action status >&2 2>/dev/null || true
|
|
463
|
-
echo "" >&2
|
|
464
|
-
fi
|
|
465
|
-
|
|
466
|
-
# Show last few log lines
|
|
467
|
-
if [[ -f "$LOG_FILE" ]]; then
|
|
468
|
-
log_info "--- Last 5 log lines ---"
|
|
469
|
-
tail -5 "$LOG_FILE" >&2 || true
|
|
470
|
-
echo "" >&2
|
|
471
|
-
fi
|
|
472
|
-
|
|
473
|
-
# JSON output on stdout (enhanced with progress info)
|
|
474
|
-
local progress_json=""
|
|
475
|
-
if [[ -n "$feature_list_path" && -f "$feature_list_path" ]]; then
|
|
476
|
-
progress_json=$(python3 -c "
|
|
477
|
-
import json, sys, os
|
|
478
|
-
|
|
479
|
-
def load_json(p):
|
|
480
|
-
with open(p, 'r') as f:
|
|
481
|
-
return json.load(f)
|
|
482
|
-
|
|
483
|
-
feature_list_path, state_dir = sys.argv[1], sys.argv[2]
|
|
484
|
-
fl = load_json(feature_list_path)
|
|
485
|
-
features = fl.get('features', [])
|
|
486
|
-
total = len(features)
|
|
487
|
-
counts = {'completed': 0, 'in_progress': 0, 'failed': 0, 'pending': 0, 'skipped': 0, 'auto_skipped': 0}
|
|
488
|
-
for feat in features:
|
|
489
|
-
fid = feat.get('id', '')
|
|
490
|
-
sp = os.path.join(state_dir, fid, 'status.json')
|
|
491
|
-
if os.path.isfile(sp):
|
|
492
|
-
fs = load_json(sp)
|
|
493
|
-
st = fs.get('status', 'pending')
|
|
494
|
-
else:
|
|
495
|
-
st = 'pending'
|
|
496
|
-
if st in counts:
|
|
497
|
-
counts[st] += 1
|
|
498
|
-
else:
|
|
499
|
-
counts['pending'] += 1
|
|
500
|
-
|
|
501
|
-
pct = round(counts['completed'] / total * 100, 1) if total > 0 else 0
|
|
502
|
-
print(json.dumps({
|
|
503
|
-
'total': total,
|
|
504
|
-
'completed': counts['completed'],
|
|
505
|
-
'in_progress': counts['in_progress'],
|
|
506
|
-
'failed': counts['failed'],
|
|
507
|
-
'pending': counts['pending'],
|
|
508
|
-
'skipped': counts['skipped'],
|
|
509
|
-
'auto_skipped': counts['auto_skipped'],
|
|
510
|
-
'percent': pct
|
|
511
|
-
}))
|
|
512
|
-
" "$feature_list_path" "$STATE_DIR" 2>/dev/null || echo "")
|
|
513
|
-
fi
|
|
514
|
-
|
|
515
|
-
if [[ -n "$progress_json" ]]; then
|
|
516
|
-
# Merge progress into the main JSON output
|
|
517
|
-
cat <<EOF
|
|
518
|
-
{"running": true, "pid": $pid, "log_file": "$LOG_FILE", "log_size_kb": $log_size_kb, "started_at": "$started_at", "feature_list": "$feature_list_path", "progress": $progress_json}
|
|
519
|
-
EOF
|
|
520
|
-
else
|
|
521
|
-
cat <<EOF
|
|
522
|
-
{"running": true, "pid": $pid, "log_file": "$LOG_FILE", "log_size_kb": $log_size_kb, "started_at": "$started_at", "feature_list": "$feature_list_path"}
|
|
523
|
-
EOF
|
|
524
|
-
fi
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
# ============================================================
|
|
528
|
-
# logs: View or follow pipeline logs
|
|
529
|
-
# ============================================================
|
|
530
|
-
|
|
531
|
-
cmd_logs() {
|
|
532
|
-
local lines=50
|
|
533
|
-
local follow=false
|
|
534
|
-
|
|
535
|
-
while [[ $# -gt 0 ]]; do
|
|
536
|
-
case "$1" in
|
|
537
|
-
--lines|-n)
|
|
538
|
-
shift
|
|
539
|
-
if [[ $# -eq 0 ]]; then
|
|
540
|
-
log_error "--lines requires a number"
|
|
541
|
-
exit 1
|
|
542
|
-
fi
|
|
543
|
-
lines="$1"
|
|
544
|
-
shift
|
|
545
|
-
;;
|
|
546
|
-
--follow|-f)
|
|
547
|
-
follow=true
|
|
548
|
-
shift
|
|
549
|
-
;;
|
|
550
|
-
*)
|
|
551
|
-
log_error "Unknown option: $1"
|
|
552
|
-
exit 1
|
|
553
|
-
;;
|
|
554
|
-
esac
|
|
555
|
-
done
|
|
556
|
-
|
|
557
|
-
if [[ ! -f "$LOG_FILE" ]]; then
|
|
558
|
-
log_info "No log file found at $LOG_FILE"
|
|
559
|
-
log_info "Pipeline has not been started yet"
|
|
560
|
-
exit 0
|
|
561
|
-
fi
|
|
562
|
-
|
|
563
|
-
if [[ "$follow" == true ]]; then
|
|
564
|
-
log_info "Following $LOG_FILE (Ctrl+C to stop)..."
|
|
565
|
-
echo "" >&2
|
|
566
|
-
tail -f "$LOG_FILE"
|
|
567
|
-
else
|
|
568
|
-
tail -"$lines" "$LOG_FILE"
|
|
569
|
-
fi
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
# ============================================================
|
|
573
|
-
# restart: Stop + Start
|
|
574
|
-
# ============================================================
|
|
575
|
-
|
|
576
|
-
cmd_restart() {
|
|
577
|
-
cmd_stop 2>/dev/null || true
|
|
578
|
-
sleep 1
|
|
579
|
-
cmd_start "$@"
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
# ============================================================
|
|
583
|
-
# Entry point
|
|
584
|
-
# ============================================================
|
|
585
|
-
|
|
586
|
-
show_help() {
|
|
587
|
-
cat <<'HELP'
|
|
588
|
-
Usage: launch-feature-daemon.sh <command> [options]
|
|
589
|
-
|
|
590
|
-
Commands:
|
|
591
|
-
start [.prizmkit/plans/feature-list.json] [--mode <mode>] [--features <filter>] [--env "K=V ..."] Start pipeline in background
|
|
592
|
-
stop Gracefully stop pipeline
|
|
593
|
-
status Check if pipeline is running
|
|
594
|
-
logs [--lines N] [--follow] View pipeline logs
|
|
595
|
-
restart [.prizmkit/plans/feature-list.json] [--mode <mode>] [--features <filter>] [--env "K=V ..."] Stop + start pipeline
|
|
596
|
-
help Show this help
|
|
597
|
-
|
|
598
|
-
Options:
|
|
599
|
-
--mode <lite|standard|full> Override pipeline mode for all features
|
|
600
|
-
--critic Enable adversarial critic review for all features
|
|
601
|
-
--no-critic Disable critic review (overrides feature-list setting)
|
|
602
|
-
--features <filter> Run only specified features (e.g. F-001,F-003 or F-001:F-010)
|
|
603
|
-
--env "KEY=VAL ..." Set environment variables
|
|
604
|
-
|
|
605
|
-
Examples:
|
|
606
|
-
./launch-feature-daemon.sh start # Start with default .prizmkit/plans/feature-list.json
|
|
607
|
-
./launch-feature-daemon.sh start my-features.json # Start with custom feature list
|
|
608
|
-
./launch-feature-daemon.sh start --features F-001:F-005 # Run only features F-001 through F-005
|
|
609
|
-
./launch-feature-daemon.sh start --features F-001,F-003,F-007 # Run specific features
|
|
610
|
-
./launch-feature-daemon.sh start --mode full # Full mode for complex features
|
|
611
|
-
./launch-feature-daemon.sh start --critic # Enable adversarial critic review
|
|
612
|
-
./launch-feature-daemon.sh start --env "MAX_RETRIES=5"
|
|
613
|
-
./launch-feature-daemon.sh start .prizmkit/plans/feature-list.json --mode full --critic --env "VERBOSE=1"
|
|
614
|
-
./launch-feature-daemon.sh status # Check if running (JSON on stdout)
|
|
615
|
-
./launch-feature-daemon.sh logs --follow # Live log tailing
|
|
616
|
-
./launch-feature-daemon.sh logs --lines 100 # Last 100 lines
|
|
617
|
-
./launch-feature-daemon.sh stop # Graceful shutdown
|
|
618
|
-
./launch-feature-daemon.sh restart # Stop + start
|
|
619
|
-
|
|
620
|
-
Environment Variables (pass via --env):
|
|
621
|
-
MAX_RETRIES Max retries per feature (default: 3)
|
|
622
|
-
VERBOSE Set to 1 for verbose AI CLI output
|
|
623
|
-
HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)
|
|
624
|
-
DEV_BRANCH Custom dev branch name (default: auto-generated)
|
|
625
|
-
AUTO_PUSH Auto-push to remote after successful feature (default: 0, set 1 to enable)
|
|
626
|
-
HELP
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
case "${1:-help}" in
|
|
630
|
-
start)
|
|
631
|
-
shift
|
|
632
|
-
cmd_start "$@"
|
|
633
|
-
;;
|
|
634
|
-
stop)
|
|
635
|
-
cmd_stop
|
|
636
|
-
;;
|
|
637
|
-
status)
|
|
638
|
-
cmd_status
|
|
639
|
-
;;
|
|
640
|
-
logs|log)
|
|
641
|
-
shift
|
|
642
|
-
cmd_logs "$@"
|
|
643
|
-
;;
|
|
644
|
-
restart)
|
|
645
|
-
shift
|
|
646
|
-
cmd_restart "$@"
|
|
647
|
-
;;
|
|
648
|
-
help|--help|-h)
|
|
649
|
-
show_help
|
|
650
|
-
;;
|
|
651
|
-
*)
|
|
652
|
-
log_error "Unknown command: $1"
|
|
653
|
-
echo "" >&2
|
|
654
|
-
show_help
|
|
655
|
-
exit 1
|
|
656
|
-
;;
|
|
657
|
-
esac
|