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
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import shutil
|
|
5
6
|
import subprocess
|
|
7
|
+
import sys
|
|
6
8
|
import time
|
|
7
9
|
from pathlib import Path
|
|
8
10
|
|
|
@@ -15,6 +17,43 @@ from update_feature_status import (
|
|
|
15
17
|
from utils import load_json_file, write_json_file
|
|
16
18
|
|
|
17
19
|
|
|
20
|
+
ROOT = Path(__file__).resolve().parents[2]
|
|
21
|
+
UNIX_RUNTIME_SNAPSHOT = ROOT / "tests" / "fixtures" / "dev-pipeline-behavior-snapshots" / "unix-runtime.json"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _python_310_plus() -> str:
|
|
25
|
+
if sys.version_info >= (3, 10):
|
|
26
|
+
return sys.executable
|
|
27
|
+
for executable in ("python3.12", "python3.11", "python3.10"):
|
|
28
|
+
resolved = shutil.which(executable)
|
|
29
|
+
if resolved:
|
|
30
|
+
return resolved
|
|
31
|
+
return sys.executable
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
PYTHON_310_PLUS = _python_310_plus()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _load_unix_snapshot_section(section):
|
|
38
|
+
with open(UNIX_RUNTIME_SNAPSHOT, encoding="utf-8") as fh:
|
|
39
|
+
fixture = json.load(fh)
|
|
40
|
+
required = fixture.get("requiredScenarios", {}).get(section)
|
|
41
|
+
assert required, f"{section} required scenario list must not be empty"
|
|
42
|
+
section_data = fixture.get(section)
|
|
43
|
+
assert section_data, f"{section} fixture section must not be empty"
|
|
44
|
+
for scenario_id in required:
|
|
45
|
+
assert scenario_id in section_data, f"missing {section}.{scenario_id} from fixture"
|
|
46
|
+
assert section_data[scenario_id] not in ({}, [], "", None), f"empty {section}.{scenario_id} fixture"
|
|
47
|
+
return section_data
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _assert_matches_unix_snapshot_section(section, actual):
|
|
51
|
+
expected = _load_unix_snapshot_section(section)
|
|
52
|
+
for scenario_id in expected:
|
|
53
|
+
assert scenario_id in actual, f"missing actual {section}.{scenario_id}"
|
|
54
|
+
assert actual == expected
|
|
55
|
+
|
|
56
|
+
|
|
18
57
|
# ---------------------------------------------------------------------------
|
|
19
58
|
# Helpers
|
|
20
59
|
# ---------------------------------------------------------------------------
|
|
@@ -424,21 +463,21 @@ class TestContextOverflowRetrySemantics:
|
|
|
424
463
|
assert runtime["last_infra_error_session_id"] is None
|
|
425
464
|
list_data, _ = load_json_file(str(list_path))
|
|
426
465
|
assert list_data[case["collection"]][0]["status"] == "pending"
|
|
427
|
-
def
|
|
466
|
+
def test_python_reset_warns_before_manual_continuation_reset(self, tmp_path):
|
|
428
467
|
project_root = Path(__file__).resolve().parents[2]
|
|
468
|
+
cli_path = project_root / "dev-pipeline" / "cli.py"
|
|
429
469
|
script_cases = [
|
|
430
470
|
{
|
|
431
|
-
"
|
|
471
|
+
"target": "feature",
|
|
432
472
|
"list_name": "feature-list.json",
|
|
433
473
|
"state_root": "features",
|
|
434
474
|
"item_id": "F-001",
|
|
435
475
|
"list_payload": {
|
|
436
476
|
"features": [_make_feature("F-001", "Context Overflow", status="failed")],
|
|
437
477
|
},
|
|
438
|
-
"pipeline_error": "run-feature.sh run",
|
|
439
478
|
},
|
|
440
479
|
{
|
|
441
|
-
"
|
|
480
|
+
"target": "bugfix",
|
|
442
481
|
"list_name": "bug-fix-list.json",
|
|
443
482
|
"state_root": "bugfix",
|
|
444
483
|
"item_id": "B-001",
|
|
@@ -452,10 +491,9 @@ class TestContextOverflowRetrySemantics:
|
|
|
452
491
|
"status": "failed",
|
|
453
492
|
}],
|
|
454
493
|
},
|
|
455
|
-
"pipeline_error": "run-bugfix.sh run",
|
|
456
494
|
},
|
|
457
495
|
{
|
|
458
|
-
"
|
|
496
|
+
"target": "refactor",
|
|
459
497
|
"list_name": "refactor-list.json",
|
|
460
498
|
"state_root": "refactor",
|
|
461
499
|
"item_id": "R-001",
|
|
@@ -470,7 +508,6 @@ class TestContextOverflowRetrySemantics:
|
|
|
470
508
|
"dependencies": [],
|
|
471
509
|
}],
|
|
472
510
|
},
|
|
473
|
-
"pipeline_error": "run-refactor.sh run",
|
|
474
511
|
},
|
|
475
512
|
]
|
|
476
513
|
|
|
@@ -498,16 +535,19 @@ class TestContextOverflowRetrySemantics:
|
|
|
498
535
|
subprocess.run(["git", "commit", "-q", "-m", "init"], cwd=case_dir, check=True)
|
|
499
536
|
|
|
500
537
|
result = subprocess.run(
|
|
501
|
-
[
|
|
538
|
+
[
|
|
539
|
+
PYTHON_310_PLUS,
|
|
540
|
+
str(cli_path),
|
|
541
|
+
"--project-root",
|
|
542
|
+
str(case_dir),
|
|
543
|
+
"reset",
|
|
544
|
+
case["target"],
|
|
545
|
+
case["item_id"],
|
|
546
|
+
str(prizmkit_dir / "plans" / case["list_name"]),
|
|
547
|
+
],
|
|
502
548
|
cwd=case_dir,
|
|
503
549
|
text=True,
|
|
504
550
|
capture_output=True,
|
|
505
|
-
env={
|
|
506
|
-
**os.environ,
|
|
507
|
-
"PROJECT_ROOT": str(case_dir),
|
|
508
|
-
"PRIZMKIT_DIR": str(prizmkit_dir),
|
|
509
|
-
"PIPELINE_DIR": str(project_root / "dev-pipeline"),
|
|
510
|
-
},
|
|
511
551
|
)
|
|
512
552
|
|
|
513
553
|
output = result.stdout + result.stderr
|
|
@@ -522,6 +562,388 @@ class TestContextOverflowRetrySemantics:
|
|
|
522
562
|
assert runtime["last_infra_error_session_id"] is None
|
|
523
563
|
|
|
524
564
|
|
|
565
|
+
# ---------------------------------------------------------------------------
|
|
566
|
+
# Unix runtime snapshot oracle: status updater behavior
|
|
567
|
+
# ---------------------------------------------------------------------------
|
|
568
|
+
|
|
569
|
+
_STATUS_SUMMARY_KEYS = [
|
|
570
|
+
"new_status",
|
|
571
|
+
"retry_count",
|
|
572
|
+
"infra_error_count",
|
|
573
|
+
"max_infra_retries",
|
|
574
|
+
"restart_policy",
|
|
575
|
+
"context_overflow_count",
|
|
576
|
+
"continuation_count",
|
|
577
|
+
"continuation_pending",
|
|
578
|
+
"artifacts_preserved",
|
|
579
|
+
"needs_attention",
|
|
580
|
+
"stalled_context_continuation",
|
|
581
|
+
"stalled_reason",
|
|
582
|
+
"no_progress_count",
|
|
583
|
+
]
|
|
584
|
+
|
|
585
|
+
_RUNTIME_STATUS_KEYS = [
|
|
586
|
+
"retry_count",
|
|
587
|
+
"infra_error_count",
|
|
588
|
+
"last_infra_error_session_id",
|
|
589
|
+
"last_failed_session_id",
|
|
590
|
+
"active_dev_branch",
|
|
591
|
+
"base_branch",
|
|
592
|
+
"continuation_pending",
|
|
593
|
+
"continuation_reason",
|
|
594
|
+
"last_context_overflow_session_id",
|
|
595
|
+
"previous_session_id",
|
|
596
|
+
"last_fatal_error_code",
|
|
597
|
+
"continuation_summary_path",
|
|
598
|
+
"context_overflow_count",
|
|
599
|
+
"continuation_count",
|
|
600
|
+
"no_progress_count",
|
|
601
|
+
"last_progress_fingerprint",
|
|
602
|
+
"needs_attention",
|
|
603
|
+
"stalled_context_continuation",
|
|
604
|
+
"stalled_reason",
|
|
605
|
+
"last_session_id",
|
|
606
|
+
]
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
def _status_snapshot_cases(scripts_dir):
|
|
610
|
+
return [
|
|
611
|
+
{
|
|
612
|
+
"task": "feature",
|
|
613
|
+
"script": scripts_dir / "update-feature-status.py",
|
|
614
|
+
"list_option": "--feature-list",
|
|
615
|
+
"id_option": "--feature-id",
|
|
616
|
+
"id": "F-001",
|
|
617
|
+
"list_name": "feature-list.json",
|
|
618
|
+
"collection": "features",
|
|
619
|
+
"list_payload": {"features": [_make_feature("F-001", "Snapshot", status="in_progress")]},
|
|
620
|
+
"feature_slug": "001-snapshot",
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"task": "bugfix",
|
|
624
|
+
"script": scripts_dir / "update-bug-status.py",
|
|
625
|
+
"list_option": "--bug-list",
|
|
626
|
+
"id_option": "--bug-id",
|
|
627
|
+
"id": "B-001",
|
|
628
|
+
"list_name": "bug-fix-list.json",
|
|
629
|
+
"collection": "bugs",
|
|
630
|
+
"list_payload": {
|
|
631
|
+
"bugs": [{
|
|
632
|
+
"id": "B-001",
|
|
633
|
+
"title": "Snapshot Bug",
|
|
634
|
+
"description": "desc",
|
|
635
|
+
"severity": "medium",
|
|
636
|
+
"priority": "medium",
|
|
637
|
+
"status": "in_progress",
|
|
638
|
+
}],
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"task": "refactor",
|
|
643
|
+
"script": scripts_dir / "update-refactor-status.py",
|
|
644
|
+
"list_option": "--refactor-list",
|
|
645
|
+
"id_option": "--refactor-id",
|
|
646
|
+
"id": "R-001",
|
|
647
|
+
"list_name": "refactor-list.json",
|
|
648
|
+
"collection": "refactors",
|
|
649
|
+
"list_payload": {
|
|
650
|
+
"refactors": [{
|
|
651
|
+
"id": "R-001",
|
|
652
|
+
"title": "Snapshot Refactor",
|
|
653
|
+
"description": "desc",
|
|
654
|
+
"complexity": "medium",
|
|
655
|
+
"priority": "medium",
|
|
656
|
+
"status": "in_progress",
|
|
657
|
+
"dependencies": [],
|
|
658
|
+
}],
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
]
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
def _deepcopy_json(value):
|
|
665
|
+
return json.loads(json.dumps(value))
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
def _prepare_snapshot_case(base_dir, case, list_status="in_progress", runtime_status=None):
|
|
669
|
+
case_dir = base_dir / case["task"]
|
|
670
|
+
state_dir = case_dir / "state"
|
|
671
|
+
list_path = case_dir / case["list_name"]
|
|
672
|
+
list_path.parent.mkdir(parents=True, exist_ok=True)
|
|
673
|
+
payload = _deepcopy_json(case["list_payload"])
|
|
674
|
+
payload[case["collection"]][0]["status"] = list_status
|
|
675
|
+
write_json_file(str(list_path), payload)
|
|
676
|
+
|
|
677
|
+
status_path = state_dir / case["id"] / "status.json"
|
|
678
|
+
status_path.parent.mkdir(parents=True, exist_ok=True)
|
|
679
|
+
status_payload = {
|
|
680
|
+
"retry_count": 0,
|
|
681
|
+
"infra_error_count": 0,
|
|
682
|
+
"sessions": [],
|
|
683
|
+
"last_session_id": None,
|
|
684
|
+
"resume_from_phase": None,
|
|
685
|
+
}
|
|
686
|
+
if runtime_status:
|
|
687
|
+
status_payload.update(runtime_status)
|
|
688
|
+
write_json_file(str(status_path), status_payload)
|
|
689
|
+
return case_dir, list_path, state_dir
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
def _run_status_snapshot_action(case, list_path, state_dir, action, session_status=None, session_id="sess-1", extra_args=None):
|
|
693
|
+
cmd = [
|
|
694
|
+
"python3",
|
|
695
|
+
str(case["script"]),
|
|
696
|
+
case["list_option"],
|
|
697
|
+
str(list_path),
|
|
698
|
+
"--state-dir",
|
|
699
|
+
str(state_dir),
|
|
700
|
+
"--action",
|
|
701
|
+
action,
|
|
702
|
+
]
|
|
703
|
+
if action in {"update", "reset", "clean", "unskip"}:
|
|
704
|
+
cmd.extend([case["id_option"], case["id"]])
|
|
705
|
+
if action == "update":
|
|
706
|
+
cmd.extend([
|
|
707
|
+
"--session-id",
|
|
708
|
+
session_id,
|
|
709
|
+
"--session-status",
|
|
710
|
+
session_status,
|
|
711
|
+
"--max-retries",
|
|
712
|
+
"3",
|
|
713
|
+
"--max-infra-retries",
|
|
714
|
+
"3",
|
|
715
|
+
])
|
|
716
|
+
if extra_args:
|
|
717
|
+
cmd.extend(extra_args)
|
|
718
|
+
result = subprocess.run(cmd, text=True, capture_output=True, check=True)
|
|
719
|
+
return json.loads(result.stdout) if result.stdout.strip() else {}
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
def _runtime_snapshot(state_dir, case):
|
|
723
|
+
with open(state_dir / case["id"] / "status.json", encoding="utf-8") as fh:
|
|
724
|
+
return json.load(fh)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
def _list_item_status(list_path, case):
|
|
728
|
+
data, _ = load_json_file(str(list_path))
|
|
729
|
+
return data[case["collection"]][0]["status"]
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
def _select_stable_fields(data, keys):
|
|
733
|
+
selected = {key: data[key] for key in keys if key in data}
|
|
734
|
+
if selected.get("continuation_summary_path"):
|
|
735
|
+
selected["continuation_summary_path"] = "<CONTINUATION_SUMMARY>"
|
|
736
|
+
return selected
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
def _normalize_status_update(summary, runtime, list_status):
|
|
740
|
+
return {
|
|
741
|
+
"summary": _select_stable_fields(summary, _STATUS_SUMMARY_KEYS),
|
|
742
|
+
"runtime": _select_stable_fields(runtime, _RUNTIME_STATUS_KEYS),
|
|
743
|
+
"listStatus": list_status,
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
def _continuation_conventional_path(case_dir, case):
|
|
748
|
+
if case["task"] == "feature":
|
|
749
|
+
return case_dir / ".prizmkit" / "specs" / case["feature_slug"] / "continuation-summary.md"
|
|
750
|
+
if case["task"] == "bugfix":
|
|
751
|
+
return case_dir / ".prizmkit" / "bugfix" / case["id"] / "continuation-summary.md"
|
|
752
|
+
return case_dir / ".prizmkit" / "refactor" / case["id"] / "continuation-summary.md"
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
def _build_status_updater_behavior_snapshot(tmp_path):
|
|
756
|
+
scripts_dir = Path(__file__).resolve().parents[1] / "scripts"
|
|
757
|
+
cases = _status_snapshot_cases(scripts_dir)
|
|
758
|
+
snapshot = {
|
|
759
|
+
"contextOverflowMetadata": {},
|
|
760
|
+
"infraErrorRetryBudget": {},
|
|
761
|
+
"crashFailureBudget": {},
|
|
762
|
+
"resetCleanMetadataCleanup": {},
|
|
763
|
+
"noProgressStall": {},
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
for case in cases:
|
|
767
|
+
task = case["task"]
|
|
768
|
+
case_dir, list_path, state_dir = _prepare_snapshot_case(
|
|
769
|
+
tmp_path / "context-overflow",
|
|
770
|
+
case,
|
|
771
|
+
runtime_status={"retry_count": 2, "infra_error_count": 1},
|
|
772
|
+
)
|
|
773
|
+
summary_path = case_dir / "continuation-summary.md"
|
|
774
|
+
summary = _run_status_snapshot_action(
|
|
775
|
+
case,
|
|
776
|
+
list_path,
|
|
777
|
+
state_dir,
|
|
778
|
+
"update",
|
|
779
|
+
session_status="context_overflow",
|
|
780
|
+
extra_args=[
|
|
781
|
+
"--active-dev-branch",
|
|
782
|
+
"dev/snapshot-branch",
|
|
783
|
+
"--base-branch",
|
|
784
|
+
"main",
|
|
785
|
+
"--last-fatal-error-code",
|
|
786
|
+
"context_overflow",
|
|
787
|
+
"--continuation-summary-path",
|
|
788
|
+
str(summary_path),
|
|
789
|
+
],
|
|
790
|
+
)
|
|
791
|
+
snapshot["contextOverflowMetadata"][task] = _normalize_status_update(
|
|
792
|
+
summary,
|
|
793
|
+
_runtime_snapshot(state_dir, case),
|
|
794
|
+
_list_item_status(list_path, case),
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
case_dir, list_path, state_dir = _prepare_snapshot_case(
|
|
798
|
+
tmp_path / "infra-error",
|
|
799
|
+
case,
|
|
800
|
+
runtime_status={"retry_count": 2, "infra_error_count": 0},
|
|
801
|
+
)
|
|
802
|
+
summary = _run_status_snapshot_action(
|
|
803
|
+
case,
|
|
804
|
+
list_path,
|
|
805
|
+
state_dir,
|
|
806
|
+
"update",
|
|
807
|
+
session_status="infra_error",
|
|
808
|
+
session_id="sess-infra",
|
|
809
|
+
)
|
|
810
|
+
snapshot["infraErrorRetryBudget"][task] = _normalize_status_update(
|
|
811
|
+
summary,
|
|
812
|
+
_runtime_snapshot(state_dir, case),
|
|
813
|
+
_list_item_status(list_path, case),
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
case_dir, list_path, state_dir = _prepare_snapshot_case(tmp_path / "crash-failure", case)
|
|
817
|
+
summary = _run_status_snapshot_action(
|
|
818
|
+
case,
|
|
819
|
+
list_path,
|
|
820
|
+
state_dir,
|
|
821
|
+
"update",
|
|
822
|
+
session_status="failed",
|
|
823
|
+
session_id="sess-failed",
|
|
824
|
+
)
|
|
825
|
+
snapshot["crashFailureBudget"][task] = _normalize_status_update(
|
|
826
|
+
summary,
|
|
827
|
+
_runtime_snapshot(state_dir, case),
|
|
828
|
+
_list_item_status(list_path, case),
|
|
829
|
+
)
|
|
830
|
+
|
|
831
|
+
snapshot["resetCleanMetadataCleanup"][task] = {}
|
|
832
|
+
for action in ["reset", "clean"]:
|
|
833
|
+
cleanup_root = tmp_path / f"{action}-cleanup"
|
|
834
|
+
cleanup_case_dir = cleanup_root / case["task"]
|
|
835
|
+
case_dir, list_path, state_dir = _prepare_snapshot_case(
|
|
836
|
+
cleanup_root,
|
|
837
|
+
case,
|
|
838
|
+
list_status="failed",
|
|
839
|
+
runtime_status={
|
|
840
|
+
"retry_count": 3,
|
|
841
|
+
"infra_error_count": 2,
|
|
842
|
+
"last_infra_error_session_id": "sess-infra",
|
|
843
|
+
"active_dev_branch": "dev/snapshot-branch",
|
|
844
|
+
"base_branch": "main",
|
|
845
|
+
"continuation_pending": True,
|
|
846
|
+
"continuation_reason": "context_overflow",
|
|
847
|
+
"last_context_overflow_session_id": "sess-overflow",
|
|
848
|
+
"previous_session_id": "sess-overflow",
|
|
849
|
+
"last_fatal_error_code": "context_overflow",
|
|
850
|
+
"continuation_summary_path": str(cleanup_case_dir / "continuation-summary.md"),
|
|
851
|
+
"no_progress_count": 1,
|
|
852
|
+
"last_progress_fingerprint": {"head_commit": "abc123"},
|
|
853
|
+
"needs_attention": True,
|
|
854
|
+
"stalled_context_continuation": True,
|
|
855
|
+
"stalled_reason": "context_overflow_without_git_checkpoint_or_artifact_progress",
|
|
856
|
+
"context_overflow_count": 2,
|
|
857
|
+
"continuation_count": 2,
|
|
858
|
+
"sessions": ["old"],
|
|
859
|
+
"last_session_id": "old",
|
|
860
|
+
"resume_from_phase": 4,
|
|
861
|
+
},
|
|
862
|
+
)
|
|
863
|
+
continuation_files = []
|
|
864
|
+
extra_args = []
|
|
865
|
+
if action == "clean":
|
|
866
|
+
stored_summary = case_dir / "continuation-summary.md"
|
|
867
|
+
stored_summary.write_text("stored", encoding="utf-8")
|
|
868
|
+
conventional_summary = _continuation_conventional_path(case_dir, case)
|
|
869
|
+
conventional_summary.parent.mkdir(parents=True)
|
|
870
|
+
conventional_summary.write_text("conventional", encoding="utf-8")
|
|
871
|
+
continuation_files = [stored_summary, conventional_summary]
|
|
872
|
+
extra_args = ["--project-root", str(case_dir)]
|
|
873
|
+
if case["task"] == "feature":
|
|
874
|
+
extra_args.extend(["--feature-slug", case["feature_slug"]])
|
|
875
|
+
_run_status_snapshot_action(case, list_path, state_dir, action, extra_args=extra_args)
|
|
876
|
+
runtime = _runtime_snapshot(state_dir, case)
|
|
877
|
+
snapshot["resetCleanMetadataCleanup"][task][action] = {
|
|
878
|
+
"runtime": _select_stable_fields(runtime, _RUNTIME_STATUS_KEYS),
|
|
879
|
+
"listStatus": _list_item_status(list_path, case),
|
|
880
|
+
"continuationFilesDeleted": all(not path.exists() for path in continuation_files),
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
case_dir, list_path, state_dir = _prepare_snapshot_case(tmp_path / "no-progress", case)
|
|
884
|
+
fingerprint = json.dumps({
|
|
885
|
+
"git_diff_fingerprint": "same",
|
|
886
|
+
"checkpoint_cursor": "S02:pending",
|
|
887
|
+
"artifact_fingerprint": "artifact",
|
|
888
|
+
"head_commit": "abc123",
|
|
889
|
+
})
|
|
890
|
+
first_summary = _run_status_snapshot_action(
|
|
891
|
+
case,
|
|
892
|
+
list_path,
|
|
893
|
+
state_dir,
|
|
894
|
+
"update",
|
|
895
|
+
session_status="context_overflow",
|
|
896
|
+
session_id="sess-1",
|
|
897
|
+
extra_args=[
|
|
898
|
+
"--active-dev-branch",
|
|
899
|
+
"dev/snapshot-branch",
|
|
900
|
+
"--base-branch",
|
|
901
|
+
"main",
|
|
902
|
+
"--no-progress-count",
|
|
903
|
+
"1",
|
|
904
|
+
"--progress-fingerprint",
|
|
905
|
+
fingerprint,
|
|
906
|
+
],
|
|
907
|
+
)
|
|
908
|
+
second_summary = _run_status_snapshot_action(
|
|
909
|
+
case,
|
|
910
|
+
list_path,
|
|
911
|
+
state_dir,
|
|
912
|
+
"update",
|
|
913
|
+
session_status="stalled_context_continuation",
|
|
914
|
+
session_id="sess-2",
|
|
915
|
+
extra_args=[
|
|
916
|
+
"--active-dev-branch",
|
|
917
|
+
"dev/snapshot-branch",
|
|
918
|
+
"--base-branch",
|
|
919
|
+
"main",
|
|
920
|
+
"--no-progress-count",
|
|
921
|
+
"2",
|
|
922
|
+
"--progress-fingerprint",
|
|
923
|
+
fingerprint,
|
|
924
|
+
],
|
|
925
|
+
)
|
|
926
|
+
snapshot["noProgressStall"][task] = {
|
|
927
|
+
"first": _normalize_status_update(
|
|
928
|
+
first_summary,
|
|
929
|
+
_runtime_snapshot(state_dir, case),
|
|
930
|
+
_list_item_status(list_path, case),
|
|
931
|
+
)["summary"],
|
|
932
|
+
"second": _normalize_status_update(
|
|
933
|
+
second_summary,
|
|
934
|
+
_runtime_snapshot(state_dir, case),
|
|
935
|
+
_list_item_status(list_path, case),
|
|
936
|
+
),
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
return snapshot
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
def test_status_updater_behavior_matches_unix_runtime_snapshot(tmp_path):
|
|
943
|
+
actual = _build_status_updater_behavior_snapshot(tmp_path)
|
|
944
|
+
_assert_matches_unix_snapshot_section("statusUpdaterBehavior", actual)
|
|
945
|
+
|
|
946
|
+
|
|
525
947
|
# ---------------------------------------------------------------------------
|
|
526
948
|
# TERMINAL_STATUSES
|
|
527
949
|
# ---------------------------------------------------------------------------
|