@pennyfarthing/core 11.1.0 → 11.2.0
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 +8 -8
- package/package.json +16 -14
- package/packages/core/dist/cli/utils/constants.d.ts +1 -1
- package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/constants.js +2 -1
- package/packages/core/dist/cli/utils/constants.js.map +1 -1
- 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/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/otlp-receiver.d.ts +16 -11
- package/packages/core/dist/server/otlp-receiver.d.ts.map +1 -1
- package/packages/core/dist/server/otlp-receiver.js +185 -24
- package/packages/core/dist/server/otlp-receiver.js.map +1 -1
- package/packages/core/dist/server/otlp-receiver.test.d.ts +21 -0
- package/packages/core/dist/server/otlp-receiver.test.d.ts.map +1 -0
- package/packages/core/dist/server/otlp-receiver.test.js +446 -0
- package/packages/core/dist/server/otlp-receiver.test.js.map +1 -0
- package/packages/core/dist/shared/portrait-resolver.d.ts +9 -0
- package/packages/core/dist/shared/portrait-resolver.d.ts.map +1 -1
- package/packages/core/dist/shared/portrait-resolver.js +27 -0
- package/packages/core/dist/shared/portrait-resolver.js.map +1 -1
- package/packages/core/dist/shared/portrait-resolver.test.js +47 -1
- package/packages/core/dist/shared/portrait-resolver.test.js.map +1 -1
- package/packages/core/dist/shared/skill-search.test.js +2 -2
- package/packages/core/dist/shared/tandem-portrait-inventory.test.d.ts +13 -0
- package/packages/core/dist/shared/tandem-portrait-inventory.test.d.ts.map +1 -0
- package/packages/core/dist/shared/tandem-portrait-inventory.test.js +126 -0
- package/packages/core/dist/shared/tandem-portrait-inventory.test.js.map +1 -0
- package/pennyfarthing-dist/agents/dev.md +1 -1
- package/pennyfarthing-dist/agents/reviewer.md +1 -1
- package/pennyfarthing-dist/agents/sm-setup.md +1 -1
- package/pennyfarthing-dist/agents/sm.md +2 -2
- package/pennyfarthing-dist/agents/tea.md +1 -1
- package/pennyfarthing-dist/agents/testing-runner.md +2 -1
- package/pennyfarthing-dist/commands/pf-chore.md +2 -2
- package/pennyfarthing-dist/commands/pf-standalone.md +7 -2
- package/pennyfarthing-dist/guides/agent-behavior.md +1 -1
- package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +1 -1
- package/pennyfarthing-dist/guides/bikerack.md +3 -3
- package/pennyfarthing-dist/guides/hooks.md +1 -1
- package/pennyfarthing-dist/guides/worktree-mode.md +3 -3
- package/pennyfarthing-dist/guides/xml-tags.md +2 -2
- package/pennyfarthing-dist/scripts/README.md +1 -1
- package/pennyfarthing-dist/scripts/core/agent-session.sh +0 -0
- package/pennyfarthing-dist/scripts/core/check-context.sh +1 -1
- package/pennyfarthing-dist/scripts/core/dialogue-manager.sh +322 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +0 -0
- package/pennyfarthing-dist/scripts/core/prime.sh +0 -0
- package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +0 -0
- package/pennyfarthing-dist/scripts/git/README.md +24 -14
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +5 -266
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +5 -151
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +6 -144
- package/pennyfarthing-dist/scripts/git/release.sh +0 -0
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +5 -496
- package/pennyfarthing-dist/scripts/health/drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/README.md +1 -1
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +1 -1
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/dispatcher-template.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +9 -11
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +0 -0
- package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +1 -1
- package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/background-tasks.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/common.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/file-lock.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/logging.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/retry.sh +0 -0
- package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +0 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add-short-names.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add_short_names.py +0 -0
- package/pennyfarthing-dist/scripts/misc/backlog.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/check-status.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/find-related-work.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +0 -0
- package/pennyfarthing-dist/scripts/misc/repo-scan.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/repo-utils.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-ci.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/statusline.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/uninstall.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +0 -0
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +0 -0
- package/pennyfarthing-dist/scripts/portraits/generate-tandem-portraits.sh +76 -0
- package/pennyfarthing-dist/scripts/story/create-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/size-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/story-template.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/check.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/theme/list-themes.sh +0 -0
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/check.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/check.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/complete-step.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +4 -221
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +5 -13
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +4 -123
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +4 -33
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +4 -156
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +4 -131
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +4 -249
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +4 -160
- package/pennyfarthing-dist/skills/pf-bc/usage.md +1 -1
- package/pennyfarthing-dist/skills/pf-jira/examples.md +5 -2
- package/pennyfarthing-dist/skills/pf-story/scripts/create-story.sh +0 -0
- package/pennyfarthing-dist/skills/pf-story/scripts/size-story.sh +0 -0
- package/pennyfarthing-dist/skills/pf-story/scripts/story-template.sh +0 -0
- package/pennyfarthing-dist/skills/pf-workflow/examples.md +27 -16
- package/pennyfarthing-dist/skills/pf-workflow/skill.md +9 -12
- package/pennyfarthing-dist/skills/pf-workflow/usage.md +33 -8
- package/pennyfarthing-dist/workflows/bdd-tandem.yaml +18 -6
- 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/review-tandem.yaml +65 -0
- package/pennyfarthing-dist/workflows/tdd-tandem.yaml +16 -8
- package/pennyfarthing_scripts/CLAUDE.md +26 -4
- package/pennyfarthing_scripts/__pycache__/cli.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__/session_start_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bc/cli.py +3 -5
- 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__/portrait.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__/tui.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/__pycache__/ws_client.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bikerack/background_panel.py +86 -5
- package/pennyfarthing_scripts/bikerack/base_panel.py +62 -0
- package/pennyfarthing_scripts/bikerack/changed_panel.py +32 -28
- package/pennyfarthing_scripts/bikerack/cli.py +10 -11
- package/pennyfarthing_scripts/bikerack/debug_panel.py +31 -1
- package/pennyfarthing_scripts/bikerack/diffs_panel.py +74 -17
- package/pennyfarthing_scripts/bikerack/git_panel.py +103 -33
- package/pennyfarthing_scripts/bikerack/launcher.py +15 -15
- package/pennyfarthing_scripts/bikerack/progress_panel.py +315 -0
- package/pennyfarthing_scripts/bikerack/sprint_panel.py +158 -26
- package/pennyfarthing_scripts/bikerack/tui.py +336 -30
- package/pennyfarthing_scripts/bikerack/ws_client.py +2 -2
- package/pennyfarthing_scripts/cli.py +37 -65
- package/pennyfarthing_scripts/consultation/__init__.py +1 -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 +149 -0
- package/pennyfarthing_scripts/consultation/dialogue_manager.py +417 -0
- package/pennyfarthing_scripts/context.py +3 -3
- 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/__init__.py +12 -1
- 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__/hooks_installer.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/__pycache__/worktree.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/create_branches.py +3 -4
- package/pennyfarthing_scripts/git/hooks_installer.py +152 -0
- package/pennyfarthing_scripts/git/repos.py +196 -0
- package/pennyfarthing_scripts/git/status_all.py +27 -11
- package/pennyfarthing_scripts/git/worktree.py +302 -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/git_group/cli.py +143 -40
- 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__/resolve_gate.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/handoff/complete_phase.py +12 -0
- package/pennyfarthing_scripts/handoff/resolve_gate.py +5 -14
- package/pennyfarthing_scripts/hooks/cyclist-pretooluse-hook.sh +0 -0
- package/pennyfarthing_scripts/hooks.py +3 -17
- package/pennyfarthing_scripts/pretooluse_hook.py +1 -1
- package/pennyfarthing_scripts/prime/__pycache__/heatmap.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/heatmap.py +655 -0
- 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 +1 -1
- package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/loader.py +15 -1
- package/pennyfarthing_scripts/sprint/story_finish.py +14 -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_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/test_bikerack.py +51 -51
- package/pennyfarthing_scripts/tests/test_dialogue_manager.py +811 -0
- package/pennyfarthing_scripts/tests/test_handoff_cli.py +16 -11
- package/pennyfarthing_scripts/tests/test_workflow_check.py +2 -3
- package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/tandem_awareness.py +254 -0
- package/pennyfarthing_scripts/validate/cli.py +17 -5
- package/pennyfarthing_scripts/workflow/__init__.py +40 -0
- 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 +1099 -0
- package/pennyfarthing_scripts/workflow/helpers.py +241 -0
- package/pennyfarthing_scripts/{workflow.py → workflow/scale.py} +0 -104
- package/pennyfarthing_scripts/workflow/state.py +112 -0
- package/scripts/README.md +41 -0
- package/pennyfarthing-dist/skills/pf-workflow/scripts/list-workflows.sh +0 -91
- package/pennyfarthing-dist/skills/pf-workflow/scripts/resume-workflow.sh +0 -163
- package/pennyfarthing-dist/skills/pf-workflow/scripts/show-workflow.sh +0 -138
- package/pennyfarthing-dist/skills/pf-workflow/scripts/start-workflow.sh +0 -273
- package/pennyfarthing-dist/skills/pf-workflow/scripts/workflow-status.sh +0 -167
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pennyfarthing
|
|
2
2
|
|
|
3
|
-
**v11.
|
|
3
|
+
**v11.2.0** | *The outer loop goes once, the inner loop goes many times.*
|
|
4
4
|
|
|
5
5
|
<img src="pennyfarthing.png" alt="Pennyfarthing Logo" width="75" style="float:left; margin:10px">
|
|
6
6
|
|
|
@@ -15,8 +15,8 @@ A Claude Code agent orchestration framework built around three pillars: a flexib
|
|
|
15
15
|
A multi-agent system with customizable BikeLane workflows for structured software development:
|
|
16
16
|
|
|
17
17
|
- **11 Coordinated Agents** - SM, TEA, Dev, Reviewer, Architect, PM, Tech Writer, UX Designer, DevOps, Orchestrator, BA
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
18
|
+
- **12 BikeLane Workflows** - Phased (TDD, BDD, Trivial, 2pTDD, TDD-Tandem, BDD-Tandem, Review-Tandem, Patch, Agent-Docs), Stepped (Architecture, Release, Git Cleanup)
|
|
19
|
+
- **60 Slash Commands** - Entry points for agent activation and workflows
|
|
20
20
|
- **22 Skills** - Reusable knowledge domains (testing, code-review, jira, mermaid, etc.)
|
|
21
21
|
- **Prime Context System** - Tiered context injection assembles agent definition, persona, session state, and sidecar memory
|
|
22
22
|
- **Automatic Handoffs** - Context-aware agent transitions via subagent delegation
|
|
@@ -254,18 +254,18 @@ See [Benchmarking Documentation](docs/BENCHMARKING.md) for methodology.
|
|
|
254
254
|
| [Brownfield Tools](pennyfarthing-dist/guides/brownfield-tools.md) | Codebase analysis CLI tools |
|
|
255
255
|
| [Benchmarks](packages/benchmark/docs/benchmarks-guide.md) | Persona evaluation system |
|
|
256
256
|
|
|
257
|
-
## Available Themes (
|
|
257
|
+
## Available Themes (100)
|
|
258
258
|
|
|
259
|
-
Core includes
|
|
259
|
+
Core includes 29 themes. Optional theme packs add 71 more across 7 packages:
|
|
260
260
|
|
|
261
261
|
| Package | Themes | Examples |
|
|
262
262
|
|---------|--------|----------|
|
|
263
|
-
| `@pennyfarthing/core` (included) |
|
|
263
|
+
| `@pennyfarthing/core` (included) | 29 | `the-expanse`, `star-trek-tng`, `breaking-bad`, `discworld`, `fifth-element` |
|
|
264
264
|
| `@pennyfarthing/themes-prestige-tv` | 17 | `succession`, `the-wire`, `mad-men`, `fargo`, `the-sopranos` |
|
|
265
265
|
| `@pennyfarthing/themes-literary` | 15 | `shakespeare`, `jane-austen`, `sherlock-holmes`, `1984`, `great-gatsby` |
|
|
266
266
|
| `@pennyfarthing/themes-realistic` | 14 | `ancient-philosophers`, `jazz-legends`, `film-auteurs`, `software-pioneers` |
|
|
267
|
-
| `@pennyfarthing/themes-comedy` |
|
|
268
|
-
| `@pennyfarthing/themes-scifi` |
|
|
267
|
+
| `@pennyfarthing/themes-comedy` | 8 | `the-office`, `parks-and-rec`, `ted-lasso`, `monty-python`, `futurama` |
|
|
268
|
+
| `@pennyfarthing/themes-scifi` | 9 | `foundation`, `snow-crash`, `neuromancer`, `babylon-5` |
|
|
269
269
|
| `@pennyfarthing/themes-mythology-fantasy` | 4 | `greek-mythology`, `norse-mythology`, `his-dark-materials`, `the-witcher` |
|
|
270
270
|
| `@pennyfarthing/themes-superheroes` | 4 | `marvel-mcu`, `avatar-the-last-airbender`, `legion-of-doom` |
|
|
271
271
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pennyfarthing/core",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Claude Code agent framework with TDD workflow and persona system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,6 +30,19 @@
|
|
|
30
30
|
"bugs": {
|
|
31
31
|
"url": "https://github.com/1898andCo/pennyfarthing/issues"
|
|
32
32
|
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prepublishOnly": "find pennyfarthing-dist/scripts -name '*.sh' ! -name 'find-root.sh' -exec chmod +x {} +",
|
|
35
|
+
"postinstall": "node scripts/postinstall.cjs",
|
|
36
|
+
"build": "pnpm --filter @pennyfarthing/shared build && pnpm --filter @pennyfarthing/core build && pnpm --filter @pennyfarthing/cyclist build && ./scripts/generate-skill-docs.sh",
|
|
37
|
+
"docs": "./scripts/generate-skill-docs.sh",
|
|
38
|
+
"dev": "pnpm -r --parallel dev",
|
|
39
|
+
"test": "pnpm -r test",
|
|
40
|
+
"lint": "eslint 'packages/*/src/**/*.ts' --max-warnings 0",
|
|
41
|
+
"lint:md": "markdownlint-cli2 'pennyfarthing-dist/**/*.md'",
|
|
42
|
+
"validate:refs": "node scripts/validate-refs.js",
|
|
43
|
+
"test:validate-refs": "node --test scripts/validate-refs.test.js",
|
|
44
|
+
"clean": "pnpm -r clean"
|
|
45
|
+
},
|
|
33
46
|
"dependencies": {
|
|
34
47
|
"@pennyfarthing/shared": "^10.0.3",
|
|
35
48
|
"chalk": "^5.3.0",
|
|
@@ -50,16 +63,5 @@
|
|
|
50
63
|
"engines": {
|
|
51
64
|
"node": ">=18.0.0"
|
|
52
65
|
},
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
"build": "pnpm --filter @pennyfarthing/shared build && pnpm --filter @pennyfarthing/core build && pnpm --filter @pennyfarthing/cyclist build && ./scripts/generate-skill-docs.sh",
|
|
56
|
-
"docs": "./scripts/generate-skill-docs.sh",
|
|
57
|
-
"dev": "pnpm -r --parallel dev",
|
|
58
|
-
"test": "pnpm -r test",
|
|
59
|
-
"lint": "eslint 'packages/*/src/**/*.ts' --max-warnings 0",
|
|
60
|
-
"lint:md": "markdownlint-cli2 'pennyfarthing-dist/**/*.md'",
|
|
61
|
-
"validate:refs": "node scripts/validate-refs.js",
|
|
62
|
-
"test:validate-refs": "node --test scripts/validate-refs.test.js",
|
|
63
|
-
"clean": "pnpm -r clean"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
+
"packageManager": "pnpm@9.0.0"
|
|
67
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Core agent types that have sidecars
|
|
7
7
|
*/
|
|
8
|
-
export declare const CORE_AGENTS: readonly ["dev", "tea", "sm", "reviewer", "architect", "pm", "tech-writer", "ux-designer", "devops", "orchestrator"];
|
|
8
|
+
export declare const CORE_AGENTS: readonly ["dev", "tea", "sm", "reviewer", "architect", "pm", "tech-writer", "ux-designer", "devops", "orchestrator", "ba"];
|
|
9
9
|
export type CoreAgent = typeof CORE_AGENTS[number];
|
|
10
10
|
/**
|
|
11
11
|
* Symlinks that point directly to node_modules directories
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,4HAYd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAQrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIf,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,4OAUhB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK;IACL,KAAK;IACL,IAAI;IACJ,UAAU;IACV,WAAW;IACX,IAAI;IACJ,aAAa;IACb,aAAa;IACb,QAAQ;IACR,cAAc;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/cli/utils/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK;IACL,KAAK;IACL,IAAI;IACJ,UAAU;IACV,WAAW;IACX,IAAI;IACJ,aAAa;IACb,aAAa;IACb,QAAQ;IACR,cAAc;IACd,IAAI;CACI,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACjD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE;IAC/C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACjD,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,8BAA8B,EAAE;IAC/D,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,yBAAyB,EAAE;IACrD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,wBAAwB,EAAE;IACnD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,0BAA0B,EAAE;CAC/C,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,kBAAkB;IACrB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAC9C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE;CAClC,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,kBAAkB;IAClB,gBAAgB;IAChB,uBAAuB;IACvB,sBAAsB;IACtB,uBAAuB;IACvB,8BAA8B;IAC9B,yBAAyB;IACzB,wBAAwB;IACxB,0BAA0B;CAClB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
export type Outcome = 'applied' | 'deferred' | 'rejected';
|
|
11
|
+
export interface DialogueHeader {
|
|
12
|
+
storyId: string;
|
|
13
|
+
workflow: string;
|
|
14
|
+
leader: string;
|
|
15
|
+
leaderCharacter?: string;
|
|
16
|
+
partner: string;
|
|
17
|
+
partnerCharacter?: string;
|
|
18
|
+
startedAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DialogueExchange {
|
|
21
|
+
number: number;
|
|
22
|
+
timestamp: string;
|
|
23
|
+
leader: string;
|
|
24
|
+
partner: string;
|
|
25
|
+
question: string;
|
|
26
|
+
recommendation: string;
|
|
27
|
+
confidence: string;
|
|
28
|
+
outcome?: Outcome;
|
|
29
|
+
outcomeNote?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface DialogueResult {
|
|
32
|
+
success: boolean;
|
|
33
|
+
data?: Record<string, unknown>;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
interface ArchiveParams {
|
|
37
|
+
dialoguePath: string;
|
|
38
|
+
archiveDir: string;
|
|
39
|
+
jiraKey?: string;
|
|
40
|
+
storyId?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create initial dialogue file content with header and empty summary.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createDialogueContent(header: DialogueHeader): string;
|
|
46
|
+
/**
|
|
47
|
+
* Format a single exchange as markdown block.
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatExchange(exchange: DialogueExchange): string;
|
|
50
|
+
/**
|
|
51
|
+
* Parse exchanges from dialogue file content.
|
|
52
|
+
*/
|
|
53
|
+
export declare function parseDialogueExchanges(content: string): DialogueExchange[];
|
|
54
|
+
/**
|
|
55
|
+
* Generate summary markdown section from exchanges.
|
|
56
|
+
*/
|
|
57
|
+
export declare function generateSummary(exchanges: DialogueExchange[], startedAt: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Append an exchange to a dialogue file. Creates the file if missing.
|
|
60
|
+
*/
|
|
61
|
+
export declare function appendExchangeToFile(dialoguePath: string, exchange: DialogueExchange, header?: DialogueHeader): Promise<DialogueResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Update the outcome of a specific exchange in the dialogue file.
|
|
64
|
+
*/
|
|
65
|
+
export declare function updateOutcomeInFile(dialoguePath: string, exchangeNum: number, outcome: Outcome, note?: string): Promise<DialogueResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Regenerate the summary section in an existing dialogue file.
|
|
68
|
+
*/
|
|
69
|
+
export declare function refreshSummary(dialoguePath: string): Promise<DialogueResult>;
|
|
70
|
+
/**
|
|
71
|
+
* Copy dialogue file to archive directory.
|
|
72
|
+
*/
|
|
73
|
+
export declare function archiveDialogue(params: ArchiveParams): Promise<DialogueResult>;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=dialogue-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|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GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAuG1E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BxF;AAMD;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,cAAc,CAAC,CA6BzB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,CAAC,CAsCzB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CA6BlF;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAoBpF"}
|
|
@@ -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,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA2C7B,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AACzC,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAC9C,MAAM,YAAY,GAAG,gDAAgD,CAAC;AACtE,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAC9D,MAAM,aAAa,GAAG,8BAA8B,CAAC;AAErD,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe;QACxC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,eAAe,GAAG;QAChD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IAClB,MAAM,YAAY,GAAG,MAAM,CAAC,gBAAgB;QAC1C,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,gBAAgB,GAAG;QAClD,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;IAEnB,OAAO,sBAAsB,MAAM,CAAC,OAAO;;gBAE7B,MAAM,CAAC,QAAQ;cACjB,WAAW,mBAAmB,YAAY;eACzC,MAAM,CAAC,SAAS;;;;EAI7B,cAAc;;;;CAIf,CAAC;AACF,CAAC;AAED;;GAEG;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AS,SAAS,CAAC,SAAiB;IAClC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,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"}
|