@pennyfarthing/core 10.0.2 → 10.0.5
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 +29 -41
- package/{dist → packages/core/dist}/cli/commands/cyclist.d.ts +5 -1
- package/packages/core/dist/cli/commands/cyclist.d.ts.map +1 -0
- package/{dist → packages/core/dist}/cli/commands/cyclist.js +4 -4
- package/packages/core/dist/cli/commands/cyclist.js.map +1 -0
- package/{dist → packages/core/dist}/cli/commands/cyclist.test.js +2 -2
- package/packages/core/dist/cli/commands/cyclist.test.js.map +1 -0
- 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-legacy.test.js +17 -16
- package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.js.map +1 -1
- 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/init.d.ts.map +1 -1
- package/{dist → packages/core/dist}/cli/commands/init.js +3 -0
- package/packages/core/dist/cli/commands/init.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/ocean-profiles.test.js +1 -1
- package/{dist → packages/core/dist}/cli/ocean-profiles.test.js.map +1 -1
- package/{dist → packages/core/dist}/cli/utils/files.d.ts +10 -0
- package/{dist → packages/core/dist}/cli/utils/files.d.ts.map +1 -1
- package/{dist → packages/core/dist}/cli/utils/files.js +35 -0
- package/{dist → packages/core/dist}/cli/utils/files.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/{dist → packages/core/dist}/scripts/generate-report.d.ts.map +1 -1
- package/{dist → packages/core/dist}/scripts/generate-report.js +11 -7
- package/packages/core/dist/scripts/generate-report.js.map +1 -0
- package/{dist → packages/core/dist}/scripts/generate-spider-report.d.ts.map +1 -1
- package/{dist → packages/core/dist}/scripts/generate-spider-report.js +12 -8
- package/packages/core/dist/scripts/generate-spider-report.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider.d.ts.map +1 -0
- package/{dist → packages/core/dist}/scripts/generate-spider.js +6 -4
- package/packages/core/dist/scripts/generate-spider.js.map +1 -0
- package/{dist → packages/core/dist}/scripts/generate-spider.test.js +2 -2
- package/packages/core/dist/scripts/generate-spider.test.js.map +1 -0
- package/pennyfarthing-dist/agents/pm.md +1 -1
- package/pennyfarthing-dist/agents/sm-finish.md +1 -1
- package/pennyfarthing-dist/agents/sm-setup.md +6 -6
- package/pennyfarthing-dist/agents/sm.md +12 -6
- package/pennyfarthing-dist/agents/workflow-status-check.md +1 -1
- package/pennyfarthing-dist/commands/repo-status.md +2 -2
- package/pennyfarthing-dist/commands/sprint.md +8 -8
- 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/skill-schema.md +25 -26
- package/pennyfarthing-dist/guides/tirepump.md +54 -0
- package/pennyfarthing-dist/guides/xml-tags.md +2 -2
- 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/README.md +2 -2
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +1 -1
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +3 -3
- package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +32 -0
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +2 -7
- package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +1 -1
- 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-reconcile.sh +11 -255
- package/pennyfarthing-dist/scripts/misc/repo-utils.sh +3 -3
- package/pennyfarthing-dist/scripts/sprint/README.md +32 -17
- package/pennyfarthing-dist/scripts/story/README.md +1 -1
- package/pennyfarthing-dist/scripts/test/test-setup.sh +1 -1
- package/pennyfarthing-dist/skills/jira/SKILL.md +107 -408
- package/pennyfarthing-dist/skills/skill-registry.yaml +21 -12
- package/pennyfarthing-dist/skills/sprint/skill.md +386 -68
- package/pennyfarthing-dist/skills/story/skill.md +14 -206
- package/pennyfarthing-dist/templates/settings.local.json.template +9 -1
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-05-import-to-future.md +1 -1
- package/pennyfarthing-dist/workflows/git-cleanup.yaml +1 -1
- package/pennyfarthing-dist/workflows/project-setup/steps/step-10-complete.md +1 -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 +92 -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 +351 -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 +277 -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__/epic_add.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 +165 -0
- package/pennyfarthing_scripts/sprint/archive_epic.py +408 -0
- package/pennyfarthing_scripts/sprint/cli.py +1863 -0
- package/pennyfarthing_scripts/sprint/epic_add.py +173 -0
- package/pennyfarthing_scripts/sprint/import_epic.py +431 -0
- package/pennyfarthing_scripts/sprint/loader.py +237 -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 +307 -0
- package/pennyfarthing_scripts/sprint/validator.py +580 -0
- package/pennyfarthing_scripts/sprint/work.py +208 -0
- package/pennyfarthing_scripts/sprint/yaml_io.py +367 -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 +402 -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 +815 -0
- package/pennyfarthing_scripts/welcome_hook.py +157 -0
- package/pennyfarthing_scripts/workflow.py +287 -0
- package/scripts/postinstall.cjs +34 -0
- package/dist/cli/commands/cyclist.d.ts.map +0 -1
- package/dist/cli/commands/cyclist.js.map +0 -1
- package/dist/cli/commands/cyclist.test.js.map +0 -1
- package/dist/cli/commands/doctor.js.map +0 -1
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/utils/settings.js.map +0 -1
- package/dist/cli/utils/themes.d.ts.map +0 -1
- package/dist/scripts/generate-report.js.map +0 -1
- package/dist/scripts/generate-spider-report.js.map +0 -1
- package/dist/scripts/generate-spider.d.ts.map +0 -1
- package/dist/scripts/generate-spider.js.map +0 -1
- package/dist/scripts/generate-spider.test.js.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/pennyfarthing-dist/scripts/sprint/archive-story.sh +0 -133
- package/pennyfarthing-dist/scripts/sprint/available-stories.sh +0 -91
- package/pennyfarthing-dist/scripts/sprint/check-story.sh +0 -158
- package/pennyfarthing-dist/scripts/sprint/get-epic-field.sh +0 -52
- package/pennyfarthing-dist/scripts/sprint/get-story-field.sh +0 -63
- package/pennyfarthing-dist/scripts/sprint/list-future.sh +0 -145
- package/pennyfarthing-dist/scripts/sprint/new-sprint.sh +0 -110
- package/pennyfarthing-dist/scripts/sprint/promote-epic.sh +0 -148
- package/pennyfarthing-dist/scripts/sprint/sprint-common.sh +0 -415
- package/pennyfarthing-dist/scripts/sprint/sprint-info.sh +0 -33
- package/pennyfarthing-dist/scripts/sprint/sprint-metrics.sh +0 -230
- package/pennyfarthing-dist/scripts/sprint/sprint-status.sh +0 -134
- package/pennyfarthing-dist/scripts/sprint/validate-sprint-yaml.sh +0 -139
- package/pennyfarthing-dist/skills/sprint/scripts/archive-story.sh +0 -101
- package/pennyfarthing-dist/skills/sprint/scripts/available-stories.sh +0 -97
- package/pennyfarthing-dist/skills/sprint/scripts/check-story.sh +0 -164
- package/pennyfarthing-dist/skills/sprint/scripts/create-jira-epic.sh +0 -101
- package/pennyfarthing-dist/skills/sprint/scripts/new-sprint.sh +0 -116
- package/pennyfarthing-dist/skills/sprint/scripts/promote-epic.sh +0 -164
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-info.sh +0 -39
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-status.sh +0 -147
- package/pennyfarthing-dist/skills/sprint/scripts/sync-epic-jira.sh +0 -93
- /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.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/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/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/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/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/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.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.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.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/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,472 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Core hotspot analysis engine.
|
|
3
|
+
|
|
4
|
+
Parses git log history, computes per-file metrics, and produces scored hotspot results.
|
|
5
|
+
Reuses async git subprocess pattern from git/status_all.py.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import asyncio
|
|
11
|
+
import fnmatch
|
|
12
|
+
import re
|
|
13
|
+
from collections import defaultdict
|
|
14
|
+
from datetime import datetime, timezone
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
from pennyfarthing_scripts.hotspots.models import (
|
|
18
|
+
DirectoryHotspot,
|
|
19
|
+
FileHotspot,
|
|
20
|
+
HotspotResult,
|
|
21
|
+
MultiRepoHotspotResult,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Scoring weights (must sum to 1.0)
|
|
25
|
+
WEIGHT_BUG_FIXES = 0.35
|
|
26
|
+
WEIGHT_CHANGES = 0.30
|
|
27
|
+
WEIGHT_AUTHORS = 0.20
|
|
28
|
+
WEIGHT_CHURN = 0.10
|
|
29
|
+
WEIGHT_RECENCY = 0.05
|
|
30
|
+
|
|
31
|
+
# Default file patterns to exclude from analysis
|
|
32
|
+
DEFAULT_EXCLUDES = [
|
|
33
|
+
"node_modules/*",
|
|
34
|
+
"dist/*",
|
|
35
|
+
"build/*",
|
|
36
|
+
"*.lock",
|
|
37
|
+
"*.min.js",
|
|
38
|
+
"*.min.css",
|
|
39
|
+
"*.map",
|
|
40
|
+
"package-lock.json",
|
|
41
|
+
"pnpm-lock.yaml",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
# Regex for identifying bug-fix commits
|
|
45
|
+
BUG_FIX_PATTERN = re.compile(
|
|
46
|
+
r"\b(fix|bug|patch|hotfix|regression|resolve[ds]?)\b", re.IGNORECASE
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
async def _run_git_command(args: list[str], cwd: Path) -> tuple[str, str, int]:
|
|
51
|
+
"""Run a git command asynchronously.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
args: Git command arguments (without 'git')
|
|
55
|
+
cwd: Working directory
|
|
56
|
+
|
|
57
|
+
Returns:
|
|
58
|
+
(stdout, stderr, return_code)
|
|
59
|
+
"""
|
|
60
|
+
proc = await asyncio.create_subprocess_exec(
|
|
61
|
+
"git",
|
|
62
|
+
*args,
|
|
63
|
+
cwd=cwd,
|
|
64
|
+
stdout=asyncio.subprocess.PIPE,
|
|
65
|
+
stderr=asyncio.subprocess.PIPE,
|
|
66
|
+
)
|
|
67
|
+
stdout, stderr = await proc.communicate()
|
|
68
|
+
return (
|
|
69
|
+
stdout.decode("utf-8", errors="replace").strip(),
|
|
70
|
+
stderr.decode("utf-8", errors="replace").strip(),
|
|
71
|
+
proc.returncode or 0,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
async def _run_git_log(
|
|
76
|
+
repo_path: Path, since_days: int, branch: str = "--all"
|
|
77
|
+
) -> tuple[str, str, int]:
|
|
78
|
+
"""Run git log with numstat for hotspot analysis."""
|
|
79
|
+
args = [
|
|
80
|
+
"log",
|
|
81
|
+
f"--since={since_days} days ago",
|
|
82
|
+
branch,
|
|
83
|
+
"--numstat",
|
|
84
|
+
"--pretty=format:COMMIT:%H|%an|%aI|%s",
|
|
85
|
+
]
|
|
86
|
+
return await _run_git_command(args, repo_path)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def is_bug_fix_commit(message: str) -> bool:
|
|
90
|
+
"""Check if a commit message indicates a bug fix."""
|
|
91
|
+
return bool(BUG_FIX_PATTERN.search(message))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def _parse_git_log(output: str) -> list[dict]:
|
|
95
|
+
"""Parse git log --numstat output into structured commit dicts.
|
|
96
|
+
|
|
97
|
+
Each dict has: hash, author, date, message, files (list of {path, added, deleted}).
|
|
98
|
+
|
|
99
|
+
Handles binary files (numstat shows '-' for added/deleted).
|
|
100
|
+
"""
|
|
101
|
+
if not output.strip():
|
|
102
|
+
return []
|
|
103
|
+
|
|
104
|
+
commits = []
|
|
105
|
+
current_commit: dict | None = None
|
|
106
|
+
|
|
107
|
+
for line in output.split("\n"):
|
|
108
|
+
line = line.rstrip()
|
|
109
|
+
|
|
110
|
+
if line.startswith("COMMIT:"):
|
|
111
|
+
# Save previous commit
|
|
112
|
+
if current_commit is not None:
|
|
113
|
+
commits.append(current_commit)
|
|
114
|
+
|
|
115
|
+
parts = line[7:].split("|", 3)
|
|
116
|
+
if len(parts) >= 4:
|
|
117
|
+
current_commit = {
|
|
118
|
+
"hash": parts[0],
|
|
119
|
+
"author": parts[1],
|
|
120
|
+
"date": parts[2],
|
|
121
|
+
"message": parts[3],
|
|
122
|
+
"files": [],
|
|
123
|
+
}
|
|
124
|
+
else:
|
|
125
|
+
current_commit = None
|
|
126
|
+
continue
|
|
127
|
+
|
|
128
|
+
if current_commit is None:
|
|
129
|
+
continue
|
|
130
|
+
|
|
131
|
+
# Numstat lines: "added\tdeleted\tpath" or "-\t-\tpath" for binary
|
|
132
|
+
if "\t" in line:
|
|
133
|
+
parts = line.split("\t", 2)
|
|
134
|
+
if len(parts) == 3:
|
|
135
|
+
added_str, deleted_str, path = parts
|
|
136
|
+
# Binary files show "-" for numstat
|
|
137
|
+
added = int(added_str) if added_str != "-" else 0
|
|
138
|
+
deleted = int(deleted_str) if deleted_str != "-" else 0
|
|
139
|
+
current_commit["files"].append(
|
|
140
|
+
{"path": path, "added": added, "deleted": deleted}
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# Don't forget the last commit
|
|
144
|
+
if current_commit is not None:
|
|
145
|
+
commits.append(current_commit)
|
|
146
|
+
|
|
147
|
+
return commits
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def calculate_hotspot_score(
|
|
151
|
+
change_count: int,
|
|
152
|
+
bug_fix_count: int,
|
|
153
|
+
author_count: int,
|
|
154
|
+
churn: int,
|
|
155
|
+
age_days: float,
|
|
156
|
+
*,
|
|
157
|
+
max_changes: int = 1,
|
|
158
|
+
max_bugs: int = 1,
|
|
159
|
+
max_authors: int = 1,
|
|
160
|
+
max_churn: int = 1,
|
|
161
|
+
window_days: int = 90,
|
|
162
|
+
) -> float:
|
|
163
|
+
"""Compute weighted composite hotspot score (0–100).
|
|
164
|
+
|
|
165
|
+
Each dimension is normalized against the max value seen in the dataset,
|
|
166
|
+
then weighted and summed.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
change_count: Number of commits touching this file
|
|
170
|
+
bug_fix_count: Number of bug-fix commits touching this file
|
|
171
|
+
author_count: Distinct authors who changed this file
|
|
172
|
+
churn: Total lines added + deleted
|
|
173
|
+
age_days: Days since last change
|
|
174
|
+
max_changes: Max change_count in dataset (for normalization)
|
|
175
|
+
max_bugs: Max bug_fix_count in dataset
|
|
176
|
+
max_authors: Max author_count in dataset
|
|
177
|
+
max_churn: Max churn in dataset
|
|
178
|
+
window_days: Analysis time window in days
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
Score between 0.0 and 100.0
|
|
182
|
+
"""
|
|
183
|
+
norm_changes = change_count / max_changes if max_changes > 0 else 0
|
|
184
|
+
norm_bugs = bug_fix_count / max_bugs if max_bugs > 0 else 0
|
|
185
|
+
norm_authors = author_count / max_authors if max_authors > 0 else 0
|
|
186
|
+
norm_churn = churn / max_churn if max_churn > 0 else 0
|
|
187
|
+
# Recency: recently changed files score higher
|
|
188
|
+
recency = max(0.0, 1.0 - (age_days / window_days)) if window_days > 0 else 0
|
|
189
|
+
|
|
190
|
+
raw = (
|
|
191
|
+
WEIGHT_BUG_FIXES * norm_bugs
|
|
192
|
+
+ WEIGHT_CHANGES * norm_changes
|
|
193
|
+
+ WEIGHT_AUTHORS * norm_authors
|
|
194
|
+
+ WEIGHT_CHURN * norm_churn
|
|
195
|
+
+ WEIGHT_RECENCY * recency
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
return round(min(raw * 100, 100.0), 1)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def _should_exclude(path: str, patterns: list[str]) -> bool:
|
|
202
|
+
"""Check if a file path matches any exclusion pattern."""
|
|
203
|
+
for pattern in patterns:
|
|
204
|
+
if fnmatch.fnmatch(path, pattern):
|
|
205
|
+
return True
|
|
206
|
+
# Also check the basename for patterns like "*.lock"
|
|
207
|
+
if fnmatch.fnmatch(path.split("/")[-1], pattern):
|
|
208
|
+
return True
|
|
209
|
+
return False
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def _aggregate_by_directory(file_hotspots: list[FileHotspot]) -> list[DirectoryHotspot]:
|
|
213
|
+
"""Roll up file-level hotspots to parent directories."""
|
|
214
|
+
dir_data: dict[str, dict] = defaultdict(
|
|
215
|
+
lambda: {
|
|
216
|
+
"file_count": 0,
|
|
217
|
+
"total_changes": 0,
|
|
218
|
+
"total_bug_fixes": 0,
|
|
219
|
+
"author_counts": [],
|
|
220
|
+
"scores": [],
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
for fh in file_hotspots:
|
|
225
|
+
parent = str(Path(fh.path).parent)
|
|
226
|
+
if parent == ".":
|
|
227
|
+
parent = "/"
|
|
228
|
+
entry = dir_data[parent]
|
|
229
|
+
entry["file_count"] += 1
|
|
230
|
+
entry["total_changes"] += fh.change_count
|
|
231
|
+
entry["total_bug_fixes"] += fh.bug_fix_count
|
|
232
|
+
entry["author_counts"].append(fh.author_count)
|
|
233
|
+
entry["scores"].append(fh.hotspot_score)
|
|
234
|
+
|
|
235
|
+
result = []
|
|
236
|
+
for path, data in dir_data.items():
|
|
237
|
+
avg_authors = (
|
|
238
|
+
sum(data["author_counts"]) / len(data["author_counts"])
|
|
239
|
+
if data["author_counts"]
|
|
240
|
+
else 0
|
|
241
|
+
)
|
|
242
|
+
avg_score = (
|
|
243
|
+
sum(data["scores"]) / len(data["scores"]) if data["scores"] else 0
|
|
244
|
+
)
|
|
245
|
+
result.append(
|
|
246
|
+
DirectoryHotspot(
|
|
247
|
+
path=path,
|
|
248
|
+
file_count=data["file_count"],
|
|
249
|
+
total_changes=data["total_changes"],
|
|
250
|
+
total_bug_fixes=data["total_bug_fixes"],
|
|
251
|
+
avg_author_count=round(avg_authors, 1),
|
|
252
|
+
hotspot_score=round(avg_score, 1),
|
|
253
|
+
)
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
result.sort(key=lambda d: d.hotspot_score, reverse=True)
|
|
257
|
+
return result
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
async def analyze_repo(
|
|
261
|
+
name: str,
|
|
262
|
+
path: Path,
|
|
263
|
+
days: int = 90,
|
|
264
|
+
excludes: list[str] | None = None,
|
|
265
|
+
branch: str = "--all",
|
|
266
|
+
) -> HotspotResult:
|
|
267
|
+
"""Analyze a single repository for code hotspots.
|
|
268
|
+
|
|
269
|
+
Args:
|
|
270
|
+
name: Display name for the repository
|
|
271
|
+
path: Path to the git repository
|
|
272
|
+
days: Time window in days
|
|
273
|
+
excludes: Additional file patterns to exclude
|
|
274
|
+
branch: Branch spec (default --all)
|
|
275
|
+
|
|
276
|
+
Returns:
|
|
277
|
+
HotspotResult with file and directory hotspots
|
|
278
|
+
"""
|
|
279
|
+
all_excludes = DEFAULT_EXCLUDES + (excludes or [])
|
|
280
|
+
resolved = Path(path).resolve()
|
|
281
|
+
|
|
282
|
+
if not resolved.exists():
|
|
283
|
+
return HotspotResult(
|
|
284
|
+
success=False,
|
|
285
|
+
repo_name=name,
|
|
286
|
+
repo_path=str(resolved),
|
|
287
|
+
time_window_days=days,
|
|
288
|
+
error=f"Path not found: {resolved}",
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
stdout, stderr, rc = await _run_git_log(resolved, days, branch)
|
|
292
|
+
|
|
293
|
+
if rc != 0:
|
|
294
|
+
return HotspotResult(
|
|
295
|
+
success=False,
|
|
296
|
+
repo_name=name,
|
|
297
|
+
repo_path=str(resolved),
|
|
298
|
+
time_window_days=days,
|
|
299
|
+
error=f"git log failed: {stderr}",
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
commits = _parse_git_log(stdout)
|
|
303
|
+
|
|
304
|
+
if not commits:
|
|
305
|
+
return HotspotResult(
|
|
306
|
+
success=True,
|
|
307
|
+
repo_name=name,
|
|
308
|
+
repo_path=str(resolved),
|
|
309
|
+
time_window_days=days,
|
|
310
|
+
commit_count=0,
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
# Aggregate per-file metrics
|
|
314
|
+
file_metrics: dict[str, dict] = defaultdict(
|
|
315
|
+
lambda: {
|
|
316
|
+
"change_count": 0,
|
|
317
|
+
"bug_fix_count": 0,
|
|
318
|
+
"authors": set(),
|
|
319
|
+
"lines_added": 0,
|
|
320
|
+
"lines_deleted": 0,
|
|
321
|
+
"last_changed": "",
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
now = datetime.now(timezone.utc)
|
|
326
|
+
|
|
327
|
+
for commit in commits:
|
|
328
|
+
is_fix = is_bug_fix_commit(commit["message"])
|
|
329
|
+
for file_info in commit["files"]:
|
|
330
|
+
fpath = file_info["path"]
|
|
331
|
+
if _should_exclude(fpath, all_excludes):
|
|
332
|
+
continue
|
|
333
|
+
|
|
334
|
+
m = file_metrics[fpath]
|
|
335
|
+
m["change_count"] += 1
|
|
336
|
+
if is_fix:
|
|
337
|
+
m["bug_fix_count"] += 1
|
|
338
|
+
m["authors"].add(commit["author"])
|
|
339
|
+
m["lines_added"] += file_info["added"]
|
|
340
|
+
m["lines_deleted"] += file_info["deleted"]
|
|
341
|
+
# Track most recent change date
|
|
342
|
+
if not m["last_changed"] or commit["date"] > m["last_changed"]:
|
|
343
|
+
m["last_changed"] = commit["date"]
|
|
344
|
+
|
|
345
|
+
if not file_metrics:
|
|
346
|
+
return HotspotResult(
|
|
347
|
+
success=True,
|
|
348
|
+
repo_name=name,
|
|
349
|
+
repo_path=str(resolved),
|
|
350
|
+
time_window_days=days,
|
|
351
|
+
commit_count=len(commits),
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
# Compute normalization maximums
|
|
355
|
+
max_changes = max(m["change_count"] for m in file_metrics.values())
|
|
356
|
+
max_bugs = max(m["bug_fix_count"] for m in file_metrics.values()) or 1
|
|
357
|
+
max_authors = max(len(m["authors"]) for m in file_metrics.values())
|
|
358
|
+
max_churn = max(
|
|
359
|
+
m["lines_added"] + m["lines_deleted"] for m in file_metrics.values()
|
|
360
|
+
) or 1
|
|
361
|
+
|
|
362
|
+
# Build FileHotspot list with scores
|
|
363
|
+
file_hotspots = []
|
|
364
|
+
for fpath, m in file_metrics.items():
|
|
365
|
+
churn = m["lines_added"] + m["lines_deleted"]
|
|
366
|
+
|
|
367
|
+
# Compute age in days
|
|
368
|
+
age_days = days # default to full window
|
|
369
|
+
if m["last_changed"]:
|
|
370
|
+
try:
|
|
371
|
+
last_dt = datetime.fromisoformat(m["last_changed"])
|
|
372
|
+
age_days = max(0, (now - last_dt).total_seconds() / 86400)
|
|
373
|
+
except (ValueError, TypeError):
|
|
374
|
+
pass
|
|
375
|
+
|
|
376
|
+
score = calculate_hotspot_score(
|
|
377
|
+
change_count=m["change_count"],
|
|
378
|
+
bug_fix_count=m["bug_fix_count"],
|
|
379
|
+
author_count=len(m["authors"]),
|
|
380
|
+
churn=churn,
|
|
381
|
+
age_days=age_days,
|
|
382
|
+
max_changes=max_changes,
|
|
383
|
+
max_bugs=max_bugs,
|
|
384
|
+
max_authors=max_authors,
|
|
385
|
+
max_churn=max_churn,
|
|
386
|
+
window_days=days,
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
file_hotspots.append(
|
|
390
|
+
FileHotspot(
|
|
391
|
+
path=fpath,
|
|
392
|
+
change_count=m["change_count"],
|
|
393
|
+
bug_fix_count=m["bug_fix_count"],
|
|
394
|
+
author_count=len(m["authors"]),
|
|
395
|
+
lines_added=m["lines_added"],
|
|
396
|
+
lines_deleted=m["lines_deleted"],
|
|
397
|
+
churn=churn,
|
|
398
|
+
last_changed=m["last_changed"],
|
|
399
|
+
hotspot_score=score,
|
|
400
|
+
)
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
# Sort by score descending
|
|
404
|
+
file_hotspots.sort(key=lambda h: h.hotspot_score, reverse=True)
|
|
405
|
+
|
|
406
|
+
# Aggregate directories
|
|
407
|
+
directory_hotspots = _aggregate_by_directory(file_hotspots)
|
|
408
|
+
|
|
409
|
+
return HotspotResult(
|
|
410
|
+
success=True,
|
|
411
|
+
repo_name=name,
|
|
412
|
+
repo_path=str(resolved),
|
|
413
|
+
time_window_days=days,
|
|
414
|
+
commit_count=len(commits),
|
|
415
|
+
file_hotspots=file_hotspots,
|
|
416
|
+
directory_hotspots=directory_hotspots,
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
async def analyze_all_repos(
|
|
421
|
+
project_root: Path,
|
|
422
|
+
days: int = 90,
|
|
423
|
+
excludes: list[str] | None = None,
|
|
424
|
+
branch: str = "--all",
|
|
425
|
+
) -> MultiRepoHotspotResult:
|
|
426
|
+
"""Analyze all repos found under project root in parallel.
|
|
427
|
+
|
|
428
|
+
Discovers repos via repos.yaml if available, otherwise analyzes project_root itself.
|
|
429
|
+
|
|
430
|
+
Args:
|
|
431
|
+
project_root: Root directory of the project
|
|
432
|
+
days: Time window in days
|
|
433
|
+
excludes: Additional file patterns to exclude
|
|
434
|
+
branch: Branch spec
|
|
435
|
+
|
|
436
|
+
Returns:
|
|
437
|
+
MultiRepoHotspotResult with per-repo results
|
|
438
|
+
"""
|
|
439
|
+
from pennyfarthing_scripts.common.config import load_yaml_config
|
|
440
|
+
|
|
441
|
+
repos_yaml = load_yaml_config(project_root / ".pennyfarthing" / "repos.yaml")
|
|
442
|
+
|
|
443
|
+
repos: list[tuple[str, Path]] = []
|
|
444
|
+
|
|
445
|
+
if repos_yaml and isinstance(repos_yaml, dict):
|
|
446
|
+
# Extract repos from repos.yaml
|
|
447
|
+
for repo_name, repo_config in repos_yaml.items():
|
|
448
|
+
if isinstance(repo_config, dict):
|
|
449
|
+
repo_path = repo_config.get("path", repo_name)
|
|
450
|
+
else:
|
|
451
|
+
repo_path = str(repo_config)
|
|
452
|
+
full_path = project_root / repo_path
|
|
453
|
+
if full_path.exists() and (full_path / ".git").exists():
|
|
454
|
+
repos.append((repo_name, full_path))
|
|
455
|
+
else:
|
|
456
|
+
# No repos.yaml — analyze the project root itself if it's a git repo
|
|
457
|
+
if (project_root / ".git").exists():
|
|
458
|
+
repos.append((project_root.name, project_root))
|
|
459
|
+
|
|
460
|
+
if not repos:
|
|
461
|
+
return MultiRepoHotspotResult(
|
|
462
|
+
success=False,
|
|
463
|
+
error="No git repositories found to analyze",
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
tasks = [analyze_repo(name, path, days, excludes, branch) for name, path in repos]
|
|
467
|
+
results = await asyncio.gather(*tasks, return_exceptions=False)
|
|
468
|
+
|
|
469
|
+
return MultiRepoHotspotResult(
|
|
470
|
+
success=True,
|
|
471
|
+
repo_results=list(results),
|
|
472
|
+
)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CLI commands for hotspot analysis.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
pf hotspots analyze [OPTIONS]
|
|
6
|
+
pf hotspots files [OPTIONS]
|
|
7
|
+
pf hotspots dirs [OPTIONS]
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import asyncio
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
import click
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@click.group()
|
|
19
|
+
def hotspots():
|
|
20
|
+
"""Git history hotspot detection.
|
|
21
|
+
|
|
22
|
+
\b
|
|
23
|
+
Commands:
|
|
24
|
+
analyze - Full hotspot analysis (files + directories)
|
|
25
|
+
files - File-level hotspot report
|
|
26
|
+
dirs - Directory-level hotspot report
|
|
27
|
+
"""
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _common_options(fn):
|
|
32
|
+
"""Shared options for all hotspot commands."""
|
|
33
|
+
fn = click.option("--repo", help="Analyze a single named repo from repos.yaml")(fn)
|
|
34
|
+
fn = click.option("--path", "repo_path", type=click.Path(exists=True), help="Analyze a standalone repo path")(fn)
|
|
35
|
+
fn = click.option("--days", default=90, show_default=True, help="Time window in days")(fn)
|
|
36
|
+
fn = click.option("--top", default=20, show_default=True, help="Number of top results to show")(fn)
|
|
37
|
+
fn = click.option("--format", "fmt", type=click.Choice(["table", "json", "csv"]), default="table", show_default=True)(fn)
|
|
38
|
+
fn = click.option("--output", "output_file", type=click.Path(), help="Write output to file")(fn)
|
|
39
|
+
fn = click.option("--exclude", multiple=True, help="Additional exclude patterns (repeatable)")(fn)
|
|
40
|
+
fn = click.option("--branch", default="--all", show_default=True, help="Branch spec for git log")(fn)
|
|
41
|
+
return fn
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _run_analysis(repo: str | None, repo_path: str | None, days: int, exclude: tuple, branch: str):
|
|
45
|
+
"""Run analysis and return result."""
|
|
46
|
+
from pennyfarthing_scripts.hotspots.analyze import analyze_all_repos, analyze_repo
|
|
47
|
+
from pennyfarthing_scripts.common.config import get_project_root
|
|
48
|
+
|
|
49
|
+
excludes = list(exclude) if exclude else None
|
|
50
|
+
|
|
51
|
+
if repo_path:
|
|
52
|
+
# Standalone analysis of a specific path
|
|
53
|
+
p = Path(repo_path).resolve()
|
|
54
|
+
return asyncio.run(analyze_repo(p.name, p, days, excludes, branch))
|
|
55
|
+
elif repo:
|
|
56
|
+
# Single named repo from project
|
|
57
|
+
project_root = get_project_root()
|
|
58
|
+
from pennyfarthing_scripts.common.config import load_yaml_config
|
|
59
|
+
repos_yaml = load_yaml_config(project_root / ".pennyfarthing" / "repos.yaml")
|
|
60
|
+
if repos_yaml and repo in repos_yaml:
|
|
61
|
+
cfg = repos_yaml[repo]
|
|
62
|
+
rpath = cfg.get("path", repo) if isinstance(cfg, dict) else str(cfg)
|
|
63
|
+
return asyncio.run(
|
|
64
|
+
analyze_repo(repo, project_root / rpath, days, excludes, branch)
|
|
65
|
+
)
|
|
66
|
+
else:
|
|
67
|
+
# Try as a subdirectory name
|
|
68
|
+
candidate = project_root / repo
|
|
69
|
+
if candidate.exists():
|
|
70
|
+
return asyncio.run(
|
|
71
|
+
analyze_repo(repo, candidate, days, excludes, branch)
|
|
72
|
+
)
|
|
73
|
+
raise click.ClickException(f"Repo not found: {repo}")
|
|
74
|
+
else:
|
|
75
|
+
# All repos
|
|
76
|
+
project_root = get_project_root()
|
|
77
|
+
return asyncio.run(
|
|
78
|
+
analyze_all_repos(project_root, days, excludes, branch)
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _output_result(result, fmt: str, output_file: str | None, top: int, mode: str):
|
|
83
|
+
"""Format and output the analysis result."""
|
|
84
|
+
from pennyfarthing_scripts.hotspots.formatters import (
|
|
85
|
+
export_csv,
|
|
86
|
+
export_json,
|
|
87
|
+
format_dir_table,
|
|
88
|
+
format_file_table,
|
|
89
|
+
format_summary,
|
|
90
|
+
)
|
|
91
|
+
from pennyfarthing_scripts.hotspots.models import HotspotResult, MultiRepoHotspotResult
|
|
92
|
+
|
|
93
|
+
# Collect all repo results
|
|
94
|
+
if isinstance(result, MultiRepoHotspotResult):
|
|
95
|
+
repo_results = result.repo_results
|
|
96
|
+
else:
|
|
97
|
+
repo_results = [result]
|
|
98
|
+
|
|
99
|
+
if fmt == "json":
|
|
100
|
+
text = export_json(result)
|
|
101
|
+
elif fmt == "csv":
|
|
102
|
+
# CSV only supports file-level
|
|
103
|
+
all_files = []
|
|
104
|
+
for r in repo_results:
|
|
105
|
+
all_files.extend(r.file_hotspots)
|
|
106
|
+
all_files.sort(key=lambda h: h.hotspot_score, reverse=True)
|
|
107
|
+
text = export_csv(all_files[:top])
|
|
108
|
+
else:
|
|
109
|
+
# Table output
|
|
110
|
+
parts = []
|
|
111
|
+
for r in repo_results:
|
|
112
|
+
if not r.success:
|
|
113
|
+
parts.append(f"Error ({r.repo_name}): {r.error}")
|
|
114
|
+
continue
|
|
115
|
+
format_summary(r)
|
|
116
|
+
if mode in ("analyze", "files"):
|
|
117
|
+
parts.append("\nFile Hotspots:")
|
|
118
|
+
parts.append(format_file_table(r.file_hotspots, top))
|
|
119
|
+
if mode in ("analyze", "dirs"):
|
|
120
|
+
parts.append("\nDirectory Hotspots:")
|
|
121
|
+
parts.append(format_dir_table(r.directory_hotspots, top))
|
|
122
|
+
text = "\n".join(parts)
|
|
123
|
+
|
|
124
|
+
if output_file:
|
|
125
|
+
Path(output_file).write_text(text)
|
|
126
|
+
click.echo(f"Output written to {output_file}", err=True)
|
|
127
|
+
else:
|
|
128
|
+
click.echo(text)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@hotspots.command()
|
|
132
|
+
@_common_options
|
|
133
|
+
def analyze(repo, repo_path, days, top, fmt, output_file, exclude, branch):
|
|
134
|
+
"""Full hotspot analysis — files and directories."""
|
|
135
|
+
result = _run_analysis(repo, repo_path, days, exclude, branch)
|
|
136
|
+
_output_result(result, fmt, output_file, top, "analyze")
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
@hotspots.command()
|
|
140
|
+
@_common_options
|
|
141
|
+
def files(repo, repo_path, days, top, fmt, output_file, exclude, branch):
|
|
142
|
+
"""File-level hotspot report."""
|
|
143
|
+
result = _run_analysis(repo, repo_path, days, exclude, branch)
|
|
144
|
+
_output_result(result, fmt, output_file, top, "files")
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@hotspots.command()
|
|
148
|
+
@_common_options
|
|
149
|
+
def dirs(repo, repo_path, days, top, fmt, output_file, exclude, branch):
|
|
150
|
+
"""Directory-level hotspot report."""
|
|
151
|
+
result = _run_analysis(repo, repo_path, days, exclude, branch)
|
|
152
|
+
_output_result(result, fmt, output_file, top, "dirs")
|