@pennyfarthing/core 11.2.0 → 11.2.2
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 +100 -40
- package/package.json +2 -1
- package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/doctor.js +474 -66
- package/packages/core/dist/cli/commands/doctor.js.map +1 -1
- package/packages/core/dist/cli/commands/init.js +4 -4
- package/packages/core/dist/cli/commands/init.js.map +1 -1
- package/packages/core/dist/cli/commands/update.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/update.js +4 -5
- package/packages/core/dist/cli/commands/update.js.map +1 -1
- package/packages/core/dist/cli/utils/constants.d.ts +3 -8
- package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/constants.js +3 -4
- package/packages/core/dist/cli/utils/constants.js.map +1 -1
- package/packages/core/dist/cli/utils/settings.d.ts +7 -0
- package/packages/core/dist/cli/utils/settings.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/settings.js +70 -29
- package/packages/core/dist/cli/utils/settings.js.map +1 -1
- package/packages/core/dist/cli/utils/symlinks.js +16 -16
- package/packages/core/dist/cli/utils/symlinks.js.map +1 -1
- package/packages/core/dist/consultation/dialogue-manager.d.ts +1 -1
- package/packages/core/dist/consultation/dialogue-manager.d.ts.map +1 -1
- package/packages/core/dist/consultation/dialogue-manager.js +1 -1
- package/packages/core/dist/consultation/dialogue-manager.js.map +1 -1
- package/packages/core/dist/consultation/dialogue-manager.test.js.map +1 -1
- package/packages/core/dist/consultation/tandem-metrics.d.ts +91 -0
- package/packages/core/dist/consultation/tandem-metrics.d.ts.map +1 -0
- package/packages/core/dist/consultation/tandem-metrics.js +131 -0
- package/packages/core/dist/consultation/tandem-metrics.js.map +1 -0
- package/packages/core/dist/consultation/tandem-metrics.test.d.ts +18 -0
- package/packages/core/dist/consultation/tandem-metrics.test.d.ts.map +1 -0
- package/packages/core/dist/consultation/tandem-metrics.test.js +457 -0
- package/packages/core/dist/consultation/tandem-metrics.test.js.map +1 -0
- package/packages/core/dist/public/css/react.css +1 -1
- package/packages/core/dist/public/js/react/react.js +14 -14
- package/packages/core/dist/server/api/agent-load.js +1 -1
- package/packages/core/dist/server/api/agent-load.js.map +1 -1
- package/packages/core/dist/server/api/git.d.ts.map +1 -1
- package/packages/core/dist/server/api/git.js +0 -1
- package/packages/core/dist/server/api/git.js.map +1 -1
- package/packages/core/dist/server/api/index.d.ts +2 -0
- package/packages/core/dist/server/api/index.d.ts.map +1 -1
- package/packages/core/dist/server/api/index.js +2 -0
- package/packages/core/dist/server/api/index.js.map +1 -1
- package/packages/core/dist/server/api/project-info.d.ts +11 -0
- package/packages/core/dist/server/api/project-info.d.ts.map +1 -0
- package/packages/core/dist/server/api/project-info.js +18 -0
- package/packages/core/dist/server/api/project-info.js.map +1 -0
- package/packages/core/dist/server/otlp-receiver.d.ts.map +1 -1
- package/packages/core/dist/server/otlp-receiver.js +18 -1
- package/packages/core/dist/server/otlp-receiver.js.map +1 -1
- package/packages/core/dist/server/otlp-receiver.test.js +1 -1
- package/packages/core/dist/server/otlp-receiver.test.js.map +1 -1
- package/packages/core/dist/server/server.d.ts +0 -3
- package/packages/core/dist/server/server.d.ts.map +1 -1
- package/packages/core/dist/server/server.js +5 -38
- package/packages/core/dist/server/server.js.map +1 -1
- package/packages/core/dist/server/server.test.d.ts +1 -1
- package/packages/core/dist/server/server.test.js +12 -23
- package/packages/core/dist/server/server.test.js.map +1 -1
- package/packages/core/dist/server/settings.d.ts +1 -0
- package/packages/core/dist/server/settings.d.ts.map +1 -1
- package/packages/core/dist/server/settings.js +13 -0
- package/packages/core/dist/server/settings.js.map +1 -1
- package/packages/core/dist/shared/capabilities.d.ts +88 -0
- package/packages/core/dist/shared/capabilities.d.ts.map +1 -0
- package/packages/core/dist/shared/capabilities.js +133 -0
- package/packages/core/dist/shared/capabilities.js.map +1 -0
- package/packages/core/dist/shared/capabilities.test.d.ts +2 -0
- package/packages/core/dist/shared/capabilities.test.d.ts.map +1 -0
- package/packages/core/dist/shared/capabilities.test.js +217 -0
- package/packages/core/dist/shared/capabilities.test.js.map +1 -0
- package/packages/core/dist/shared/spawn-prompt.d.ts +47 -0
- package/packages/core/dist/shared/spawn-prompt.d.ts.map +1 -0
- package/packages/core/dist/shared/spawn-prompt.js +82 -0
- package/packages/core/dist/shared/spawn-prompt.js.map +1 -0
- package/packages/core/dist/shared/spawn-prompt.test.d.ts +2 -0
- package/packages/core/dist/shared/spawn-prompt.test.d.ts.map +1 -0
- package/packages/core/dist/shared/spawn-prompt.test.js +251 -0
- package/packages/core/dist/shared/spawn-prompt.test.js.map +1 -0
- package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts +18 -0
- package/packages/core/dist/workflow/tandem-workflow-templates.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/tandem-workflow-templates.test.js +434 -0
- package/packages/core/dist/workflow/tandem-workflow-templates.test.js.map +1 -0
- package/packages/core/dist/workflow/team-lifecycle.d.ts +169 -0
- package/packages/core/dist/workflow/team-lifecycle.d.ts.map +1 -0
- package/packages/core/dist/workflow/team-lifecycle.js +217 -0
- package/packages/core/dist/workflow/team-lifecycle.js.map +1 -0
- package/packages/core/dist/workflow/team-lifecycle.test.d.ts +20 -0
- package/packages/core/dist/workflow/team-lifecycle.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/team-lifecycle.test.js +966 -0
- package/packages/core/dist/workflow/team-lifecycle.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-schema.d.ts +32 -0
- package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.js +120 -0
- package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.test.d.ts.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.test.js +570 -1
- package/packages/core/dist/workflow/workflow-schema.test.js.map +1 -1
- package/packages/core/dist/workflow/workflow-team-templates.test.d.ts +17 -0
- package/packages/core/dist/workflow/workflow-team-templates.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-team-templates.test.js +275 -0
- package/packages/core/dist/workflow/workflow-team-templates.test.js.map +1 -0
- package/pennyfarthing-dist/agents/dev.md +21 -12
- package/pennyfarthing-dist/agents/reviewer.md +23 -4
- package/pennyfarthing-dist/agents/sm-finish.md +19 -2
- package/pennyfarthing-dist/agents/sm-setup.md +7 -7
- package/pennyfarthing-dist/agents/sm.md +12 -12
- package/pennyfarthing-dist/agents/tea.md +2 -2
- package/pennyfarthing-dist/agents/testing-runner.md +1 -1
- package/pennyfarthing-dist/commands/pf-architect.md +1 -1
- package/pennyfarthing-dist/commands/pf-ba.md +1 -1
- package/pennyfarthing-dist/commands/pf-chore.md +2 -2
- package/pennyfarthing-dist/commands/pf-dev.md +1 -1
- package/pennyfarthing-dist/commands/pf-devops.md +1 -1
- package/pennyfarthing-dist/commands/pf-epic.md +6 -6
- package/pennyfarthing-dist/commands/pf-git.md +12 -10
- package/pennyfarthing-dist/commands/pf-health-check.md +1 -1
- package/pennyfarthing-dist/commands/pf-help.md +12 -12
- package/pennyfarthing-dist/commands/pf-orchestrator.md +1 -1
- package/pennyfarthing-dist/commands/pf-pm.md +1 -1
- package/pennyfarthing-dist/commands/pf-prime.md +8 -8
- package/pennyfarthing-dist/commands/pf-reviewer.md +1 -1
- package/pennyfarthing-dist/commands/pf-session.md +7 -7
- package/pennyfarthing-dist/commands/pf-sm.md +1 -1
- package/pennyfarthing-dist/commands/pf-sprint.md +7 -7
- package/pennyfarthing-dist/commands/pf-tea.md +1 -1
- package/pennyfarthing-dist/commands/pf-tech-writer.md +1 -1
- package/pennyfarthing-dist/commands/pf-theme.md +9 -9
- package/pennyfarthing-dist/commands/pf-ux-designer.md +1 -1
- package/pennyfarthing-dist/commands/pf-work.md +1 -1
- package/pennyfarthing-dist/gates/approval.md +63 -0
- package/pennyfarthing-dist/gates/confidence-sm.md +71 -0
- package/pennyfarthing-dist/gates/context-ok.md +56 -0
- package/pennyfarthing-dist/gates/evaluations/confidence-sm.md +54 -0
- package/pennyfarthing-dist/gates/quality-pass.md +67 -0
- package/pennyfarthing-dist/gates/tests-fail.md +84 -0
- package/pennyfarthing-dist/gates/tests-pass.md +79 -0
- package/pennyfarthing-dist/guides/agent-behavior.md +84 -29
- package/pennyfarthing-dist/guides/agent-coordination.md +10 -10
- package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +6 -6
- package/pennyfarthing-dist/guides/agent-template-tactical.md +1 -1
- package/pennyfarthing-dist/guides/bell-mode.md +1 -1
- package/pennyfarthing-dist/guides/bikerack.md +10 -10
- package/pennyfarthing-dist/guides/brownfield-tools.md +24 -24
- package/pennyfarthing-dist/guides/command-tag-taxonomy.md +1 -1
- package/pennyfarthing-dist/guides/gate-schema.md +2 -2
- package/pennyfarthing-dist/guides/gates.md +3 -3
- package/pennyfarthing-dist/guides/handoff-cli.md +8 -8
- package/pennyfarthing-dist/guides/hooks.md +29 -29
- package/pennyfarthing-dist/guides/prime.md +2 -2
- package/pennyfarthing-dist/guides/reflector.md +1 -1
- package/pennyfarthing-dist/guides/skill-schema.md +6 -6
- package/pennyfarthing-dist/guides/tandem-protocol.md +3 -3
- package/pennyfarthing-dist/guides/workflow-schema.md +1 -1
- package/pennyfarthing-dist/guides/worktree-mode.md +3 -3
- package/pennyfarthing-dist/guides/xml-tags.md +8 -8
- package/pennyfarthing-dist/scripts/README.md +4 -4
- package/pennyfarthing-dist/scripts/core/agent-session.sh +2 -5
- package/pennyfarthing-dist/scripts/core/check-context.sh +3 -1
- package/pennyfarthing-dist/scripts/core/pf.sh +5 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +4 -89
- package/pennyfarthing-dist/scripts/core/prime.sh +2 -25
- package/pennyfarthing-dist/scripts/git/README.md +14 -14
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +2 -3
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +2 -3
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +2 -3
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +2 -4
- package/pennyfarthing-dist/scripts/hooks/README.md +6 -6
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +4 -183
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +4 -95
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +4 -65
- package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +3 -31
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +5 -4
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +29 -34
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +4 -71
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +3 -19
- package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +4 -30
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +3 -32
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +4 -65
- package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +4 -78
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +3 -93
- package/pennyfarthing-dist/scripts/lib/env.sh +34 -0
- package/pennyfarthing-dist/scripts/lib/run-pf.sh +39 -0
- package/pennyfarthing-dist/scripts/misc/README.md +1 -1
- package/pennyfarthing-dist/scripts/misc/statusline.sh +4 -301
- package/pennyfarthing-dist/scripts/sprint/README.md +21 -21
- package/pennyfarthing-dist/scripts/workflow/README.md +2 -2
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +2 -16
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +3 -3
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +3 -3
- package/pennyfarthing-dist/skills/pf-bc/examples.md +23 -23
- package/pennyfarthing-dist/skills/pf-bc/skill.md +17 -17
- package/pennyfarthing-dist/skills/pf-bc/usage.md +8 -8
- package/pennyfarthing-dist/skills/pf-jira/SKILL.md +15 -15
- package/pennyfarthing-dist/skills/pf-jira/examples.md +48 -48
- package/pennyfarthing-dist/skills/pf-jira/usage.md +15 -15
- package/pennyfarthing-dist/skills/pf-sprint/examples.md +80 -80
- package/pennyfarthing-dist/skills/pf-sprint/skill.md +35 -35
- package/pennyfarthing-dist/skills/pf-sprint/usage.md +30 -30
- package/pennyfarthing-dist/skills/pf-theme/examples.md +15 -15
- package/pennyfarthing-dist/skills/pf-theme/skill.md +6 -6
- package/pennyfarthing-dist/skills/pf-theme/usage.md +5 -5
- package/pennyfarthing-dist/skills/pf-workflow/examples.md +27 -27
- package/pennyfarthing-dist/skills/pf-workflow/skill.md +11 -11
- package/pennyfarthing-dist/skills/pf-workflow/usage.md +11 -11
- package/pennyfarthing-dist/skills/skill-registry.yaml +19 -19
- package/pennyfarthing-dist/templates/settings.local.json.template +19 -10
- package/pennyfarthing-dist/workflows/bdd-team.yaml +89 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-05-import-to-future.md +1 -1
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-01-analyze.md +1 -1
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-04-verify.md +1 -1
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +1 -1
- package/pennyfarthing-dist/workflows/project-setup/steps/step-01-discover.md +47 -0
- package/pennyfarthing-dist/workflows/tdd-team.yaml +80 -0
- package/pennyfarthing-dist/workflows/tdd.yaml +11 -2
- package/pennyfarthing_scripts/CLAUDE.md +19 -10
- package/pennyfarthing_scripts/__init__.py +1 -1
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/context.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/hooks.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__/session_start_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/__pycache__/focus.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/__pycache__/split.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/cli.py +2 -2
- package/pennyfarthing_scripts/bellmode_hook.py +9 -296
- package/pennyfarthing_scripts/bikerack/__pycache__/audit_log_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/background_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/changed_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/context_meter_footer.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/debug_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/events.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/portrait_resolver.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/progress_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_data.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/story_detail_screen.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/audit_log_panel.py +161 -0
- package/pennyfarthing_scripts/bikerack/base_panel.py +27 -4
- package/pennyfarthing_scripts/bikerack/changed_panel.py +96 -4
- package/pennyfarthing_scripts/bikerack/context_meter_footer.py +88 -0
- package/pennyfarthing_scripts/bikerack/debug_panel.py +1 -1
- package/pennyfarthing_scripts/bikerack/diffs_panel.py +30 -0
- package/pennyfarthing_scripts/bikerack/events.py +28 -0
- package/pennyfarthing_scripts/bikerack/launcher.py +6 -6
- package/pennyfarthing_scripts/bikerack/portrait_resolver.py +139 -0
- package/pennyfarthing_scripts/bikerack/progress_panel.py +0 -1
- package/pennyfarthing_scripts/bikerack/sprint_panel.py +373 -142
- package/pennyfarthing_scripts/bikerack/story_detail_data.py +247 -0
- package/pennyfarthing_scripts/bikerack/story_detail_screen.py +177 -0
- package/pennyfarthing_scripts/bikerack/tui.py +304 -62
- package/pennyfarthing_scripts/bikerack/ws_client.py +2 -2
- package/pennyfarthing_scripts/cli.py +5 -0
- package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/config.py +29 -2
- package/pennyfarthing_scripts/common/pr_config.py +38 -0
- package/pennyfarthing_scripts/consultation/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/consultation/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/consultation/cli.py +3 -3
- package/pennyfarthing_scripts/context.py +3 -3
- 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__/repos.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/hooks_installer.py +2 -3
- package/pennyfarthing_scripts/git/status_all.py +1 -1
- package/pennyfarthing_scripts/git/worktree.py +2 -2
- package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/marker.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/phase_check.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/cli.py +33 -1
- package/pennyfarthing_scripts/handoff/complete_phase.py +28 -0
- package/pennyfarthing_scripts/handoff/marker.py +15 -15
- package/pennyfarthing_scripts/handoff/phase_check.py +96 -0
- package/pennyfarthing_scripts/handoff/resolve_gate.py +13 -1
- package/pennyfarthing_scripts/hooks/__init__.py +442 -0
- package/pennyfarthing_scripts/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/bell_mode.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/context_breaker.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/context_warning.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/cyclist_pretooluse.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/pre_edit_check.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/reflector_check.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/schema_validation.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/session_start.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/session_stop.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/sprint_yaml_validation.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__pycache__/statusline.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/bell_mode.py +214 -0
- package/pennyfarthing_scripts/hooks/cli.py +96 -0
- package/pennyfarthing_scripts/hooks/context_breaker.py +104 -0
- package/pennyfarthing_scripts/hooks/context_warning.py +66 -0
- package/pennyfarthing_scripts/hooks/cyclist_pretooluse.py +129 -0
- package/pennyfarthing_scripts/hooks/pre_edit_check.py +77 -0
- package/pennyfarthing_scripts/hooks/reflector_check.py +270 -0
- package/pennyfarthing_scripts/hooks/schema_validation.py +202 -0
- package/pennyfarthing_scripts/hooks/session_start.py +294 -0
- package/pennyfarthing_scripts/hooks/session_stop.py +111 -0
- package/pennyfarthing_scripts/hooks/sprint_yaml_validation.py +97 -0
- package/pennyfarthing_scripts/hooks/statusline.py +429 -0
- package/pennyfarthing_scripts/hooks.py +27 -432
- package/pennyfarthing_scripts/pretooluse_hook.py +3 -185
- package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/heatmap.py +3 -15
- package/pennyfarthing_scripts/prime/workflow.py +2 -1
- package/pennyfarthing_scripts/schema_validation_hook.py +3 -298
- package/pennyfarthing_scripts/session_start_hook.py +4 -186
- 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__/story_finish.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/cli.py +121 -0
- package/pennyfarthing_scripts/sprint/loader.py +154 -3
- package/pennyfarthing_scripts/sprint/story_update.py +26 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_list_team.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/test_bikerack.py +26 -26
- package/pennyfarthing_scripts/tests/test_dialogue_manager.py +0 -1
- package/pennyfarthing_scripts/tests/test_sprint_panel.py +344 -265
- package/pennyfarthing_scripts/tests/test_workflow_list_team.py +147 -0
- package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/tandem_awareness.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/team_mode.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/team_mode.py +323 -0
- package/pennyfarthing_scripts/validate/adapters/workflow.py +19 -0
- package/pennyfarthing_scripts/welcome_hook.py +3 -149
- package/pennyfarthing_scripts/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/__pycache__/helpers.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/__pycache__/scale.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/__pycache__/state.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/__pycache__/team_lifecycle.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/workflow/cli.py +22 -20
- package/pennyfarthing_scripts/workflow/state.py +0 -1
- package/pennyfarthing_scripts/workflow/team_lifecycle.py +256 -0
- package/packages/core/dist/cli/cyclist-migration.test.d.ts +0 -16
- package/packages/core/dist/cli/cyclist-migration.test.d.ts.map +0 -1
- package/packages/core/dist/cli/cyclist-migration.test.js +0 -229
- package/packages/core/dist/cli/cyclist-migration.test.js.map +0 -1
- package/packages/core/dist/scripts/theme-detail.test.d.ts +0 -10
- package/packages/core/dist/scripts/theme-detail.test.d.ts.map +0 -1
- package/packages/core/dist/scripts/theme-detail.test.js +0 -199
- package/packages/core/dist/scripts/theme-detail.test.js.map +0 -1
|
@@ -1,33 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# Initializes environment for Claude Code session:
|
|
6
|
-
# - Session directory setup and logging
|
|
7
|
-
# - Checkpoint validation (cross-session drift)
|
|
8
|
-
# - WheelHub auto-start
|
|
9
|
-
# - OTEL auto-configuration
|
|
10
|
-
#
|
|
11
|
-
# Input (stdin): JSON with session_id, source, cwd, etc.
|
|
12
|
-
# Output: Writes to CLAUDE_ENV_FILE
|
|
13
|
-
|
|
14
|
-
set -euo pipefail
|
|
15
|
-
|
|
16
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
17
|
-
source "$SCRIPT_DIR/../lib/find-root.sh"
|
|
18
|
-
|
|
19
|
-
# Set PYTHONPATH for pennyfarthing_scripts
|
|
20
|
-
PENNYFARTHING_SCRIPTS=""
|
|
21
|
-
if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
|
|
22
|
-
# Dogfooding: framework inlined in orchestrator
|
|
23
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
|
|
24
|
-
elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
|
|
25
|
-
# Normal install
|
|
26
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
|
|
30
|
-
export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
python3 -m pennyfarthing_scripts.session_start_hook
|
|
2
|
+
# Shim: delegates to Python CLI via uv run — no global pf install needed.
|
|
3
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
|
|
4
|
+
exec_pf hooks session-start
|
|
@@ -1,65 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# Writes session state to checkpoint:
|
|
6
|
-
# - Active agent (from .session/agents/)
|
|
7
|
-
# - Current story (from .session/*-session.md)
|
|
8
|
-
# - Workflow phase (from session file)
|
|
9
|
-
# - Git SHA (current HEAD)
|
|
10
|
-
# - Session ID
|
|
11
|
-
#
|
|
12
|
-
# Next session can validate this against current git state.
|
|
13
|
-
|
|
14
|
-
set -euo pipefail
|
|
15
|
-
|
|
16
|
-
# Load shared functions
|
|
17
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
18
|
-
|
|
19
|
-
# Determine project root (directory containing .claude)
|
|
20
|
-
PROJECT_ROOT="$SCRIPT_DIR"
|
|
21
|
-
while [[ ! -d "$PROJECT_ROOT/.pennyfarthing" ]] && [[ "$PROJECT_ROOT" != "/" ]]; do
|
|
22
|
-
PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
|
|
23
|
-
done
|
|
24
|
-
|
|
25
|
-
source "$SCRIPT_DIR/../lib/checkpoint.sh"
|
|
26
|
-
|
|
27
|
-
# Read input from stdin (contains session_id, source, etc.)
|
|
28
|
-
input=$(cat)
|
|
29
|
-
session_id=$(echo "$input" | jq -r '.session_id // "unknown"')
|
|
30
|
-
|
|
31
|
-
# Get current agent for this session
|
|
32
|
-
agent=""
|
|
33
|
-
agent_file="$PROJECT_ROOT/.session/agents/$session_id"
|
|
34
|
-
if [[ -f "$agent_file" ]]; then
|
|
35
|
-
agent=$(cat "$agent_file")
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
# Find active story from session files
|
|
39
|
-
story=""
|
|
40
|
-
phase=""
|
|
41
|
-
session_file=$(find "$PROJECT_ROOT/.session" -maxdepth 1 -name "*-session.md" -type f 2>/dev/null | head -1)
|
|
42
|
-
if [[ -n "$session_file" && -f "$session_file" ]]; then
|
|
43
|
-
# Extract story ID from filename (e.g., 8-3-session.md -> 8-3)
|
|
44
|
-
story=$(basename "$session_file" | sed 's/-session\.md$//')
|
|
45
|
-
|
|
46
|
-
# Extract phase from session file (look for "Phase:" line)
|
|
47
|
-
phase=$(grep -i "^- Phase:" "$session_file" 2>/dev/null | head -1 | sed 's/.*Phase:[[:space:]]*//' | cut -d' ' -f1 || echo "")
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
# Get current git SHA
|
|
51
|
-
git_sha=""
|
|
52
|
-
if command -v git &>/dev/null && git rev-parse --git-dir &>/dev/null; then
|
|
53
|
-
git_sha=$(git rev-parse --short HEAD 2>/dev/null || echo "")
|
|
54
|
-
fi
|
|
55
|
-
|
|
56
|
-
# Build checkpoint data (semicolon-separated key=value pairs)
|
|
57
|
-
checkpoint_data="agent=${agent};story=${story};phase=${phase};sha=${git_sha};session=${session_id}"
|
|
58
|
-
|
|
59
|
-
# Save checkpoint
|
|
60
|
-
checkpoint_save "session_state" "$checkpoint_data"
|
|
61
|
-
|
|
62
|
-
# Log session end
|
|
63
|
-
echo "$(date -Iseconds) | Session end: $session_id (agent=$agent, story=$story)" >> "$PROJECT_ROOT/.session/session-log.txt"
|
|
64
|
-
|
|
65
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shim: delegates to Python CLI via uv run — no global pf install needed.
|
|
3
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
|
|
4
|
+
exec_pf hooks session-stop
|
|
@@ -1,78 +1,4 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# Validates sprint YAML files after Edit/Write operations to ensure
|
|
6
|
-
# compatibility with the yaml npm package used by Cyclist's SprintPanel.
|
|
7
|
-
#
|
|
8
|
-
# The yaml npm package follows YAML 1.2 strictly and rejects:
|
|
9
|
-
# - Single-quoted strings with blank lines
|
|
10
|
-
# - Invalid multiline string formats
|
|
11
|
-
#
|
|
12
|
-
# When validation fails, returns additionalContext with an error message
|
|
13
|
-
# prompting the agent to fix the YAML format.
|
|
14
|
-
#
|
|
15
|
-
# Input: JSON via stdin with tool_name, tool_input
|
|
16
|
-
# Output: JSON with additionalContext on validation failure
|
|
17
|
-
#
|
|
18
|
-
# See also: pf sprint validate
|
|
19
|
-
|
|
20
|
-
set -euo pipefail
|
|
21
|
-
|
|
22
|
-
# Read hook input from stdin
|
|
23
|
-
INPUT=$(cat)
|
|
24
|
-
|
|
25
|
-
# Extract tool name and file path from input
|
|
26
|
-
TOOL_NAME=$(echo "$INPUT" | grep -o '"tool_name"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*"tool_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || echo "")
|
|
27
|
-
FILE_PATH=$(echo "$INPUT" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || echo "")
|
|
28
|
-
|
|
29
|
-
# Only process Edit and Write operations on sprint YAML files
|
|
30
|
-
if [[ "$TOOL_NAME" != "Edit" && "$TOOL_NAME" != "Write" ]]; then
|
|
31
|
-
exit 0
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
# Check if it's a sprint YAML file
|
|
35
|
-
if [[ ! "$FILE_PATH" =~ sprint/.*\.(yaml|yml)$ ]]; then
|
|
36
|
-
exit 0
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
# Check if the file exists
|
|
40
|
-
if [[ ! -f "$FILE_PATH" ]]; then
|
|
41
|
-
exit 0
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
# Validate using Node.js yaml package (same parser Cyclist uses)
|
|
45
|
-
VALIDATION_ERROR=$(node --input-type=module -e "
|
|
46
|
-
import { parse } from 'yaml';
|
|
47
|
-
import { readFileSync } from 'fs';
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
const content = readFileSync('$FILE_PATH', 'utf-8');
|
|
51
|
-
parse(content);
|
|
52
|
-
process.exit(0);
|
|
53
|
-
} catch (e) {
|
|
54
|
-
console.error(e.message);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
|
-
" 2>&1) && VALID=true || VALID=false
|
|
58
|
-
|
|
59
|
-
if [[ "$VALID" == "true" ]]; then
|
|
60
|
-
# Valid YAML - exit silently
|
|
61
|
-
exit 0
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# Validation failed - return error context to agent
|
|
65
|
-
# Escape special characters for JSON
|
|
66
|
-
ESCAPED_ERROR=$(echo "$VALIDATION_ERROR" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
|
|
67
|
-
ESCAPED_PATH=$(echo "$FILE_PATH" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g')
|
|
68
|
-
|
|
69
|
-
cat << EOF
|
|
70
|
-
{
|
|
71
|
-
"hookSpecificOutput": {
|
|
72
|
-
"hookEventName": "PostToolUse",
|
|
73
|
-
"additionalContext": "⚠️ SPRINT YAML VALIDATION FAILED\n\nFile: $ESCAPED_PATH\nError: $ESCAPED_ERROR\n\nThe sprint YAML file has invalid syntax that will break the Cyclist SprintPanel.\n\nCommon fix: Single-quoted strings cannot contain blank lines in YAML 1.2.\nUse literal block scalars (|) for multiline strings instead.\n\nTo auto-fix, run: yq eval -o=json '$ESCAPED_PATH' > /tmp/sprint.json && yq eval -P /tmp/sprint.json > '$ESCAPED_PATH'"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
EOF
|
|
77
|
-
|
|
78
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shim: delegates to Python CLI via uv run — no global pf install needed.
|
|
3
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
|
|
4
|
+
exec_pf hooks sprint-yaml
|
|
@@ -1,94 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
# For Cyclist: Sends WebSocket message to display logo and welcome
|
|
6
|
-
#
|
|
7
|
-
# Called by Claude Code SessionStart hook
|
|
8
|
-
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
# Read and discard stdin (required by hook protocol)
|
|
12
|
-
cat > /dev/null
|
|
13
|
-
|
|
14
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
15
|
-
PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
|
|
16
|
-
|
|
17
|
-
# Once-per-session guard: only show welcome on first invocation
|
|
18
|
-
# Use session ID from environment or generate a unique one
|
|
19
|
-
SESSION_ID="${CLAUDE_SESSION_ID:-$$}"
|
|
20
|
-
WELCOME_LOCK="$PROJECT_ROOT/.session/.welcome-shown-$SESSION_ID"
|
|
21
|
-
|
|
22
|
-
# Ensure .session directory exists
|
|
23
|
-
mkdir -p "$PROJECT_ROOT/.session"
|
|
24
|
-
|
|
25
|
-
# Check if welcome was already shown for this session
|
|
26
|
-
if [[ -f "$WELCOME_LOCK" ]]; then
|
|
27
|
-
exit 0
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# Mark welcome as shown for this session
|
|
31
|
-
touch "$WELCOME_LOCK"
|
|
32
|
-
|
|
33
|
-
# Check if running in Cyclist (port file exists)
|
|
34
|
-
PORT_FILE="$PROJECT_ROOT/.wheelhub-port"
|
|
35
|
-
IN_CYCLIST=false
|
|
36
|
-
if [[ -f "$PORT_FILE" ]]; then
|
|
37
|
-
CYCLIST_PORT=$(cat "$PORT_FILE" 2>/dev/null)
|
|
38
|
-
if [[ "$CYCLIST_PORT" =~ ^[0-9]+$ ]]; then
|
|
39
|
-
IN_CYCLIST=true
|
|
40
|
-
fi
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# Get project name from package.json or directory name
|
|
44
|
-
PROJECT_NAME=""
|
|
45
|
-
if [[ -f "$PROJECT_ROOT/package.json" ]]; then
|
|
46
|
-
PROJECT_NAME=$(jq -r '.name // empty' "$PROJECT_ROOT/package.json" 2>/dev/null || echo "")
|
|
47
|
-
fi
|
|
48
|
-
if [[ -z "$PROJECT_NAME" ]]; then
|
|
49
|
-
PROJECT_NAME=$(basename "$PROJECT_ROOT")
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
# Get current theme from config
|
|
53
|
-
THEME=""
|
|
54
|
-
if [[ -f "$PROJECT_ROOT/.pennyfarthing/config.local.yaml" ]]; then
|
|
55
|
-
THEME=$(grep -E '^theme:' "$PROJECT_ROOT/.pennyfarthing/config.local.yaml" 2>/dev/null | sed 's/theme:[[:space:]]*//' | tr -d '"' || echo "")
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
if [[ "$IN_CYCLIST" == "true" ]]; then
|
|
59
|
-
# Send welcome message via WebSocket API for Cyclist to display
|
|
60
|
-
# Cyclist will show the pennyfarthing logo image and welcome text
|
|
61
|
-
curl -s -X POST "http://localhost:$CYCLIST_PORT/api/welcome" \
|
|
62
|
-
-H "Content-Type: application/json" \
|
|
63
|
-
-d "{\"project\": \"$PROJECT_NAME\", \"theme\": \"$THEME\"}" \
|
|
64
|
-
>/dev/null 2>&1 || true
|
|
65
|
-
else
|
|
66
|
-
# CLI mode: Display ASCII art welcome
|
|
67
|
-
cat << 'EOF'
|
|
68
|
-
|
|
69
|
-
___
|
|
70
|
-
/ \
|
|
71
|
-
| | Welcome to
|
|
72
|
-
| | ╔═══════════════════════════════════╗
|
|
73
|
-
\___/ ║ ╔═╗╔═╗╔╗╔╔╗╔╦═╗╔═╗╔═╗╔═╗╦╔═╗ ║
|
|
74
|
-
║ ║ ╠═╝║╣ ║║║║║║ ╠╣ ╠═╣╠╦╝ ║ ╠═╣ ║
|
|
75
|
-
║ ║ ╩ ╚═╝╝╚╝╝╚╝╩ ╩ ╩╩╚═ ╩ ╩ ╩ ║
|
|
76
|
-
╔═╩═╗ ╚═══════════════════════════════════╝
|
|
77
|
-
/ \
|
|
78
|
-
│ O │ Agent-powered development with style
|
|
79
|
-
\ /
|
|
80
|
-
╚═══╝
|
|
81
|
-
|
|
82
|
-
EOF
|
|
83
|
-
|
|
84
|
-
# Add project-specific info
|
|
85
|
-
if [[ -n "$PROJECT_NAME" ]]; then
|
|
86
|
-
echo " Project: $PROJECT_NAME"
|
|
87
|
-
fi
|
|
88
|
-
if [[ -n "$THEME" ]]; then
|
|
89
|
-
echo " Theme: $THEME"
|
|
90
|
-
fi
|
|
91
|
-
echo ""
|
|
92
|
-
fi
|
|
93
|
-
|
|
94
|
-
exit 0
|
|
2
|
+
# Shim: delegates to Python CLI via uv run — no global pf install needed.
|
|
3
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
|
|
4
|
+
exec_pf hooks session-start
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Resolve CLAUDE_PROJECT_DIR in any context (hooks, Bash tool, subshells).
|
|
3
|
+
#
|
|
4
|
+
# Claude Code sets CLAUDE_PROJECT_DIR for hook execution but NOT for the
|
|
5
|
+
# Bash tool environment. This script fills the gap by walking up from PWD
|
|
6
|
+
# to find .pennyfarthing/, mirroring find-root.sh's fallback strategy.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# source .pennyfarthing/scripts/lib/env.sh # relative (Bash tool)
|
|
10
|
+
# source "$CLAUDE_PROJECT_DIR/.pennyfarthing/scripts/lib/env.sh" # hooks (already set)
|
|
11
|
+
#
|
|
12
|
+
# After sourcing, CLAUDE_PROJECT_DIR is exported and safe to use.
|
|
13
|
+
|
|
14
|
+
if [[ -z "${CLAUDE_PROJECT_DIR:-}" ]]; then
|
|
15
|
+
_d="$PWD"
|
|
16
|
+
while [[ ! -d "$_d/.pennyfarthing" ]] && [[ "$_d" != "/" ]]; do
|
|
17
|
+
_d="$(dirname "$_d")"
|
|
18
|
+
done
|
|
19
|
+
if [[ -d "$_d/.pennyfarthing" ]]; then
|
|
20
|
+
# Guard against nested .pennyfarthing (e.g., inlined child repo).
|
|
21
|
+
# If the found dir sits inside a parent that also has .pennyfarthing/,
|
|
22
|
+
# prefer the parent (outermost project root).
|
|
23
|
+
_parent="$(dirname "$_d")"
|
|
24
|
+
while [[ "$_parent" != "/" ]]; do
|
|
25
|
+
if [[ -d "$_parent/.pennyfarthing" ]]; then
|
|
26
|
+
_d="$_parent"
|
|
27
|
+
fi
|
|
28
|
+
_parent="$(dirname "$_parent")"
|
|
29
|
+
done
|
|
30
|
+
unset _parent
|
|
31
|
+
export CLAUDE_PROJECT_DIR="$_d"
|
|
32
|
+
fi
|
|
33
|
+
unset _d
|
|
34
|
+
fi
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shared utility: Run the `pf` CLI via uv run — no global install needed.
|
|
3
|
+
#
|
|
4
|
+
# Resolution order for pyproject.toml:
|
|
5
|
+
# 1. Dogfooding: $PROJECT_ROOT/pennyfarthing/pyproject.toml (inlined repo)
|
|
6
|
+
# 2. Consumer: $PROJECT_ROOT/pyproject.toml (project declares dependency)
|
|
7
|
+
#
|
|
8
|
+
# Usage from hook shims:
|
|
9
|
+
# source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../lib/run-pf.sh"
|
|
10
|
+
# exec_pf hooks session-start
|
|
11
|
+
|
|
12
|
+
# Resolve PROJECT_ROOT if not already set
|
|
13
|
+
_lib_dir="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd -P)"
|
|
14
|
+
source "$_lib_dir/find-root.sh"
|
|
15
|
+
|
|
16
|
+
# Find the pyproject.toml that provides pennyfarthing-scripts
|
|
17
|
+
_pf_project=""
|
|
18
|
+
if [[ -f "$PROJECT_ROOT/pennyfarthing/pyproject.toml" ]]; then
|
|
19
|
+
# Dogfooding: inlined framework repo
|
|
20
|
+
_pf_project="$PROJECT_ROOT/pennyfarthing"
|
|
21
|
+
elif [[ -f "$PROJECT_ROOT/pyproject.toml" ]]; then
|
|
22
|
+
# Consumer: project-level pyproject.toml with pennyfarthing-scripts dep
|
|
23
|
+
_pf_project="$PROJECT_ROOT"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [[ -z "$_pf_project" ]]; then
|
|
27
|
+
echo "Error: No pyproject.toml found for pennyfarthing-scripts" >&2
|
|
28
|
+
echo "Expected: $PROJECT_ROOT/pennyfarthing/pyproject.toml (dogfooding)" >&2
|
|
29
|
+
echo " or: $PROJECT_ROOT/pyproject.toml (consumer)" >&2
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
run_pf() {
|
|
34
|
+
uv run --project "$_pf_project" pf "$@"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exec_pf() {
|
|
38
|
+
exec uv run --project "$_pf_project" pf "$@"
|
|
39
|
+
}
|
|
@@ -9,7 +9,7 @@ Uncategorized utilities and one-off scripts.
|
|
|
9
9
|
| `deploy.sh` | Deployment script |
|
|
10
10
|
| `doctor-dogfood.sh` | Health check for framework/orchestrator development setup |
|
|
11
11
|
| `run-ci.sh` | Run CI locally |
|
|
12
|
-
| `
|
|
12
|
+
| `pf.sh hooks statusline` | Status line configuration |
|
|
13
13
|
| `uninstall.sh` | Uninstall Pennyfarthing from project |
|
|
14
14
|
| `backlog.sh` | Backlog operations |
|
|
15
15
|
| `repo-utils.sh` | Multi-repo utilities |
|