@pennyfarthing/core 7.8.2 → 7.9.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 +1 -1
- package/package.json +1 -1
- package/packages/core/dist/cli/commands/init.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/init.js +8 -7
- package/packages/core/dist/cli/commands/init.js.map +1 -1
- package/packages/core/dist/cli/cyclist-migration.test.js +16 -13
- package/packages/core/dist/cli/cyclist-migration.test.js.map +1 -1
- package/packages/core/dist/cli/utils/files.d.ts +5 -4
- package/packages/core/dist/cli/utils/files.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/files.js +8 -6
- package/packages/core/dist/cli/utils/files.js.map +1 -1
- package/packages/core/dist/cli/utils/symlinks.d.ts +7 -0
- package/packages/core/dist/cli/utils/symlinks.d.ts.map +1 -1
- package/packages/core/dist/cli/utils/symlinks.js +25 -0
- package/packages/core/dist/cli/utils/symlinks.js.map +1 -1
- package/packages/core/dist/cli/utils/themes.d.ts +1 -1
- package/packages/core/dist/cli/utils/themes.d.ts.map +1 -1
- package/packages/core/dist/scripts/run-ci.test.js +1 -1
- package/packages/core/dist/scripts/run-ci.test.js.map +1 -1
- package/pennyfarthing-dist/agents/README.md +25 -17
- package/pennyfarthing-dist/agents/architect.md +3 -11
- package/pennyfarthing-dist/agents/dev.md +2 -2
- package/pennyfarthing-dist/agents/devops.md +3 -11
- package/pennyfarthing-dist/agents/handoff.md +4 -4
- package/pennyfarthing-dist/agents/orchestrator.md +2 -4
- package/pennyfarthing-dist/agents/pm.md +4 -11
- package/pennyfarthing-dist/agents/reviewer-preflight.md +4 -3
- package/pennyfarthing-dist/agents/reviewer.md +2 -8
- package/pennyfarthing-dist/agents/sm-handoff.md +3 -3
- package/pennyfarthing-dist/agents/sm-setup.md +1 -1
- package/pennyfarthing-dist/agents/sm.md +5 -29
- package/pennyfarthing-dist/agents/tea.md +2 -2
- package/pennyfarthing-dist/agents/tech-writer.md +3 -12
- package/pennyfarthing-dist/agents/testing-runner.md +8 -8
- package/pennyfarthing-dist/agents/ux-designer.md +3 -12
- package/pennyfarthing-dist/commands/git-cleanup.md +29 -53
- package/pennyfarthing-dist/commands/party-mode.md +20 -10
- package/pennyfarthing-dist/commands/work.md +6 -105
- package/pennyfarthing-dist/guides/agent-behavior.md +19 -7
- package/pennyfarthing-dist/personas/themes/1984.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/a-team.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/agatha-christie.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/alice-in-wonderland.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/all-stars.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/ancient-philosophers.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/ancient-strategists.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/arcane.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/arthurian-mythos.yaml +0 -13
- package/pennyfarthing-dist/personas/themes/avatar-the-last-airbender.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/babylon-5.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/better-call-saul.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/big-lebowski.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/black-sails.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/blade-runner.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/bobiverse.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/breaking-bad.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/catch-22.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/classical-composers.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/count-of-monte-cristo.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/cowboy-bebop.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/deadwood.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/dickens.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/discworld.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/doctor-who.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/don-quixote.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/dune.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/enlightenment-thinkers.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/expeditionary-force.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/fargo.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/film-auteurs.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/firefly.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/foundation.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/futurama.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/gothic-literature.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/great-gatsby.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/greek-mythology.yaml +0 -13
- package/pennyfarthing-dist/personas/themes/hannibal.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/harry-potter.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/his-dark-materials.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/historical-figures.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/house-md.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/imperial-radch.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/inspector-morse.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/jane-austen.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/jazz-legends.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/justified.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/legion-of-doom.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/les-miserables.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/lord-of-the-rings.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/lovecraft-mythos.yaml +0 -13
- package/pennyfarthing-dist/personas/themes/mad-max.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/mad-men.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/marvel-mcu.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/mash.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/mass-effect.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/military-commanders.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/moby-dick.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/monty-python.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/neuromancer.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/norse-mythology.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/parks-and-rec.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/peaky-blinders.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/princess-bride.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/renaissance-masters.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/rome.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/russian-masters.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/sandman.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/scientific-revolutionaries.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/shakespeare.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/sherlock-holmes.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/snow-crash.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/software-pioneers.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/star-trek-tng.yaml +0 -11
- package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/star-wars.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/succession.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/superfriends.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/ted-lasso.yaml +0 -11
- package/pennyfarthing-dist/personas/themes/the-americans.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/the-crown.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/the-expanse.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/the-good-place.yaml +0 -11
- package/pennyfarthing-dist/personas/themes/the-matrix.yaml +0 -15
- package/pennyfarthing-dist/personas/themes/the-odyssey.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/the-office.yaml +0 -11
- package/pennyfarthing-dist/personas/themes/the-simpsons.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/the-sopranos.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/the-wire.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/the-witcher.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/twin-peaks.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/vorkosigan-saga.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/watchmen.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/west-wing.yaml +0 -10
- package/pennyfarthing-dist/personas/themes/world-explorers.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/wwii-leaders.yaml +0 -12
- package/pennyfarthing-dist/personas/themes/x-files.yaml +0 -10
- package/pennyfarthing-dist/scripts/core/agent-session.sh +13 -14
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +1 -1
- package/pennyfarthing-dist/scripts/core/prime.sh +17 -2
- package/pennyfarthing-dist/scripts/core/run.sh +5 -5
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +2 -2
- package/pennyfarthing-dist/scripts/git/release.sh +2 -2
- package/pennyfarthing-dist/scripts/health/drift-detection.sh +1 -1
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +2 -2
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +2 -2
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +1 -1
- package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +1 -1
- package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +1 -1
- package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +1 -1
- package/pennyfarthing-dist/scripts/lib/common.sh +1 -1
- package/pennyfarthing-dist/scripts/lib/find-root.sh +4 -4
- package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +102 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +1 -1
- package/pennyfarthing-dist/scripts/misc/add_short_names.py +2 -2
- package/pennyfarthing-dist/scripts/misc/backlog.sh +2 -2
- package/pennyfarthing-dist/scripts/misc/deploy.sh +2 -2
- package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +4 -4
- package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +2 -2
- package/pennyfarthing-dist/scripts/misc/run-ci.sh +1 -1
- package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +2 -2
- package/pennyfarthing-dist/scripts/sprint/archive-story.sh +6 -2
- package/pennyfarthing-dist/scripts/sprint/available-stories.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/check-story.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/get-epic-field.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/get-story-field.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/import_epic_to_future.py +2 -2
- package/pennyfarthing-dist/scripts/sprint/list-future.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/new-sprint.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/promote-epic.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/sprint-common.sh +3 -3
- package/pennyfarthing-dist/scripts/sprint/sprint-info.sh +1 -1
- package/pennyfarthing-dist/scripts/sprint/sprint-metrics.sh +2 -2
- package/pennyfarthing-dist/scripts/theme/compute_theme_tiers.py +2 -2
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +3 -2
- package/pennyfarthing-dist/scripts/workflow/check.py +2 -2
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +2 -2
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +1 -1
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +1 -1
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-01-analyze.md +18 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-03-execute.md +18 -4
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +13 -5
- package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/client.py +1 -1
- package/pennyfarthing_scripts/prime/__init__.py +98 -11
- 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__/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__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/cli.py +208 -53
- package/pennyfarthing_scripts/prime/models.py +169 -0
- package/pennyfarthing_scripts/prime/persona.py +288 -0
- package/pennyfarthing_scripts/prime/session.py +183 -0
- package/pennyfarthing_scripts/prime/workflow.py +275 -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_prime.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/test_prime.py +653 -0
|
@@ -9,7 +9,7 @@ set -euo pipefail
|
|
|
9
9
|
# PROJECT_ROOT should be set by run.sh, but find it if not
|
|
10
10
|
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
11
11
|
d="$PWD"
|
|
12
|
-
while [[ ! -d "$d/.
|
|
12
|
+
while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
|
|
13
13
|
d="$(dirname "$d")"
|
|
14
14
|
done
|
|
15
15
|
PROJECT_ROOT="$d"
|
|
@@ -11,7 +11,7 @@ set -euo pipefail
|
|
|
11
11
|
# PROJECT_ROOT should be set by run.sh, but find it if not
|
|
12
12
|
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
13
13
|
d="$PWD"
|
|
14
|
-
while [[ ! -d "$d/.
|
|
14
|
+
while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
|
|
15
15
|
d="$(dirname "$d")"
|
|
16
16
|
done
|
|
17
17
|
PROJECT_ROOT="$d"
|
|
@@ -10,7 +10,7 @@ set -euo pipefail
|
|
|
10
10
|
# PROJECT_ROOT should be set by run.sh, but find it if not
|
|
11
11
|
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
12
12
|
d="$PWD"
|
|
13
|
-
while [[ ! -d "$d/.
|
|
13
|
+
while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
|
|
14
14
|
d="$(dirname "$d")"
|
|
15
15
|
done
|
|
16
16
|
PROJECT_ROOT="$d"
|
|
@@ -9,7 +9,7 @@ set -euo pipefail
|
|
|
9
9
|
# PROJECT_ROOT should be set by run.sh, but find it if not
|
|
10
10
|
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
11
11
|
d="$PWD"
|
|
12
|
-
while [[ ! -d "$d/.
|
|
12
|
+
while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
|
|
13
13
|
d="$(dirname "$d")"
|
|
14
14
|
done
|
|
15
15
|
PROJECT_ROOT="$d"
|
|
@@ -12,6 +12,24 @@ Build a complete picture of:
|
|
|
12
12
|
|
|
13
13
|
## Execution
|
|
14
14
|
|
|
15
|
+
### 1.0 Check Stash (CRITICAL - DO THIS FIRST)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
echo "=== Stash Status (CRITICAL) ==="
|
|
19
|
+
git stash list
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**If stash has ANY entries:**
|
|
23
|
+
1. Show the stash contents to user
|
|
24
|
+
2. Ask: "Stash contains saved work. Clear it completely before proceeding?"
|
|
25
|
+
3. If user agrees: `git stash clear`
|
|
26
|
+
4. If user declines: **STOP** - do not proceed with cleanup
|
|
27
|
+
|
|
28
|
+
**This prevents:**
|
|
29
|
+
- Losing work that was stashed from a previous interrupted cleanup
|
|
30
|
+
- Confusion about what changes belong to what
|
|
31
|
+
- Accidentally clearing someone else's stashed work
|
|
32
|
+
|
|
15
33
|
### 1.1 Gather Git Status (All Repos)
|
|
16
34
|
|
|
17
35
|
```bash
|
|
@@ -29,8 +29,13 @@ Execute the approved change groupings following the branch workflow:
|
|
|
29
29
|
### 3.1 Stash All Changes
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
# Stash everything to start clean
|
|
33
|
-
git stash push -m "git-cleanup-$(date +%Y%m%d-%H%M%S)"
|
|
32
|
+
# Stash everything to start clean - MARK CLEARLY
|
|
33
|
+
git stash push -m "CLEANUP-WIP: git-cleanup-$(date +%Y%m%d-%H%M%S)"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Verify stash worked:**
|
|
37
|
+
```bash
|
|
38
|
+
git stash list # Should show your CLEANUP-WIP entry
|
|
34
39
|
```
|
|
35
40
|
|
|
36
41
|
### 3.2 For Each Group
|
|
@@ -57,8 +62,8 @@ git stash pop
|
|
|
57
62
|
# Stage only files for this group
|
|
58
63
|
git add {file1} {file2} ...
|
|
59
64
|
|
|
60
|
-
# Re-stash remaining changes
|
|
61
|
-
git stash push -m "remaining
|
|
65
|
+
# Re-stash remaining changes - MARK CLEARLY
|
|
66
|
+
git stash push -m "CLEANUP-WIP: remaining changes"
|
|
62
67
|
```
|
|
63
68
|
|
|
64
69
|
#### Show Diff for Verification
|
|
@@ -187,6 +192,15 @@ If a commit fails:
|
|
|
187
192
|
2. **Merge conflict**: Report to user, offer to abort or resolve
|
|
188
193
|
3. **Test failure**: Report which tests failed, offer to proceed or abort
|
|
189
194
|
|
|
195
|
+
**CRITICAL: Before panicking about lost work, CHECK STASH:**
|
|
196
|
+
```bash
|
|
197
|
+
git stash list # Work is probably here!
|
|
198
|
+
git stash show -p stash@{0} # See what's in it
|
|
199
|
+
git stash pop # Restore it
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
When a pre-commit hook blocks a commit, staged changes may be auto-stashed. Always check.
|
|
203
|
+
|
|
190
204
|
## Output
|
|
191
205
|
|
|
192
206
|
After all groups processed:
|
|
@@ -38,18 +38,26 @@ Run periodically to clean up merged branches:
|
|
|
38
38
|
git branch --merged develop | grep -v "develop\|main" | xargs -r git branch -d
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
### Stash
|
|
41
|
+
### Stash Verification (MANDATORY)
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
**Before completing, verify stash is empty:**
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
# View stashes
|
|
47
46
|
git stash list
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**If stash has entries:**
|
|
50
|
+
- If CLEANUP-WIP entries: These are leftover from this session - pop or clear them
|
|
51
|
+
- If other entries: Ask user before clearing
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
**Clear stash completely when done:**
|
|
54
|
+
```bash
|
|
55
|
+
# After confirming with user
|
|
56
|
+
git stash clear
|
|
51
57
|
```
|
|
52
58
|
|
|
59
|
+
**Why this matters:** Leftover stash entries cause confusion in future cleanups and can lead to lost work if forgotten.
|
|
60
|
+
|
|
53
61
|
## Quick Re-run
|
|
54
62
|
|
|
55
63
|
To run git-cleanup again:
|
|
Binary file
|
|
Binary file
|
|
@@ -123,7 +123,7 @@ def get_issue(issue_key: str) -> dict[str, Any] | None:
|
|
|
123
123
|
return None
|
|
124
124
|
|
|
125
125
|
result = subprocess.run(
|
|
126
|
-
["jira", "issue", "view", issue_key, "--
|
|
126
|
+
["jira", "issue", "view", issue_key, "--raw"],
|
|
127
127
|
capture_output=True,
|
|
128
128
|
text=True,
|
|
129
129
|
)
|
|
@@ -1,22 +1,48 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Prime -
|
|
2
|
+
Prime - Unified agent bootstrap for Pennyfarthing.
|
|
3
3
|
|
|
4
|
-
This module provides context loading for Pennyfarthing agents,
|
|
5
|
-
|
|
4
|
+
This module provides context loading and state detection for Pennyfarthing agents,
|
|
5
|
+
consolidating agent-session.sh, prime.sh, and workflow-status-check into a single
|
|
6
|
+
Python entry point.
|
|
6
7
|
|
|
7
8
|
Usage:
|
|
8
|
-
python -m pennyfarthing_scripts.prime [--agent <name>] [--
|
|
9
|
+
python -m pennyfarthing_scripts.prime [--agent <name>] [--json] [--minimal] [--full]
|
|
9
10
|
|
|
10
11
|
Public API:
|
|
11
12
|
prime() - Load and print context (main entry point)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
|
|
14
|
+
Context Loaders:
|
|
15
|
+
load_agent_definition() - Load agent markdown
|
|
16
|
+
load_behavior_guide() - Load shared behavior guide
|
|
17
|
+
load_sprint_context() - Load sprint summary
|
|
18
|
+
load_session_context() - Load active session header and assessment
|
|
19
|
+
load_sidecars() - Load agent-specific patterns, gotchas, decisions
|
|
20
|
+
load_domain_docs() - Load domain documentation (--full only)
|
|
21
|
+
|
|
22
|
+
Workflow Detection:
|
|
23
|
+
detect_workflow_state() - Detect FINISH/IN_PROGRESS/NEW_WORK/EMPTY_BACKLOG state
|
|
24
|
+
check_redirect() - Check if agent should redirect to another
|
|
25
|
+
|
|
26
|
+
Persona Loading:
|
|
27
|
+
load_persona() - Load agent persona from theme
|
|
28
|
+
get_crew_manifest() - Get all agent characters for handoff reference
|
|
29
|
+
format_persona_output() - Format persona as XML for Claude
|
|
30
|
+
is_character_voice_enabled() - Check if character voice is enabled
|
|
31
|
+
|
|
32
|
+
Session Management:
|
|
33
|
+
register_session() - Register agent session
|
|
34
|
+
cleanup_old_sessions() - Remove stale sessions
|
|
35
|
+
get_session_agent() - Get agent name for session
|
|
36
|
+
unregister_session() - Remove session
|
|
37
|
+
|
|
38
|
+
Models:
|
|
39
|
+
WorkflowState - Enum of workflow states
|
|
40
|
+
WorkflowStatus - Workflow detection result
|
|
41
|
+
Persona - Agent persona data
|
|
42
|
+
PrimeResult - Complete prime result for JSON output
|
|
18
43
|
"""
|
|
19
44
|
|
|
45
|
+
from pennyfarthing_scripts.prime.cli import prime
|
|
20
46
|
from pennyfarthing_scripts.prime.loader import (
|
|
21
47
|
load_agent_definition,
|
|
22
48
|
load_behavior_guide,
|
|
@@ -25,14 +51,75 @@ from pennyfarthing_scripts.prime.loader import (
|
|
|
25
51
|
load_sidecars,
|
|
26
52
|
load_sprint_context,
|
|
27
53
|
)
|
|
28
|
-
from pennyfarthing_scripts.prime.
|
|
54
|
+
from pennyfarthing_scripts.prime.models import (
|
|
55
|
+
CrewMember,
|
|
56
|
+
Persona,
|
|
57
|
+
PrimeResult,
|
|
58
|
+
SessionInfo,
|
|
59
|
+
WorkflowState,
|
|
60
|
+
WorkflowStatus,
|
|
61
|
+
)
|
|
62
|
+
from pennyfarthing_scripts.prime.persona import (
|
|
63
|
+
format_persona_output,
|
|
64
|
+
get_crew_manifest,
|
|
65
|
+
get_current_theme,
|
|
66
|
+
get_user_title,
|
|
67
|
+
is_character_voice_enabled,
|
|
68
|
+
load_persona,
|
|
69
|
+
load_theme,
|
|
70
|
+
)
|
|
71
|
+
from pennyfarthing_scripts.prime.session import (
|
|
72
|
+
cleanup_old_sessions,
|
|
73
|
+
get_session_agent,
|
|
74
|
+
list_sessions,
|
|
75
|
+
register_session,
|
|
76
|
+
unregister_session,
|
|
77
|
+
)
|
|
78
|
+
from pennyfarthing_scripts.prime.workflow import (
|
|
79
|
+
check_redirect,
|
|
80
|
+
detect_workflow_state,
|
|
81
|
+
find_active_session,
|
|
82
|
+
get_backlog_count,
|
|
83
|
+
get_phase_owner,
|
|
84
|
+
parse_session_header,
|
|
85
|
+
)
|
|
29
86
|
|
|
30
87
|
__all__ = [
|
|
88
|
+
# Main entry point
|
|
31
89
|
"prime",
|
|
90
|
+
# Context loaders
|
|
32
91
|
"load_agent_definition",
|
|
33
92
|
"load_behavior_guide",
|
|
34
93
|
"load_sprint_context",
|
|
35
94
|
"load_session_context",
|
|
36
95
|
"load_sidecars",
|
|
37
96
|
"load_domain_docs",
|
|
97
|
+
# Workflow detection
|
|
98
|
+
"detect_workflow_state",
|
|
99
|
+
"check_redirect",
|
|
100
|
+
"find_active_session",
|
|
101
|
+
"parse_session_header",
|
|
102
|
+
"get_phase_owner",
|
|
103
|
+
"get_backlog_count",
|
|
104
|
+
# Persona loading
|
|
105
|
+
"load_persona",
|
|
106
|
+
"load_theme",
|
|
107
|
+
"get_current_theme",
|
|
108
|
+
"get_crew_manifest",
|
|
109
|
+
"get_user_title",
|
|
110
|
+
"format_persona_output",
|
|
111
|
+
"is_character_voice_enabled",
|
|
112
|
+
# Session management
|
|
113
|
+
"register_session",
|
|
114
|
+
"cleanup_old_sessions",
|
|
115
|
+
"get_session_agent",
|
|
116
|
+
"unregister_session",
|
|
117
|
+
"list_sessions",
|
|
118
|
+
# Models
|
|
119
|
+
"WorkflowState",
|
|
120
|
+
"WorkflowStatus",
|
|
121
|
+
"Persona",
|
|
122
|
+
"PrimeResult",
|
|
123
|
+
"CrewMember",
|
|
124
|
+
"SessionInfo",
|
|
38
125
|
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|