@pennyfarthing/core 11.2.0 → 11.2.1
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 +1 -1
- 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 +381 -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 +11 -0
- package/packages/core/dist/cli/utils/settings.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/settings.js +65 -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/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/js/react/react.js +14 -14
- package/packages/core/dist/scripts/benchmark-integration.d.ts +182 -0
- package/packages/core/dist/scripts/benchmark-integration.d.ts.map +1 -0
- package/packages/core/dist/scripts/benchmark-integration.js +691 -0
- package/packages/core/dist/scripts/benchmark-integration.js.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts +150 -0
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.js +547 -0
- package/packages/core/dist/scripts/job-fair-aggregator.js.map +1 -0
- 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/server.d.ts +0 -3
- package/packages/core/dist/server/server.d.ts.map +1 -1
- package/packages/core/dist/server/server.js +3 -37
- 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/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/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/pennyfarthing-dist/agents/dev.md +6 -10
- package/pennyfarthing-dist/agents/reviewer.md +8 -2
- package/pennyfarthing-dist/agents/sm-finish.md +18 -1
- package/pennyfarthing-dist/commands/pf-git.md +4 -2
- 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 +23 -19
- package/pennyfarthing-dist/guides/bell-mode.md +1 -1
- package/pennyfarthing-dist/guides/hooks.md +28 -28
- package/pennyfarthing-dist/guides/reflector.md +1 -1
- package/pennyfarthing-dist/guides/tandem-protocol.md +3 -3
- package/pennyfarthing-dist/scripts/core/check-context.sh +2 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +5 -87
- package/pennyfarthing-dist/scripts/hooks/README.md +5 -5
- package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
- 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/pre-commit.sh +27 -33
- 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 +4 -93
- package/pennyfarthing-dist/scripts/misc/README.md +1 -1
- package/pennyfarthing-dist/scripts/misc/statusline.sh +4 -301
- package/pennyfarthing-dist/templates/settings.local.json.template +19 -10
- package/pennyfarthing-dist/workflows/tdd.yaml +11 -2
- package/pennyfarthing_scripts/CLAUDE.md +19 -10
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- 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__/config.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__/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__/session_start_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/bc/__pycache__/__init__.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/bellmode_hook.py +12 -296
- package/pennyfarthing_scripts/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/__main__.cpython-314.pyc +0 -0
- 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__/cli.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 +119 -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/portrait_resolver.py +139 -0
- package/pennyfarthing_scripts/bikerack/sprint_panel.py +373 -142
- package/pennyfarthing_scripts/bikerack/story_detail_data.py +244 -0
- package/pennyfarthing_scripts/bikerack/story_detail_screen.py +176 -0
- package/pennyfarthing_scripts/bikerack/tui.py +293 -61
- 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/cli.py +5 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/models.cpython-314.pyc +0 -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/pr_config.py +38 -0
- package/pennyfarthing_scripts/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/models.cpython-314.pyc +0 -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/__pycache__/dialogue_manager.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/epic/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/epic/__pycache__/cli.cpython-314.pyc +0 -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_group/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git_group/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/__init__.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__/gate_file.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/gate_runner.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/__pycache__/marker.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/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hooks/__init__.py +437 -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 +215 -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 +78 -0
- package/pennyfarthing_scripts/hooks/reflector_check.py +271 -0
- package/pennyfarthing_scripts/hooks/schema_validation.py +203 -0
- package/pennyfarthing_scripts/hooks/session_start.py +296 -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 +420 -0
- package/pennyfarthing_scripts/hooks.py +27 -432
- 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/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/launch/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/launch/__pycache__/cli.cpython-314.pyc +0 -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/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/pretooluse_hook.py +3 -185
- 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__/version_sentinel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/workflow.py +2 -1
- package/pennyfarthing_scripts/schema_validation_hook.py +3 -298
- package/pennyfarthing_scripts/session/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/session/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/session_start_hook.py +4 -186
- 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__/epic_update.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/import_epic.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_finish.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/story_update.py +19 -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/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_108_1_gate_migration.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_archive_epic.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_bc.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_bikerack.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_cli_normalization.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_codemarkers.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_confidence_sm_evaluation.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_confidence_sm_gate.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_dialogue_manager.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_epic_shard_validation.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_handoff_cli.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_handoff_e2e.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_healthscore.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_panel.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_topology_loader.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_tui_focus.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_tui_panel_persistence.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_version_sentinel.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/test_sprint_panel.py +344 -265
- package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/agent.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/schema.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/sprint.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/tandem_awareness.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -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/cli.py +7 -6
- package/pennyfarthing_scripts/workflow/team_lifecycle.py +257 -0
- package/packages/core/dist/scripts/theme-detail.test.d.ts +0 -10
- package/packages/core/dist/scripts/theme-detail.test.js +0 -199
- package/pennyfarthing_scripts/bikerack/__pycache__/portrait.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/gate/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/gate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/gate/__pycache__/validate.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/hooks_installer.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/repos.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/worktree.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/heatmap.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_108_2_remove_handoff_fallback.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_gate_file_resolution.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_gate_runner.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_resolve_gate_file_field.cpython-314-pytest-9.0.2.pyc +0 -0
|
@@ -1,95 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# Input: JSON via stdin with tool_name, tool_input, session_id
|
|
6
|
-
# Output: Exit 0 to allow, Exit 2 to block (stderr shown to Claude)
|
|
7
|
-
#
|
|
8
|
-
# This hook provides a hard stop when context is critically high,
|
|
9
|
-
# unlike context-warning.sh which only warns.
|
|
10
|
-
#
|
|
11
|
-
# When triggered, automatically saves the active agent to a checkpoint
|
|
12
|
-
# so /continue-session can restore it with FULL tier.
|
|
13
|
-
|
|
14
|
-
# Read stdin to get session_id (required by hook protocol)
|
|
15
|
-
INPUT=$(cat)
|
|
16
|
-
|
|
17
|
-
# Script location for sibling script references
|
|
18
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
19
|
-
|
|
20
|
-
# Get context percentage from check-context.sh
|
|
21
|
-
CONTEXT_SCRIPT="$SCRIPT_DIR/../check-context.sh"
|
|
22
|
-
if [[ ! -x "$CONTEXT_SCRIPT" ]]; then
|
|
23
|
-
# graceful degradation: if check-context.sh not found, allow the tool
|
|
24
|
-
exit 0
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# Run check-context.sh and parse output
|
|
28
|
-
eval "$("$CONTEXT_SCRIPT" 2>/dev/null)" 2>/dev/null
|
|
29
|
-
|
|
30
|
-
# graceful degradation: if we can't get context, allow the tool
|
|
31
|
-
if [[ -z "$CONTEXT_PERCENT" ]] || [[ "$CONTEXT_PERCENT" == "null" ]]; then
|
|
32
|
-
exit 0
|
|
33
|
-
fi
|
|
34
|
-
|
|
35
|
-
# Load critical threshold (default 80%)
|
|
36
|
-
CRITICAL_THRESHOLD="${CRITICAL_THRESHOLD:-80}"
|
|
37
|
-
|
|
38
|
-
# Check if at or above critical threshold
|
|
39
|
-
if [[ "$CONTEXT_PERCENT" -ge "$CRITICAL_THRESHOLD" ]] 2>/dev/null; then
|
|
40
|
-
# Auto-save active agent to checkpoint before blocking
|
|
41
|
-
# This allows /continue-session to restore with FULL tier
|
|
42
|
-
source "$SCRIPT_DIR/../lib/checkpoint.sh" 2>/dev/null || true
|
|
43
|
-
|
|
44
|
-
# Get session_id from input JSON
|
|
45
|
-
SESSION_ID=""
|
|
46
|
-
if command -v jq &>/dev/null && [[ -n "$INPUT" ]]; then
|
|
47
|
-
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // empty' 2>/dev/null)
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
# Look up active agent for this session
|
|
51
|
-
ACTIVE_AGENT=""
|
|
52
|
-
AGENT_FILE="${CLAUDE_PROJECT_DIR:-.}/.session/agents/${SESSION_ID}"
|
|
53
|
-
if [[ -n "$SESSION_ID" && -f "$AGENT_FILE" ]]; then
|
|
54
|
-
ACTIVE_AGENT=$(cat "$AGENT_FILE" 2>/dev/null)
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
# Save agent checkpoint if we found one
|
|
58
|
-
if [[ -n "$ACTIVE_AGENT" ]]; then
|
|
59
|
-
checkpoint_save "circuit_breaker_agent" "$ACTIVE_AGENT" 2>/dev/null || true
|
|
60
|
-
fi
|
|
61
|
-
|
|
62
|
-
# Send error message to stderr (Claude will see this)
|
|
63
|
-
cat >&2 << EOF
|
|
64
|
-
CONTEXT CIRCUIT BREAKER TRIGGERED
|
|
65
|
-
|
|
66
|
-
Context usage: ${CONTEXT_PERCENT}% - CRITICAL (threshold: ${CRITICAL_THRESHOLD}%)
|
|
67
|
-
|
|
68
|
-
Tool execution BLOCKED. You must stop and hand off.
|
|
69
|
-
EOF
|
|
70
|
-
|
|
71
|
-
# Include agent info if available
|
|
72
|
-
if [[ -n "$ACTIVE_AGENT" ]]; then
|
|
73
|
-
cat >&2 << EOF
|
|
74
|
-
|
|
75
|
-
Active agent saved: ${ACTIVE_AGENT}
|
|
76
|
-
The agent will be restored with FULL context when you run /continue-session.
|
|
77
|
-
EOF
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
cat >&2 << EOF
|
|
81
|
-
|
|
82
|
-
Required actions:
|
|
83
|
-
1. Commit any pending changes
|
|
84
|
-
2. Tell user to start fresh session with /continue-session
|
|
85
|
-
|
|
86
|
-
DO NOT attempt further tool calls. This is a hard stop.
|
|
87
|
-
|
|
88
|
-
To resume later: /continue-session
|
|
89
|
-
EOF
|
|
90
|
-
# Exit 2 blocks the tool execution
|
|
91
|
-
exit 2
|
|
92
|
-
fi
|
|
93
|
-
|
|
94
|
-
# Below threshold: allow the tool
|
|
95
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks context-breaker
|
|
4
|
+
exec pf hooks context-breaker
|
|
@@ -1,65 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# Input: JSON via stdin with tool_name, tool_input
|
|
6
|
-
# Output: Warning message to stdout if context > 60%
|
|
7
|
-
# Always exits 0 (warning only, never blocks)
|
|
8
|
-
|
|
9
|
-
# Read and discard stdin (required by hook protocol)
|
|
10
|
-
cat > /dev/null
|
|
11
|
-
|
|
12
|
-
# Script location for sibling script references
|
|
13
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
14
|
-
|
|
15
|
-
# Get context percentage from check-context.sh
|
|
16
|
-
CONTEXT_SCRIPT="$SCRIPT_DIR/../check-context.sh"
|
|
17
|
-
if [[ ! -x "$CONTEXT_SCRIPT" ]]; then
|
|
18
|
-
exit 0 # Can't check, allow silently
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# Run check-context.sh and parse output
|
|
22
|
-
eval "$("$CONTEXT_SCRIPT" 2>/dev/null)" 2>/dev/null
|
|
23
|
-
|
|
24
|
-
# Check if we got a valid percentage
|
|
25
|
-
if [[ -z "$CONTEXT_PERCENT" ]] || [[ "$CONTEXT_PERCENT" == "null" ]]; then
|
|
26
|
-
exit 0 # Can't determine, allow silently
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
# Load thresholds from settings (defaults match check-context.sh)
|
|
30
|
-
WARNING_THRESHOLD="${WARNING_THRESHOLD:-60}"
|
|
31
|
-
CRITICAL_THRESHOLD="${CRITICAL_THRESHOLD:-85}"
|
|
32
|
-
|
|
33
|
-
# Output warning if above threshold
|
|
34
|
-
if [[ "$CONTEXT_PERCENT" -ge "$CRITICAL_THRESHOLD" ]] 2>/dev/null; then
|
|
35
|
-
cat << EOF
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
CONTEXT WARNING: ${CONTEXT_PERCENT}% (CRITICAL)
|
|
39
|
-
|
|
40
|
-
Context usage is critically high. Recommended actions:
|
|
41
|
-
1. Complete current task immediately
|
|
42
|
-
2. Commit any pending changes
|
|
43
|
-
3. Hand off to next agent or ask user to start fresh session
|
|
44
|
-
|
|
45
|
-
Do NOT start new subtasks. Wrap up and hand off.
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
EOF
|
|
49
|
-
elif [[ "$CONTEXT_PERCENT" -ge "$WARNING_THRESHOLD" ]] 2>/dev/null; then
|
|
50
|
-
cat << EOF
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
CONTEXT WARNING: ${CONTEXT_PERCENT}%
|
|
54
|
-
|
|
55
|
-
Context usage is high. Consider:
|
|
56
|
-
- Wrapping up current task soon
|
|
57
|
-
- Preparing for handoff to next agent
|
|
58
|
-
- Avoiding large file reads or complex operations
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
EOF
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
# Always allow the tool (we're warning, not blocking)
|
|
65
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks context-warning
|
|
4
|
+
exec pf hooks context-warning
|
|
@@ -1,32 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# Routes tool approval requests through WheelHub when Cyclist is running.
|
|
6
|
-
# Falls back to Claude Code's built-in permissions when Cyclist is not active.
|
|
7
|
-
#
|
|
8
|
-
# Input (stdin): JSON with tool_name, tool_input, session_id, etc.
|
|
9
|
-
# Output (stdout): JSON decision (allow/deny/ask)
|
|
10
|
-
#
|
|
11
|
-
# Story: MSSCI-14320
|
|
12
|
-
|
|
13
|
-
set -euo pipefail
|
|
14
|
-
|
|
15
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
16
|
-
source "$SCRIPT_DIR/../lib/find-root.sh"
|
|
17
|
-
|
|
18
|
-
# Set PYTHONPATH for pennyfarthing_scripts
|
|
19
|
-
PENNYFARTHING_SCRIPTS=""
|
|
20
|
-
if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
|
|
21
|
-
# Dogfooding: framework inlined in orchestrator
|
|
22
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
|
|
23
|
-
elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
|
|
24
|
-
# Normal install
|
|
25
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
|
|
29
|
-
export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
python3 -m pennyfarthing_scripts.pretooluse_hook
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks cyclist-pretooluse
|
|
4
|
+
exec pf hooks cyclist-pretooluse
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Checks:
|
|
5
5
|
# 1. Prevents direct commits to protected branches (main, develop)
|
|
6
|
-
# Exception: sprint/ folder commits allowed on
|
|
6
|
+
# Exception: sprint/ folder commits allowed on protected branches
|
|
7
7
|
# 2. Validates agent files when pennyfarthing-dist/agents/*.md is modified
|
|
8
8
|
# 3. Validates file references when pennyfarthing-dist/ files are modified (warn only)
|
|
9
9
|
# 4. Validates sprint YAML files when sprint/*.yaml is modified
|
|
@@ -34,40 +34,34 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
|
34
34
|
PROTECTED_BRANCHES="^(main|develop)$"
|
|
35
35
|
|
|
36
36
|
if [[ $BRANCH =~ $PROTECTED_BRANCHES ]]; then
|
|
37
|
-
# Special case: Allow sprint/ folder commits on
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
else
|
|
47
|
-
echo ""
|
|
48
|
-
echo "COMMIT BLOCKED"
|
|
49
|
-
echo ""
|
|
50
|
-
echo "You are trying to commit directly to: $BRANCH"
|
|
51
|
-
echo "This violates the git workflow rules."
|
|
52
|
-
echo ""
|
|
53
|
-
echo "Protected branches: main, develop"
|
|
54
|
-
echo ""
|
|
55
|
-
echo "What to do:"
|
|
56
|
-
echo "1. Create a feature branch:"
|
|
57
|
-
echo " git checkout -b <type>/<epic-story>-<description>"
|
|
58
|
-
echo ""
|
|
59
|
-
echo "2. Example:"
|
|
60
|
-
echo " git checkout -b feat/8-2-add-authentication"
|
|
61
|
-
echo ""
|
|
62
|
-
echo "3. Then commit your changes on the feature branch"
|
|
63
|
-
echo ""
|
|
64
|
-
echo "Exception: Sprint tracking files (sprint/*) can be committed to develop"
|
|
65
|
-
echo ""
|
|
66
|
-
exit 1
|
|
67
|
-
fi
|
|
37
|
+
# Special case: Allow sprint/ folder commits on protected branches
|
|
38
|
+
# (orchestrator uses trunk-based on main; pennyfarthing uses gitflow on develop)
|
|
39
|
+
STAGED_FILES=$(git diff --cached --name-only)
|
|
40
|
+
NON_SPRINT_FILES=$(echo "$STAGED_FILES" | grep -v "^sprint/")
|
|
41
|
+
|
|
42
|
+
# If all staged files are in sprint/, allow the commit
|
|
43
|
+
if [ -z "$NON_SPRINT_FILES" ] && [ -n "$STAGED_FILES" ]; then
|
|
44
|
+
# Continue to agent validation check
|
|
45
|
+
:
|
|
68
46
|
else
|
|
69
47
|
echo ""
|
|
70
|
-
echo "COMMIT BLOCKED
|
|
48
|
+
echo "COMMIT BLOCKED"
|
|
49
|
+
echo ""
|
|
50
|
+
echo "You are trying to commit directly to: $BRANCH"
|
|
51
|
+
echo "This violates the git workflow rules."
|
|
52
|
+
echo ""
|
|
53
|
+
echo "Protected branches: main, develop"
|
|
54
|
+
echo ""
|
|
55
|
+
echo "What to do:"
|
|
56
|
+
echo "1. Create a feature branch:"
|
|
57
|
+
echo " git checkout -b <type>/<epic-story>-<description>"
|
|
58
|
+
echo ""
|
|
59
|
+
echo "2. Example:"
|
|
60
|
+
echo " git checkout -b feat/8-2-add-authentication"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "3. Then commit your changes on the feature branch"
|
|
63
|
+
echo ""
|
|
64
|
+
echo "Exception: Sprint tracking files (sprint/*) can be committed directly"
|
|
71
65
|
echo ""
|
|
72
66
|
exit 1
|
|
73
67
|
fi
|
|
@@ -1,71 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# Input: JSON via stdin with tool_name, tool_input
|
|
6
|
-
# Output: Exit 0 to allow, Exit 2 to block (stderr shown to Claude)
|
|
7
|
-
|
|
8
|
-
set -euo pipefail
|
|
9
|
-
|
|
10
|
-
# Read input from stdin
|
|
11
|
-
input=$(cat)
|
|
12
|
-
|
|
13
|
-
# Extract file path from tool input
|
|
14
|
-
file_path=$(echo "$input" | jq -r '.tool_input.file_path // .tool_input.path // ""')
|
|
15
|
-
|
|
16
|
-
# Protected patterns (files that should never be edited automatically)
|
|
17
|
-
protected_patterns=(
|
|
18
|
-
"*.env"
|
|
19
|
-
"*.pem"
|
|
20
|
-
"*.key"
|
|
21
|
-
"*credentials*"
|
|
22
|
-
"*secrets*"
|
|
23
|
-
".git/*"
|
|
24
|
-
"node_modules/*"
|
|
25
|
-
"vendor/*"
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
# Pennyfarthing managed files protection
|
|
29
|
-
# These are managed by `pennyfarthing update`, don't edit directly
|
|
30
|
-
# EXCEPTION: If we ARE in the pennyfarthing library itself, allow edits
|
|
31
|
-
is_pennyfarthing_lib=false
|
|
32
|
-
if [[ -d "${CLAUDE_PROJECT_DIR:-$PWD}/pennyfarthing-dist" ]]; then
|
|
33
|
-
is_pennyfarthing_lib=true
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
if [[ "$file_path" == *".claude/pennyfarthing/"* ]] && [[ "$is_pennyfarthing_lib" == "false" ]]; then
|
|
37
|
-
echo "BLOCKED: Cannot edit managed pennyfarthing files." >&2
|
|
38
|
-
echo "File: $file_path" >&2
|
|
39
|
-
echo "" >&2
|
|
40
|
-
echo "These files are managed by pennyfarthing and will be overwritten on update." >&2
|
|
41
|
-
echo "Instead:" >&2
|
|
42
|
-
echo " - Put project-specific customizations in .claude/project/" >&2
|
|
43
|
-
echo " - For framework changes, edit the pennyfarthing repo and run 'pennyfarthing update'" >&2
|
|
44
|
-
exit 2
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# Check if file matches any protected pattern
|
|
48
|
-
for pattern in "${protected_patterns[@]}"; do
|
|
49
|
-
if [[ "$file_path" == $pattern ]]; then
|
|
50
|
-
echo "BLOCKED: Cannot edit protected file matching pattern: $pattern" >&2
|
|
51
|
-
echo "File: $file_path" >&2
|
|
52
|
-
exit 2
|
|
53
|
-
fi
|
|
54
|
-
done
|
|
55
|
-
|
|
56
|
-
# Additional check: warn on certain file types but allow
|
|
57
|
-
warn_patterns=(
|
|
58
|
-
"*.md"
|
|
59
|
-
"*.json"
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
# For warnings, just log to stderr but allow (exit 0)
|
|
63
|
-
for pattern in "${warn_patterns[@]}"; do
|
|
64
|
-
if [[ "$file_path" == $pattern ]]; then
|
|
65
|
-
# Could log warnings here if needed
|
|
66
|
-
:
|
|
67
|
-
fi
|
|
68
|
-
done
|
|
69
|
-
|
|
70
|
-
# Allow the edit
|
|
71
|
-
exit 0
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks pre-edit-check
|
|
4
|
+
exec pf hooks pre-edit-check
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
# Thin wrapper that delegates to question_reflector_check.py for the actual logic.
|
|
6
|
-
# This allows the hook to be written in Python for easier testing and maintenance.
|
|
7
|
-
#
|
|
8
|
-
# Input (stdin): JSON with transcript_path, stop_hook_active, etc.
|
|
9
|
-
# Output (stdout): JSON decision to allow or block
|
|
10
|
-
#
|
|
11
|
-
# Story: MSSCI-12393
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
set -euo pipefail
|
|
15
|
-
|
|
16
|
-
# Get the directory where this script lives
|
|
17
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
|
-
|
|
19
|
-
# Delegate to Python implementation
|
|
20
|
-
exec python3 "$SCRIPT_DIR/question_reflector_check.py"
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks reflector-check
|
|
4
|
+
exec pf hooks reflector-check
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
#
|
|
6
|
-
# Input: JSON via stdin with tool_name, tool_input
|
|
7
|
-
# Output: JSON with decision (allow/deny)
|
|
8
|
-
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
# Find script directory (zsh compatible)
|
|
12
|
-
SCRIPT_DIR="${0:A:h}"
|
|
13
|
-
source "$SCRIPT_DIR/../lib/find-root.sh"
|
|
14
|
-
|
|
15
|
-
# Set PYTHONPATH for pennyfarthing_scripts
|
|
16
|
-
PENNYFARTHING_SCRIPTS=""
|
|
17
|
-
if [[ -d "$PROJECT_ROOT/pennyfarthing" ]]; then
|
|
18
|
-
# Dogfooding: framework inlined in orchestrator
|
|
19
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/pennyfarthing"
|
|
20
|
-
elif [[ -d "$PROJECT_ROOT/node_modules/@pennyfarthing/core" ]]; then
|
|
21
|
-
# Normal install
|
|
22
|
-
PENNYFARTHING_SCRIPTS="$PROJECT_ROOT/node_modules/@pennyfarthing/core"
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
if [[ -n "$PENNYFARTHING_SCRIPTS" ]]; then
|
|
26
|
-
export PYTHONPATH="$PENNYFARTHING_SCRIPTS:${PYTHONPATH:-}"
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
# Run Python validation hook
|
|
30
|
-
python3 -m pennyfarthing_scripts.schema_validation_hook
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks schema-validation
|
|
4
|
+
exec pf hooks schema-validation
|
|
@@ -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
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks session-start
|
|
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
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks session-stop
|
|
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
|
+
# DEPRECATED: This script is a shim. Logic has moved to Python.
|
|
3
|
+
# Use: pf hooks sprint-yaml
|
|
4
|
+
exec pf hooks sprint-yaml
|