@pennyfarthing/core 11.0.0 → 11.1.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 +81 -23
- package/package.json +1 -1
- package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.d.ts +20 -0
- package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.js +278 -0
- package/packages/core/dist/cli/utils/010-detect-remove-old-packages.test.js.map +1 -0
- package/packages/core/dist/cli/utils/constants.d.ts +8 -2
- package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/constants.js +4 -1
- package/packages/core/dist/cli/utils/constants.js.map +1 -1
- package/packages/core/dist/cli/utils/constants.test.d.ts +10 -0
- package/packages/core/dist/cli/utils/constants.test.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/constants.test.js +38 -0
- package/packages/core/dist/cli/utils/constants.test.js.map +1 -0
- package/packages/core/dist/consultation/consultation-protocol.d.ts +139 -0
- package/packages/core/dist/consultation/consultation-protocol.d.ts.map +1 -0
- package/packages/core/dist/consultation/consultation-protocol.js +178 -0
- package/packages/core/dist/consultation/consultation-protocol.js.map +1 -0
- package/packages/core/dist/consultation/consultation-protocol.test.d.ts +20 -0
- package/packages/core/dist/consultation/consultation-protocol.test.d.ts.map +1 -0
- package/packages/core/dist/consultation/consultation-protocol.test.js +474 -0
- package/packages/core/dist/consultation/consultation-protocol.test.js.map +1 -0
- package/packages/core/dist/consultation/dialogue-manager.d.ts +75 -0
- package/packages/core/dist/consultation/dialogue-manager.d.ts.map +1 -0
- package/packages/core/dist/consultation/dialogue-manager.js +334 -0
- package/packages/core/dist/consultation/dialogue-manager.js.map +1 -0
- package/packages/core/dist/consultation/dialogue-manager.test.d.ts +19 -0
- package/packages/core/dist/consultation/dialogue-manager.test.d.ts.map +1 -0
- package/packages/core/dist/consultation/dialogue-manager.test.js +444 -0
- package/packages/core/dist/consultation/dialogue-manager.test.js.map +1 -0
- package/packages/core/dist/public/js/react/react.js +3 -3
- package/packages/core/dist/scripts/theme-detail.test.d.ts +10 -0
- package/packages/core/dist/scripts/theme-detail.test.js +199 -0
- package/packages/core/dist/server/api/git.d.ts +13 -1
- package/packages/core/dist/server/api/git.d.ts.map +1 -1
- package/packages/core/dist/server/api/git.js +53 -34
- package/packages/core/dist/server/api/git.js.map +1 -1
- package/packages/core/dist/server/api/health-score.d.ts.map +1 -1
- package/packages/core/dist/server/api/health-score.js +25 -1
- package/packages/core/dist/server/api/health-score.js.map +1 -1
- package/packages/core/dist/server/api/settings.d.ts.map +1 -1
- package/packages/core/dist/server/api/settings.js +63 -1
- package/packages/core/dist/server/api/settings.js.map +1 -1
- package/packages/core/dist/server/api/theme-agents.d.ts.map +1 -1
- package/packages/core/dist/server/api/theme-agents.js +61 -0
- package/packages/core/dist/server/api/theme-agents.js.map +1 -1
- package/packages/core/dist/server/server.d.ts.map +1 -1
- package/packages/core/dist/server/server.js +17 -12
- package/packages/core/dist/server/server.js.map +1 -1
- package/packages/core/dist/shared/skill-search.test.js +2 -2
- package/packages/core/dist/workflow/gate-file-validation.d.ts +49 -0
- package/packages/core/dist/workflow/gate-file-validation.d.ts.map +1 -0
- package/packages/core/dist/workflow/gate-file-validation.js +157 -0
- package/packages/core/dist/workflow/gate-file-validation.js.map +1 -0
- package/packages/core/dist/workflow/gate-file-validation.test.d.ts +19 -0
- package/packages/core/dist/workflow/gate-file-validation.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/gate-file-validation.test.js +536 -0
- package/packages/core/dist/workflow/gate-file-validation.test.js.map +1 -0
- package/packages/core/dist/workflow/gate-schema-validation.test.d.ts +14 -0
- package/packages/core/dist/workflow/gate-schema-validation.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/gate-schema-validation.test.js +339 -0
- package/packages/core/dist/workflow/gate-schema-validation.test.js.map +1 -0
- package/packages/core/dist/workflow/handoff.js +2 -2
- package/packages/core/dist/workflow/handoff.js.map +1 -1
- package/packages/core/dist/workflow/handoff.test.js +16 -0
- package/packages/core/dist/workflow/handoff.test.js.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.d.ts +4 -2
- package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.js +43 -8
- package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
- package/pennyfarthing-dist/agents/README.md +6 -14
- package/pennyfarthing-dist/agents/architect.md +43 -29
- package/pennyfarthing-dist/agents/ba.md +30 -29
- package/pennyfarthing-dist/agents/dev.md +32 -43
- package/pennyfarthing-dist/agents/devops.md +57 -21
- package/pennyfarthing-dist/agents/orchestrator.md +3 -10
- package/pennyfarthing-dist/agents/pm.md +45 -31
- package/pennyfarthing-dist/agents/reviewer.md +20 -66
- package/pennyfarthing-dist/agents/sm-setup.md +2 -2
- package/pennyfarthing-dist/agents/sm.md +8 -30
- package/pennyfarthing-dist/agents/tea.md +25 -41
- package/pennyfarthing-dist/agents/tech-writer.md +33 -90
- package/pennyfarthing-dist/agents/ux-designer.md +39 -39
- package/pennyfarthing-dist/commands/benchmark-control.md +8 -64
- package/pennyfarthing-dist/commands/benchmark.md +8 -480
- package/pennyfarthing-dist/commands/job-fair.md +8 -97
- package/pennyfarthing-dist/commands/pf-benchmark-control.md +70 -0
- package/pennyfarthing-dist/commands/pf-benchmark.md +486 -0
- package/pennyfarthing-dist/commands/pf-chore.md +4 -4
- package/pennyfarthing-dist/commands/pf-ci.md +40 -0
- package/pennyfarthing-dist/commands/pf-close-epic.md +9 -27
- package/pennyfarthing-dist/commands/pf-continue-session.md +9 -213
- package/pennyfarthing-dist/commands/pf-create-branches-from-story.md +11 -353
- package/pennyfarthing-dist/commands/pf-docs.md +28 -0
- package/pennyfarthing-dist/commands/pf-epic.md +67 -0
- package/pennyfarthing-dist/commands/pf-git-cleanup.md +11 -52
- package/pennyfarthing-dist/commands/pf-git.md +75 -0
- package/pennyfarthing-dist/commands/pf-help.md +110 -128
- package/pennyfarthing-dist/commands/pf-job-fair.md +102 -0
- package/pennyfarthing-dist/commands/pf-new-work.md +9 -18
- package/pennyfarthing-dist/commands/pf-parallel-work.md +6 -66
- package/pennyfarthing-dist/commands/pf-release.md +11 -76
- package/pennyfarthing-dist/commands/pf-repo-status.md +11 -44
- package/pennyfarthing-dist/commands/pf-run-ci.md +8 -111
- package/pennyfarthing-dist/commands/pf-session.md +51 -0
- package/pennyfarthing-dist/commands/pf-solo.md +447 -0
- package/pennyfarthing-dist/commands/pf-sprint-planning.md +8 -104
- package/pennyfarthing-dist/commands/pf-standalone.md +1 -1
- package/pennyfarthing-dist/commands/pf-start-epic.md +9 -163
- package/pennyfarthing-dist/commands/pf-sync-epic-to-jira.md +8 -179
- package/pennyfarthing-dist/commands/pf-sync-work-with-sprint.md +8 -368
- package/pennyfarthing-dist/commands/pf-update-domain-docs.md +8 -78
- package/pennyfarthing-dist/commands/solo.md +8 -442
- package/pennyfarthing-dist/guides/agent-behavior.md +13 -13
- package/pennyfarthing-dist/guides/agent-coordination.md +7 -7
- package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +6 -5
- package/pennyfarthing-dist/guides/bikerack.md +128 -0
- package/pennyfarthing-dist/guides/brownfield-tools.md +133 -0
- package/pennyfarthing-dist/guides/command-tag-taxonomy.md +2 -2
- package/pennyfarthing-dist/guides/gate-schema.md +227 -0
- package/pennyfarthing-dist/guides/gates.md +120 -0
- package/pennyfarthing-dist/guides/handoff-cli.md +116 -0
- package/pennyfarthing-dist/guides/hooks.md +86 -4
- package/pennyfarthing-dist/guides/output-styles.md +65 -0
- package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +5 -5
- package/pennyfarthing-dist/guides/patterns/tdd-flow-pattern.md +4 -4
- package/pennyfarthing-dist/guides/prompt-patterns.md +5 -5
- package/pennyfarthing-dist/guides/reflector.md +4 -4
- package/pennyfarthing-dist/guides/session-artifacts.md +1 -1
- package/pennyfarthing-dist/guides/skill-schema.md +1 -1
- package/pennyfarthing-dist/guides/tandem-protocol.md +13 -1
- package/pennyfarthing-dist/guides/worktree-mode.md +3 -3
- package/pennyfarthing-dist/guides/xml-tags.md +5 -4
- package/pennyfarthing-dist/personas/themes/hogans-heroes.yaml +11 -22
- package/pennyfarthing-dist/personas/themes/stephen-king.yaml +13 -24
- package/pennyfarthing-dist/scripts/core/dialogue-manager.sh +322 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +1 -1
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +19 -14
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +191 -57
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +26 -10
- package/pennyfarthing-dist/skills/pf-changelog/SKILL.md +4 -4
- package/pennyfarthing-dist/skills/pf-sprint/skill.md +1 -1
- package/pennyfarthing-dist/skills/skill-registry.schema.json +4 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +5 -0
- package/pennyfarthing-dist/workflows/2party-tdd.yaml +11 -0
- package/pennyfarthing-dist/workflows/agent-docs.yaml +2 -0
- package/pennyfarthing-dist/workflows/bdd-tandem.yaml +4 -0
- package/pennyfarthing-dist/workflows/bdd.yaml +4 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +1 -1
- package/pennyfarthing-dist/workflows/tdd-tandem.yaml +3 -0
- package/pennyfarthing-dist/workflows/tdd.yaml +3 -0
- package/pennyfarthing-dist/workflows/trivial.yaml +2 -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_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__/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/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/__main__.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__/debug_panel.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/diffs_panel.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__/sprint_panel.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/cli.py +10 -11
- package/pennyfarthing_scripts/bikerack/debug_panel.py +218 -0
- package/pennyfarthing_scripts/bikerack/diffs_panel.py +203 -27
- 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 +114 -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/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/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/__init__.py +0 -0
- package/pennyfarthing_scripts/epic/cli.py +64 -0
- package/pennyfarthing_scripts/gate/__init__.py +1 -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/gate/cli.py +56 -0
- package/pennyfarthing_scripts/gate/validate.py +266 -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/__init__.py +0 -0
- package/pennyfarthing_scripts/git_group/cli.py +100 -0
- package/pennyfarthing_scripts/handoff/__init__.py +1 -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 +120 -0
- package/pennyfarthing_scripts/handoff/complete_phase.py +155 -0
- package/pennyfarthing_scripts/handoff/gate_file.py +105 -0
- package/pennyfarthing_scripts/handoff/gate_runner.py +152 -0
- package/pennyfarthing_scripts/handoff/marker.py +109 -0
- package/pennyfarthing_scripts/handoff/resolve_gate.py +152 -0
- 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/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__/create.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/epic.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__/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/prime/__pycache__/__init__.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 +39 -0
- package/pennyfarthing_scripts/session/__init__.py +0 -0
- package/pennyfarthing_scripts/session/cli.py +87 -0
- package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/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_finish.py +14 -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_2_remove_handoff_fallback.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_epic_shard_validation.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_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_resolve_gate_file_field.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_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/test_108_1_gate_migration.py +540 -0
- package/pennyfarthing_scripts/tests/test_108_2_remove_handoff_fallback.py +339 -0
- package/pennyfarthing_scripts/tests/test_confidence_sm_evaluation.py +253 -0
- package/pennyfarthing_scripts/tests/test_confidence_sm_gate.py +315 -0
- package/pennyfarthing_scripts/tests/test_gate_file_resolution.py +341 -0
- package/pennyfarthing_scripts/tests/test_gate_runner.py +620 -0
- package/pennyfarthing_scripts/tests/test_handoff_cli.py +929 -0
- package/pennyfarthing_scripts/tests/test_handoff_e2e.py +454 -0
- package/pennyfarthing_scripts/tests/test_resolve_gate_file_field.py +464 -0
- 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__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/skill_command.py +200 -0
- package/pennyfarthing_scripts/validate/adapters/workflow.py +64 -0
- package/pennyfarthing_scripts/validate/cli.py +15 -4
- package/packages/core/dist/scripts/benchmark-integration.d.ts +0 -182
- package/packages/core/dist/scripts/benchmark-integration.d.ts.map +0 -1
- package/packages/core/dist/scripts/benchmark-integration.js +0 -691
- package/packages/core/dist/scripts/benchmark-integration.js.map +0 -1
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts +0 -150
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +0 -1
- package/packages/core/dist/scripts/job-fair-aggregator.js +0 -547
- package/packages/core/dist/scripts/job-fair-aggregator.js.map +0 -1
- package/pennyfarthing-dist/agents/handoff.md +0 -250
- package/pennyfarthing-dist/agents/sm-handoff.md +0 -152
- package/pennyfarthing-dist/scripts/core/handoff-marker.sh +0 -112
- package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira.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/jira/__pycache__/compat.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/migration/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialogue File Management for Story 86-3
|
|
3
|
+
*
|
|
4
|
+
* Persistence layer for tandem agent consultation exchanges.
|
|
5
|
+
* Creates, appends, and archives dialogue files following the format
|
|
6
|
+
* defined in ADR-0012 (lines 156-195).
|
|
7
|
+
*
|
|
8
|
+
* All functions are pure or use simple file I/O — no external dependencies.
|
|
9
|
+
*/
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Constants
|
|
14
|
+
// =============================================================================
|
|
15
|
+
const SUMMARY_MARKER = '## Summary';
|
|
16
|
+
const EXCHANGE_RE = /^## Exchange (\d+)/;
|
|
17
|
+
const OUTCOME_RE = /^\*\*Outcome:\*\*\s+(.+)/;
|
|
18
|
+
const DIRECTION_RE = /^\*\*\[(\d{2}:\d{2})\]\s+(\S+)\s+→\s+(\S+)\*\*/;
|
|
19
|
+
const PARTNER_RESP_RE = /^\*\*\[(\d{2}:\d{2})\]\s+(\S+):\*\*/;
|
|
20
|
+
const CONFIDENCE_RE = /^\*\*Confidence:\*\*\s+(\S+)/;
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// Pure Functions
|
|
23
|
+
// =============================================================================
|
|
24
|
+
/**
|
|
25
|
+
* Create initial dialogue file content with header and empty summary.
|
|
26
|
+
*/
|
|
27
|
+
export function createDialogueContent(header) {
|
|
28
|
+
const leaderLabel = header.leaderCharacter
|
|
29
|
+
? `${header.leader} (${header.leaderCharacter})`
|
|
30
|
+
: header.leader;
|
|
31
|
+
const partnerLabel = header.partnerCharacter
|
|
32
|
+
? `${header.partner} (${header.partnerCharacter})`
|
|
33
|
+
: header.partner;
|
|
34
|
+
return `# Tandem Dialogue: ${header.storyId}
|
|
35
|
+
|
|
36
|
+
**Workflow:** ${header.workflow}
|
|
37
|
+
**Leader:** ${leaderLabel} | **Partner:** ${partnerLabel}
|
|
38
|
+
**Started:** ${header.startedAt}
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
${SUMMARY_MARKER}
|
|
43
|
+
- **Total exchanges:** 0
|
|
44
|
+
- **Key decisions:** None
|
|
45
|
+
- **Time in tandem:** 0m
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Format a single exchange as markdown block.
|
|
50
|
+
*/
|
|
51
|
+
export function formatExchange(exchange) {
|
|
52
|
+
const outcomeText = exchange.outcome
|
|
53
|
+
? `**Outcome:** ${exchange.outcome}${exchange.outcomeNote ? ` - ${exchange.outcomeNote}` : ''}`
|
|
54
|
+
: '**Outcome:** _pending_';
|
|
55
|
+
return `## Exchange ${exchange.number}
|
|
56
|
+
**[${exchange.timestamp}] ${exchange.leader} → ${exchange.partner}**
|
|
57
|
+
|
|
58
|
+
> ${exchange.question}
|
|
59
|
+
|
|
60
|
+
**[${exchange.timestamp}] ${exchange.partner}:**
|
|
61
|
+
|
|
62
|
+
${exchange.recommendation}
|
|
63
|
+
|
|
64
|
+
**Confidence:** ${exchange.confidence}
|
|
65
|
+
|
|
66
|
+
${outcomeText}
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Parse exchanges from dialogue file content.
|
|
73
|
+
*/
|
|
74
|
+
export function parseDialogueExchanges(content) {
|
|
75
|
+
const exchanges = [];
|
|
76
|
+
const lines = content.split('\n');
|
|
77
|
+
let current = null;
|
|
78
|
+
let inQuestion = false;
|
|
79
|
+
let inRecommendation = false;
|
|
80
|
+
let questionLines = [];
|
|
81
|
+
let recLines = [];
|
|
82
|
+
for (let i = 0; i < lines.length; i++) {
|
|
83
|
+
const line = lines[i];
|
|
84
|
+
// New exchange starts
|
|
85
|
+
const exchangeMatch = line.match(EXCHANGE_RE);
|
|
86
|
+
if (exchangeMatch) {
|
|
87
|
+
if (current && current.number !== undefined) {
|
|
88
|
+
current.question = questionLines.join('\n');
|
|
89
|
+
current.recommendation = recLines.join('\n');
|
|
90
|
+
exchanges.push(current);
|
|
91
|
+
}
|
|
92
|
+
current = { number: parseInt(exchangeMatch[1], 10) };
|
|
93
|
+
questionLines = [];
|
|
94
|
+
recLines = [];
|
|
95
|
+
inQuestion = false;
|
|
96
|
+
inRecommendation = false;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (!current)
|
|
100
|
+
continue;
|
|
101
|
+
// Leader → Partner direction line
|
|
102
|
+
const dirMatch = line.match(DIRECTION_RE);
|
|
103
|
+
if (dirMatch) {
|
|
104
|
+
current.timestamp = dirMatch[1];
|
|
105
|
+
current.leader = dirMatch[2];
|
|
106
|
+
current.partner = dirMatch[3];
|
|
107
|
+
inQuestion = true;
|
|
108
|
+
inRecommendation = false;
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// Partner response line
|
|
112
|
+
const partnerMatch = line.match(PARTNER_RESP_RE);
|
|
113
|
+
if (partnerMatch) {
|
|
114
|
+
inQuestion = false;
|
|
115
|
+
inRecommendation = true;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
// Confidence line
|
|
119
|
+
const confMatch = line.match(CONFIDENCE_RE);
|
|
120
|
+
if (confMatch) {
|
|
121
|
+
current.confidence = confMatch[1];
|
|
122
|
+
inRecommendation = false;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
// Outcome line
|
|
126
|
+
const outcomeMatch = line.match(OUTCOME_RE);
|
|
127
|
+
if (outcomeMatch) {
|
|
128
|
+
const outcomeRaw = outcomeMatch[1].trim();
|
|
129
|
+
if (outcomeRaw === '_pending_') {
|
|
130
|
+
// No outcome yet
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
const dashIdx = outcomeRaw.indexOf(' - ');
|
|
134
|
+
if (dashIdx >= 0) {
|
|
135
|
+
current.outcome = outcomeRaw.substring(0, dashIdx).trim();
|
|
136
|
+
current.outcomeNote = outcomeRaw.substring(dashIdx + 3).trim();
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
current.outcome = outcomeRaw;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
inRecommendation = false;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
// Collect question text (blockquote lines)
|
|
146
|
+
if (inQuestion) {
|
|
147
|
+
const stripped = line.startsWith('> ') ? line.substring(2) : line;
|
|
148
|
+
if (stripped.trim()) {
|
|
149
|
+
questionLines.push(stripped);
|
|
150
|
+
}
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
// Collect recommendation text
|
|
154
|
+
if (inRecommendation) {
|
|
155
|
+
if (line.trim()) {
|
|
156
|
+
recLines.push(line);
|
|
157
|
+
}
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// Push last exchange
|
|
162
|
+
if (current && current.number !== undefined) {
|
|
163
|
+
current.question = questionLines.join('\n');
|
|
164
|
+
current.recommendation = recLines.join('\n');
|
|
165
|
+
exchanges.push(current);
|
|
166
|
+
}
|
|
167
|
+
return exchanges;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Generate summary markdown section from exchanges.
|
|
171
|
+
*/
|
|
172
|
+
export function generateSummary(exchanges, startedAt) {
|
|
173
|
+
const total = exchanges.length;
|
|
174
|
+
// Key decisions from applied outcomes
|
|
175
|
+
const applied = exchanges.filter(e => e.outcome === 'applied' && e.outcomeNote);
|
|
176
|
+
const decisionsText = applied.length > 0
|
|
177
|
+
? applied.map(e => ` - ${e.outcomeNote}`).join('\n')
|
|
178
|
+
: 'None';
|
|
179
|
+
// Time in tandem: span between first and last exchange timestamps
|
|
180
|
+
let duration = '0m';
|
|
181
|
+
if (exchanges.length > 0) {
|
|
182
|
+
const first = parseTime(exchanges[0].timestamp);
|
|
183
|
+
const last = parseTime(exchanges[exchanges.length - 1].timestamp);
|
|
184
|
+
if (first !== null && last !== null) {
|
|
185
|
+
const mins = last - first;
|
|
186
|
+
duration = mins > 0 ? `${mins}m` : '0m';
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return `${SUMMARY_MARKER}
|
|
190
|
+
- **Total exchanges:** ${total}
|
|
191
|
+
- **Key decisions:**
|
|
192
|
+
${decisionsText}
|
|
193
|
+
- **Time in tandem:** ${duration}
|
|
194
|
+
`;
|
|
195
|
+
}
|
|
196
|
+
// =============================================================================
|
|
197
|
+
// File Operations
|
|
198
|
+
// =============================================================================
|
|
199
|
+
/**
|
|
200
|
+
* Append an exchange to a dialogue file. Creates the file if missing.
|
|
201
|
+
*/
|
|
202
|
+
export async function appendExchangeToFile(dialoguePath, exchange, header) {
|
|
203
|
+
try {
|
|
204
|
+
if (!fs.existsSync(dialoguePath)) {
|
|
205
|
+
if (!header) {
|
|
206
|
+
return { success: false, error: 'Header required for new dialogue file' };
|
|
207
|
+
}
|
|
208
|
+
const initial = createDialogueContent(header);
|
|
209
|
+
fs.mkdirSync(path.dirname(dialoguePath), { recursive: true });
|
|
210
|
+
fs.writeFileSync(dialoguePath, initial, 'utf-8');
|
|
211
|
+
}
|
|
212
|
+
const content = fs.readFileSync(dialoguePath, 'utf-8');
|
|
213
|
+
const formatted = formatExchange(exchange);
|
|
214
|
+
// Insert exchange before summary section
|
|
215
|
+
const summaryIdx = content.indexOf(SUMMARY_MARKER);
|
|
216
|
+
if (summaryIdx < 0) {
|
|
217
|
+
// No summary marker — append at end
|
|
218
|
+
fs.writeFileSync(dialoguePath, content + '\n' + formatted, 'utf-8');
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
const before = content.substring(0, summaryIdx);
|
|
222
|
+
const after = content.substring(summaryIdx);
|
|
223
|
+
fs.writeFileSync(dialoguePath, before + formatted + '\n' + after, 'utf-8');
|
|
224
|
+
}
|
|
225
|
+
return { success: true, data: { exchangeNumber: exchange.number } };
|
|
226
|
+
}
|
|
227
|
+
catch (err) {
|
|
228
|
+
return { success: false, error: `Failed to append exchange: ${err instanceof Error ? err.message : String(err)}` };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Update the outcome of a specific exchange in the dialogue file.
|
|
233
|
+
*/
|
|
234
|
+
export async function updateOutcomeInFile(dialoguePath, exchangeNum, outcome, note) {
|
|
235
|
+
try {
|
|
236
|
+
if (!fs.existsSync(dialoguePath)) {
|
|
237
|
+
return { success: false, error: `Dialogue file not found: ${dialoguePath}` };
|
|
238
|
+
}
|
|
239
|
+
const content = fs.readFileSync(dialoguePath, 'utf-8');
|
|
240
|
+
const lines = content.split('\n');
|
|
241
|
+
// Find the exchange section
|
|
242
|
+
let inTargetExchange = false;
|
|
243
|
+
let found = false;
|
|
244
|
+
for (let i = 0; i < lines.length; i++) {
|
|
245
|
+
const exchangeMatch = lines[i].match(EXCHANGE_RE);
|
|
246
|
+
if (exchangeMatch) {
|
|
247
|
+
inTargetExchange = parseInt(exchangeMatch[1], 10) === exchangeNum;
|
|
248
|
+
}
|
|
249
|
+
if (inTargetExchange && OUTCOME_RE.test(lines[i])) {
|
|
250
|
+
const outcomeText = note
|
|
251
|
+
? `**Outcome:** ${outcome} - ${note}`
|
|
252
|
+
: `**Outcome:** ${outcome}`;
|
|
253
|
+
lines[i] = outcomeText;
|
|
254
|
+
found = true;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (!found) {
|
|
259
|
+
return { success: false, error: `Exchange ${exchangeNum} not found in dialogue file` };
|
|
260
|
+
}
|
|
261
|
+
fs.writeFileSync(dialoguePath, lines.join('\n'), 'utf-8');
|
|
262
|
+
return { success: true, data: { exchangeNum, outcome } };
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
return { success: false, error: `Failed to update outcome: ${err instanceof Error ? err.message : String(err)}` };
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Regenerate the summary section in an existing dialogue file.
|
|
270
|
+
*/
|
|
271
|
+
export async function refreshSummary(dialoguePath) {
|
|
272
|
+
try {
|
|
273
|
+
if (!fs.existsSync(dialoguePath)) {
|
|
274
|
+
return { success: false, error: `Dialogue file not found: ${dialoguePath}` };
|
|
275
|
+
}
|
|
276
|
+
const content = fs.readFileSync(dialoguePath, 'utf-8');
|
|
277
|
+
const exchanges = parseDialogueExchanges(content);
|
|
278
|
+
// Extract startedAt from header
|
|
279
|
+
const startedMatch = content.match(/\*\*Started:\*\*\s+(.+)/);
|
|
280
|
+
const startedAt = startedMatch ? startedMatch[1].trim() : new Date().toISOString();
|
|
281
|
+
const newSummary = generateSummary(exchanges, startedAt);
|
|
282
|
+
// Replace existing summary section
|
|
283
|
+
const summaryIdx = content.indexOf(SUMMARY_MARKER);
|
|
284
|
+
if (summaryIdx < 0) {
|
|
285
|
+
// Append summary at end
|
|
286
|
+
fs.writeFileSync(dialoguePath, content + '\n' + newSummary, 'utf-8');
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
const before = content.substring(0, summaryIdx);
|
|
290
|
+
fs.writeFileSync(dialoguePath, before + newSummary, 'utf-8');
|
|
291
|
+
}
|
|
292
|
+
return { success: true, data: { totalExchanges: exchanges.length } };
|
|
293
|
+
}
|
|
294
|
+
catch (err) {
|
|
295
|
+
return { success: false, error: `Failed to refresh summary: ${err instanceof Error ? err.message : String(err)}` };
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Copy dialogue file to archive directory.
|
|
300
|
+
*/
|
|
301
|
+
export async function archiveDialogue(params) {
|
|
302
|
+
const { dialoguePath, archiveDir, jiraKey, storyId } = params;
|
|
303
|
+
try {
|
|
304
|
+
if (!fs.existsSync(dialoguePath)) {
|
|
305
|
+
return { success: false, error: `Dialogue file not found: ${dialoguePath}` };
|
|
306
|
+
}
|
|
307
|
+
fs.mkdirSync(archiveDir, { recursive: true });
|
|
308
|
+
const prefix = jiraKey || storyId || 'unknown';
|
|
309
|
+
const archiveName = `${prefix}-dialogue.md`;
|
|
310
|
+
const archivePath = path.join(archiveDir, archiveName);
|
|
311
|
+
fs.copyFileSync(dialoguePath, archivePath);
|
|
312
|
+
return { success: true, data: { archivePath } };
|
|
313
|
+
}
|
|
314
|
+
catch (err) {
|
|
315
|
+
return { success: false, error: `Failed to archive dialogue: ${err instanceof Error ? err.message : String(err)}` };
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
// =============================================================================
|
|
319
|
+
// Internal Helpers
|
|
320
|
+
// =============================================================================
|
|
321
|
+
/**
|
|
322
|
+
* Parse HH:MM timestamp to minutes since midnight.
|
|
323
|
+
*/
|
|
324
|
+
function parseTime(timestamp) {
|
|
325
|
+
const parts = timestamp.split(':');
|
|
326
|
+
if (parts.length !== 2)
|
|
327
|
+
return null;
|
|
328
|
+
const hours = parseInt(parts[0], 10);
|
|
329
|
+
const minutes = parseInt(parts[1], 10);
|
|
330
|
+
if (Number.isNaN(hours) || Number.isNaN(minutes))
|
|
331
|
+
return null;
|
|
332
|
+
return hours * 60 + minutes;
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=dialogue-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogue-manager.js","sourceRoot":"","sources":["../../src/consultation/dialogue-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,O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,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9D,OAAO,KAAK,GAAG,EAAE,GAAG,OAAO,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story 86-3: Dialogue File Management
|
|
3
|
+
*
|
|
4
|
+
* RED state tests for the dialogue file persistence layer.
|
|
5
|
+
* Dialogue files record all consultation exchanges between tandem agents,
|
|
6
|
+
* following the format defined in ADR-0012 (lines 156-195).
|
|
7
|
+
*
|
|
8
|
+
* ACs covered:
|
|
9
|
+
* AC1: Dialogue file created at .session/{story-id}-dialogue.md on first consultation
|
|
10
|
+
* AC2: Each exchange appended with: timestamp, agents, question, response, outcome
|
|
11
|
+
* AC3: Outcome tracked: applied / deferred / rejected
|
|
12
|
+
* AC4: Summary section auto-generated: total exchanges, key decisions, time in tandem
|
|
13
|
+
* AC5: Dialogue file archived alongside session file on story completion
|
|
14
|
+
* AC6: Dialogue file readable by Reviewer for audit
|
|
15
|
+
*
|
|
16
|
+
* Run with: npm test
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=dialogue-manager.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogue-manager.test.d.ts","sourceRoot":"","sources":["../../src/consultation/dialogue-manager.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|