prizmkit 1.1.99 → 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/check-session-status.py +74 -1
- package/bundled/dev-pipeline/scripts/continuation.py +374 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +64 -52
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +35 -25
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +2 -2
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -20
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +185 -16
- package/bundled/dev-pipeline/scripts/update-bug-status.py +214 -6
- package/bundled/dev-pipeline/scripts/update-feature-status.py +237 -6
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +214 -6
- package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +8 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -0
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +14 -5
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +16 -6
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +16 -6
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -0
- package/bundled/dev-pipeline/templates/sections/log-size-awareness.md +13 -69
- 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/templates/session-status-schema.json +1 -1
- package/bundled/dev-pipeline/tests/conftest.py +1 -0
- package/bundled/dev-pipeline/tests/test_auto_skip.py +932 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +207 -0
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +100 -0
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +43 -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 -1257
- package/bundled/dev-pipeline/lib/heartbeat.sh +0 -469
- package/bundled/dev-pipeline/reset-bug.sh +0 -395
- package/bundled/dev-pipeline/reset-feature.sh +0 -406
- package/bundled/dev-pipeline/reset-refactor.sh +0 -393
- package/bundled/dev-pipeline/run-bugfix.sh +0 -1315
- package/bundled/dev-pipeline/run-feature.sh +0 -1602
- package/bundled/dev-pipeline/run-recovery.sh +0 -648
- package/bundled/dev-pipeline/run-refactor.sh +0 -1348
- package/bundled/dev-pipeline/scripts/monitor-log.sh +0 -104
- 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 -829
- package/bundled/dev-pipeline-windows/lib/daemon.ps1 +0 -140
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -967
- package/bundled/dev-pipeline-windows/lib/reset.ps1 +0 -87
- package/bundled/dev-pipeline-windows/reset-bug.ps1 +0 -9
- package/bundled/dev-pipeline-windows/reset-feature.ps1 +0 -9
- package/bundled/dev-pipeline-windows/reset-refactor.ps1 +0 -9
- 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 -228
- package/bundled/dev-pipeline-windows/scripts/detect-stuck.py +0 -530
- package/bundled/dev-pipeline-windows/scripts/generate-bootstrap-prompt.py +0 -2282
- package/bundled/dev-pipeline-windows/scripts/generate-bugfix-prompt.py +0 -767
- package/bundled/dev-pipeline-windows/scripts/generate-recovery-prompt.py +0 -805
- package/bundled/dev-pipeline-windows/scripts/generate-refactor-prompt.py +0 -845
- 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/monitor-log.ps1 +0 -102
- package/bundled/dev-pipeline-windows/scripts/parse-stream-progress.py +0 -1232
- 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 -913
- package/bundled/dev-pipeline-windows/scripts/update-checkpoint.py +0 -173
- package/bundled/dev-pipeline-windows/scripts/update-feature-status.py +0 -1558
- package/bundled/dev-pipeline-windows/scripts/update-refactor-status.py +0 -1119
- 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 -78
- 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
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Validate .prizmkit/prizm-docs files for PrizmKit projects."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import re
|
|
7
|
+
import subprocess
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path, PurePosixPath
|
|
10
|
+
|
|
11
|
+
DOCS_ROOT = Path(".prizmkit/prizm-docs")
|
|
12
|
+
ROOT_PRIZM = DOCS_ROOT / "root.prizm"
|
|
13
|
+
VALID_MODES = {"--all", "--staged"}
|
|
14
|
+
|
|
15
|
+
AUXILIARY_METADATA_RE = re.compile(
|
|
16
|
+
r"^[ \t]*[-*]?[ \t]*(CHANGELOG|CREATED([ _-]?(AT|ON|DATE))?|"
|
|
17
|
+
r"UPDATED([ _-]?(AT|ON|DATE))?|MODIFIED([ _-]?(AT|ON|DATE))?|"
|
|
18
|
+
r"LAST[ _-]?(UPDATED|MODIFIED)([ _-]?(AT|ON|DATE))?|DATE|TIMESTAMP):",
|
|
19
|
+
re.IGNORECASE | re.MULTILINE,
|
|
20
|
+
)
|
|
21
|
+
WORKFLOW_ID_RE = re.compile(
|
|
22
|
+
r"(^|[^A-Za-z0-9_])([FBR]-[0-9]{3}|T-[0-9]{3})(-[A-Z])?([^A-Za-z0-9_]|$)",
|
|
23
|
+
re.IGNORECASE,
|
|
24
|
+
)
|
|
25
|
+
WORKFLOW_FIELD_RE = re.compile(
|
|
26
|
+
r"^[ \t]*[-*]?[ \t]*((bug|feature|refactor|task)[ _-]?id|"
|
|
27
|
+
r"(session|run|pipeline|workflow)([ _-]?id)?)([ \t]*(:|=)|[ \t]+)",
|
|
28
|
+
re.IGNORECASE | re.MULTILINE,
|
|
29
|
+
)
|
|
30
|
+
WORKFLOW_COMPOUND_FIELD_RE = re.compile(
|
|
31
|
+
r"^[ \t]*[-*]?[ \t]*(bug|feature|refactor|task|session|run|pipeline|workflow)"
|
|
32
|
+
r"([ _-](bug|feature|refactor|task|session|run|pipeline|workflow|id))+"
|
|
33
|
+
r"([ \t]*(:|=)|[ \t]+)",
|
|
34
|
+
re.IGNORECASE | re.MULTILINE,
|
|
35
|
+
)
|
|
36
|
+
ARTIFACT_PATH_RE = re.compile(
|
|
37
|
+
r"(^|[^A-Za-z0-9_.-])\.prizmkit/(specs|dev-pipeline)($|/|[^A-Za-z0-9_.-])"
|
|
38
|
+
)
|
|
39
|
+
ABSOLUTE_PATH_RE = re.compile(
|
|
40
|
+
r"(^|[^A-Za-z0-9_./:-])"
|
|
41
|
+
r"(/Users/|/home/|/tmp/|/private/tmp/|/var/folders/|/workspace/|/workspaces/|"
|
|
42
|
+
r"/opt/|/srv/|/root/|/var/tmp/|/Volumes/|/mnt/[A-Za-z]/|[A-Za-z]:/)"
|
|
43
|
+
)
|
|
44
|
+
BRANCH_EXACT_FIELD_RE = re.compile(
|
|
45
|
+
r"^[ \t]*[-*]?[ \t]*(BRANCH|BRANCH_NAME|CURRENT_BRANCH|SOURCE_BRANCH|BASE_BRANCH|"
|
|
46
|
+
r"HEAD_BRANCH|GIT_BRANCH|TARGET_BRANCH)[ \t_-]*(:|=|[ \t])",
|
|
47
|
+
re.MULTILINE,
|
|
48
|
+
)
|
|
49
|
+
BRANCH_UPPER_FIELD_RE = re.compile(
|
|
50
|
+
r"^[ \t]*[-*]?[ \t]*[A-Z][A-Z0-9_]*_BRANCH[ \t_-]*(:|=|[ \t])"
|
|
51
|
+
r"[ \t]*(main|master|develop|development|trunk|[A-Za-z0-9._-]+/[A-Za-z0-9._/-]+|"
|
|
52
|
+
r"(feature|fix|bugfix|hotfix|release|chore|refactor|task|dev)[/_-][A-Za-z0-9._/-]+)"
|
|
53
|
+
r"[ \t]*(#.*)?$",
|
|
54
|
+
re.MULTILINE,
|
|
55
|
+
)
|
|
56
|
+
BRANCH_NAME_FIELD_RE = re.compile(
|
|
57
|
+
r"^[ \t]*[-*]?[ \t]*(branch[ _-]*name|current[ _-]*branch|source[ _-]*branch|"
|
|
58
|
+
r"base[ _-]*branch|head[ _-]*branch|git[ _-]*branch|target[ _-]*branch)"
|
|
59
|
+
r"[ \t_-]*(:|=|[ \t])",
|
|
60
|
+
re.IGNORECASE | re.MULTILINE,
|
|
61
|
+
)
|
|
62
|
+
BRANCH_TITLE_FIELD_RE = re.compile(
|
|
63
|
+
r"^[ \t]*[-*]?[ \t]*([A-Za-z0-9]+[ _-]+)+branch([ \t]*(:|=)|[ \t]+)"
|
|
64
|
+
r"[ \t]*(main|master|develop|development|trunk|[A-Za-z0-9._-]+/[A-Za-z0-9._/-]+|"
|
|
65
|
+
r"(feature|fix|bugfix|hotfix|release|chore|refactor|task|dev)[/_-][A-Za-z0-9._/-]+)"
|
|
66
|
+
r"[ \t]*(#.*)?$",
|
|
67
|
+
re.IGNORECASE | re.MULTILINE,
|
|
68
|
+
)
|
|
69
|
+
BRANCH_SIMPLE_FIELD_RE = re.compile(
|
|
70
|
+
r"^[ \t]*[-*]?[ \t]*branch[ \t_-]*(:|=|[ \t])"
|
|
71
|
+
r"[ \t]*(main|master|develop|development|trunk|[A-Za-z0-9._-]+/[A-Za-z0-9._/-]+|"
|
|
72
|
+
r"(feature|fix|bugfix|hotfix|release|chore|refactor|task|dev)[/_-][A-Za-z0-9._/-]+)"
|
|
73
|
+
r"[ \t]*(#.*)?$",
|
|
74
|
+
re.IGNORECASE | re.MULTILINE,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def emit_error(file_path: str, message: str) -> None:
|
|
79
|
+
print(f"ERROR: {file_path} {message}", file=sys.stderr)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def run_git(args: list[str], *, capture: bool = True) -> subprocess.CompletedProcess[str]:
|
|
83
|
+
return subprocess.run(
|
|
84
|
+
["git", *args],
|
|
85
|
+
text=True,
|
|
86
|
+
encoding="utf-8",
|
|
87
|
+
errors="replace",
|
|
88
|
+
stdout=subprocess.PIPE if capture else subprocess.DEVNULL,
|
|
89
|
+
stderr=subprocess.DEVNULL,
|
|
90
|
+
check=False,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def collect_files(mode: str) -> list[str]:
|
|
95
|
+
if mode == "--all":
|
|
96
|
+
return sorted(path.as_posix() for path in DOCS_ROOT.rglob("*.prizm") if path.is_file())
|
|
97
|
+
|
|
98
|
+
result = run_git(["diff", "--cached", "--name-only"])
|
|
99
|
+
if result.returncode != 0:
|
|
100
|
+
return []
|
|
101
|
+
return [line.strip() for line in result.stdout.splitlines() if line.strip().endswith(".prizm")]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def read_check_content(file_path: str, mode: str) -> tuple[bytes, str] | None:
|
|
105
|
+
if mode == "--staged":
|
|
106
|
+
exists = run_git(["cat-file", "-e", f":{file_path}"], capture=False)
|
|
107
|
+
if exists.returncode != 0:
|
|
108
|
+
return None
|
|
109
|
+
blob = subprocess.run(
|
|
110
|
+
["git", "show", f":{file_path}"],
|
|
111
|
+
stdout=subprocess.PIPE,
|
|
112
|
+
stderr=subprocess.DEVNULL,
|
|
113
|
+
check=False,
|
|
114
|
+
)
|
|
115
|
+
if blob.returncode != 0:
|
|
116
|
+
return None
|
|
117
|
+
raw = blob.stdout
|
|
118
|
+
else:
|
|
119
|
+
path = Path(file_path)
|
|
120
|
+
if not path.is_file():
|
|
121
|
+
return None
|
|
122
|
+
raw = path.read_bytes()
|
|
123
|
+
|
|
124
|
+
return raw, raw.decode("utf-8", errors="replace")
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def is_l1_doc(file_path: str) -> bool:
|
|
128
|
+
parent = PurePosixPath(file_path).parent.as_posix()
|
|
129
|
+
return parent == DOCS_ROOT.as_posix()
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def size_limit(file_path: str) -> tuple[int, str, str]:
|
|
133
|
+
if file_path.endswith("root.prizm"):
|
|
134
|
+
return 4096, "L0", "Consolidate MODULE_INDEX, keep top-5 RULES."
|
|
135
|
+
if is_l1_doc(file_path):
|
|
136
|
+
return 3072, "L1", "Move implementation details to L2."
|
|
137
|
+
return 5120, "L2", "Remove stale or trivially derivable entries."
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def contains_root_field(text: str, field: str) -> bool:
|
|
141
|
+
return re.search(rf"^{re.escape(field)}:", text, re.MULTILINE) is not None
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def validate_file(file_path: str, raw: bytes, text: str) -> int:
|
|
145
|
+
errors = 0
|
|
146
|
+
|
|
147
|
+
if re.search(r"^#{1,6} ", text, re.MULTILINE):
|
|
148
|
+
emit_error(file_path, "contains markdown headers (##). Use KEY: value format.")
|
|
149
|
+
errors += 1
|
|
150
|
+
|
|
151
|
+
if re.search(r"^```", text, re.MULTILINE):
|
|
152
|
+
emit_error(file_path, "contains code blocks. Use file_path:line_number reference.")
|
|
153
|
+
errors += 1
|
|
154
|
+
|
|
155
|
+
base_name = PurePosixPath(file_path).name.lower()
|
|
156
|
+
if base_name in {"changelog.prizm", "changelog-archive.prizm"} or (
|
|
157
|
+
"changelog" in base_name and base_name.endswith(".prizm")
|
|
158
|
+
):
|
|
159
|
+
emit_error(file_path, "is auxiliary history. Use git history instead of changelog .prizm files.")
|
|
160
|
+
errors += 1
|
|
161
|
+
|
|
162
|
+
if AUXILIARY_METADATA_RE.search(text):
|
|
163
|
+
emit_error(
|
|
164
|
+
file_path,
|
|
165
|
+
"contains auxiliary history metadata. Use durable KEY: value sections only; git tracks history.",
|
|
166
|
+
)
|
|
167
|
+
errors += 1
|
|
168
|
+
|
|
169
|
+
if WORKFLOW_ID_RE.search(text) or WORKFLOW_FIELD_RE.search(text) or WORKFLOW_COMPOUND_FIELD_RE.search(text):
|
|
170
|
+
emit_error(
|
|
171
|
+
file_path,
|
|
172
|
+
"contains workflow metadata. Translate IDs, branch names, worktree paths, and pipeline artifacts into durable product/domain language.",
|
|
173
|
+
)
|
|
174
|
+
errors += 1
|
|
175
|
+
|
|
176
|
+
normalized_text = text.replace("\\", "/")
|
|
177
|
+
if ARTIFACT_PATH_RE.search(normalized_text):
|
|
178
|
+
emit_error(
|
|
179
|
+
file_path,
|
|
180
|
+
"contains PrizmKit artifact paths. Translate specs/dev-pipeline references into durable product/domain language.",
|
|
181
|
+
)
|
|
182
|
+
errors += 1
|
|
183
|
+
|
|
184
|
+
if ABSOLUTE_PATH_RE.search(normalized_text):
|
|
185
|
+
emit_error(file_path, "contains absolute worktree paths. Use repository-relative source paths only.")
|
|
186
|
+
errors += 1
|
|
187
|
+
|
|
188
|
+
if (
|
|
189
|
+
BRANCH_EXACT_FIELD_RE.search(text)
|
|
190
|
+
or BRANCH_UPPER_FIELD_RE.search(text)
|
|
191
|
+
or BRANCH_NAME_FIELD_RE.search(text)
|
|
192
|
+
or BRANCH_TITLE_FIELD_RE.search(text)
|
|
193
|
+
or BRANCH_SIMPLE_FIELD_RE.search(text)
|
|
194
|
+
):
|
|
195
|
+
emit_error(file_path, "contains branch names. Describe durable product/domain context instead.")
|
|
196
|
+
errors += 1
|
|
197
|
+
|
|
198
|
+
limit, level, hint = size_limit(file_path)
|
|
199
|
+
size = len(raw)
|
|
200
|
+
if size > limit:
|
|
201
|
+
emit_error(file_path, f"exceeds {level} limit ({size}B > {limit}B). {hint}")
|
|
202
|
+
errors += 1
|
|
203
|
+
|
|
204
|
+
if file_path.endswith("root.prizm"):
|
|
205
|
+
for field in ["PRIZM_VERSION", "PROJECT", "LANG", "RULES"]:
|
|
206
|
+
if not contains_root_field(text, field):
|
|
207
|
+
emit_error(file_path, f"missing required field {field}:")
|
|
208
|
+
errors += 1
|
|
209
|
+
if not contains_root_field(text, "MODULE_INDEX") and not contains_root_field(text, "MODULE_GROUPS"):
|
|
210
|
+
emit_error(file_path, "missing required field MODULE_INDEX: or MODULE_GROUPS:")
|
|
211
|
+
errors += 1
|
|
212
|
+
|
|
213
|
+
return errors
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def main(argv: list[str]) -> int:
|
|
217
|
+
mode = argv[1] if len(argv) > 1 else "--staged"
|
|
218
|
+
if len(argv) > 2 or mode not in VALID_MODES:
|
|
219
|
+
print("Usage: validate-prizm-docs.py [--all | --staged]", file=sys.stderr)
|
|
220
|
+
return 1
|
|
221
|
+
|
|
222
|
+
if not ROOT_PRIZM.is_file():
|
|
223
|
+
return 0
|
|
224
|
+
|
|
225
|
+
errors = 0
|
|
226
|
+
for file_path in collect_files(mode):
|
|
227
|
+
content = read_check_content(file_path, mode)
|
|
228
|
+
if content is None:
|
|
229
|
+
continue
|
|
230
|
+
raw, text = content
|
|
231
|
+
errors += validate_file(file_path, raw, text)
|
|
232
|
+
|
|
233
|
+
if errors > 0:
|
|
234
|
+
print(f"PrizmKit: {errors} format error(s) in .prizm files. Fix before committing.", file=sys.stderr)
|
|
235
|
+
return 1
|
|
236
|
+
return 0
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
if __name__ == "__main__":
|
|
240
|
+
raise SystemExit(main(sys.argv))
|
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -36,6 +36,8 @@ import {
|
|
|
36
36
|
resolveSkillList,
|
|
37
37
|
resolvePipelineFileList,
|
|
38
38
|
resolveRuleNamesForRuntime,
|
|
39
|
+
findStaleManagedPipelineFiles,
|
|
40
|
+
removeStaleManagedPipelineFiles,
|
|
39
41
|
} from './scaffold.js';
|
|
40
42
|
import {
|
|
41
43
|
removeSkillFiles,
|
|
@@ -47,7 +49,6 @@ import { detectPlatform } from './detect-platform.js';
|
|
|
47
49
|
import {
|
|
48
50
|
selectPlatform,
|
|
49
51
|
selectAiCli,
|
|
50
|
-
selectRuntime,
|
|
51
52
|
selectSkillSuite,
|
|
52
53
|
selectRulesPreset,
|
|
53
54
|
confirmTeamMode,
|
|
@@ -350,11 +351,17 @@ export async function runConfig(directory, options = {}) {
|
|
|
350
351
|
|
|
351
352
|
// Existing manifests are the source of truth. Filesystem detection is only a
|
|
352
353
|
// legacy fallback for manifests created before platform was recorded.
|
|
353
|
-
const
|
|
354
|
+
const detectedPlatformRaw = oldManifest.platform || await detectInstalledPlatforms(projectRoot) || 'claude';
|
|
355
|
+
const detectedPlatform = detectedPlatformRaw === 'both' ? 'all' : detectedPlatformRaw;
|
|
356
|
+
|
|
357
|
+
const rawManifestRuntime = oldManifest.runtime;
|
|
358
|
+
const normalizedManifestRuntime = normalizeRuntime(rawManifestRuntime);
|
|
359
|
+
const runtimeManifestNeedsNormalization = rawManifestRuntime !== normalizedManifestRuntime;
|
|
360
|
+
const platformManifestNeedsNormalization = detectedPlatformRaw !== detectedPlatform;
|
|
354
361
|
|
|
355
362
|
const currentConfig = {
|
|
356
363
|
platform: detectedPlatform,
|
|
357
|
-
runtime:
|
|
364
|
+
runtime: normalizedManifestRuntime,
|
|
358
365
|
suite: oldManifest.suite || 'core',
|
|
359
366
|
rules: oldManifest.options?.rules || 'recommended',
|
|
360
367
|
team: oldManifest.options?.team ?? true,
|
|
@@ -369,7 +376,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
369
376
|
// Display current config
|
|
370
377
|
console.log(chalk.bold(' 当前配置:'));
|
|
371
378
|
console.log(` 平台: ${chalk.cyan(platformLabel(currentConfig.platform))}`);
|
|
372
|
-
console.log(`
|
|
379
|
+
console.log(` 运行时: ${chalk.cyan(runtimeLabel(currentConfig.runtime))}`);
|
|
373
380
|
console.log(` AI CLI: ${currentConfig.aiCli ? chalk.cyan(currentConfig.aiCli) : chalk.gray('(未设置)')}`);
|
|
374
381
|
console.log(` 技能套件: ${chalk.cyan(currentConfig.suite)}`);
|
|
375
382
|
console.log(` 规则: ${chalk.cyan(currentConfig.rules)}`);
|
|
@@ -381,10 +388,11 @@ export async function runConfig(directory, options = {}) {
|
|
|
381
388
|
|
|
382
389
|
let newConfig;
|
|
383
390
|
const optionRuntime = options.runtime !== undefined ? normalizeRuntime(options.runtime) : undefined;
|
|
391
|
+
const runtimeOptionNeedsNormalization = options.runtime !== undefined && options.runtime !== optionRuntime;
|
|
384
392
|
|
|
385
393
|
if (nonInteractive) {
|
|
386
394
|
// Non-interactive: only change what's explicitly specified via CLI options
|
|
387
|
-
if (!options.platform && !options.skills && !options.rules && options.runtime === undefined
|
|
395
|
+
if (!platformManifestNeedsNormalization && !runtimeManifestNeedsNormalization && !runtimeOptionNeedsNormalization && !options.platform && !options.skills && !options.rules && options.runtime === undefined
|
|
388
396
|
&& options.aiCli === undefined && options.team === undefined && options.pipeline === undefined) {
|
|
389
397
|
console.log(chalk.yellow(' ⚠ 非交互式模式下未指定任何变更。'));
|
|
390
398
|
console.log(chalk.gray(' 使用 --platform, --runtime, --skills, --rules, --ai-cli, --team/--no-team, --pipeline/--no-pipeline'));
|
|
@@ -407,7 +415,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
407
415
|
try {
|
|
408
416
|
console.log(chalk.bold(' 选择新配置(按 Enter 保持当前值):\n'));
|
|
409
417
|
|
|
410
|
-
const newRuntime = optionRuntime ||
|
|
418
|
+
const newRuntime = optionRuntime || currentConfig.runtime;
|
|
411
419
|
const newPlatform = await selectPlatform(currentConfig.platform, detected);
|
|
412
420
|
const newAiCli = await selectAiCli(currentConfig.aiCli, detected);
|
|
413
421
|
|
|
@@ -442,11 +450,15 @@ export async function runConfig(directory, options = {}) {
|
|
|
442
450
|
// ── Phase 3: COMPUTE DIFF ────────────────────────────────────────────────
|
|
443
451
|
|
|
444
452
|
const changes = [];
|
|
445
|
-
if (
|
|
453
|
+
if (platformManifestNeedsNormalization) {
|
|
454
|
+
changes.push(`平台: ${platformLabel(detectedPlatformRaw)} → ${platformLabel(newConfig.platform)}`);
|
|
455
|
+
} else if (newConfig.platform !== currentConfig.platform) {
|
|
446
456
|
changes.push(`平台: ${platformLabel(currentConfig.platform)} → ${platformLabel(newConfig.platform)}`);
|
|
447
457
|
}
|
|
448
|
-
if (
|
|
449
|
-
changes.push(
|
|
458
|
+
if (runtimeManifestNeedsNormalization || runtimeOptionNeedsNormalization) {
|
|
459
|
+
changes.push(`运行时: ${runtimeLabel(rawManifestRuntime)} → ${runtimeLabel(newConfig.runtime)}`);
|
|
460
|
+
} else if (newConfig.runtime !== currentConfig.runtime) {
|
|
461
|
+
changes.push(`运行时: ${runtimeLabel(currentConfig.runtime)} → ${runtimeLabel(newConfig.runtime)}`);
|
|
450
462
|
}
|
|
451
463
|
if (newConfig.aiCli !== currentConfig.aiCli) {
|
|
452
464
|
changes.push(`AI CLI: ${currentConfig.aiCli || '(未设置)'} → ${newConfig.aiCli || '(未设置)'}`);
|
|
@@ -562,6 +574,9 @@ export async function runConfig(directory, options = {}) {
|
|
|
562
574
|
// 5d. Install/update files for new + existing platforms
|
|
563
575
|
const allTargetPlatforms = [...platformsToAdd, ...platformsToUpdate];
|
|
564
576
|
const needsReinstall = newConfig.platform !== currentConfig.platform
|
|
577
|
+
|| platformManifestNeedsNormalization
|
|
578
|
+
|| runtimeManifestNeedsNormalization
|
|
579
|
+
|| runtimeOptionNeedsNormalization
|
|
565
580
|
|| newConfig.runtime !== currentConfig.runtime
|
|
566
581
|
|| newConfig.suite !== currentConfig.suite
|
|
567
582
|
|| newConfig.rules !== currentConfig.rules
|
|
@@ -595,7 +610,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
595
610
|
}
|
|
596
611
|
|
|
597
612
|
// 5e. Pipeline changes
|
|
598
|
-
if (newConfig.pipeline !== currentConfig.pipeline || (newConfig.pipeline && newConfig.runtime !== currentConfig.runtime)) {
|
|
613
|
+
if (newConfig.pipeline !== currentConfig.pipeline || (newConfig.pipeline && (newConfig.runtime !== currentConfig.runtime || runtimeManifestNeedsNormalization || runtimeOptionNeedsNormalization))) {
|
|
599
614
|
if (newConfig.pipeline) {
|
|
600
615
|
console.log(chalk.blue('\n 安装 Pipeline:'));
|
|
601
616
|
await installPipeline(projectRoot, false, {
|
|
@@ -609,6 +624,12 @@ export async function runConfig(directory, options = {}) {
|
|
|
609
624
|
await removePipelineFiles(projectRoot, oldPipelineFiles, false);
|
|
610
625
|
}
|
|
611
626
|
}
|
|
627
|
+
} else if (newConfig.pipeline) {
|
|
628
|
+
const staleManagedPipelineFiles = await findStaleManagedPipelineFiles(projectRoot, newConfig.runtime);
|
|
629
|
+
if (staleManagedPipelineFiles.length) {
|
|
630
|
+
console.log(chalk.blue('\n 移除过期 Pipeline 框架文件:'));
|
|
631
|
+
await removeStaleManagedPipelineFiles(projectRoot, staleManagedPipelineFiles, false);
|
|
632
|
+
}
|
|
612
633
|
}
|
|
613
634
|
|
|
614
635
|
// 5f. Update .gitignore
|
|
@@ -616,7 +637,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
616
637
|
await installGitignore(projectRoot, { pipeline: newConfig.pipeline }, false);
|
|
617
638
|
|
|
618
639
|
// 5g. Runtime-aware git hook and PrizmKit helper scripts
|
|
619
|
-
if (newConfig.runtime !== currentConfig.runtime) {
|
|
640
|
+
if (newConfig.runtime !== currentConfig.runtime || runtimeManifestNeedsNormalization || runtimeOptionNeedsNormalization) {
|
|
620
641
|
console.log(chalk.blue('\n Git Hook:'));
|
|
621
642
|
await installGitHook(projectRoot, false, newConfig.runtime);
|
|
622
643
|
|
|
@@ -675,7 +696,7 @@ export async function runConfig(directory, options = {}) {
|
|
|
675
696
|
|
|
676
697
|
console.log(chalk.gray(' 新配置:'));
|
|
677
698
|
console.log(chalk.gray(` 平台: ${platformLabel(newConfig.platform)}`));
|
|
678
|
-
console.log(chalk.gray(`
|
|
699
|
+
console.log(chalk.gray(` 运行时: ${runtimeLabel(newConfig.runtime)}`));
|
|
679
700
|
console.log(chalk.gray(` AI CLI: ${newConfig.aiCli || '(未设置)'}`));
|
|
680
701
|
console.log(chalk.gray(` 技能套件: ${newConfig.suite}`));
|
|
681
702
|
console.log(chalk.gray(` 规则: ${newConfig.rules}`));
|
package/src/index.js
CHANGED
|
@@ -16,7 +16,6 @@ import { scaffold } from './scaffold.js';
|
|
|
16
16
|
import { loadMetadata } from './metadata.js';
|
|
17
17
|
import { platformLabel } from './platforms.js';
|
|
18
18
|
import { normalizeRuntime, runtimeLabel } from './runtimes.js';
|
|
19
|
-
import { selectRuntime } from './prompts.js';
|
|
20
19
|
|
|
21
20
|
export { runUpgrade } from './upgrade.js';
|
|
22
21
|
|
|
@@ -85,10 +84,8 @@ export async function runScaffold(directory, options) {
|
|
|
85
84
|
|
|
86
85
|
// === 交互式模式 ===
|
|
87
86
|
try {
|
|
88
|
-
// 1.
|
|
89
|
-
const runtime = options.runtime
|
|
90
|
-
? normalizeRuntime(options.runtime)
|
|
91
|
-
: await selectRuntime();
|
|
87
|
+
// 1. 统一 Python runtime(旧 runtime 参数仅作为兼容别名归一)
|
|
88
|
+
const runtime = normalizeRuntime(options.runtime);
|
|
92
89
|
|
|
93
90
|
// 2. 选择平台(控制安装的目录结构)
|
|
94
91
|
const platform = await select({
|
|
@@ -243,7 +240,7 @@ export async function runScaffold(directory, options) {
|
|
|
243
240
|
|
|
244
241
|
console.log('');
|
|
245
242
|
console.log(chalk.bold(' 安装摘要:'));
|
|
246
|
-
console.log(`
|
|
243
|
+
console.log(` 运行时: ${chalk.cyan(runtimeLabel(runtime))}`);
|
|
247
244
|
console.log(` 平台: ${chalk.cyan(selectedPlatformLabel)}`);
|
|
248
245
|
console.log(` 技能: ${chalk.cyan(suiteLabel)}`);
|
|
249
246
|
console.log(` 团队模式: ${team ? chalk.green('启用') : chalk.gray('禁用')}`);
|
package/src/manifest.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import fs from 'fs-extra';
|
|
11
11
|
import path from 'path';
|
|
12
12
|
import { expandPlatforms, projectMemoryFile } from './platforms.js';
|
|
13
|
+
import { normalizeRuntime } from './runtimes.js';
|
|
13
14
|
|
|
14
15
|
const MANIFEST_FILE = 'manifest.json';
|
|
15
16
|
const MANIFEST_DIR = '.prizmkit';
|
|
@@ -48,7 +49,7 @@ export async function writeManifest(projectRoot, data) {
|
|
|
48
49
|
* @param {Object} params
|
|
49
50
|
* @param {string} params.version - PrizmKit version
|
|
50
51
|
* @param {string} params.platform - 'codebuddy' | 'claude' | 'codex' | 'all' ('both' supported only for legacy manifests)
|
|
51
|
-
* @param {string} [params.runtime] -
|
|
52
|
+
* @param {string} [params.runtime] - canonical Python runtime id or compatibility alias
|
|
52
53
|
* @param {string} params.suite - skill suite name
|
|
53
54
|
* @param {string[]} params.skills - resolved skill name list
|
|
54
55
|
* @param {string[]} params.agents - agent file names (e.g. ['prizm-dev-team-dev.md'])
|
|
@@ -80,7 +81,7 @@ export function buildManifest({
|
|
|
80
81
|
installedAt: now,
|
|
81
82
|
updatedAt: now,
|
|
82
83
|
platform,
|
|
83
|
-
runtime: runtime
|
|
84
|
+
runtime: normalizeRuntime(runtime),
|
|
84
85
|
suite,
|
|
85
86
|
options: {
|
|
86
87
|
team: Boolean(team),
|
package/src/metadata.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import fs from 'fs-extra';
|
|
10
10
|
import path from 'path';
|
|
11
11
|
import { fileURLToPath } from 'url';
|
|
12
|
-
import { normalizeRuntime
|
|
12
|
+
import { normalizeRuntime } from './runtimes.js';
|
|
13
13
|
|
|
14
14
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
15
|
|
|
@@ -72,25 +72,14 @@ export function getSkillsDir() {
|
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Return candidate source directories for a skill in priority order.
|
|
75
|
-
* Windows
|
|
76
|
-
* tree so macOS/Linux content remains untouched.
|
|
75
|
+
* Retired Windows runtime aliases resolve to the canonical skill tree.
|
|
77
76
|
*/
|
|
78
|
-
export function getSkillCandidatePaths(skillName, skillDef = {}, runtime = '
|
|
79
|
-
|
|
77
|
+
export function getSkillCandidatePaths(skillName, skillDef = {}, runtime = 'python') {
|
|
78
|
+
normalizeRuntime(runtime);
|
|
80
79
|
const category = skillDef.category;
|
|
81
80
|
const subcategory = skillDef.subcategory;
|
|
82
81
|
const candidates = [];
|
|
83
82
|
|
|
84
|
-
if (normalizedRuntime === RUNTIME_WINDOWS && category) {
|
|
85
|
-
const windowsCategory = `${category}-windows`;
|
|
86
|
-
candidates.push(path.join(getBundledRoot(), 'skills-windows', skillName));
|
|
87
|
-
candidates.push(
|
|
88
|
-
subcategory
|
|
89
|
-
? path.join(getFrameworkRoot(), 'core', 'skills', windowsCategory, subcategory, skillName)
|
|
90
|
-
: path.join(getFrameworkRoot(), 'core', 'skills', windowsCategory, skillName)
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
83
|
candidates.push(path.join(getBundledRoot(), 'skills', skillName));
|
|
95
84
|
|
|
96
85
|
if (category) {
|
|
@@ -147,9 +136,9 @@ export function getTemplatesDir() {
|
|
|
147
136
|
/**
|
|
148
137
|
* 获取 dev-pipeline 目录路径
|
|
149
138
|
*/
|
|
150
|
-
export function getPipelineDir(runtime = '
|
|
151
|
-
|
|
152
|
-
const dirName =
|
|
139
|
+
export function getPipelineDir(runtime = 'python') {
|
|
140
|
+
normalizeRuntime(runtime);
|
|
141
|
+
const dirName = 'dev-pipeline';
|
|
153
142
|
const bundledDir = path.join(getBundledRoot(), dirName);
|
|
154
143
|
const coreDir = path.join(getFrameworkRoot(), dirName);
|
|
155
144
|
|
package/src/prompts.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { select, confirm, checkbox, input } from '@inquirer/prompts';
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import { platformLabel } from './platforms.js';
|
|
9
|
-
import { normalizeRuntime } from './runtimes.js';
|
|
10
9
|
|
|
11
10
|
let selectPlatformPrompt = select;
|
|
12
11
|
|
|
@@ -18,17 +17,6 @@ export function __resetSelectPlatformPromptForTests() {
|
|
|
18
17
|
selectPlatformPrompt = select;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
export async function selectRuntime(currentRuntime) {
|
|
22
|
-
return select({
|
|
23
|
-
message: '选择运行系统 (决定安装 macOS/Linux 或 Windows 版本的流水线与编排技能):',
|
|
24
|
-
choices: [
|
|
25
|
-
{ name: 'macOS/Linux — 使用 Bash 流水线', value: 'unix' },
|
|
26
|
-
{ name: 'Windows PowerShell — 使用原生 PowerShell 流水线', value: 'windows' },
|
|
27
|
-
],
|
|
28
|
-
default: normalizeRuntime(currentRuntime),
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
20
|
/**
|
|
33
21
|
* Select target platform (codebuddy, claude, codex, or all).
|
|
34
22
|
* @param {string} currentPlatform - current platform value
|
package/src/runtimes.js
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
export const
|
|
2
|
-
export const
|
|
3
|
-
|
|
1
|
+
export const RUNTIME_PYTHON = 'python';
|
|
2
|
+
export const RUNTIME_IDS = [RUNTIME_PYTHON];
|
|
3
|
+
|
|
4
|
+
export const LEGACY_UNIX_RUNTIME_ALIASES = ['unix', 'macos-linux', 'macos', 'linux'];
|
|
5
|
+
export const RETIRED_WINDOWS_RUNTIME_ALIASES = ['windows', 'win', 'powershell'];
|
|
6
|
+
export const LEGACY_RUNTIME_ALIASES = [
|
|
7
|
+
...LEGACY_UNIX_RUNTIME_ALIASES,
|
|
8
|
+
...RETIRED_WINDOWS_RUNTIME_ALIASES,
|
|
9
|
+
];
|
|
4
10
|
|
|
5
11
|
export function detectDefaultRuntime() {
|
|
6
|
-
return
|
|
12
|
+
return RUNTIME_PYTHON;
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
export function normalizeRuntime(runtime) {
|
|
10
|
-
if (!runtime
|
|
11
|
-
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
14
|
-
|
|
16
|
+
if (!runtime) return RUNTIME_PYTHON;
|
|
17
|
+
const normalized = String(runtime).trim().toLowerCase();
|
|
18
|
+
if (!normalized || normalized === 'auto') return RUNTIME_PYTHON;
|
|
19
|
+
if (LEGACY_RUNTIME_ALIASES.includes(normalized)) return RUNTIME_PYTHON;
|
|
20
|
+
if (RUNTIME_IDS.includes(normalized)) return normalized;
|
|
21
|
+
throw new Error(`Unknown runtime "${runtime}". Expected python runtime, legacy compatibility alias, or auto.`);
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
export function runtimeLabel(runtime) {
|
|
18
|
-
|
|
19
|
-
return
|
|
25
|
+
normalizeRuntime(runtime);
|
|
26
|
+
return 'Python runtime';
|
|
20
27
|
}
|