@pennyfarthing/core 11.1.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.
Files changed (128) hide show
  1. package/README.md +1 -1
  2. package/package.json +16 -14
  3. package/packages/core/dist/cli/utils/constants.d.ts +1 -1
  4. package/packages/core/dist/cli/utils/constants.d.ts.map +1 -1
  5. package/packages/core/dist/cli/utils/constants.js +2 -1
  6. package/packages/core/dist/cli/utils/constants.js.map +1 -1
  7. package/packages/core/dist/consultation/dialogue-manager.d.ts +75 -0
  8. package/packages/core/dist/consultation/dialogue-manager.d.ts.map +1 -0
  9. package/packages/core/dist/consultation/dialogue-manager.js +334 -0
  10. package/packages/core/dist/consultation/dialogue-manager.js.map +1 -0
  11. package/packages/core/dist/consultation/dialogue-manager.test.d.ts +19 -0
  12. package/packages/core/dist/consultation/dialogue-manager.test.d.ts.map +1 -0
  13. package/packages/core/dist/consultation/dialogue-manager.test.js +444 -0
  14. package/packages/core/dist/consultation/dialogue-manager.test.js.map +1 -0
  15. package/packages/core/dist/server/api/git.d.ts +13 -1
  16. package/packages/core/dist/server/api/git.d.ts.map +1 -1
  17. package/packages/core/dist/server/api/git.js +53 -34
  18. package/packages/core/dist/server/api/git.js.map +1 -1
  19. package/packages/core/dist/shared/skill-search.test.js +2 -2
  20. package/pennyfarthing-dist/scripts/core/agent-session.sh +0 -0
  21. package/pennyfarthing-dist/scripts/core/check-context.sh +0 -0
  22. package/pennyfarthing-dist/scripts/core/dialogue-manager.sh +322 -0
  23. package/pennyfarthing-dist/scripts/core/phase-check-start.sh +0 -0
  24. package/pennyfarthing-dist/scripts/core/prime.sh +0 -0
  25. package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +0 -0
  26. package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +0 -0
  27. package/pennyfarthing-dist/scripts/git/git-status-all.sh +0 -0
  28. package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +0 -0
  29. package/pennyfarthing-dist/scripts/git/release.sh +0 -0
  30. package/pennyfarthing-dist/scripts/git/worktree-manager.sh +0 -0
  31. package/pennyfarthing-dist/scripts/health/drift-detection.sh +0 -0
  32. package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +0 -0
  33. package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +0 -0
  34. package/pennyfarthing-dist/scripts/hooks/context-warning.sh +0 -0
  35. package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +0 -0
  36. package/pennyfarthing-dist/scripts/hooks/dispatcher-template.sh +0 -0
  37. package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +0 -0
  38. package/pennyfarthing-dist/scripts/hooks/post-merge.sh +0 -0
  39. package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +0 -0
  40. package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +0 -0
  41. package/pennyfarthing-dist/scripts/hooks/pre-push.sh +0 -0
  42. package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +0 -0
  43. package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +0 -0
  44. package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +0 -0
  45. package/pennyfarthing-dist/scripts/hooks/session-start.sh +0 -0
  46. package/pennyfarthing-dist/scripts/hooks/session-stop.sh +0 -0
  47. package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +0 -0
  48. package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +0 -0
  49. package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +0 -0
  50. package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +0 -0
  51. package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +0 -0
  52. package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +0 -0
  53. package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +0 -0
  54. package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +0 -0
  55. package/pennyfarthing-dist/scripts/lib/background-tasks.sh +0 -0
  56. package/pennyfarthing-dist/scripts/lib/checkpoint.sh +0 -0
  57. package/pennyfarthing-dist/scripts/lib/common.sh +0 -0
  58. package/pennyfarthing-dist/scripts/lib/file-lock.sh +0 -0
  59. package/pennyfarthing-dist/scripts/lib/logging.sh +0 -0
  60. package/pennyfarthing-dist/scripts/lib/retry.sh +0 -0
  61. package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +0 -0
  62. package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +0 -0
  63. package/pennyfarthing-dist/scripts/misc/add-short-names.sh +0 -0
  64. package/pennyfarthing-dist/scripts/misc/add_short_names.py +0 -0
  65. package/pennyfarthing-dist/scripts/misc/backlog.sh +0 -0
  66. package/pennyfarthing-dist/scripts/misc/check-status.sh +0 -0
  67. package/pennyfarthing-dist/scripts/misc/find-related-work.sh +0 -0
  68. package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +0 -0
  69. package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +0 -0
  70. package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +0 -0
  71. package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +0 -0
  72. package/pennyfarthing-dist/scripts/misc/repo-scan.sh +0 -0
  73. package/pennyfarthing-dist/scripts/misc/repo-utils.sh +0 -0
  74. package/pennyfarthing-dist/scripts/misc/run-ci.sh +0 -0
  75. package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +0 -0
  76. package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +0 -0
  77. package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +0 -0
  78. package/pennyfarthing-dist/scripts/misc/statusline.sh +0 -0
  79. package/pennyfarthing-dist/scripts/misc/uninstall.sh +0 -0
  80. package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +0 -0
  81. package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +0 -0
  82. package/pennyfarthing-dist/scripts/story/create-story.sh +0 -0
  83. package/pennyfarthing-dist/scripts/story/size-story.sh +0 -0
  84. package/pennyfarthing-dist/scripts/story/story-template.sh +0 -0
  85. package/pennyfarthing-dist/scripts/tests/check.test.sh +0 -0
  86. package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +0 -0
  87. package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +0 -0
  88. package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +0 -0
  89. package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +0 -0
  90. package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +0 -0
  91. package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +0 -0
  92. package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +0 -0
  93. package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +0 -0
  94. package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +0 -0
  95. package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +0 -0
  96. package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +0 -0
  97. package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +0 -0
  98. package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +0 -0
  99. package/pennyfarthing-dist/scripts/theme/list-themes.sh +0 -0
  100. package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +0 -0
  101. package/pennyfarthing-dist/scripts/workflow/check.py +0 -0
  102. package/pennyfarthing-dist/scripts/workflow/check.sh +0 -0
  103. package/pennyfarthing-dist/scripts/workflow/complete-step.py +0 -0
  104. package/pennyfarthing-dist/scripts/workflow/finish-story.sh +0 -0
  105. package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +0 -0
  106. package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +0 -0
  107. package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +0 -0
  108. package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +0 -0
  109. package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +0 -0
  110. package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +0 -0
  111. package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +0 -0
  112. package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +0 -0
  113. package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +0 -0
  114. package/pennyfarthing-dist/skills/pf-story/scripts/create-story.sh +0 -0
  115. package/pennyfarthing-dist/skills/pf-story/scripts/size-story.sh +0 -0
  116. package/pennyfarthing-dist/skills/pf-story/scripts/story-template.sh +0 -0
  117. package/pennyfarthing-dist/skills/pf-workflow/scripts/list-workflows.sh +0 -0
  118. package/pennyfarthing-dist/skills/pf-workflow/scripts/resume-workflow.sh +0 -0
  119. package/pennyfarthing-dist/skills/pf-workflow/scripts/show-workflow.sh +0 -0
  120. package/pennyfarthing-dist/skills/pf-workflow/scripts/start-workflow.sh +0 -0
  121. package/pennyfarthing-dist/skills/pf-workflow/scripts/workflow-status.sh +0 -0
  122. package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
  123. package/pennyfarthing_scripts/bikerack/__pycache__/cli.cpython-314.pyc +0 -0
  124. package/pennyfarthing_scripts/bikerack/cli.py +10 -11
  125. package/pennyfarthing_scripts/hooks/cyclist-pretooluse-hook.sh +0 -0
  126. package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
  127. package/pennyfarthing_scripts/sprint/story_finish.py +14 -0
  128. package/scripts/README.md +41 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -64,12 +64,12 @@ def start(project_dir, dry_run):
