@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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tandem Metrics and Token Tracking for Story 86-6
|
|
3
|
+
*
|
|
4
|
+
* Tracks consultation token usage, frequency, and outcomes for overhead analysis.
|
|
5
|
+
* Extends the dialogue manager (86-3) with metrics collection and summary generation.
|
|
6
|
+
*
|
|
7
|
+
* All functions are pure or use simple computation — no external dependencies.
|
|
8
|
+
*/
|
|
9
|
+
import type { Outcome } from './dialogue-manager.js';
|
|
10
|
+
/**
|
|
11
|
+
* Token and timing metrics for a single consultation exchange.
|
|
12
|
+
* These are tracked separately from leader session tokens (AC1).
|
|
13
|
+
*/
|
|
14
|
+
export interface ExchangeMetrics {
|
|
15
|
+
/** Tokens sent to the consultation partner (request) */
|
|
16
|
+
inputTokens: number;
|
|
17
|
+
/** Tokens received from the consultation partner (response) */
|
|
18
|
+
outputTokens: number;
|
|
19
|
+
/** Time in milliseconds for the partner to respond */
|
|
20
|
+
responseTimeMs: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A dialogue exchange extended with metrics fields.
|
|
24
|
+
* Mirrors DialogueExchange from dialogue-manager but adds token tracking.
|
|
25
|
+
*/
|
|
26
|
+
export interface MetricsExchange {
|
|
27
|
+
number: number;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
leader: string;
|
|
30
|
+
partner: string;
|
|
31
|
+
question: string;
|
|
32
|
+
recommendation: string;
|
|
33
|
+
confidence: string;
|
|
34
|
+
outcome?: Outcome;
|
|
35
|
+
outcomeNote?: string;
|
|
36
|
+
/** Consultation-specific metrics (absent for exchanges without tracking) */
|
|
37
|
+
metrics?: ExchangeMetrics;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Aggregated metrics across all consultation exchanges in a dialogue.
|
|
41
|
+
*/
|
|
42
|
+
export interface TandemMetricsSummary {
|
|
43
|
+
/** Number of consultation exchanges */
|
|
44
|
+
consultationCount: number;
|
|
45
|
+
/** Total input tokens across all exchanges */
|
|
46
|
+
totalInputTokens: number;
|
|
47
|
+
/** Total output tokens across all exchanges */
|
|
48
|
+
totalOutputTokens: number;
|
|
49
|
+
/** Combined total tokens (input + output) */
|
|
50
|
+
totalTokens: number;
|
|
51
|
+
/** Average response time in milliseconds */
|
|
52
|
+
avgResponseTimeMs: number;
|
|
53
|
+
/** Distribution of outcomes: { applied: N, deferred: N, rejected: N, pending: N } */
|
|
54
|
+
outcomeDistribution: Record<string, number>;
|
|
55
|
+
/** Tandem overhead as percentage of baseline, or null if baseline not provided */
|
|
56
|
+
overheadPercent: number | null;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Aggregate metrics from a list of exchanges with metrics data.
|
|
60
|
+
* Exchanges without metrics are counted but excluded from token/timing calculations.
|
|
61
|
+
*/
|
|
62
|
+
export declare function aggregateMetrics(exchanges: MetricsExchange[]): TandemMetricsSummary;
|
|
63
|
+
/**
|
|
64
|
+
* Calculate tandem overhead as a percentage of baseline token cost.
|
|
65
|
+
* Returns the percentage (e.g., 12.5 for 12.5%).
|
|
66
|
+
*
|
|
67
|
+
* @param tandemTokens - Total tokens used by tandem consultations
|
|
68
|
+
* @param baselineTokens - Total tokens used by the leader session (non-tandem)
|
|
69
|
+
* @returns Overhead percentage, or null if baselineTokens is zero
|
|
70
|
+
*/
|
|
71
|
+
export declare function calculateOverheadPercent(tandemTokens: number, baselineTokens: number): number | null;
|
|
72
|
+
/**
|
|
73
|
+
* Check whether tandem overhead is within the acceptable budget threshold.
|
|
74
|
+
* Default threshold is 25% per story AC5.
|
|
75
|
+
*
|
|
76
|
+
* @param overheadPercent - The calculated overhead percentage
|
|
77
|
+
* @param threshold - Maximum acceptable overhead percentage (default: 25)
|
|
78
|
+
* @returns true if within budget, false if over
|
|
79
|
+
*/
|
|
80
|
+
export declare function isWithinBudget(overheadPercent: number | null, threshold?: number): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Format a TandemMetricsSummary as markdown lines for the dialogue file summary section.
|
|
83
|
+
* Returns an array of markdown bullet lines (without the ## Summary header).
|
|
84
|
+
*/
|
|
85
|
+
export declare function formatMetricsSummary(metrics: TandemMetricsSummary): string[];
|
|
86
|
+
/**
|
|
87
|
+
* Parse metrics fields from an existing dialogue file summary section.
|
|
88
|
+
* Returns null if no metrics are found in the summary.
|
|
89
|
+
*/
|
|
90
|
+
export declare function parseMetricsFromSummary(summaryContent: string): TandemMetricsSummary | null;
|
|
91
|
+
//# sourceMappingURL=tandem-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tandem-metrics.d.ts","sourceRoot":"","sources":["../../src/consultation/tandem-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMrD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,E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|
1
|
+
/**
|
|
2
|
+
* Tandem Metrics and Token Tracking for Story 86-6
|
|
3
|
+
*
|
|
4
|
+
* Tracks consultation token usage, frequency, and outcomes for overhead analysis.
|
|
5
|
+
* Extends the dialogue manager (86-3) with metrics collection and summary generation.
|
|
6
|
+
*
|
|
7
|
+
* All functions are pure or use simple computation — no external dependencies.
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Metrics Calculation
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Aggregate metrics from a list of exchanges with metrics data.
|
|
14
|
+
* Exchanges without metrics are counted but excluded from token/timing calculations.
|
|
15
|
+
*/
|
|
16
|
+
export function aggregateMetrics(exchanges) {
|
|
17
|
+
let totalInputTokens = 0;
|
|
18
|
+
let totalOutputTokens = 0;
|
|
19
|
+
let totalResponseTimeMs = 0;
|
|
20
|
+
let metricsCount = 0;
|
|
21
|
+
const outcomeDistribution = {
|
|
22
|
+
applied: 0,
|
|
23
|
+
deferred: 0,
|
|
24
|
+
rejected: 0,
|
|
25
|
+
pending: 0,
|
|
26
|
+
};
|
|
27
|
+
for (const ex of exchanges) {
|
|
28
|
+
if (ex.metrics) {
|
|
29
|
+
totalInputTokens += ex.metrics.inputTokens;
|
|
30
|
+
totalOutputTokens += ex.metrics.outputTokens;
|
|
31
|
+
totalResponseTimeMs += ex.metrics.responseTimeMs;
|
|
32
|
+
metricsCount++;
|
|
33
|
+
}
|
|
34
|
+
const outcome = ex.outcome ?? 'pending';
|
|
35
|
+
outcomeDistribution[outcome] = (outcomeDistribution[outcome] ?? 0) + 1;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
consultationCount: exchanges.length,
|
|
39
|
+
totalInputTokens,
|
|
40
|
+
totalOutputTokens,
|
|
41
|
+
totalTokens: totalInputTokens + totalOutputTokens,
|
|
42
|
+
avgResponseTimeMs: metricsCount > 0 ? Math.round(totalResponseTimeMs / metricsCount) : 0,
|
|
43
|
+
outcomeDistribution,
|
|
44
|
+
overheadPercent: null,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Calculate tandem overhead as a percentage of baseline token cost.
|
|
49
|
+
* Returns the percentage (e.g., 12.5 for 12.5%).
|
|
50
|
+
*
|
|
51
|
+
* @param tandemTokens - Total tokens used by tandem consultations
|
|
52
|
+
* @param baselineTokens - Total tokens used by the leader session (non-tandem)
|
|
53
|
+
* @returns Overhead percentage, or null if baselineTokens is zero
|
|
54
|
+
*/
|
|
55
|
+
export function calculateOverheadPercent(tandemTokens, baselineTokens) {
|
|
56
|
+
if (baselineTokens === 0)
|
|
57
|
+
return null;
|
|
58
|
+
return Math.round((tandemTokens / baselineTokens) * 1000) / 10;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Check whether tandem overhead is within the acceptable budget threshold.
|
|
62
|
+
* Default threshold is 25% per story AC5.
|
|
63
|
+
*
|
|
64
|
+
* @param overheadPercent - The calculated overhead percentage
|
|
65
|
+
* @param threshold - Maximum acceptable overhead percentage (default: 25)
|
|
66
|
+
* @returns true if within budget, false if over
|
|
67
|
+
*/
|
|
68
|
+
export function isWithinBudget(overheadPercent, threshold) {
|
|
69
|
+
if (overheadPercent === null)
|
|
70
|
+
return true;
|
|
71
|
+
const limit = threshold ?? 25;
|
|
72
|
+
return overheadPercent < limit;
|
|
73
|
+
}
|
|
74
|
+
// =============================================================================
|
|
75
|
+
// Summary Formatting
|
|
76
|
+
// =============================================================================
|
|
77
|
+
/**
|
|
78
|
+
* Format a TandemMetricsSummary as markdown lines for the dialogue file summary section.
|
|
79
|
+
* Returns an array of markdown bullet lines (without the ## Summary header).
|
|
80
|
+
*/
|
|
81
|
+
export function formatMetricsSummary(metrics) {
|
|
82
|
+
const lines = [];
|
|
83
|
+
lines.push(`- **Consultations:** ${metrics.consultationCount}`);
|
|
84
|
+
lines.push(`- **Tokens:** ${metrics.totalTokens} (input: ${metrics.totalInputTokens}, output: ${metrics.totalOutputTokens})`);
|
|
85
|
+
lines.push(`- **Avg Response Time:** ${metrics.avgResponseTimeMs}ms`);
|
|
86
|
+
const dist = metrics.outcomeDistribution;
|
|
87
|
+
const parts = ['applied', 'deferred', 'rejected', 'pending']
|
|
88
|
+
.map(k => `${k}: ${dist[k] ?? 0}`)
|
|
89
|
+
.join(', ');
|
|
90
|
+
lines.push(`- **Outcomes:** ${parts}`);
|
|
91
|
+
if (metrics.overheadPercent !== null) {
|
|
92
|
+
lines.push(`- **Overhead:** ${metrics.overheadPercent}%`);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
lines.push(`- **Overhead:** N/A`);
|
|
96
|
+
}
|
|
97
|
+
return lines;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Parse metrics fields from an existing dialogue file summary section.
|
|
101
|
+
* Returns null if no metrics are found in the summary.
|
|
102
|
+
*/
|
|
103
|
+
export function parseMetricsFromSummary(summaryContent) {
|
|
104
|
+
const consultMatch = summaryContent.match(/\*\*Consultations:\*\*\s*(\d+)/);
|
|
105
|
+
const tokensMatch = summaryContent.match(/\*\*Tokens:\*\*\s*(\d+)\s*\(input:\s*(\d+),\s*output:\s*(\d+)\)/);
|
|
106
|
+
const responseMatch = summaryContent.match(/\*\*Avg Response Time:\*\*\s*(\d+)ms/);
|
|
107
|
+
if (!consultMatch || !tokensMatch)
|
|
108
|
+
return null;
|
|
109
|
+
const outcomesMatch = summaryContent.match(/\*\*Outcomes:\*\*\s*(.+)/);
|
|
110
|
+
const outcomeDistribution = { applied: 0, deferred: 0, rejected: 0, pending: 0 };
|
|
111
|
+
if (outcomesMatch) {
|
|
112
|
+
for (const part of outcomesMatch[1].split(',')) {
|
|
113
|
+
const [key, val] = part.trim().split(':').map(s => s.trim());
|
|
114
|
+
if (key && val !== undefined) {
|
|
115
|
+
outcomeDistribution[key] = parseInt(val, 10);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const overheadMatch = summaryContent.match(/\*\*Overhead:\*\*\s*([\d.]+)%/);
|
|
120
|
+
const overheadPercent = overheadMatch ? parseFloat(overheadMatch[1]) : null;
|
|
121
|
+
return {
|
|
122
|
+
consultationCount: parseInt(consultMatch[1], 10),
|
|
123
|
+
totalTokens: parseInt(tokensMatch[1], 10),
|
|
124
|
+
totalInputTokens: parseInt(tokensMatch[2], 10),
|
|
125
|
+
totalOutputTokens: parseInt(tokensMatch[3], 10),
|
|
126
|
+
avgResponseTimeMs: responseMatch ? parseInt(responseMatch[1], 10) : 0,
|
|
127
|
+
outcomeDistribution,
|
|
128
|
+
overheadPercent,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=tandem-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tandem-metrics.js","sourceRoot":"","sources":["../../src/consultation/tandem-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2DH,gFAAgF;AAChF,sBAAsB;AACtB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAA4B;IAC3D,IAAI,gBAAgB,GAAG,CAAC,CAAC;IACzB,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,IAAI,mBAAmB,GAAG,CAAC,CAAC;IAC5B,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,MAAM,mBAAmB,GAA2B;QAClD,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;KACX,CAAC;IAEF,KAAK,MAAM,EAAE,IAAI,SAAS,EAAE,CAAC;QAC3B,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;YACf,gBAAgB,IAAI,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;YAC3C,iBAAiB,IAAI,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;YAC7C,mBAAmB,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;YAC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-0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story 86-6: Tandem Metrics and Token Tracking
|
|
3
|
+
*
|
|
4
|
+
* RED state tests for consultation token usage, frequency, and outcome metrics.
|
|
5
|
+
* These metrics are tracked separately from leader session tokens and written
|
|
6
|
+
* to the dialogue file summary section.
|
|
7
|
+
*
|
|
8
|
+
* ACs covered:
|
|
9
|
+
* AC1: Consultation tokens logged separately from leader session tokens
|
|
10
|
+
* AC2: Metrics captured: count, total tokens, avg response time, outcome distribution
|
|
11
|
+
* AC3: Metrics written to dialogue file summary section
|
|
12
|
+
* AC4: Session summary includes tandem overhead percentage
|
|
13
|
+
* AC5: Target: consultation overhead < 25% of baseline story token cost
|
|
14
|
+
*
|
|
15
|
+
* Run with: npm test
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=tandem-metrics.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tandem-metrics.test.d.ts","sourceRoot":"","sources":["../../src/consultation/tandem-metrics.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|