prizmkit 1.1.100 → 1.1.102
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 +355 -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 +153 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +425 -0
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +560 -0
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +71 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +51 -36
- 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 +8 -2
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +6 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +14 -6
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +14 -4
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +14 -4
- 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/phase-implement-lite.md +8 -17
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +1 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
- package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +3 -8
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +6 -2
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +5 -1
- package/bundled/dev-pipeline/tests/test_auto_skip.py +436 -14
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +115 -7
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +40 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1226 -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 +42 -19
- package/src/external-skills.js +14 -14
- package/src/index.js +3 -6
- package/src/manifest.js +11 -5
- package/src/metadata.js +7 -18
- package/src/platforms.js +25 -0
- package/src/prompts.js +0 -12
- package/src/runtimes.js +18 -11
- package/src/scaffold.js +144 -122
- package/src/upgrade.js +12 -3
- 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,137 +0,0 @@
|
|
|
1
|
-
# prizm-dev-team Integration Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
dev-pipeline drives the prizm-dev-team multi-agent team through an outer shell loop. Each iteration spawns a new AI CLI session with a bootstrap prompt that instructs the agent to create and orchestrate the team for one feature.
|
|
6
|
-
|
|
7
|
-
## Architecture
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
dev-pipeline (outer loop)
|
|
11
|
-
│
|
|
12
|
-
├── run-feature.ps1 PowerShell runner — picks next feature, spawns CLI
|
|
13
|
-
├── scripts/ Python state management scripts
|
|
14
|
-
├── templates/bootstrap-prompt.md Session prompt template
|
|
15
|
-
│
|
|
16
|
-
└── [per session] AI CLI
|
|
17
|
-
│
|
|
18
|
-
├── Phase 0: Init (Orchestrator)
|
|
19
|
-
├── Phase 1-2: Context snapshot + Specify + Plan (Orchestrator)
|
|
20
|
-
├── Phase 3: Analyze (Reviewer agent) [tier2] / Phase 4: Analyze [tier3]
|
|
21
|
-
├── Phase 3.5: Plan Challenge (Critic agent(s), 1 or 3 parallel) [tier2+]
|
|
22
|
-
├── Phase 4: Implement (Dev agent) [tier2] / Phase 5: Implement [tier3]
|
|
23
|
-
├── Phase 5: Review (Reviewer agent)
|
|
24
|
-
└── Phase 6: Retrospective & Commit (Orchestrator)
|
|
25
|
-
│
|
|
26
|
-
└── Write session-status.json → exit
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Agent Definitions (Source of Truth)
|
|
30
|
-
|
|
31
|
-
| Agent | Definition Path | Type |
|
|
32
|
-
|-------|----------------|------|
|
|
33
|
-
| Dev | `.claude/agents/prizm-dev-team-dev.md` (or `.codebuddy/agents/`) | prizm-dev-team-dev |
|
|
34
|
-
| Reviewer | `.claude/agents/prizm-dev-team-reviewer.md` (or `.codebuddy/agents/`) | prizm-dev-team-reviewer |
|
|
35
|
-
| Critic | `.claude/agents/prizm-dev-team-critic.md` (or `.codebuddy/agents/`) | prizm-dev-team-critic |
|
|
36
|
-
|
|
37
|
-
Note: The Orchestrator role is handled by the main agent (session orchestrator) directly — no separate agent definition needed.
|
|
38
|
-
|
|
39
|
-
## Pipeline Scripts
|
|
40
|
-
|
|
41
|
-
Located at `.prizmkit/dev-pipeline/scripts/`:
|
|
42
|
-
|
|
43
|
-
| Script | Purpose |
|
|
44
|
-
|--------|---------|
|
|
45
|
-
| `init-dev-team.py` | Initialize `.dev-team/` + `.prizmkit/` directories |
|
|
46
|
-
| `init-pipeline.py` | Initialize pipeline state directories and config |
|
|
47
|
-
| `init-bugfix-pipeline.py` | Initialize bugfix pipeline state |
|
|
48
|
-
| `generate-bootstrap-prompt.py` | Render tier-specific bootstrap prompt with feature context |
|
|
49
|
-
| `generate-bugfix-prompt.py` | Render bugfix bootstrap prompt with bug context |
|
|
50
|
-
| `update-feature-status.py` | Update feature status in feature-list.json after session |
|
|
51
|
-
| `update-bug-status.py` | Update bug status in bug-fix-list.json after session |
|
|
52
|
-
| `check-session-status.py` | Read and validate session-status.json output |
|
|
53
|
-
| `detect-stuck.py` | Detect stuck/hung pipeline sessions via heartbeat |
|
|
54
|
-
| `parse-stream-progress.py` | Parse AI CLI output stream for progress tracking |
|
|
55
|
-
| `utils.py` | Shared utility functions for pipeline scripts |
|
|
56
|
-
|
|
57
|
-
## Artifact Mapping
|
|
58
|
-
|
|
59
|
-
### PrizmKit Artifacts (.prizmkit/)
|
|
60
|
-
|
|
61
|
-
| Phase | File | Content |
|
|
62
|
-
|-------|------|---------|
|
|
63
|
-
| 1 | `specs/spec.md` | Feature specification (WHAT/WHY) |
|
|
64
|
-
| 2 | `plans/plan.md` | Technical plan (architecture, API, tests) |
|
|
65
|
-
| 3 | `tasks/tasks.md` | Executable task list with `[ ]` / `[x]` (legacy — now part of plan.md Tasks section) |
|
|
66
|
-
| 4 | `analysis/analyze-report.md` | Consistency analysis |
|
|
67
|
-
|
|
68
|
-
### Dev-Team Artifacts (.dev-team/)
|
|
69
|
-
|
|
70
|
-
| Phase | File | Content |
|
|
71
|
-
|-------|------|---------|
|
|
72
|
-
| 1 | `specs/requirements.md` | Requirements with REQ-NNN IDs |
|
|
73
|
-
| 2 | `contracts/*.contract.json` | Interface contracts |
|
|
74
|
-
| 2 | `contracts/data-models.json` | Data entity definitions |
|
|
75
|
-
| 3 | `tasks/task-manifest.json` | Structured tasks with T-NNN IDs |
|
|
76
|
-
| 3 | `tasks/dependency-graph.json` | Task DAG |
|
|
77
|
-
| 6 | `reports/dev/self-test-*.md` | Dev self-test reports |
|
|
78
|
-
| 7 | `reports/qa/integration-test.md` | QA integration test report |
|
|
79
|
-
| 7 | `reports/review/code-review.md` | Review report |
|
|
80
|
-
|
|
81
|
-
## Session Lifecycle
|
|
82
|
-
|
|
83
|
-
### 1. Session Start
|
|
84
|
-
|
|
85
|
-
The bootstrap prompt instructs the agent to:
|
|
86
|
-
- Execute phases directly as the session orchestrator
|
|
87
|
-
- Spawn Dev and Reviewer agents as subagents for implementation and review phases
|
|
88
|
-
- The orchestrator handles context building, planning, retrospective, and commit phases directly
|
|
89
|
-
|
|
90
|
-
### 2. Pipeline Execution
|
|
91
|
-
|
|
92
|
-
The Orchestrator drives the pipeline phases with checkpoints (CP-0 through CP-3). Each checkpoint validates artifacts.
|
|
93
|
-
|
|
94
|
-
### 3. Session End
|
|
95
|
-
|
|
96
|
-
The agent MUST write `session-status.json` before exiting:
|
|
97
|
-
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"session_id": "F-001-20260304100000",
|
|
101
|
-
"feature_id": "F-001",
|
|
102
|
-
"status": "success",
|
|
103
|
-
"completed_phases": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
|
104
|
-
"current_phase": 9,
|
|
105
|
-
"checkpoint_reached": "CP-7",
|
|
106
|
-
"tasks_completed": 12,
|
|
107
|
-
"tasks_total": 12,
|
|
108
|
-
"errors": [],
|
|
109
|
-
"can_resume": false,
|
|
110
|
-
"resume_from_phase": null,
|
|
111
|
-
"artifacts": {
|
|
112
|
-
"spec_path": ".prizmkit/specs/spec.md",
|
|
113
|
-
"plan_path": ".prizmkit/plans/plan.md"
|
|
114
|
-
},
|
|
115
|
-
"timestamp": "2026-03-04T11:30:00Z"
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Failure Recovery
|
|
120
|
-
|
|
121
|
-
| Session Outcome | Pipeline Action |
|
|
122
|
-
|-----------------|-----------------|
|
|
123
|
-
| `status: "success"` | Mark feature completed, pick next |
|
|
124
|
-
| `status: "partial"`, `can_resume: true` | Resume from `resume_from_phase` |
|
|
125
|
-
| `status: "partial"`, `can_resume: false` | Retry from scratch |
|
|
126
|
-
| `status: "failed"` | Retry (up to MAX_RETRIES) |
|
|
127
|
-
| No status file (crash) | Treat as failed, retry |
|
|
128
|
-
|
|
129
|
-
## Team Naming Convention
|
|
130
|
-
|
|
131
|
-
Each feature gets its own team instance: `prizm-dev-team-{FEATURE_ID}`
|
|
132
|
-
|
|
133
|
-
Examples:
|
|
134
|
-
- `prizm-dev-team-F-001` — User Authentication
|
|
135
|
-
- `prizm-dev-team-F-002` — Dashboard
|
|
136
|
-
|
|
137
|
-
This ensures clean isolation between features and allows multiple features to have separate artifact histories.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
. "$PSScriptRoot\lib\daemon.ps1"
|
|
3
|
-
try {
|
|
4
|
-
Invoke-PrizmDaemon -Kind bugfix -ScriptRoot $PSScriptRoot -RunScript (Join-Path $PSScriptRoot 'run-bugfix.ps1') -Args $args
|
|
5
|
-
exit $global:PRIZM_DAEMON_EXIT_CODE
|
|
6
|
-
} catch {
|
|
7
|
-
Write-PrizmError $_.Exception.Message
|
|
8
|
-
exit 1
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
. "$PSScriptRoot\lib\daemon.ps1"
|
|
3
|
-
try {
|
|
4
|
-
Invoke-PrizmDaemon -Kind feature -ScriptRoot $PSScriptRoot -RunScript (Join-Path $PSScriptRoot 'run-feature.ps1') -Args $args
|
|
5
|
-
exit $global:PRIZM_DAEMON_EXIT_CODE
|
|
6
|
-
} catch {
|
|
7
|
-
Write-PrizmError $_.Exception.Message
|
|
8
|
-
exit 1
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
. "$PSScriptRoot\lib\daemon.ps1"
|
|
3
|
-
try {
|
|
4
|
-
Invoke-PrizmDaemon -Kind refactor -ScriptRoot $PSScriptRoot -RunScript (Join-Path $PSScriptRoot 'run-refactor.ps1') -Args $args
|
|
5
|
-
exit $global:PRIZM_DAEMON_EXIT_CODE
|
|
6
|
-
} catch {
|
|
7
|
-
Write-PrizmError $_.Exception.Message
|
|
8
|
-
exit 1
|
|
9
|
-
}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
Set-StrictMode -Version 2.0
|
|
2
|
-
$ErrorActionPreference = 'Stop'
|
|
3
|
-
|
|
4
|
-
function Get-PrizmGitStatusSafe {
|
|
5
|
-
param([string]$ProjectRoot)
|
|
6
|
-
$hiddenToolWorktreeExcludes = Get-PrizmHiddenToolWorktreeExcludes
|
|
7
|
-
$lines = & git -C $ProjectRoot status --porcelain -- . @hiddenToolWorktreeExcludes 2>$null
|
|
8
|
-
return @($lines)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function Add-PrizmGitAllSafe {
|
|
12
|
-
param([string]$ProjectRoot)
|
|
13
|
-
$hiddenToolWorktreeExcludes = Get-PrizmHiddenToolWorktreeExcludes
|
|
14
|
-
& git -C $ProjectRoot add -A -- . @hiddenToolWorktreeExcludes *> $null
|
|
15
|
-
return $LASTEXITCODE -eq 0
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function Get-PrizmCurrentBranch {
|
|
19
|
-
param([string]$ProjectRoot)
|
|
20
|
-
$branch = & git -C $ProjectRoot rev-parse --abbrev-ref HEAD 2>$null
|
|
21
|
-
if ($LASTEXITCODE -eq 0 -and $branch) { return [string]($branch | Select-Object -First 1) }
|
|
22
|
-
return ''
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function Test-PrizmTrackedDirty {
|
|
26
|
-
param([string]$ProjectRoot)
|
|
27
|
-
$trackedDirty = & git -C $ProjectRoot diff --name-only 2>$null
|
|
28
|
-
$stagedDirty = & git -C $ProjectRoot diff --cached --name-only 2>$null
|
|
29
|
-
return -not [string]::IsNullOrWhiteSpace((@($trackedDirty) + @($stagedDirty) -join "`n"))
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function New-PrizmDevBranch {
|
|
33
|
-
param(
|
|
34
|
-
[string]$ProjectRoot,
|
|
35
|
-
[string]$DevBranch,
|
|
36
|
-
[string]$SourceBranch
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
if (-not $DevBranch -or -not $SourceBranch) { return $false }
|
|
40
|
-
|
|
41
|
-
& git -C $ProjectRoot rev-parse --verify $DevBranch *> $null
|
|
42
|
-
if ($LASTEXITCODE -eq 0) {
|
|
43
|
-
Write-PrizmInfo "Branch already exists: $DevBranch - checking out"
|
|
44
|
-
& git -C $ProjectRoot checkout $DevBranch *> $null
|
|
45
|
-
if ($LASTEXITCODE -ne 0) {
|
|
46
|
-
Write-PrizmError "Failed to checkout existing branch: $DevBranch"
|
|
47
|
-
return $false
|
|
48
|
-
}
|
|
49
|
-
return $true
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
& git -C $ProjectRoot checkout -b $DevBranch $SourceBranch *> $null
|
|
53
|
-
if ($LASTEXITCODE -ne 0) {
|
|
54
|
-
Write-PrizmWarn "Failed to create branch: $DevBranch from $SourceBranch"
|
|
55
|
-
return $false
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
Write-PrizmInfo "Created and checked out branch: $DevBranch (from $SourceBranch)"
|
|
59
|
-
return $true
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function Switch-PrizmOriginalBranch {
|
|
63
|
-
param(
|
|
64
|
-
[string]$ProjectRoot,
|
|
65
|
-
[string]$OriginalBranch
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
if (-not $OriginalBranch) { return $false }
|
|
69
|
-
$currentBranch = Get-PrizmCurrentBranch $ProjectRoot
|
|
70
|
-
if ($currentBranch -eq $OriginalBranch) { return $true }
|
|
71
|
-
|
|
72
|
-
& git -C $ProjectRoot checkout $OriginalBranch *> $null
|
|
73
|
-
if ($LASTEXITCODE -ne 0) {
|
|
74
|
-
Write-PrizmError "Failed to checkout original branch: $OriginalBranch"
|
|
75
|
-
return $false
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
Write-PrizmInfo "Returned to branch: $OriginalBranch"
|
|
79
|
-
return $true
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function Save-PrizmBranchWip {
|
|
83
|
-
param(
|
|
84
|
-
[string]$ProjectRoot,
|
|
85
|
-
[string]$DevBranch
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
if (-not $DevBranch) { return $true }
|
|
89
|
-
|
|
90
|
-
$currentBranch = Get-PrizmCurrentBranch $ProjectRoot
|
|
91
|
-
if ($currentBranch -ne $DevBranch) { return $true }
|
|
92
|
-
|
|
93
|
-
$changes = Get-PrizmGitStatusSafe $ProjectRoot
|
|
94
|
-
if ([string]::IsNullOrWhiteSpace(($changes -join "`n"))) { return $true }
|
|
95
|
-
|
|
96
|
-
Write-PrizmWarn "Saving uncommitted work-in-progress on branch: $DevBranch"
|
|
97
|
-
if (-not (Add-PrizmGitAllSafe $ProjectRoot)) {
|
|
98
|
-
Write-PrizmWarn "git add failed - uncommitted work may remain on $DevBranch"
|
|
99
|
-
return $true
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
& git -C $ProjectRoot commit --no-verify `
|
|
103
|
-
-m "wip($DevBranch): interrupted - uncommitted work saved" `
|
|
104
|
-
-m "Pipeline was interrupted or failed. This commit preserves work-in-progress." `
|
|
105
|
-
-m "To resume: git checkout $DevBranch" *> $null
|
|
106
|
-
|
|
107
|
-
if ($LASTEXITCODE -eq 0) {
|
|
108
|
-
Write-PrizmInfo "Saved uncommitted work on branch $DevBranch"
|
|
109
|
-
} else {
|
|
110
|
-
Write-PrizmWarn "git commit failed - uncommitted work may remain on $DevBranch"
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return $true
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function Merge-PrizmDevBranch {
|
|
117
|
-
param(
|
|
118
|
-
[string]$ProjectRoot,
|
|
119
|
-
[string]$DevBranch,
|
|
120
|
-
[string]$OriginalBranch,
|
|
121
|
-
[bool]$AutoPush = $false
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
if (-not $DevBranch -or -not $OriginalBranch) { return $false }
|
|
125
|
-
|
|
126
|
-
$hadStash = $false
|
|
127
|
-
if (Test-PrizmTrackedDirty $ProjectRoot) {
|
|
128
|
-
& git -C $ProjectRoot stash push -m 'pipeline-merge-stash' *> $null
|
|
129
|
-
if ($LASTEXITCODE -eq 0) {
|
|
130
|
-
$hadStash = $true
|
|
131
|
-
} else {
|
|
132
|
-
Write-PrizmWarn "git stash failed - tracked changes may block branch merge"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
Write-PrizmInfo "Merging $DevBranch into $OriginalBranch..."
|
|
137
|
-
& git -C $ProjectRoot rebase $OriginalBranch $DevBranch
|
|
138
|
-
if ($LASTEXITCODE -ne 0) {
|
|
139
|
-
Write-PrizmError "Rebase of $DevBranch onto $OriginalBranch failed - resolve manually"
|
|
140
|
-
& git -C $ProjectRoot rebase --abort *> $null
|
|
141
|
-
if ($hadStash) {
|
|
142
|
-
& git -C $ProjectRoot stash pop *> $null
|
|
143
|
-
if ($LASTEXITCODE -ne 0) { Write-PrizmWarn "git stash pop failed after rebase abort" }
|
|
144
|
-
}
|
|
145
|
-
return $false
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
& git -C $ProjectRoot checkout $OriginalBranch *> $null
|
|
149
|
-
if ($LASTEXITCODE -ne 0) {
|
|
150
|
-
Write-PrizmError "Failed to checkout $OriginalBranch for merge"
|
|
151
|
-
if ($hadStash) {
|
|
152
|
-
& git -C $ProjectRoot stash pop *> $null
|
|
153
|
-
if ($LASTEXITCODE -ne 0) { Write-PrizmWarn "git stash pop failed after checkout failure" }
|
|
154
|
-
}
|
|
155
|
-
return $false
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
& git -C $ProjectRoot merge --ff-only $DevBranch
|
|
159
|
-
if ($LASTEXITCODE -ne 0) {
|
|
160
|
-
Write-PrizmError "Merge failed after rebase - resolve manually"
|
|
161
|
-
if ($hadStash) {
|
|
162
|
-
& git -C $ProjectRoot stash pop *> $null
|
|
163
|
-
if ($LASTEXITCODE -ne 0) { Write-PrizmWarn "git stash pop failed after merge failure" }
|
|
164
|
-
}
|
|
165
|
-
return $false
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
Write-PrizmSuccess "Merged $DevBranch into $OriginalBranch"
|
|
169
|
-
|
|
170
|
-
if ($AutoPush) {
|
|
171
|
-
Write-PrizmInfo "Pushing $OriginalBranch to remote..."
|
|
172
|
-
& git -C $ProjectRoot push *> $null
|
|
173
|
-
if ($LASTEXITCODE -eq 0) {
|
|
174
|
-
Write-PrizmSuccess "Pushed $OriginalBranch to remote"
|
|
175
|
-
} else {
|
|
176
|
-
Write-PrizmWarn "Push failed - run git push manually"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
& git -C $ProjectRoot branch -d $DevBranch *> $null
|
|
181
|
-
if ($LASTEXITCODE -eq 0) { Write-PrizmInfo "Deleted merged branch: $DevBranch" }
|
|
182
|
-
|
|
183
|
-
if ($hadStash) {
|
|
184
|
-
& git -C $ProjectRoot stash pop *> $null
|
|
185
|
-
if ($LASTEXITCODE -ne 0) { Write-PrizmWarn "git stash pop failed after merge" }
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return $true
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function Restore-PrizmOriginalBranch {
|
|
192
|
-
param(
|
|
193
|
-
[string]$ProjectRoot,
|
|
194
|
-
[string]$OriginalBranch,
|
|
195
|
-
[string]$DevBranch = ''
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
if (-not $OriginalBranch) { return $true }
|
|
199
|
-
|
|
200
|
-
& git -C $ProjectRoot rebase --show-current-patch *> $null
|
|
201
|
-
if ($LASTEXITCODE -eq 0) {
|
|
202
|
-
Write-PrizmWarn "Aborting in-progress rebase..."
|
|
203
|
-
& git -C $ProjectRoot rebase --abort *> $null
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
$currentBranch = Get-PrizmCurrentBranch $ProjectRoot
|
|
207
|
-
if ($currentBranch -eq $OriginalBranch) { return $true }
|
|
208
|
-
|
|
209
|
-
$wipBranch = if ($DevBranch) { $DevBranch } else { $currentBranch }
|
|
210
|
-
if ($wipBranch -and $wipBranch -ne $OriginalBranch) {
|
|
211
|
-
Save-PrizmBranchWip $ProjectRoot $wipBranch | Out-Null
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
Write-PrizmInfo "Ensuring return to original branch: $OriginalBranch (currently on: $currentBranch)"
|
|
215
|
-
|
|
216
|
-
$hadStash = $false
|
|
217
|
-
if (Test-PrizmTrackedDirty $ProjectRoot) {
|
|
218
|
-
& git -C $ProjectRoot stash push -m 'pipeline-ensure-return-stash' *> $null
|
|
219
|
-
if ($LASTEXITCODE -eq 0) { $hadStash = $true }
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
& git -C $ProjectRoot checkout $OriginalBranch *> $null
|
|
223
|
-
if ($LASTEXITCODE -eq 0) {
|
|
224
|
-
Write-PrizmInfo "Returned to branch: $OriginalBranch"
|
|
225
|
-
} else {
|
|
226
|
-
Write-PrizmError "Failed to checkout $OriginalBranch - manual recovery needed"
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if ($hadStash) {
|
|
230
|
-
& git -C $ProjectRoot stash pop *> $null
|
|
231
|
-
if ($LASTEXITCODE -ne 0) { Write-PrizmWarn "git stash pop failed during branch return" }
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return $true
|
|
235
|
-
}
|