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
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Shared utility functions for dev-pipeline scripts.
|
|
3
|
-
|
|
4
|
-
Centralizes common operations (JSON I/O, error reporting, display helpers)
|
|
5
|
-
to avoid duplication across pipeline scripts.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
import json
|
|
9
|
-
import logging
|
|
10
|
-
import os
|
|
11
|
-
import re
|
|
12
|
-
import sys
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def load_json_file(path):
|
|
16
|
-
"""Load and return parsed JSON from a file.
|
|
17
|
-
|
|
18
|
-
Returns (data, error_string). On success error_string is None.
|
|
19
|
-
"""
|
|
20
|
-
abs_path = os.path.abspath(path)
|
|
21
|
-
if not os.path.isfile(abs_path):
|
|
22
|
-
return None, "File not found: {}".format(abs_path)
|
|
23
|
-
try:
|
|
24
|
-
with open(abs_path, "r", encoding="utf-8") as f:
|
|
25
|
-
data = json.load(f)
|
|
26
|
-
except json.JSONDecodeError as e:
|
|
27
|
-
return None, "Invalid JSON: {}".format(str(e))
|
|
28
|
-
except IOError as e:
|
|
29
|
-
return None, "Cannot read file: {}".format(str(e))
|
|
30
|
-
return data, None
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def write_json_file(path, data):
|
|
34
|
-
"""Write data as JSON to a file. Creates parent directories if needed.
|
|
35
|
-
|
|
36
|
-
Returns an error string on failure, None on success.
|
|
37
|
-
"""
|
|
38
|
-
abs_path = os.path.abspath(path)
|
|
39
|
-
parent = os.path.dirname(abs_path)
|
|
40
|
-
if parent and not os.path.isdir(parent):
|
|
41
|
-
try:
|
|
42
|
-
os.makedirs(parent, exist_ok=True)
|
|
43
|
-
except OSError as e:
|
|
44
|
-
return "Cannot create directory: {}".format(str(e))
|
|
45
|
-
try:
|
|
46
|
-
with open(abs_path, "w", encoding="utf-8") as f:
|
|
47
|
-
json.dump(data, f, indent=2, ensure_ascii=False)
|
|
48
|
-
f.write("\n")
|
|
49
|
-
except IOError as e:
|
|
50
|
-
return "Cannot write file: {}".format(str(e))
|
|
51
|
-
return None
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def setup_logging(name="prizmkit.dev_pipeline", level=None):
|
|
55
|
-
"""Configure and return a standard logger for pipeline scripts.
|
|
56
|
-
|
|
57
|
-
Logs are written to stderr to avoid interfering with stdout JSON outputs.
|
|
58
|
-
"""
|
|
59
|
-
resolved_level = (level or os.environ.get("PRIZMKIT_LOG_LEVEL", "INFO")).upper()
|
|
60
|
-
numeric_level = getattr(logging, resolved_level, logging.INFO)
|
|
61
|
-
|
|
62
|
-
root_logger = logging.getLogger()
|
|
63
|
-
if not root_logger.handlers:
|
|
64
|
-
logging.basicConfig(
|
|
65
|
-
level=numeric_level,
|
|
66
|
-
stream=sys.stderr,
|
|
67
|
-
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
logger = logging.getLogger(name)
|
|
71
|
-
logger.setLevel(numeric_level)
|
|
72
|
-
return logger
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def error_out(message, code=1):
|
|
76
|
-
"""Print an error JSON and exit with the given code."""
|
|
77
|
-
output = {"error": message}
|
|
78
|
-
print(json.dumps(output, indent=2, ensure_ascii=False))
|
|
79
|
-
sys.exit(code)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def pad_right(text, width):
|
|
83
|
-
"""Pad text with spaces to fill width, accounting for ANSI escape codes."""
|
|
84
|
-
i = 0
|
|
85
|
-
visible_len = 0
|
|
86
|
-
while i < len(text):
|
|
87
|
-
if text[i] == "\033":
|
|
88
|
-
while i < len(text) and text[i] != "m":
|
|
89
|
-
i += 1
|
|
90
|
-
i += 1
|
|
91
|
-
else:
|
|
92
|
-
visible_len += 1
|
|
93
|
-
i += 1
|
|
94
|
-
padding = width - visible_len
|
|
95
|
-
if padding > 0:
|
|
96
|
-
return text + " " * padding
|
|
97
|
-
return text
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def _build_progress_bar(percent, width=20):
|
|
101
|
-
"""Build a text progress bar.
|
|
102
|
-
|
|
103
|
-
Example: ████████░░░░░░░░░░░░ 40%
|
|
104
|
-
"""
|
|
105
|
-
filled = int(width * percent / 100)
|
|
106
|
-
empty = width - filled
|
|
107
|
-
bar = "\u2588" * filled + "\u2591" * empty
|
|
108
|
-
return "{} {:>3}%".format(bar, int(percent))
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def _read_file_safe(filepath):
|
|
112
|
-
"""Read a file and return its content, or empty string on error."""
|
|
113
|
-
try:
|
|
114
|
-
with open(filepath, "r", encoding="utf-8") as f:
|
|
115
|
-
return f.read()
|
|
116
|
-
except (IOError, OSError):
|
|
117
|
-
return ""
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def _detect_node_runtime(project_root, pkg):
|
|
121
|
-
"""Detect Node.js runtime version from engines, .nvmrc, or .node-version."""
|
|
122
|
-
engines = pkg.get("engines", {})
|
|
123
|
-
node_ver = engines.get("node", "")
|
|
124
|
-
if node_ver:
|
|
125
|
-
return "Node.js {}".format(node_ver)
|
|
126
|
-
|
|
127
|
-
for version_file in [".nvmrc", ".node-version"]:
|
|
128
|
-
vpath = os.path.join(project_root, version_file)
|
|
129
|
-
if os.path.isfile(vpath):
|
|
130
|
-
content = _read_file_safe(vpath).strip()
|
|
131
|
-
if content:
|
|
132
|
-
return "Node.js {}".format(content)
|
|
133
|
-
|
|
134
|
-
return "Node.js"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
def _parse_python_deps(py_content, req_content):
|
|
138
|
-
"""Extract Python package names from pyproject.toml and requirements.txt.
|
|
139
|
-
|
|
140
|
-
Returns a set of lowercased package names (without version specifiers).
|
|
141
|
-
"""
|
|
142
|
-
deps = set()
|
|
143
|
-
|
|
144
|
-
# Parse requirements.txt lines: "package==1.0", "package>=2.0", "package"
|
|
145
|
-
for line in req_content.splitlines():
|
|
146
|
-
line = line.strip()
|
|
147
|
-
if not line or line.startswith("#") or line.startswith("-"):
|
|
148
|
-
continue
|
|
149
|
-
# Split on version specifiers and extras
|
|
150
|
-
name = re.split(r"[>=<!~;\[\s]", line, 1)[0].strip()
|
|
151
|
-
if name:
|
|
152
|
-
deps.add(name.lower())
|
|
153
|
-
|
|
154
|
-
# Parse pyproject.toml dependencies (simplified: look for quoted strings
|
|
155
|
-
# in [project.dependencies] and [project.optional-dependencies.*] sections)
|
|
156
|
-
in_deps_section = False
|
|
157
|
-
for line in py_content.splitlines():
|
|
158
|
-
stripped = line.strip()
|
|
159
|
-
if stripped.startswith("["):
|
|
160
|
-
in_deps_section = (
|
|
161
|
-
"dependencies" in stripped.lower()
|
|
162
|
-
and "optional" not in stripped.lower()
|
|
163
|
-
) or "dependencies" in stripped.lower()
|
|
164
|
-
continue
|
|
165
|
-
if in_deps_section:
|
|
166
|
-
# Match quoted dependency: "flask>=2.0" or 'django~=4.0'
|
|
167
|
-
match = re.match(r"""^[\s"']*([a-zA-Z0-9_-]+)""", stripped)
|
|
168
|
-
if match:
|
|
169
|
-
deps.add(match.group(1).lower())
|
|
170
|
-
|
|
171
|
-
return deps
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
def detect_project_context(project_root):
|
|
175
|
-
"""Auto-detect project tech stack from project files.
|
|
176
|
-
|
|
177
|
-
Reads package.json, pyproject.toml, requirements.txt, docker-compose,
|
|
178
|
-
and common config files to infer language, frameworks, styling,
|
|
179
|
-
database, ORM, bundler, testing, and project type.
|
|
180
|
-
|
|
181
|
-
Returns a dict of detected key-value pairs. Only detected fields are
|
|
182
|
-
included — no empty or null values. Adapts to any project type
|
|
183
|
-
(frontend-only, backend-only, fullstack, library, CLI, monorepo).
|
|
184
|
-
"""
|
|
185
|
-
detected = {}
|
|
186
|
-
|
|
187
|
-
# ── 1. Node.js / JavaScript / TypeScript project ──
|
|
188
|
-
pkg_path = os.path.join(project_root, "package.json")
|
|
189
|
-
if os.path.isfile(pkg_path):
|
|
190
|
-
try:
|
|
191
|
-
with open(pkg_path, "r", encoding="utf-8") as f:
|
|
192
|
-
pkg = json.load(f)
|
|
193
|
-
|
|
194
|
-
# All dependencies combined for detection
|
|
195
|
-
deps = {}
|
|
196
|
-
deps.update(pkg.get("dependencies", {}))
|
|
197
|
-
deps.update(pkg.get("devDependencies", {}))
|
|
198
|
-
|
|
199
|
-
# Language
|
|
200
|
-
if "typescript" in deps or os.path.isfile(
|
|
201
|
-
os.path.join(project_root, "tsconfig.json")
|
|
202
|
-
):
|
|
203
|
-
detected["language"] = "TypeScript"
|
|
204
|
-
else:
|
|
205
|
-
detected["language"] = "JavaScript"
|
|
206
|
-
|
|
207
|
-
# Runtime
|
|
208
|
-
detected["runtime"] = _detect_node_runtime(project_root, pkg)
|
|
209
|
-
|
|
210
|
-
# Test framework (more specific first)
|
|
211
|
-
scripts = pkg.get("scripts", {})
|
|
212
|
-
test_script = (
|
|
213
|
-
scripts.get("test", "")
|
|
214
|
-
+ " "
|
|
215
|
-
+ scripts.get("test:unit", "")
|
|
216
|
-
)
|
|
217
|
-
if "vitest" in deps or "vitest" in test_script:
|
|
218
|
-
detected["testing_framework"] = "Vitest"
|
|
219
|
-
elif "jest" in deps or "jest" in test_script:
|
|
220
|
-
detected["testing_framework"] = "Jest"
|
|
221
|
-
elif "mocha" in deps or "mocha" in test_script:
|
|
222
|
-
detected["testing_framework"] = "Mocha"
|
|
223
|
-
elif "--test" in test_script or "node:test" in test_script:
|
|
224
|
-
detected["testing_framework"] = "Node.js built-in test runner"
|
|
225
|
-
|
|
226
|
-
# ── Frontend framework ──
|
|
227
|
-
frontend_frameworks = [
|
|
228
|
-
("next", "Next.js"),
|
|
229
|
-
("nuxt", "Nuxt"),
|
|
230
|
-
("@angular/core", "Angular"),
|
|
231
|
-
("svelte", "Svelte"),
|
|
232
|
-
("solid-js", "Solid.js"),
|
|
233
|
-
("react", "React"),
|
|
234
|
-
("vue", "Vue.js"),
|
|
235
|
-
]
|
|
236
|
-
for dep_name, fw_name in frontend_frameworks:
|
|
237
|
-
if dep_name in deps:
|
|
238
|
-
detected["frontend_framework"] = fw_name
|
|
239
|
-
break
|
|
240
|
-
|
|
241
|
-
# ── Backend framework ──
|
|
242
|
-
backend_frameworks = [
|
|
243
|
-
("@nestjs/core", "NestJS"),
|
|
244
|
-
("express", "Express.js"),
|
|
245
|
-
("fastify", "Fastify"),
|
|
246
|
-
("koa", "Koa"),
|
|
247
|
-
("hapi", "Hapi"),
|
|
248
|
-
("hono", "Hono"),
|
|
249
|
-
]
|
|
250
|
-
for dep_name, fw_name in backend_frameworks:
|
|
251
|
-
if dep_name in deps:
|
|
252
|
-
detected["backend_framework"] = fw_name
|
|
253
|
-
break
|
|
254
|
-
|
|
255
|
-
# Legacy "framework" field for backward compatibility
|
|
256
|
-
if "frontend_framework" in detected:
|
|
257
|
-
detected["framework"] = detected["frontend_framework"]
|
|
258
|
-
elif "backend_framework" in detected:
|
|
259
|
-
detected["framework"] = detected["backend_framework"]
|
|
260
|
-
|
|
261
|
-
# ── Frontend styling ──
|
|
262
|
-
styling_libs = [
|
|
263
|
-
("tailwindcss", "Tailwind CSS"),
|
|
264
|
-
("@tailwindcss/vite", "Tailwind CSS"),
|
|
265
|
-
("styled-components", "Styled Components"),
|
|
266
|
-
("@emotion/react", "Emotion"),
|
|
267
|
-
("@emotion/styled", "Emotion"),
|
|
268
|
-
("@mui/material", "Material UI"),
|
|
269
|
-
("@chakra-ui/react", "Chakra UI"),
|
|
270
|
-
("antd", "Ant Design"),
|
|
271
|
-
("sass", "SCSS/Sass"),
|
|
272
|
-
("node-sass", "SCSS/Sass"),
|
|
273
|
-
("less", "Less"),
|
|
274
|
-
]
|
|
275
|
-
for dep_name, style_name in styling_libs:
|
|
276
|
-
if dep_name in deps:
|
|
277
|
-
detected["frontend_styling"] = style_name
|
|
278
|
-
break
|
|
279
|
-
|
|
280
|
-
# ── Database ──
|
|
281
|
-
db_libs = [
|
|
282
|
-
("pg", "PostgreSQL"),
|
|
283
|
-
("postgres", "PostgreSQL"),
|
|
284
|
-
("mysql2", "MySQL"),
|
|
285
|
-
("mysql", "MySQL"),
|
|
286
|
-
("better-sqlite3", "SQLite"),
|
|
287
|
-
("mongodb", "MongoDB"),
|
|
288
|
-
("mongoose", "MongoDB"),
|
|
289
|
-
("redis", "Redis"),
|
|
290
|
-
("ioredis", "Redis"),
|
|
291
|
-
]
|
|
292
|
-
for dep_name, db_name in db_libs:
|
|
293
|
-
if dep_name in deps:
|
|
294
|
-
detected["database"] = db_name
|
|
295
|
-
break
|
|
296
|
-
|
|
297
|
-
# ── ORM ──
|
|
298
|
-
orm_libs = [
|
|
299
|
-
("@prisma/client", "Prisma"),
|
|
300
|
-
("prisma", "Prisma"),
|
|
301
|
-
("drizzle-orm", "Drizzle"),
|
|
302
|
-
("typeorm", "TypeORM"),
|
|
303
|
-
("sequelize", "Sequelize"),
|
|
304
|
-
("mongoose", "Mongoose"),
|
|
305
|
-
("knex", "Knex.js"),
|
|
306
|
-
("@mikro-orm/core", "MikroORM"),
|
|
307
|
-
]
|
|
308
|
-
for dep_name, orm_name in orm_libs:
|
|
309
|
-
if dep_name in deps:
|
|
310
|
-
detected["orm"] = orm_name
|
|
311
|
-
break
|
|
312
|
-
|
|
313
|
-
# ── Bundler ──
|
|
314
|
-
bundler_libs = [
|
|
315
|
-
("vite", "Vite"),
|
|
316
|
-
("webpack", "Webpack"),
|
|
317
|
-
("esbuild", "esbuild"),
|
|
318
|
-
("rollup", "Rollup"),
|
|
319
|
-
("parcel", "Parcel"),
|
|
320
|
-
("turbo", "Turborepo"),
|
|
321
|
-
("@rspack/core", "Rspack"),
|
|
322
|
-
]
|
|
323
|
-
for dep_name, bundler_name in bundler_libs:
|
|
324
|
-
if dep_name in deps:
|
|
325
|
-
detected["bundler"] = bundler_name
|
|
326
|
-
break
|
|
327
|
-
|
|
328
|
-
# ── Project type inference ──
|
|
329
|
-
has_frontend = "frontend_framework" in detected
|
|
330
|
-
has_backend = "backend_framework" in detected
|
|
331
|
-
has_workspaces = "workspaces" in pkg
|
|
332
|
-
has_bin = "bin" in pkg
|
|
333
|
-
|
|
334
|
-
if has_workspaces:
|
|
335
|
-
detected["project_type"] = "monorepo"
|
|
336
|
-
elif has_frontend and has_backend:
|
|
337
|
-
detected["project_type"] = "fullstack"
|
|
338
|
-
elif has_frontend:
|
|
339
|
-
detected["project_type"] = "frontend"
|
|
340
|
-
elif has_backend:
|
|
341
|
-
detected["project_type"] = "backend"
|
|
342
|
-
elif has_bin:
|
|
343
|
-
detected["project_type"] = "cli"
|
|
344
|
-
elif "main" in pkg or "exports" in pkg:
|
|
345
|
-
detected["project_type"] = "library"
|
|
346
|
-
|
|
347
|
-
except (json.JSONDecodeError, IOError):
|
|
348
|
-
pass
|
|
349
|
-
|
|
350
|
-
# ── 2. Python project detection ──
|
|
351
|
-
if "language" not in detected:
|
|
352
|
-
py_content = ""
|
|
353
|
-
for marker in ["pyproject.toml", "setup.py", "requirements.txt"]:
|
|
354
|
-
marker_path = os.path.join(project_root, marker)
|
|
355
|
-
if os.path.isfile(marker_path):
|
|
356
|
-
detected["language"] = "Python"
|
|
357
|
-
if marker == "pyproject.toml":
|
|
358
|
-
py_content = _read_file_safe(marker_path)
|
|
359
|
-
break
|
|
360
|
-
|
|
361
|
-
if detected.get("language") == "Python":
|
|
362
|
-
req_path = os.path.join(project_root, "requirements.txt")
|
|
363
|
-
req_content = _read_file_safe(req_path) if os.path.isfile(req_path) else ""
|
|
364
|
-
py_deps = _parse_python_deps(py_content, req_content)
|
|
365
|
-
|
|
366
|
-
# Runtime version (regex for requires-python = ">=3.11")
|
|
367
|
-
if py_content:
|
|
368
|
-
ver_match = re.search(
|
|
369
|
-
r'requires-python\s*=\s*["\']([^"\']+)["\']', py_content
|
|
370
|
-
)
|
|
371
|
-
if ver_match:
|
|
372
|
-
detected["runtime"] = "Python {}".format(ver_match.group(1))
|
|
373
|
-
|
|
374
|
-
# Testing
|
|
375
|
-
if "pytest" in py_deps:
|
|
376
|
-
detected["testing_framework"] = "pytest"
|
|
377
|
-
|
|
378
|
-
# Backend framework
|
|
379
|
-
py_backend = [
|
|
380
|
-
("django", "Django"),
|
|
381
|
-
("fastapi", "FastAPI"),
|
|
382
|
-
("flask", "Flask"),
|
|
383
|
-
("starlette", "Starlette"),
|
|
384
|
-
("tornado", "Tornado"),
|
|
385
|
-
("aiohttp", "aiohttp"),
|
|
386
|
-
]
|
|
387
|
-
for dep_name, fw_name in py_backend:
|
|
388
|
-
if dep_name in py_deps:
|
|
389
|
-
detected["backend_framework"] = fw_name
|
|
390
|
-
detected["framework"] = fw_name
|
|
391
|
-
break
|
|
392
|
-
|
|
393
|
-
# Database / ORM
|
|
394
|
-
py_db = [
|
|
395
|
-
("psycopg2", "PostgreSQL"),
|
|
396
|
-
("psycopg", "PostgreSQL"),
|
|
397
|
-
("asyncpg", "PostgreSQL"),
|
|
398
|
-
("pymysql", "MySQL"),
|
|
399
|
-
("pymongo", "MongoDB"),
|
|
400
|
-
("motor", "MongoDB"),
|
|
401
|
-
]
|
|
402
|
-
for dep_name, db_name in py_db:
|
|
403
|
-
if dep_name in py_deps:
|
|
404
|
-
detected["database"] = db_name
|
|
405
|
-
break
|
|
406
|
-
|
|
407
|
-
py_orm = [
|
|
408
|
-
("sqlalchemy", "SQLAlchemy"),
|
|
409
|
-
("tortoise-orm", "Tortoise ORM"),
|
|
410
|
-
("peewee", "Peewee"),
|
|
411
|
-
]
|
|
412
|
-
for dep_name, orm_name in py_orm:
|
|
413
|
-
if dep_name in py_deps:
|
|
414
|
-
detected["orm"] = orm_name
|
|
415
|
-
break
|
|
416
|
-
# Django ORM: if django is a dep and no other ORM detected
|
|
417
|
-
if "django" in py_deps and "orm" not in detected:
|
|
418
|
-
detected["orm"] = "Django ORM"
|
|
419
|
-
|
|
420
|
-
# Project type
|
|
421
|
-
if "backend_framework" in detected:
|
|
422
|
-
detected["project_type"] = "backend"
|
|
423
|
-
|
|
424
|
-
# ── 3. Go project detection ──
|
|
425
|
-
if "language" not in detected:
|
|
426
|
-
go_mod_path = os.path.join(project_root, "go.mod")
|
|
427
|
-
if os.path.isfile(go_mod_path):
|
|
428
|
-
detected["language"] = "Go"
|
|
429
|
-
detected["runtime"] = "Go"
|
|
430
|
-
go_content = _read_file_safe(go_mod_path)
|
|
431
|
-
if "gin-gonic" in go_content:
|
|
432
|
-
detected["backend_framework"] = "Gin"
|
|
433
|
-
elif "labstack/echo" in go_content:
|
|
434
|
-
detected["backend_framework"] = "Echo"
|
|
435
|
-
elif "go-chi/chi" in go_content:
|
|
436
|
-
detected["backend_framework"] = "Chi"
|
|
437
|
-
if "backend_framework" in detected:
|
|
438
|
-
detected["framework"] = detected["backend_framework"]
|
|
439
|
-
detected["project_type"] = "backend"
|
|
440
|
-
|
|
441
|
-
# ── 4. Rust / Java / other languages (basic detection) ──
|
|
442
|
-
if "language" not in detected:
|
|
443
|
-
if os.path.isfile(os.path.join(project_root, "Cargo.toml")):
|
|
444
|
-
detected["language"] = "Rust"
|
|
445
|
-
detected["runtime"] = "Rust"
|
|
446
|
-
elif os.path.isfile(os.path.join(project_root, "pom.xml")):
|
|
447
|
-
detected["language"] = "Java"
|
|
448
|
-
detected["runtime"] = "Java (Maven)"
|
|
449
|
-
elif os.path.isfile(os.path.join(project_root, "build.gradle")):
|
|
450
|
-
detected["language"] = "Java/Kotlin"
|
|
451
|
-
detected["runtime"] = "Java (Gradle)"
|
|
452
|
-
|
|
453
|
-
# ── 5. Database from docker-compose (cross-language) ──
|
|
454
|
-
if "database" not in detected:
|
|
455
|
-
for dc_name in [
|
|
456
|
-
"docker-compose.yml",
|
|
457
|
-
"docker-compose.yaml",
|
|
458
|
-
"compose.yml",
|
|
459
|
-
"compose.yaml",
|
|
460
|
-
]:
|
|
461
|
-
dc_path = os.path.join(project_root, dc_name)
|
|
462
|
-
if os.path.isfile(dc_path):
|
|
463
|
-
dc_content = _read_file_safe(dc_path).lower()
|
|
464
|
-
dc_db = [
|
|
465
|
-
("postgres", "PostgreSQL"),
|
|
466
|
-
("mysql", "MySQL"),
|
|
467
|
-
("mariadb", "MariaDB"),
|
|
468
|
-
("mongo", "MongoDB"),
|
|
469
|
-
("redis", "Redis"),
|
|
470
|
-
("sqlite", "SQLite"),
|
|
471
|
-
]
|
|
472
|
-
for pattern, db_name in dc_db:
|
|
473
|
-
if pattern in dc_content:
|
|
474
|
-
detected["database"] = db_name
|
|
475
|
-
break
|
|
476
|
-
break
|
|
477
|
-
|
|
478
|
-
return detected
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
def enrich_global_context(global_context, project_root):
|
|
482
|
-
"""Fill gaps in global_context using auto-detected project info.
|
|
483
|
-
|
|
484
|
-
Only adds auto-detected values for keys not already present.
|
|
485
|
-
Mutates global_context in place and returns it.
|
|
486
|
-
"""
|
|
487
|
-
if not project_root:
|
|
488
|
-
return global_context
|
|
489
|
-
|
|
490
|
-
detected = detect_project_context(project_root)
|
|
491
|
-
# Map detected keys → global_context convention names
|
|
492
|
-
key_mapping = {
|
|
493
|
-
"language": "language",
|
|
494
|
-
"testing_framework": "testing_strategy",
|
|
495
|
-
"framework": "framework",
|
|
496
|
-
"frontend_framework": "frontend_framework",
|
|
497
|
-
"frontend_styling": "frontend_styling",
|
|
498
|
-
"backend_framework": "backend_framework",
|
|
499
|
-
"database": "database",
|
|
500
|
-
"orm": "orm",
|
|
501
|
-
"bundler": "bundler",
|
|
502
|
-
"project_type": "project_type",
|
|
503
|
-
"runtime": "runtime",
|
|
504
|
-
}
|
|
505
|
-
# Alternate key names that should block auto-detection
|
|
506
|
-
alt_keys = {
|
|
507
|
-
"testing_strategy": ["testing_framework", "test_framework", "testing"],
|
|
508
|
-
}
|
|
509
|
-
for det_key, ctx_key in key_mapping.items():
|
|
510
|
-
if det_key not in detected:
|
|
511
|
-
continue
|
|
512
|
-
if ctx_key in global_context:
|
|
513
|
-
continue
|
|
514
|
-
already_set = any(
|
|
515
|
-
k in global_context for k in alt_keys.get(ctx_key, [])
|
|
516
|
-
)
|
|
517
|
-
if not already_set:
|
|
518
|
-
global_context[ctx_key] = detected[det_key] + " (auto-detected)"
|
|
519
|
-
|
|
520
|
-
return global_context
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
def read_platform_conventions(project_root):
|
|
524
|
-
"""Resolve the platform-specific project conventions file.
|
|
525
|
-
|
|
526
|
-
Returns a path reference for the AI agent to read at runtime,
|
|
527
|
-
rather than inlining the full file content into the prompt.
|
|
528
|
-
"""
|
|
529
|
-
platform = os.environ.get("PRIZMKIT_PLATFORM", "claude")
|
|
530
|
-
if platform == "codebuddy":
|
|
531
|
-
candidates = ["CODEBUDDY.md", "CLAUDE.md", "AGENTS.md"]
|
|
532
|
-
elif platform == "codex":
|
|
533
|
-
candidates = ["AGENTS.md", "CLAUDE.md", "CODEBUDDY.md"]
|
|
534
|
-
else:
|
|
535
|
-
candidates = ["CLAUDE.md", "CODEBUDDY.md", "AGENTS.md"]
|
|
536
|
-
|
|
537
|
-
for filename in candidates:
|
|
538
|
-
filepath = os.path.join(project_root, filename)
|
|
539
|
-
if os.path.isfile(filepath):
|
|
540
|
-
return "`{}`".format(filename)
|
|
541
|
-
|
|
542
|
-
return "(No project conventions file found — AGENTS.md, CLAUDE.md, or CODEBUDDY.md)"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
**MODE: Plan Challenge**
|
|
3
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
4
|
-
2. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1/L2 docs for affected modules.
|
|
5
|
-
3. Read existing source files in the modules this plan touches.
|
|
6
|
-
4. Challenge plan.md against the project's existing architecture, patterns, and style.
|
|
7
|
-
Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` with findings (or 'No significant challenges')."
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"Read {{DEV_SUBAGENT_PATH}}. Fix NEEDS_FIXES issues for feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/review-report.md` — contains structured Fix Instructions with exact steps.
|
|
3
|
-
2. Follow Fix Instructions in order (respect Depends On / Blocks dependencies). Each FIX-N has: Root Cause, Fix Strategy, Code Guidance, and Verification criteria.
|
|
4
|
-
3. After each fix, run the Verification command listed in that FIX-N to confirm it works.
|
|
5
|
-
4. Run `{{TEST_CMD}}` to verify no regressions.
|
|
6
|
-
5. Append fix summary to '## Implementation Log' in context-snapshot.md.
|
|
7
|
-
6. Do NOT execute any git commands."
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"Read {{DEV_SUBAGENT_PATH}}. Implement feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
-
|
|
3
|
-
## Task Summary Card
|
|
4
|
-
|
|
5
|
-
**Objective**: Implement {{FEATURE_TITLE}}.
|
|
6
|
-
|
|
7
|
-
**Primary files** (see context-snapshot.md Section 4 for full manifest):
|
|
8
|
-
- Review plan.md Tasks section for the complete task-to-file mapping.
|
|
9
|
-
- Each task's `— file:` suffix identifies the target file.
|
|
10
|
-
|
|
11
|
-
**Test command**: `{{TEST_CMD}}`
|
|
12
|
-
|
|
13
|
-
**Known baseline failures**: `{{BASELINE_FAILURES}}`
|
|
14
|
-
|
|
15
|
-
**DO NOT**:
|
|
16
|
-
- Re-read source files already listed in context-snapshot.md Section 4 File Manifest
|
|
17
|
-
- Create new files unless a plan.md task explicitly requires it
|
|
18
|
-
- Run git commands
|
|
19
|
-
- Use mock success data or fake rows in UI/tests
|
|
20
|
-
|
|
21
|
-
## Required Inputs
|
|
22
|
-
|
|
23
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` first.
|
|
24
|
-
2. Use Section 4 File Manifest for targeted reads.
|
|
25
|
-
3. Do not expand scope beyond the Task Contract and Verification Gates.
|
|
26
|
-
4. Do not re-read source files already listed in Section 4 unless implementation details are missing from the manifest.
|
|
27
|
-
|
|
28
|
-
## Work
|
|
29
|
-
|
|
30
|
-
Run `/prizmkit-implement` to execute `plan.md`.
|
|
31
|
-
|
|
32
|
-
Test command:
|
|
33
|
-
`{{TEST_CMD}}`
|
|
34
|
-
|
|
35
|
-
Known baseline failures:
|
|
36
|
-
`{{BASELINE_FAILURES}}`
|
|
37
|
-
|
|
38
|
-
If plan.md has more than 5 tasks, run `/compact` after completing every 3 tasks to manage context budget. If `/compact` is unavailable, continue without it.
|
|
39
|
-
|
|
40
|
-
## Required Outputs
|
|
41
|
-
|
|
42
|
-
Before returning, append `## Implementation Log` to `context-snapshot.md` with:
|
|
43
|
-
- files changed/created
|
|
44
|
-
- key decisions
|
|
45
|
-
- deviations from plan
|
|
46
|
-
- test results
|
|
47
|
-
- Verification Gate status
|
|
48
|
-
- unresolved blockers, if any
|
|
49
|
-
|
|
50
|
-
## Protocol References
|
|
51
|
-
|
|
52
|
-
- Follow the global Context Budget Rules.
|
|
53
|
-
- Carry forward the Dev-isolated subset: skip scaffold/generated files listed in `context-snapshot.md`; verify dependency versions before install/build commands that resolve dependencies; after build/compile commands, ensure outputs are ignored and never commit generated artifacts.
|
|
54
|
-
- If tests fail, follow this Test Failure Recovery subset: classify failures as baseline, new regression, brittle test, or environment/tooling; fix new regressions and brittle tests while progress is being made; document baseline failures; write `failure-log.md` for blockers.
|
|
55
|
-
- Do not run git commands; staging and commit are handled by the orchestrator.
|
|
56
|
-
- **Edit safety**: If an Edit fails with 'String to replace not found', use Select-String or a targeted Read to find the target text before retrying. Never guess file offsets — verify them first.
|
|
57
|
-
- **Read safety**: If 3 consecutive Reads to the same file return 'shorter than offset' or 'Wasted call', STOP and report BLOCKED.
|
|
58
|
-
- **Test early**: Run `{{TEST_CMD}}` after every 3 successful Edit operations. Capture output with `Tee-Object (Join-Path $env:TEMP "test-out.txt")` and use Select-String for failures.
|
|
59
|
-
|
|
60
|
-
Do not return success unless:
|
|
61
|
-
1. implementation tasks are complete;
|
|
62
|
-
2. `## Implementation Log` exists;
|
|
63
|
-
3. every Verification Gate is verified.
|
|
64
|
-
|
|
65
|
-
If any Verification Gate is blocked, write `failure-log.md` and return a blocked/incomplete result instead of success."
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"Read {{DEV_SUBAGENT_PATH}}. You are resuming implementation of feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}).
|
|
2
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Section 4 has File Manifest, 'Implementation Log' (if present) shows what was already done.
|
|
3
|
-
2. Run `git diff HEAD` to see actual code changes already made.
|
|
4
|
-
3. Run `/prizmkit-implement` to complete the remaining `[ ]` tasks. Run tests with: `{{TEST_CMD}}`.
|
|
5
|
-
4. Do NOT execute any git commands."
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"Read {{REVIEWER_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/spec.md` (if it exists) for goals and Verification Gates; if spec.md does not exist, read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` Section 1 Task Contract instead
|
|
3
|
-
2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
4
|
-
3. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill will run its internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and write review-report.md.
|
|
5
|
-
4. Run the full test suite using `{{TEST_CMD}}`. When running tests: `& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "review-test-out.txt") | Select-Object -Last 20`, then Select-String `(Join-Path $env:TEMP "review-test-out.txt")` for details — do NOT re-run the suite multiple times.
|
|
6
|
-
5. review-report.md will be written to .prizmkit/specs/{{FEATURE_SLUG}}/ by prizmkit-code-review.
|
|
7
|
-
Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected."
|