64
64
 
65
65
  running, pid, port = is_already_running(project_dir)
66
66
  if running:
67
- click.echo(
68
- f"Error: BikeRack is already running (PID {pid}, port {port})",
69
- err=True,
70
- )
71
- click.echo("Use 'pf bikerack stop' to stop it.", err=True)
72
- sys.exit(2)
67
+ # Idempotent: WheelHub already up, just exec Claude with OTEL env
68
+ click.echo(f"BikeRack already running (PID {pid}, port {port})")
69
+ otel_env = build_otel_env(port)
70
+ click.echo(f"Dashboard: http://localhost:{port}/bikerack")
71
+ click.echo("Starting Claude CLI...")
72
+ exec_claude(otel_env, project_dir)
73
73
 
74
74
  click.echo("Starting BikeRack mode...")
75
75
  try:
@@ -116,11 +116,10 @@ def stop(project_dir, dry_run):
116
116
 
117
117
  result = stop_bikerack(project_dir)
118
118
 
119
- if result["success"]:
120
- click.echo(result["message"])
121
- else:
122
- click.echo(result["message"], err=True)
123
- sys.exit(1)
119
+ click.echo(result["message"])
120
+ if not result["success"]:
121
+ # "Not running" is not an error for stop — idempotent
122
+ sys.exit(0)
124
123
 
