@pennyfarthing/core 10.0.2 → 10.0.3
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/README.md +287 -0
- package/package.json +30 -44
- package/packages/core/dist/cli/commands/doctor-file-layout.test.d.ts +13 -0
- package/packages/core/dist/cli/commands/doctor-file-layout.test.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/doctor-file-layout.test.js +234 -0
- package/packages/core/dist/cli/commands/doctor-file-layout.test.js.map +1 -0
- package/{dist → packages/core/dist}/cli/commands/doctor.d.ts +8 -0
- package/{dist → packages/core/dist}/cli/commands/doctor.d.ts.map +1 -1
- package/{dist → packages/core/dist}/cli/commands/doctor.js +224 -3
- package/packages/core/dist/cli/commands/doctor.js.map +1 -0
- package/{dist → packages/core/dist}/cli/commands/e2e-fresh-install.test.js +1 -1
- package/{dist → packages/core/dist}/cli/commands/e2e-fresh-install.test.js.map +1 -1
- package/{dist → packages/core/dist}/cli/commands/e2e-upgrade.test.js +1 -1
- package/{dist → packages/core/dist}/cli/commands/e2e-upgrade.test.js.map +1 -1
- package/packages/core/dist/cli/commands/hooks-consolidation.test.d.ts +19 -0
- package/packages/core/dist/cli/commands/hooks-consolidation.test.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/hooks-consolidation.test.js +358 -0
- package/packages/core/dist/cli/commands/hooks-consolidation.test.js.map +1 -0
- package/{dist → packages/core/dist}/cli/commands/update.d.ts.map +1 -1
- package/{dist → packages/core/dist}/cli/commands/update.js +53 -1
- package/{dist → packages/core/dist}/cli/commands/update.js.map +1 -1
- package/{dist → packages/core/dist}/cli/utils/settings.d.ts.map +1 -1
- package/{dist → packages/core/dist}/cli/utils/settings.js +24 -0
- package/packages/core/dist/cli/utils/settings.js.map +1 -0
- package/{dist → packages/core/dist}/cli/utils/themes.d.ts +1 -0
- package/packages/core/dist/cli/utils/themes.d.ts.map +1 -0
- package/{dist → packages/core/dist}/cli/utils/themes.js.map +1 -1
- package/pennyfarthing-dist/agents/sm-setup.md +4 -4
- package/pennyfarthing-dist/agents/sm.md +8 -1
- package/pennyfarthing-dist/guides/bell-mode.md +65 -0
- package/pennyfarthing-dist/guides/benchmarks.md +62 -0
- package/pennyfarthing-dist/guides/bikelane.md +86 -0
- package/pennyfarthing-dist/guides/prime.md +72 -0
- package/pennyfarthing-dist/guides/reflector.md +59 -0
- package/pennyfarthing-dist/guides/relay-mode.md +53 -0
- package/pennyfarthing-dist/guides/tirepump.md +54 -0
- package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +59 -58
- package/pennyfarthing-dist/personas/themes/blade-runner.yaml +10 -10
- package/pennyfarthing-dist/personas/themes/doctor-who.yaml +10 -10
- package/pennyfarthing-dist/personas/themes/dune.yaml +64 -69
- package/pennyfarthing-dist/personas/themes/firefly.yaml +60 -73
- package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +60 -69
- package/pennyfarthing-dist/personas/themes/harry-potter.yaml +59 -73
- package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +45 -57
- package/pennyfarthing-dist/personas/themes/mad-max.yaml +5 -11
- package/pennyfarthing-dist/personas/themes/princess-bride.yaml +53 -63
- package/pennyfarthing-dist/personas/themes/sandman.yaml +59 -59
- package/pennyfarthing-dist/personas/themes/the-matrix.yaml +61 -62
- package/pennyfarthing-dist/personas/themes/west-wing.yaml +8 -9
- package/pennyfarthing-dist/scripts/core/agent-session.sh +0 -0
- package/pennyfarthing-dist/scripts/core/check-context.sh +0 -0
- package/pennyfarthing-dist/scripts/core/handoff-marker.sh +0 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +0 -0
- package/pennyfarthing-dist/scripts/core/prime.sh +0 -0
- package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +0 -0
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +0 -0
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +0 -0
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +0 -0
- package/pennyfarthing-dist/scripts/git/release.sh +0 -0
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +0 -0
- package/pennyfarthing-dist/scripts/health/drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +32 -0
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +0 -0
- package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +12 -91
- package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +11 -86
- package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +11 -255
- package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/background-tasks.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/common.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/file-lock.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/logging.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/retry.sh +0 -0
- package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +0 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add-short-names.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add_short_names.py +0 -0
- package/pennyfarthing-dist/scripts/misc/backlog.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/check-status.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/find-related-work.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +0 -0
- package/pennyfarthing-dist/scripts/misc/repo-scan.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/repo-utils.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-ci.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/statusline.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/uninstall.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +0 -0
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/archive-story.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/available-stories.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/check-story.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/get-epic-field.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/get-story-field.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/list-future.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/new-sprint.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/promote-epic.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-common.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-info.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-metrics.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-status.sh +0 -0
- package/pennyfarthing-dist/scripts/sprint/validate-sprint-yaml.sh +0 -0
- package/pennyfarthing-dist/scripts/story/create-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/size-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/story-template.sh +0 -0
- package/pennyfarthing-dist/scripts/test/ensure-swebench-data.sh +0 -0
- package/pennyfarthing-dist/scripts/test/swebench-judge.py +0 -0
- package/pennyfarthing-dist/scripts/test/test-cache.sh +0 -0
- package/pennyfarthing-dist/scripts/test/test-setup.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/check.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/theme/compute-theme-tiers.sh +0 -0
- package/pennyfarthing-dist/scripts/theme/compute_theme_tiers.py +0 -0
- package/pennyfarthing-dist/scripts/theme/list-themes.sh +0 -0
- package/pennyfarthing-dist/scripts/theme/update-theme-tiers.sh +0 -0
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/check.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/check.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/complete-step.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +0 -0
- package/pennyfarthing-dist/skills/jira/SKILL.md +107 -408
- package/pennyfarthing-dist/skills/sprint/scripts/archive-story.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/available-stories.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/check-story.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/create-jira-epic.sh +17 -95
- package/pennyfarthing-dist/skills/sprint/scripts/new-sprint.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/promote-epic.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-info.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-status.sh +0 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sync-epic-jira.sh +20 -90
- package/pennyfarthing-dist/skills/story/scripts/create-story.sh +0 -0
- package/pennyfarthing-dist/skills/story/scripts/size-story.sh +0 -0
- package/pennyfarthing-dist/skills/story/scripts/story-template.sh +0 -0
- package/pennyfarthing-dist/skills/workflow/scripts/list-workflows.sh +0 -0
- package/pennyfarthing-dist/skills/workflow/scripts/resume-workflow.sh +0 -0
- package/pennyfarthing-dist/skills/workflow/scripts/show-workflow.sh +0 -0
- package/pennyfarthing-dist/skills/workflow/scripts/start-workflow.sh +0 -0
- package/pennyfarthing-dist/skills/workflow/scripts/workflow-status.sh +0 -0
- package/pennyfarthing-dist/templates/settings.local.json.template +9 -1
- package/pennyfarthing_scripts/README.md +66 -0
- package/pennyfarthing_scripts/__init__.py +17 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_bidirectional_sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_epic_creation.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_sync_story.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/output.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/patch_mode.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/sprint.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bellmode_hook.py +154 -0
- package/pennyfarthing_scripts/brownfield/__init__.py +35 -0
- package/pennyfarthing_scripts/brownfield/__main__.py +7 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/discover.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/cli.py +131 -0
- package/pennyfarthing_scripts/brownfield/discover.py +753 -0
- package/pennyfarthing_scripts/cli.py +184 -0
- package/pennyfarthing_scripts/common/__init__.py +49 -0
- package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/output.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/themes.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/config.py +91 -0
- package/pennyfarthing_scripts/common/output.py +180 -0
- package/pennyfarthing_scripts/common/themes.py +253 -0
- package/pennyfarthing_scripts/config.py +21 -0
- package/pennyfarthing_scripts/context.py +414 -0
- package/pennyfarthing_scripts/git/__init__.py +29 -0
- package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/create_branches.py +439 -0
- package/pennyfarthing_scripts/git/status_all.py +310 -0
- package/pennyfarthing_scripts/hooks/cyclist-pretooluse-hook.sh +7 -0
- package/pennyfarthing_scripts/hooks.py +454 -0
- package/pennyfarthing_scripts/hotspots/__init__.py +31 -0
- package/pennyfarthing_scripts/hotspots/__main__.py +6 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/analyze.py +472 -0
- package/pennyfarthing_scripts/hotspots/cli.py +152 -0
- package/pennyfarthing_scripts/hotspots/formatters.py +109 -0
- package/pennyfarthing_scripts/hotspots/models.py +60 -0
- package/pennyfarthing_scripts/jira/__init__.py +99 -0
- package/pennyfarthing_scripts/jira/__main__.py +10 -0
- package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/compat.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/create.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/mappings.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/story.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/bidirectional.py +561 -0
- package/pennyfarthing_scripts/jira/claim.py +211 -0
- package/pennyfarthing_scripts/jira/cli.py +277 -0
- package/pennyfarthing_scripts/jira/client.py +762 -0
- package/pennyfarthing_scripts/jira/create.py +267 -0
- package/pennyfarthing_scripts/jira/epic.py +176 -0
- package/pennyfarthing_scripts/jira/operations.py +124 -0
- package/pennyfarthing_scripts/jira/reconcile.py +277 -0
- package/pennyfarthing_scripts/jira/story.py +219 -0
- package/pennyfarthing_scripts/jira/sync.py +350 -0
- package/pennyfarthing_scripts/jira_bidirectional_sync.py +37 -0
- package/pennyfarthing_scripts/jira_epic_creation.py +30 -0
- package/pennyfarthing_scripts/jira_sync.py +36 -0
- package/pennyfarthing_scripts/jira_sync_story.py +30 -0
- package/pennyfarthing_scripts/migration/__init__.py +39 -0
- package/pennyfarthing_scripts/migration/__main__.py +10 -0
- package/pennyfarthing_scripts/migration/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/session.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/skill.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/step.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/validate.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/cli.py +304 -0
- package/pennyfarthing_scripts/migration/session.py +384 -0
- package/pennyfarthing_scripts/migration/skill.py +188 -0
- package/pennyfarthing_scripts/migration/step.py +229 -0
- package/pennyfarthing_scripts/migration/validate.py +282 -0
- package/pennyfarthing_scripts/output.py +37 -0
- package/pennyfarthing_scripts/patch_mode.py +449 -0
- package/pennyfarthing_scripts/preflight/__init__.py +17 -0
- package/pennyfarthing_scripts/preflight/__main__.py +10 -0
- package/pennyfarthing_scripts/preflight/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/finish.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/cli.py +141 -0
- package/pennyfarthing_scripts/preflight/finish.py +382 -0
- package/pennyfarthing_scripts/pretooluse_hook.py +193 -0
- package/pennyfarthing_scripts/prime/__init__.py +125 -0
- package/pennyfarthing_scripts/prime/__main__.py +8 -0
- package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/persona.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/session.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/tiers.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/cli.py +645 -0
- package/pennyfarthing_scripts/prime/loader.py +239 -0
- package/pennyfarthing_scripts/prime/models.py +206 -0
- package/pennyfarthing_scripts/prime/persona.py +309 -0
- package/pennyfarthing_scripts/prime/session.py +183 -0
- package/pennyfarthing_scripts/prime/tiers.py +201 -0
- package/pennyfarthing_scripts/prime/workflow.py +275 -0
- package/pennyfarthing_scripts/schema_validation_hook.py +306 -0
- package/pennyfarthing_scripts/sprint/__init__.py +66 -0
- package/pennyfarthing_scripts/sprint/__main__.py +10 -0
- package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/archive.py +108 -0
- package/pennyfarthing_scripts/sprint/archive_epic.py +399 -0
- package/pennyfarthing_scripts/sprint/cli.py +373 -0
- package/pennyfarthing_scripts/sprint/import_epic.py +431 -0
- package/pennyfarthing_scripts/sprint/loader.py +193 -0
- package/pennyfarthing_scripts/sprint/status.py +122 -0
- package/pennyfarthing_scripts/sprint/story_add.py +187 -0
- package/pennyfarthing_scripts/sprint/story_update.py +181 -0
- package/pennyfarthing_scripts/sprint/validate_cmd.py +268 -0
- package/pennyfarthing_scripts/sprint/validator.py +570 -0
- package/pennyfarthing_scripts/sprint/work.py +192 -0
- package/pennyfarthing_scripts/sprint/yaml_io.py +258 -0
- package/pennyfarthing_scripts/story/__init__.py +67 -0
- package/pennyfarthing_scripts/story/__main__.py +10 -0
- package/pennyfarthing_scripts/story/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/create.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/size.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/template.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/cli.py +105 -0
- package/pennyfarthing_scripts/story/create.py +167 -0
- package/pennyfarthing_scripts/story/size.py +113 -0
- package/pennyfarthing_scripts/story/template.py +151 -0
- package/pennyfarthing_scripts/swebench.py +216 -0
- package/pennyfarthing_scripts/tests/__init__.py +1 -0
- package/pennyfarthing_scripts/tests/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_brownfield.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_cli_modules.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_common.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_git_utils.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_jira_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_package_structure.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_patch_mode.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_prime.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_sprint_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_add.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_update.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_tiers.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_token_counting.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_validate_cmd.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/conftest.py +106 -0
- package/pennyfarthing_scripts/tests/test_brownfield.py +842 -0
- package/pennyfarthing_scripts/tests/test_cli_modules.py +245 -0
- package/pennyfarthing_scripts/tests/test_common.py +180 -0
- package/pennyfarthing_scripts/tests/test_git_utils.py +866 -0
- package/pennyfarthing_scripts/tests/test_jira_package.py +334 -0
- package/pennyfarthing_scripts/tests/test_package_structure.py +372 -0
- package/pennyfarthing_scripts/tests/test_patch_mode.py +830 -0
- package/pennyfarthing_scripts/tests/test_prime.py +1050 -0
- package/pennyfarthing_scripts/tests/test_sprint_package.py +236 -0
- package/pennyfarthing_scripts/tests/test_sprint_validator.py +731 -0
- package/pennyfarthing_scripts/tests/test_story_add.py +921 -0
- package/pennyfarthing_scripts/tests/test_story_package.py +156 -0
- package/pennyfarthing_scripts/tests/test_story_update.py +769 -0
- package/pennyfarthing_scripts/tests/test_tiers.py +1090 -0
- package/pennyfarthing_scripts/tests/test_token_counting.py +559 -0
- package/pennyfarthing_scripts/tests/test_validate_cmd.py +500 -0
- package/pennyfarthing_scripts/tests/test_workflow_check.py +341 -0
- package/pennyfarthing_scripts/tests/test_yaml_io.py +698 -0
- package/pennyfarthing_scripts/welcome_hook.py +157 -0
- package/pennyfarthing_scripts/workflow.py +287 -0
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/utils/settings.js.map +0 -1
- package/dist/cli/utils/themes.d.ts.map +0 -1
- package/pennyfarthing-dist/scripts/jira/jira-lib.sh +0 -464
- package/pennyfarthing-dist/scripts/jira/jira-sync.sh +0 -16
- package/pennyfarthing-dist/scripts/jira/sync-epic-to-jira.sh +0 -16
- /package/{bin → packages/core/bin}/pennyfarthing.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.js +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/index.js +0 -0
- /package/{dist → packages/core/dist}/bmad/index.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.js +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/e2e-fresh-install.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/e2e-fresh-install.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/e2e-upgrade.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/e2e-upgrade.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init-consolidation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init-consolidation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init-consolidation.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init-consolidation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/persona-config-consolidation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/persona-config-consolidation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/persona-config-consolidation.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/persona-config-consolidation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update-consolidation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update-consolidation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update-consolidation.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update-consolidation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/index.js +0 -0
- /package/{dist → packages/core/dist}/cli/index.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/files.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/files.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/files.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/files.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/settings-consolidation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/settings-consolidation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/settings-consolidation.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/settings-consolidation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/settings.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.js.map +0 -0
- /package/{dist → packages/core/dist}/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/index.js +0 -0
- /package/{dist → packages/core/dist}/index.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/index.js +0 -0
- /package/{dist → packages/core/dist}/permissions/index.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.js +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.js +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.js +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.js +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.js +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/complete-step-integration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/complete-step-integration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/complete-step-integration.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/complete-step-integration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.js +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.js +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.js +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.js +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/index.js +0 -0
- /package/{dist → packages/core/dist}/workflow/index.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.js +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.js +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.js +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.js +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.js +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.js.map +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Skill file auditing tools.
|
|
3
|
+
|
|
4
|
+
Audits skill files for conformance to guides/skill-schema.md.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import re
|
|
10
|
+
from dataclasses import dataclass, field
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Tag requirements
|
|
15
|
+
REQUIRED_TAGS = ["run", "output"]
|
|
16
|
+
RECOMMENDED_TAGS = ["args", "example", "when"]
|
|
17
|
+
OPTIONAL_TAGS = ["critical", "agent-activation"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@dataclass
|
|
21
|
+
class SkillAuditResult:
|
|
22
|
+
"""Result of auditing a skill file."""
|
|
23
|
+
|
|
24
|
+
skill_name: str
|
|
25
|
+
file_path: Path
|
|
26
|
+
has_frontmatter: bool = False
|
|
27
|
+
missing_required: list[str] = field(default_factory=list)
|
|
28
|
+
missing_recommended: list[str] = field(default_factory=list)
|
|
29
|
+
present_tags: list[str] = field(default_factory=list)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def is_valid(self) -> bool:
|
|
33
|
+
"""Check if skill passes validation (has all required)."""
|
|
34
|
+
return len(self.missing_required) == 0
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def status(self) -> str:
|
|
38
|
+
"""Get status string."""
|
|
39
|
+
if not self.is_valid:
|
|
40
|
+
return "NEEDS UPDATE"
|
|
41
|
+
if self.missing_recommended:
|
|
42
|
+
return "PARTIAL"
|
|
43
|
+
return "OK"
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _has_frontmatter(content: str) -> bool:
|
|
47
|
+
"""Check if file has YAML frontmatter."""
|
|
48
|
+
return content.startswith("---\n")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _has_tag(content: str, tag: str) -> bool:
|
|
52
|
+
"""Check if content contains a specific XML tag."""
|
|
53
|
+
return f"<{tag}>" in content or f"<{tag} " in content
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _get_present_tags(content: str) -> list[str]:
|
|
57
|
+
"""Get list of XML tags present in content."""
|
|
58
|
+
# Find all opening tags
|
|
59
|
+
tags = re.findall(r"<([a-z][a-z0-9-]*)(?:\s|>)", content)
|
|
60
|
+
return list(set(tags))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def audit_skill_file(file_path: Path) -> SkillAuditResult:
|
|
64
|
+
"""Audit a single skill file.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
file_path: Path to SKILL.md file
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
SkillAuditResult with findings
|
|
71
|
+
"""
|
|
72
|
+
skill_name = file_path.parent.name
|
|
73
|
+
content = file_path.read_text()
|
|
74
|
+
|
|
75
|
+
result = SkillAuditResult(skill_name=skill_name, file_path=file_path)
|
|
76
|
+
|
|
77
|
+
# Check frontmatter
|
|
78
|
+
result.has_frontmatter = _has_frontmatter(content)
|
|
79
|
+
if not result.has_frontmatter:
|
|
80
|
+
result.missing_required.append("frontmatter")
|
|
81
|
+
|
|
82
|
+
# Check required tags
|
|
83
|
+
for tag in REQUIRED_TAGS:
|
|
84
|
+
if _has_tag(content, tag):
|
|
85
|
+
result.present_tags.append(tag)
|
|
86
|
+
else:
|
|
87
|
+
result.missing_required.append(tag)
|
|
88
|
+
|
|
89
|
+
# Check recommended tags
|
|
90
|
+
for tag in RECOMMENDED_TAGS:
|
|
91
|
+
if _has_tag(content, tag):
|
|
92
|
+
result.present_tags.append(tag)
|
|
93
|
+
else:
|
|
94
|
+
result.missing_recommended.append(tag)
|
|
95
|
+
|
|
96
|
+
# Check optional tags (just track presence)
|
|
97
|
+
for tag in OPTIONAL_TAGS:
|
|
98
|
+
if _has_tag(content, tag):
|
|
99
|
+
result.present_tags.append(tag)
|
|
100
|
+
|
|
101
|
+
return result
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def find_skill_files(root: Path) -> list[Path]:
|
|
105
|
+
"""Find all skill files in a project.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
root: Project root directory
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
List of SKILL.md file paths
|
|
112
|
+
"""
|
|
113
|
+
# Try multiple locations
|
|
114
|
+
skill_dirs = [
|
|
115
|
+
root / ".pennyfarthing" / "skills",
|
|
116
|
+
root / "pennyfarthing" / "pennyfarthing-dist" / "skills",
|
|
117
|
+
root / "pennyfarthing-dist" / "skills",
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
for skills_dir in skill_dirs:
|
|
121
|
+
if skills_dir.exists():
|
|
122
|
+
return sorted(skills_dir.glob("*/SKILL.md"))
|
|
123
|
+
|
|
124
|
+
return []
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def audit_skills(
|
|
128
|
+
root: Path, *, skill_name: str | None = None
|
|
129
|
+
) -> dict[str, SkillAuditResult | list[SkillAuditResult] | dict]:
|
|
130
|
+
"""Audit skill files in a project.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
root: Project root directory
|
|
134
|
+
skill_name: Optional specific skill to audit
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
Dict with 'results', 'summary' keys
|
|
138
|
+
"""
|
|
139
|
+
if skill_name:
|
|
140
|
+
# Find specific skill
|
|
141
|
+
skill_dirs = [
|
|
142
|
+
root / ".pennyfarthing" / "skills" / skill_name / "SKILL.md",
|
|
143
|
+
root / "pennyfarthing" / "pennyfarthing-dist" / "skills" / skill_name / "SKILL.md",
|
|
144
|
+
root / "pennyfarthing-dist" / "skills" / skill_name / "SKILL.md",
|
|
145
|
+
]
|
|
146
|
+
|
|
147
|
+
for skill_path in skill_dirs:
|
|
148
|
+
if skill_path.exists():
|
|
149
|
+
result = audit_skill_file(skill_path)
|
|
150
|
+
return {
|
|
151
|
+
"results": [result],
|
|
152
|
+
"summary": {
|
|
153
|
+
"total": 1,
|
|
154
|
+
"valid": 1 if result.is_valid else 0,
|
|
155
|
+
"partial": 1 if result.status == "PARTIAL" else 0,
|
|
156
|
+
"needs_update": 1 if not result.is_valid else 0,
|
|
157
|
+
"missing_required": len(result.missing_required),
|
|
158
|
+
"missing_recommended": len(result.missing_recommended),
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
"results": [],
|
|
164
|
+
"summary": {"total": 0, "error": f"Skill not found: {skill_name}"},
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
# Audit all skills
|
|
168
|
+
skill_files = find_skill_files(root)
|
|
169
|
+
results = [audit_skill_file(f) for f in skill_files]
|
|
170
|
+
|
|
171
|
+
# Calculate summary
|
|
172
|
+
valid = sum(1 for r in results if r.is_valid and not r.missing_recommended)
|
|
173
|
+
partial = sum(1 for r in results if r.is_valid and r.missing_recommended)
|
|
174
|
+
needs_update = sum(1 for r in results if not r.is_valid)
|
|
175
|
+
total_missing_required = sum(len(r.missing_required) for r in results)
|
|
176
|
+
total_missing_recommended = sum(len(r.missing_recommended) for r in results)
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
"results": results,
|
|
180
|
+
"summary": {
|
|
181
|
+
"total": len(results),
|
|
182
|
+
"valid": valid,
|
|
183
|
+
"partial": partial,
|
|
184
|
+
"needs_update": needs_update,
|
|
185
|
+
"missing_required": total_missing_required,
|
|
186
|
+
"missing_recommended": total_missing_recommended,
|
|
187
|
+
},
|
|
188
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Workflow step file auditing tools.
|
|
3
|
+
|
|
4
|
+
Audits workflow step files for conformance to guides/workflow-step-schema.md.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import re
|
|
10
|
+
from dataclasses import dataclass, field
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Tag requirements
|
|
15
|
+
REQUIRED_TAGS = ["step-meta", "purpose", "instructions", "output"]
|
|
16
|
+
RECOMMENDED_TAGS = ["prerequisites", "actions", "collaboration-menu", "next-step"]
|
|
17
|
+
OPTIONAL_TAGS = ["gate"]
|
|
18
|
+
|
|
19
|
+
# step-meta required fields
|
|
20
|
+
STEP_META_FIELDS = ["number", "name", "gate"]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass
|
|
24
|
+
class StepAuditResult:
|
|
25
|
+
"""Result of auditing a workflow step file."""
|
|
26
|
+
|
|
27
|
+
workflow_name: str
|
|
28
|
+
step_name: str
|
|
29
|
+
file_path: Path
|
|
30
|
+
missing_required: list[str] = field(default_factory=list)
|
|
31
|
+
missing_recommended: list[str] = field(default_factory=list)
|
|
32
|
+
missing_meta_fields: list[str] = field(default_factory=list)
|
|
33
|
+
present_tags: list[str] = field(default_factory=list)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def is_valid(self) -> bool:
|
|
37
|
+
"""Check if step passes validation (has all required)."""
|
|
38
|
+
return len(self.missing_required) == 0 and len(self.missing_meta_fields) == 0
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def status(self) -> str:
|
|
42
|
+
"""Get status string."""
|
|
43
|
+
if not self.is_valid:
|
|
44
|
+
return "NEEDS UPDATE"
|
|
45
|
+
if self.missing_recommended:
|
|
46
|
+
return "PARTIAL"
|
|
47
|
+
return "OK"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _has_tag(content: str, tag: str) -> bool:
|
|
51
|
+
"""Check if content contains a specific XML tag."""
|
|
52
|
+
return f"<{tag}>" in content or f"<{tag} " in content
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _check_step_meta_fields(content: str) -> list[str]:
|
|
56
|
+
"""Check which step-meta fields are missing."""
|
|
57
|
+
# Extract step-meta section
|
|
58
|
+
meta_match = re.search(r"<step-meta>(.+?)</step-meta>", content, re.DOTALL)
|
|
59
|
+
if not meta_match:
|
|
60
|
+
return STEP_META_FIELDS.copy()
|
|
61
|
+
|
|
62
|
+
meta_content = meta_match.group(1)
|
|
63
|
+
missing = []
|
|
64
|
+
|
|
65
|
+
for field_name in STEP_META_FIELDS:
|
|
66
|
+
if f"{field_name}:" not in meta_content:
|
|
67
|
+
missing.append(field_name)
|
|
68
|
+
|
|
69
|
+
return missing
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def audit_step_file(file_path: Path) -> StepAuditResult:
|
|
73
|
+
"""Audit a single workflow step file.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
file_path: Path to step-*.md file
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
StepAuditResult with findings
|
|
80
|
+
"""
|
|
81
|
+
# Determine workflow name from path
|
|
82
|
+
# Could be workflows/{name}/steps/step-*.md
|
|
83
|
+
# or workflows/{name}/steps-{mode}/step-*.md
|
|
84
|
+
steps_dir = file_path.parent
|
|
85
|
+
workflow_dir = steps_dir.parent
|
|
86
|
+
workflow_name = workflow_dir.name
|
|
87
|
+
step_name = file_path.stem
|
|
88
|
+
|
|
89
|
+
content = file_path.read_text()
|
|
90
|
+
|
|
91
|
+
result = StepAuditResult(
|
|
92
|
+
workflow_name=workflow_name, step_name=step_name, file_path=file_path
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
# Check required tags
|
|
96
|
+
for tag in REQUIRED_TAGS:
|
|
97
|
+
if _has_tag(content, tag):
|
|
98
|
+
result.present_tags.append(tag)
|
|
99
|
+
else:
|
|
100
|
+
result.missing_required.append(tag)
|
|
101
|
+
|
|
102
|
+
# Check step-meta fields if tag exists
|
|
103
|
+
if "step-meta" in result.present_tags:
|
|
104
|
+
result.missing_meta_fields = _check_step_meta_fields(content)
|
|
105
|
+
if result.missing_meta_fields:
|
|
106
|
+
# Add to required as "step-meta fields: x, y"
|
|
107
|
+
missing_str = ", ".join(result.missing_meta_fields)
|
|
108
|
+
result.missing_required.append(f"step-meta fields ({missing_str})")
|
|
109
|
+
|
|
110
|
+
# Check recommended tags
|
|
111
|
+
for tag in RECOMMENDED_TAGS:
|
|
112
|
+
if _has_tag(content, tag):
|
|
113
|
+
result.present_tags.append(tag)
|
|
114
|
+
else:
|
|
115
|
+
result.missing_recommended.append(tag)
|
|
116
|
+
|
|
117
|
+
# Check optional tags (just track presence)
|
|
118
|
+
for tag in OPTIONAL_TAGS:
|
|
119
|
+
if _has_tag(content, tag):
|
|
120
|
+
result.present_tags.append(tag)
|
|
121
|
+
|
|
122
|
+
return result
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def find_step_files(root: Path) -> list[Path]:
|
|
126
|
+
"""Find all workflow step files in a project.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
root: Project root directory
|
|
130
|
+
|
|
131
|
+
Returns:
|
|
132
|
+
List of step-*.md file paths
|
|
133
|
+
"""
|
|
134
|
+
# Try multiple locations
|
|
135
|
+
workflow_dirs = [
|
|
136
|
+
root / ".pennyfarthing" / "workflows",
|
|
137
|
+
root / "pennyfarthing" / "pennyfarthing-dist" / "workflows",
|
|
138
|
+
root / "pennyfarthing-dist" / "workflows",
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
step_files = []
|
|
142
|
+
|
|
143
|
+
for workflows_dir in workflow_dirs:
|
|
144
|
+
if workflows_dir.exists():
|
|
145
|
+
# Find step files in steps/ and steps-*/ directories
|
|
146
|
+
for workflow_dir in workflows_dir.iterdir():
|
|
147
|
+
if not workflow_dir.is_dir():
|
|
148
|
+
continue
|
|
149
|
+
|
|
150
|
+
for steps_dir in workflow_dir.iterdir():
|
|
151
|
+
if steps_dir.is_dir() and steps_dir.name.startswith("steps"):
|
|
152
|
+
step_files.extend(steps_dir.glob("step-*.md"))
|
|
153
|
+
|
|
154
|
+
break # Only use first found workflows dir
|
|
155
|
+
|
|
156
|
+
return sorted(step_files)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
@dataclass
|
|
160
|
+
class WorkflowAuditResult:
|
|
161
|
+
"""Result of auditing a workflow's step files."""
|
|
162
|
+
|
|
163
|
+
workflow_name: str
|
|
164
|
+
step_results: list[StepAuditResult] = field(default_factory=list)
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def total_steps(self) -> int:
|
|
168
|
+
return len(self.step_results)
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def valid_steps(self) -> int:
|
|
172
|
+
return sum(1 for r in self.step_results if r.is_valid)
|
|
173
|
+
|
|
174
|
+
@property
|
|
175
|
+
def needs_update(self) -> int:
|
|
176
|
+
return sum(1 for r in self.step_results if not r.is_valid)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def audit_workflow_steps(
|
|
180
|
+
root: Path, *, workflow_name: str | None = None
|
|
181
|
+
) -> dict[str, list | dict]:
|
|
182
|
+
"""Audit workflow step files in a project.
|
|
183
|
+
|
|
184
|
+
Args:
|
|
185
|
+
root: Project root directory
|
|
186
|
+
workflow_name: Optional specific workflow to audit
|
|
187
|
+
|
|
188
|
+
Returns:
|
|
189
|
+
Dict with 'workflows', 'summary' keys
|
|
190
|
+
"""
|
|
191
|
+
step_files = find_step_files(root)
|
|
192
|
+
|
|
193
|
+
# Group by workflow
|
|
194
|
+
workflows: dict[str, WorkflowAuditResult] = {}
|
|
195
|
+
|
|
196
|
+
for file_path in step_files:
|
|
197
|
+
result = audit_step_file(file_path)
|
|
198
|
+
|
|
199
|
+
if workflow_name and result.workflow_name != workflow_name:
|
|
200
|
+
continue
|
|
201
|
+
|
|
202
|
+
if result.workflow_name not in workflows:
|
|
203
|
+
workflows[result.workflow_name] = WorkflowAuditResult(
|
|
204
|
+
workflow_name=result.workflow_name
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
workflows[result.workflow_name].step_results.append(result)
|
|
208
|
+
|
|
209
|
+
# Calculate summary
|
|
210
|
+
workflow_list = list(workflows.values())
|
|
211
|
+
total_files = sum(w.total_steps for w in workflow_list)
|
|
212
|
+
total_valid = sum(w.valid_steps for w in workflow_list)
|
|
213
|
+
total_needs_update = sum(w.needs_update for w in workflow_list)
|
|
214
|
+
|
|
215
|
+
all_results = [r for w in workflow_list for r in w.step_results]
|
|
216
|
+
total_missing_required = sum(len(r.missing_required) for r in all_results)
|
|
217
|
+
total_missing_recommended = sum(len(r.missing_recommended) for r in all_results)
|
|
218
|
+
|
|
219
|
+
return {
|
|
220
|
+
"workflows": workflow_list,
|
|
221
|
+
"summary": {
|
|
222
|
+
"total_workflows": len(workflow_list),
|
|
223
|
+
"total_files": total_files,
|
|
224
|
+
"valid": total_valid,
|
|
225
|
+
"needs_update": total_needs_update,
|
|
226
|
+
"missing_required": total_missing_required,
|
|
227
|
+
"missing_recommended": total_missing_recommended,
|
|
228
|
+
},
|
|
229
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"""
|
|
2
|
+
XML schema validation for Pennyfarthing files.
|
|
3
|
+
|
|
4
|
+
Validates files against their respective schemas:
|
|
5
|
+
- Session files -> guides/session-schema.md
|
|
6
|
+
- Skill files -> guides/skill-schema.md
|
|
7
|
+
- Workflow step files -> guides/workflow-step-schema.md
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import re
|
|
13
|
+
from dataclasses import dataclass, field
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Literal
|
|
16
|
+
|
|
17
|
+
from pennyfarthing_scripts.migration.session import (
|
|
18
|
+
find_session_files,
|
|
19
|
+
is_xml_format,
|
|
20
|
+
)
|
|
21
|
+
from pennyfarthing_scripts.migration.skill import (
|
|
22
|
+
RECOMMENDED_TAGS as SKILL_RECOMMENDED,
|
|
23
|
+
REQUIRED_TAGS as SKILL_REQUIRED,
|
|
24
|
+
find_skill_files,
|
|
25
|
+
)
|
|
26
|
+
from pennyfarthing_scripts.migration.step import (
|
|
27
|
+
RECOMMENDED_TAGS as STEP_RECOMMENDED,
|
|
28
|
+
REQUIRED_TAGS as STEP_REQUIRED,
|
|
29
|
+
STEP_META_FIELDS,
|
|
30
|
+
find_step_files,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass
|
|
35
|
+
class ValidationResult:
|
|
36
|
+
"""Result of validating a single file."""
|
|
37
|
+
|
|
38
|
+
file_path: Path
|
|
39
|
+
file_type: Literal["session", "skill", "step"]
|
|
40
|
+
errors: list[str] = field(default_factory=list)
|
|
41
|
+
warnings: list[str] = field(default_factory=list)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def is_valid(self) -> bool:
|
|
45
|
+
return len(self.errors) == 0
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def status(self) -> str:
|
|
49
|
+
if self.errors:
|
|
50
|
+
return "ERROR"
|
|
51
|
+
if self.warnings:
|
|
52
|
+
return "WARN"
|
|
53
|
+
return "PASS"
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _has_tag(content: str, tag: str) -> bool:
|
|
57
|
+
"""Check if content contains a specific XML tag."""
|
|
58
|
+
return f"<{tag}>" in content or f"<{tag} " in content
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def validate_session_file(file_path: Path) -> ValidationResult:
|
|
62
|
+
"""Validate a session file against the schema.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
file_path: Path to session file
|
|
66
|
+
|
|
67
|
+
Returns:
|
|
68
|
+
ValidationResult with errors/warnings
|
|
69
|
+
"""
|
|
70
|
+
result = ValidationResult(file_path=file_path, file_type="session")
|
|
71
|
+
content = file_path.read_text()
|
|
72
|
+
|
|
73
|
+
# Check for XML format
|
|
74
|
+
if not is_xml_format(content):
|
|
75
|
+
result.errors.append("Not in XML format - needs migration")
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
# Validate <session> root with attributes
|
|
79
|
+
if not re.search(r'<session\s+story="[^"]+"', content):
|
|
80
|
+
result.errors.append("Missing story attribute on <session>")
|
|
81
|
+
|
|
82
|
+
if not re.search(r'<session[^>]+workflow="[^"]+"', content):
|
|
83
|
+
result.errors.append("Missing workflow attribute on <session>")
|
|
84
|
+
|
|
85
|
+
# Validate <meta> section
|
|
86
|
+
if not _has_tag(content, "meta"):
|
|
87
|
+
result.errors.append("Missing <meta> section")
|
|
88
|
+
else:
|
|
89
|
+
if "<jira>" not in content:
|
|
90
|
+
result.errors.append("Missing <jira> in <meta>")
|
|
91
|
+
if "<started>" not in content:
|
|
92
|
+
result.errors.append("Missing <started> in <meta>")
|
|
93
|
+
|
|
94
|
+
# Validate <status> element
|
|
95
|
+
if not _has_tag(content, "status"):
|
|
96
|
+
result.errors.append("Missing <status> element")
|
|
97
|
+
else:
|
|
98
|
+
if 'phase="' not in content:
|
|
99
|
+
result.errors.append("Missing phase attribute on <status>")
|
|
100
|
+
if 'next-agent="' not in content:
|
|
101
|
+
result.warnings.append("Missing next-agent attribute on <status>")
|
|
102
|
+
|
|
103
|
+
# Validate optional sections
|
|
104
|
+
if not _has_tag(content, "acceptance-criteria"):
|
|
105
|
+
result.warnings.append("Missing <acceptance-criteria> section")
|
|
106
|
+
|
|
107
|
+
if not _has_tag(content, "work-log"):
|
|
108
|
+
result.warnings.append("Missing <work-log> section")
|
|
109
|
+
|
|
110
|
+
return result
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def validate_skill_file(file_path: Path) -> ValidationResult:
|
|
114
|
+
"""Validate a skill file against the schema.
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
file_path: Path to SKILL.md file
|
|
118
|
+
|
|
119
|
+
Returns:
|
|
120
|
+
ValidationResult with errors/warnings
|
|
121
|
+
"""
|
|
122
|
+
skill_name = file_path.parent.name
|
|
123
|
+
result = ValidationResult(file_path=file_path, file_type="skill")
|
|
124
|
+
content = file_path.read_text()
|
|
125
|
+
|
|
126
|
+
# Check YAML frontmatter
|
|
127
|
+
if not content.startswith("---\n"):
|
|
128
|
+
result.errors.append("Missing YAML frontmatter")
|
|
129
|
+
else:
|
|
130
|
+
if "name:" not in content.split("---")[1]:
|
|
131
|
+
result.errors.append("Missing 'name' in frontmatter")
|
|
132
|
+
if "description:" not in content.split("---")[1]:
|
|
133
|
+
result.errors.append("Missing 'description' in frontmatter")
|
|
134
|
+
|
|
135
|
+
# Check required tags
|
|
136
|
+
for tag in SKILL_REQUIRED:
|
|
137
|
+
if not _has_tag(content, tag):
|
|
138
|
+
result.errors.append(f"Missing <{tag}> tag (required)")
|
|
139
|
+
|
|
140
|
+
# Check recommended tags
|
|
141
|
+
for tag in SKILL_RECOMMENDED:
|
|
142
|
+
if not _has_tag(content, tag):
|
|
143
|
+
result.warnings.append(f"Missing <{tag}> tag (recommended)")
|
|
144
|
+
|
|
145
|
+
return result
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def validate_step_file(file_path: Path) -> ValidationResult:
|
|
149
|
+
"""Validate a workflow step file against the schema.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
file_path: Path to step-*.md file
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
ValidationResult with errors/warnings
|
|
156
|
+
"""
|
|
157
|
+
result = ValidationResult(file_path=file_path, file_type="step")
|
|
158
|
+
content = file_path.read_text()
|
|
159
|
+
|
|
160
|
+
# Determine workflow/step names from path
|
|
161
|
+
workflow_name = file_path.parent.parent.name
|
|
162
|
+
step_name = file_path.stem
|
|
163
|
+
|
|
164
|
+
# Check required tags
|
|
165
|
+
for tag in STEP_REQUIRED:
|
|
166
|
+
if not _has_tag(content, tag):
|
|
167
|
+
result.errors.append(f"Missing <{tag}> tag")
|
|
168
|
+
|
|
169
|
+
# Check step-meta fields if tag exists
|
|
170
|
+
if _has_tag(content, "step-meta"):
|
|
171
|
+
meta_match = re.search(r"<step-meta>(.+?)</step-meta>", content, re.DOTALL)
|
|
172
|
+
if meta_match:
|
|
173
|
+
meta_content = meta_match.group(1)
|
|
174
|
+
for field_name in STEP_META_FIELDS:
|
|
175
|
+
if f"{field_name}:" not in meta_content:
|
|
176
|
+
result.errors.append(f"Missing '{field_name}' in step-meta")
|
|
177
|
+
|
|
178
|
+
# Check recommended tags
|
|
179
|
+
for tag in STEP_RECOMMENDED:
|
|
180
|
+
if not _has_tag(content, tag):
|
|
181
|
+
result.warnings.append(f"Missing <{tag}> tag")
|
|
182
|
+
|
|
183
|
+
return result
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def validate_file(file_path: Path) -> ValidationResult:
|
|
187
|
+
"""Validate a file, auto-detecting its type.
|
|
188
|
+
|
|
189
|
+
Args:
|
|
190
|
+
file_path: Path to file
|
|
191
|
+
|
|
192
|
+
Returns:
|
|
193
|
+
ValidationResult
|
|
194
|
+
"""
|
|
195
|
+
name = file_path.name
|
|
196
|
+
|
|
197
|
+
if name.endswith("-session.md"):
|
|
198
|
+
return validate_session_file(file_path)
|
|
199
|
+
elif name == "SKILL.md":
|
|
200
|
+
return validate_skill_file(file_path)
|
|
201
|
+
elif name.startswith("step-") and name.endswith(".md"):
|
|
202
|
+
return validate_step_file(file_path)
|
|
203
|
+
else:
|
|
204
|
+
result = ValidationResult(file_path=file_path, file_type="session")
|
|
205
|
+
result.errors.append(f"Unknown file type: {name}")
|
|
206
|
+
return result
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
@dataclass
|
|
210
|
+
class ValidationSummary:
|
|
211
|
+
"""Summary of validation results."""
|
|
212
|
+
|
|
213
|
+
results: list[ValidationResult] = field(default_factory=list)
|
|
214
|
+
passed: int = 0
|
|
215
|
+
warnings: int = 0
|
|
216
|
+
errors: int = 0
|
|
217
|
+
|
|
218
|
+
def add(self, result: ValidationResult) -> None:
|
|
219
|
+
"""Add a result to the summary."""
|
|
220
|
+
self.results.append(result)
|
|
221
|
+
if result.status == "PASS":
|
|
222
|
+
self.passed += 1
|
|
223
|
+
elif result.status == "WARN":
|
|
224
|
+
self.warnings += 1
|
|
225
|
+
else:
|
|
226
|
+
self.errors += 1
|
|
227
|
+
|
|
228
|
+
@property
|
|
229
|
+
def total(self) -> int:
|
|
230
|
+
return len(self.results)
|
|
231
|
+
|
|
232
|
+
@property
|
|
233
|
+
def success(self) -> bool:
|
|
234
|
+
return self.errors == 0
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def validate_all(
|
|
238
|
+
root: Path,
|
|
239
|
+
*,
|
|
240
|
+
file_type: Literal["session", "skill", "step", "all"] = "all",
|
|
241
|
+
strict: bool = False,
|
|
242
|
+
) -> ValidationSummary:
|
|
243
|
+
"""Validate all files of specified type(s).
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
root: Project root directory
|
|
247
|
+
file_type: Type to validate (session, skill, step, or all)
|
|
248
|
+
strict: If True, treat warnings as errors
|
|
249
|
+
|
|
250
|
+
Returns:
|
|
251
|
+
ValidationSummary with all results
|
|
252
|
+
"""
|
|
253
|
+
summary = ValidationSummary()
|
|
254
|
+
|
|
255
|
+
# Validate sessions
|
|
256
|
+
if file_type in ("session", "all"):
|
|
257
|
+
for file_path in find_session_files(root):
|
|
258
|
+
result = validate_session_file(file_path)
|
|
259
|
+
if strict and result.warnings:
|
|
260
|
+
result.errors.extend(result.warnings)
|
|
261
|
+
result.warnings = []
|
|
262
|
+
summary.add(result)
|
|
263
|
+
|
|
264
|
+
# Validate skills
|
|
265
|
+
if file_type in ("skill", "all"):
|
|
266
|
+
for file_path in find_skill_files(root):
|
|
267
|
+
result = validate_skill_file(file_path)
|
|
268
|
+
if strict and result.warnings:
|
|
269
|
+
result.errors.extend(result.warnings)
|
|
270
|
+
result.warnings = []
|
|
271
|
+
summary.add(result)
|
|
272
|
+
|
|
273
|
+
# Validate steps
|
|
274
|
+
if file_type in ("step", "all"):
|
|
275
|
+
for file_path in find_step_files(root):
|
|
276
|
+
result = validate_step_file(file_path)
|
|
277
|
+
if strict and result.warnings:
|
|
278
|
+
result.errors.extend(result.warnings)
|
|
279
|
+
result.warnings = []
|
|
280
|
+
summary.add(result)
|
|
281
|
+
|
|
282
|
+
return summary
|