125
124
 
126
125
  @bikerack.command()
@@ -126,8 +126,16 @@ def finish_story(
126
126
  steps: list[dict[str, Any]] = []
127
127
  archive_name = f"{jira_key}-session.md" if jira_key else f"{story_id}-session.md"
128
128
 
129
+ # Check for dialogue file
130
+ dialogue_path = project_root / ".session" / f"{story_id}-dialogue.md"
131
+ dialogue_archive_name = (
132
+ f"{jira_key}-dialogue.md" if jira_key else f"{story_id}-dialogue.md"
133
+ )
134
+
129
135
  if dry_run:
130
136
  steps.append({"step": 1, "action": f"Archive session → {archive_dir / archive_name}"})
137
+ if dialogue_path.exists():
138
+ steps.append({"step": "1b", "action": f"Archive dialogue → {archive_dir / dialogue_archive_name}"})
131
139
  if pr_number:
132
140
  steps.append({"step": 2, "action": f"Merge PR #{pr_number} (squash, delete branch)"})
133
141
  else:
@@ -147,6 +155,12 @@ def finish_story(
147
155
  shutil.copy2(session_path, archive_dest)
148
156
  steps.append({"step": 1, "action": "archive_session", "dest": str(archive_dest)})
149
157
 
158
+ # --- Step 1b: Archive dialogue (if exists) ---
159
+ if dialogue_path.exists():
160
+ dialogue_dest = archive_dir / dialogue_archive_name
161
+ shutil.copy2(dialogue_path, dialogue_dest)
162
+ steps.append({"step": "1b", "action": "archive_dialogue", "dest": str(dialogue_dest)})
163
+
150
164
  # --- Step 2: Merge PR ---
151
165
  if pr_number:
152
166
  result = _run(["gh", "pr", "merge", pr_number, "--squash", "--delete-branch"])
@@ -0,0 +1,41 @@
1
+ # Meta Scripts
2
+
3
+ **These scripts are NOT distributed to users.** They are for Pennyfarthing framework development only.
4
+
5
+ ## Contents
6
+
7
+ | Script | Purpose |
8
+ |--------|---------|
9
+ | `deploy.sh` | Release Pennyfarthing (version bump, tag, push, GitHub release) |
10
+ | `cyclist-debug.mjs` | Debug Cyclist connection |
11
+ | `handoff-cli.{sh,js}` | Test handoff flow |
12
+ | `verify-visual-mapping.js` | Verify theme visual mappings |
13
+ | `migrate-assets-to-slug.sh` | One-time migration script |
14
+ | `resize-portraits.sh` | Resize portrait images |
15
+ | `resolve-portrait.mjs` | Portrait resolution logic |
16
+ | `validate-refs.js` | Validate internal references |
17
+
18
+ > Benchmark scripts have been moved to `packages/benchmark/`.
19
+
20
+ ## Usage
21
+
22
+ Run from pennyfarthing repo root:
23
+
24
+ ```bash
25
+ # Release a new version
26
+ ./scripts/deploy.sh --dry-run patch
27
+ ./scripts/deploy.sh patch
28
+ ```
29
+
30
+ ## Where Should My Script Go?
31
+
32
+ **Put it here if:**
33
+ - It's for framework development/CI only
34
+ - Users should NOT have access to it
35
+ - It uses GPU/heavy dependencies (keep in meta, not distributed)
36
+
37
+ **Put it in `pennyfarthing-dist/scripts/` if:**
38
+ - Users need it for their workflows
39
+ - It's part of the sprint/story/jira tooling
40
+
41
+ See `CLAUDE.md` for the full decision tree.