@pennyfarthing/core 7.9.3 → 8.0.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/LICENSE +14 -0
- package/README.md +209 -0
- package/package.json +32 -37
- package/packages/core/dist/cli/utils/files.d.ts +76 -0
- package/packages/core/dist/cli/utils/files.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/files.js +172 -0
- package/packages/core/dist/cli/utils/files.js.map +1 -0
- package/packages/core/dist/cli/workspace.test.js +158 -0
- package/packages/core/dist/cli/workspace.test.js.map +1 -0
- package/pennyfarthing-dist/agents/README.md +348 -0
- package/pennyfarthing-dist/agents/architect.md +180 -0
- package/pennyfarthing-dist/agents/dev.md +169 -0
- package/pennyfarthing-dist/agents/devops.md +203 -0
- package/pennyfarthing-dist/agents/handoff.md +235 -0
- package/pennyfarthing-dist/agents/orchestrator.md +182 -0
- package/pennyfarthing-dist/agents/pm.md +152 -0
- package/pennyfarthing-dist/agents/reviewer-preflight.md +129 -0
- package/pennyfarthing-dist/agents/reviewer.md +180 -0
- package/pennyfarthing-dist/agents/sm-file-summary.md +79 -0
- package/pennyfarthing-dist/agents/sm-finish.md +82 -0
- package/pennyfarthing-dist/agents/sm-handoff.md +129 -0
- package/pennyfarthing-dist/agents/sm-setup.md +251 -0
- package/pennyfarthing-dist/agents/sm.md +284 -0
- package/pennyfarthing-dist/agents/tea.md +161 -0
- package/pennyfarthing-dist/agents/tech-writer.md +226 -0
- package/pennyfarthing-dist/agents/testing-runner.md +184 -0
- package/pennyfarthing-dist/agents/ux-designer.md +236 -0
- package/pennyfarthing-dist/agents/workflow-status-check.md +96 -0
- package/pennyfarthing-dist/commands/architect.md +7 -0
- package/pennyfarthing-dist/commands/benchmark-control.md +69 -0
- package/pennyfarthing-dist/commands/benchmark.md +485 -0
- package/pennyfarthing-dist/commands/brainstorming.md +91 -0
- package/pennyfarthing-dist/commands/check.md +156 -0
- package/pennyfarthing-dist/commands/chore.md +178 -0
- package/pennyfarthing-dist/commands/close-epic.md +139 -0
- package/pennyfarthing-dist/commands/continue-session.md +184 -0
- package/pennyfarthing-dist/commands/create-branches-from-story.md +358 -0
- package/pennyfarthing-dist/commands/create-theme.md +29 -0
- package/pennyfarthing-dist/commands/dev.md +7 -0
- package/pennyfarthing-dist/commands/devops.md +7 -0
- package/pennyfarthing-dist/commands/git-cleanup.md +51 -0
- package/pennyfarthing-dist/commands/health-check.md +141 -0
- package/pennyfarthing-dist/commands/help.md +264 -0
- package/pennyfarthing-dist/commands/job-fair.md +102 -0
- package/pennyfarthing-dist/commands/list-themes.md +21 -0
- package/pennyfarthing-dist/commands/orchestrator.md +7 -0
- package/pennyfarthing-dist/commands/parallel-work.md +71 -0
- package/pennyfarthing-dist/commands/party-mode.md +77 -0
- package/pennyfarthing-dist/commands/permissions.md +193 -0
- package/pennyfarthing-dist/commands/pm.md +7 -0
- package/pennyfarthing-dist/commands/prime.md +140 -0
- package/pennyfarthing-dist/commands/release.md +58 -0
- package/pennyfarthing-dist/commands/repo-status.md +49 -0
- package/pennyfarthing-dist/commands/retro.md +200 -0
- package/pennyfarthing-dist/commands/reviewer.md +7 -0
- package/pennyfarthing-dist/commands/run-ci.md +116 -0
- package/pennyfarthing-dist/commands/set-theme.md +56 -0
- package/pennyfarthing-dist/commands/show-theme.md +21 -0
- package/pennyfarthing-dist/commands/sm.md +7 -0
- package/pennyfarthing-dist/commands/solo.md +447 -0
- package/pennyfarthing-dist/commands/sprint-planning.md +109 -0
- package/pennyfarthing-dist/commands/sprint.md +133 -0
- package/pennyfarthing-dist/commands/standalone.md +194 -0
- package/pennyfarthing-dist/commands/start-epic.md +168 -0
- package/pennyfarthing-dist/commands/sync-epic-to-jira.md +184 -0
- package/pennyfarthing-dist/commands/sync-work-with-sprint.md +373 -0
- package/pennyfarthing-dist/commands/tea.md +7 -0
- package/pennyfarthing-dist/commands/tech-writer.md +7 -0
- package/pennyfarthing-dist/commands/theme-maker.md +676 -0
- package/pennyfarthing-dist/commands/update-domain-docs.md +83 -0
- package/pennyfarthing-dist/commands/ux-designer.md +7 -0
- package/pennyfarthing-dist/commands/work.md +23 -0
- package/pennyfarthing-dist/commands/workflow.md +21 -0
- package/pennyfarthing-dist/guides/agent-behavior.md +311 -0
- package/pennyfarthing-dist/guides/agent-coordination.md +480 -0
- package/pennyfarthing-dist/guides/agent-tag-taxonomy.md +432 -0
- package/pennyfarthing-dist/guides/agent-template-strategic.md +148 -0
- package/pennyfarthing-dist/guides/agent-template-tactical.md +162 -0
- package/pennyfarthing-dist/guides/hooks.md +230 -0
- package/pennyfarthing-dist/guides/measurement-framework.md +210 -0
- package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +766 -0
- package/pennyfarthing-dist/guides/patterns/fan-out-fan-in-pattern.md +574 -0
- package/pennyfarthing-dist/guides/patterns/helper-delegation-pattern.md +488 -0
- package/pennyfarthing-dist/guides/patterns/tdd-flow-pattern.md +402 -0
- package/pennyfarthing-dist/guides/permission-protocol.md +188 -0
- package/pennyfarthing-dist/guides/persona-loading.md +46 -0
- package/pennyfarthing-dist/guides/prompt-patterns.md +338 -0
- package/pennyfarthing-dist/guides/scale-levels.md +114 -0
- package/pennyfarthing-dist/guides/session-artifacts.md +193 -0
- package/pennyfarthing-dist/guides/workflow-schema.md +257 -0
- package/pennyfarthing-dist/guides/worktree-mode.md +113 -0
- package/pennyfarthing-dist/guides/xml-tags.md +335 -0
- package/pennyfarthing-dist/output-styles/teaching.md +33 -0
- package/pennyfarthing-dist/output-styles/terse.md +20 -0
- package/pennyfarthing-dist/output-styles/verbose.md +28 -0
- package/pennyfarthing-dist/personas/themes/1984.yaml +304 -0
- package/pennyfarthing-dist/personas/themes/a-team.yaml +331 -0
- package/pennyfarthing-dist/personas/themes/agatha-christie.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/alice-in-wonderland.yaml +324 -0
- package/pennyfarthing-dist/personas/themes/all-stars.yaml +326 -0
- package/pennyfarthing-dist/personas/themes/ancient-philosophers.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/ancient-strategists.yaml +298 -0
- package/pennyfarthing-dist/personas/themes/arcane.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/arthurian-mythos.yaml +327 -0
- package/pennyfarthing-dist/personas/themes/avatar-the-last-airbender.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/babylon-5.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/better-call-saul.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/big-lebowski.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/black-sails.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/blade-runner.yaml +289 -0
- package/pennyfarthing-dist/personas/themes/bobiverse.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/breaking-bad.yaml +319 -0
- package/pennyfarthing-dist/personas/themes/catch-22.yaml +304 -0
- package/pennyfarthing-dist/personas/themes/classical-composers.yaml +302 -0
- package/pennyfarthing-dist/personas/themes/control.yaml +201 -0
- package/pennyfarthing-dist/personas/themes/count-of-monte-cristo.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/cowboy-bebop.yaml +315 -0
- package/pennyfarthing-dist/personas/themes/deadwood.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/dickens.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/discworld.yaml +334 -0
- package/pennyfarthing-dist/personas/themes/doctor-who.yaml +284 -0
- package/pennyfarthing-dist/personas/themes/don-quixote.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/dune.yaml +301 -0
- package/pennyfarthing-dist/personas/themes/enlightenment-thinkers.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/expeditionary-force.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/fargo.yaml +322 -0
- package/pennyfarthing-dist/personas/themes/film-auteurs.yaml +304 -0
- package/pennyfarthing-dist/personas/themes/firefly.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/foundation.yaml +284 -0
- package/pennyfarthing-dist/personas/themes/futurama.yaml +313 -0
- package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +284 -0
- package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +365 -0
- package/pennyfarthing-dist/personas/themes/gothic-literature.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/great-gatsby.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/greek-mythology.yaml +326 -0
- package/pennyfarthing-dist/personas/themes/hannibal.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/harry-potter.yaml +316 -0
- package/pennyfarthing-dist/personas/themes/his-dark-materials.yaml +285 -0
- package/pennyfarthing-dist/personas/themes/historical-figures.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +323 -0
- package/pennyfarthing-dist/personas/themes/house-md.yaml +313 -0
- package/pennyfarthing-dist/personas/themes/imperial-radch.yaml +283 -0
- package/pennyfarthing-dist/personas/themes/inspector-morse.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/jane-austen.yaml +281 -0
- package/pennyfarthing-dist/personas/themes/jazz-legends.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/justified.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/legion-of-doom.yaml +343 -0
- package/pennyfarthing-dist/personas/themes/les-miserables.yaml +293 -0
- package/pennyfarthing-dist/personas/themes/lord-of-the-rings.yaml +326 -0
- package/pennyfarthing-dist/personas/themes/lovecraft-mythos.yaml +325 -0
- package/pennyfarthing-dist/personas/themes/mad-max.yaml +349 -0
- package/pennyfarthing-dist/personas/themes/mad-men.yaml +283 -0
- package/pennyfarthing-dist/personas/themes/marvel-mcu.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/mash.yaml +329 -0
- package/pennyfarthing-dist/personas/themes/mass-effect.yaml +283 -0
- package/pennyfarthing-dist/personas/themes/military-commanders.yaml +298 -0
- package/pennyfarthing-dist/personas/themes/moby-dick.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/monty-python.yaml +297 -0
- package/pennyfarthing-dist/personas/themes/neuromancer.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/norse-mythology.yaml +321 -0
- package/pennyfarthing-dist/personas/themes/parks-and-rec.yaml +364 -0
- package/pennyfarthing-dist/personas/themes/peaky-blinders.yaml +292 -0
- package/pennyfarthing-dist/personas/themes/princess-bride.yaml +344 -0
- package/pennyfarthing-dist/personas/themes/renaissance-masters.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/rome.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/russian-masters.yaml +310 -0
- package/pennyfarthing-dist/personas/themes/sandman.yaml +282 -0
- package/pennyfarthing-dist/personas/themes/scientific-revolutionaries.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/shakespeare.yaml +295 -0
- package/pennyfarthing-dist/personas/themes/sherlock-holmes.yaml +283 -0
- package/pennyfarthing-dist/personas/themes/snow-crash.yaml +290 -0
- package/pennyfarthing-dist/personas/themes/software-pioneers.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/star-trek-tng.yaml +358 -0
- package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +327 -0
- package/pennyfarthing-dist/personas/themes/star-wars.yaml +297 -0
- package/pennyfarthing-dist/personas/themes/succession.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/superfriends.yaml +332 -0
- package/pennyfarthing-dist/personas/themes/ted-lasso.yaml +359 -0
- package/pennyfarthing-dist/personas/themes/the-americans.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/the-crown.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/the-expanse.yaml +337 -0
- package/pennyfarthing-dist/personas/themes/the-good-place.yaml +315 -0
- package/pennyfarthing-dist/personas/themes/the-matrix.yaml +342 -0
- package/pennyfarthing-dist/personas/themes/the-odyssey.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/the-office.yaml +323 -0
- package/pennyfarthing-dist/personas/themes/the-simpsons.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/the-sopranos.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/the-wire.yaml +303 -0
- package/pennyfarthing-dist/personas/themes/the-witcher.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/twin-peaks.yaml +296 -0
- package/pennyfarthing-dist/personas/themes/vorkosigan-saga.yaml +294 -0
- package/pennyfarthing-dist/personas/themes/watchmen.yaml +285 -0
- package/pennyfarthing-dist/personas/themes/west-wing.yaml +285 -0
- package/pennyfarthing-dist/personas/themes/world-explorers.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/wwii-leaders.yaml +299 -0
- package/pennyfarthing-dist/personas/themes/x-files.yaml +296 -0
- package/pennyfarthing-dist/scripts/README.md +87 -0
- package/pennyfarthing-dist/scripts/core/README.md +25 -0
- package/pennyfarthing-dist/scripts/core/agent-session.sh +383 -0
- package/pennyfarthing-dist/scripts/core/check-context.sh +280 -0
- package/pennyfarthing-dist/scripts/core/handoff-marker.sh +101 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +90 -0
- package/pennyfarthing-dist/scripts/core/prime.sh +30 -0
- package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +21 -0
- package/pennyfarthing-dist/scripts/git/README.md +25 -0
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +267 -0
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +152 -0
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +79 -0
- package/pennyfarthing-dist/scripts/git/release.sh +215 -0
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +494 -0
- package/pennyfarthing-dist/scripts/health/drift-detection.sh +162 -0
- package/pennyfarthing-dist/scripts/hooks/README.md +32 -0
- package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +106 -0
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +60 -0
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +65 -0
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +35 -0
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +157 -0
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +107 -0
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +71 -0
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +42 -0
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +20 -0
- package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +499 -0
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +97 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +65 -0
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +94 -0
- package/pennyfarthing-dist/scripts/jira/README.md +36 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +101 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +97 -0
- package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +22 -0
- package/pennyfarthing-dist/scripts/jira/jira-lib.sh +464 -0
- package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +266 -0
- package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +18 -0
- package/pennyfarthing-dist/scripts/jira/jira-sync.sh +16 -0
- package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +16 -0
- package/pennyfarthing-dist/scripts/jira/sync-epic-to-jira.sh +16 -0
- package/pennyfarthing-dist/scripts/lib/README.md +29 -0
- package/pennyfarthing-dist/scripts/lib/background-tasks.sh +177 -0
- package/pennyfarthing-dist/scripts/lib/checkpoint.sh +136 -0
- package/pennyfarthing-dist/scripts/lib/common.sh +212 -0
- package/pennyfarthing-dist/scripts/lib/file-lock.sh +269 -0
- package/pennyfarthing-dist/scripts/lib/find-root.sh +55 -0
- package/pennyfarthing-dist/scripts/lib/logging.sh +186 -0
- package/pennyfarthing-dist/scripts/lib/retry.sh +76 -0
- package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +102 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +97 -0
- package/pennyfarthing-dist/scripts/misc/README.md +44 -0
- package/pennyfarthing-dist/scripts/misc/add-short-names.sh +13 -0
- package/pennyfarthing-dist/scripts/misc/add_short_names.py +226 -0
- package/pennyfarthing-dist/scripts/misc/backlog.sh +77 -0
- package/pennyfarthing-dist/scripts/misc/check-status.sh +247 -0
- package/pennyfarthing-dist/scripts/misc/find-related-work.sh +231 -0
- package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +96 -0
- package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +74 -0
- package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +10 -0
- package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +319 -0
- package/pennyfarthing-dist/scripts/misc/repo-scan.sh +141 -0
- package/pennyfarthing-dist/scripts/misc/repo-utils.sh +778 -0
- package/pennyfarthing-dist/scripts/misc/run-ci.sh +212 -0
- package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +7 -0
- package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +319 -0
- package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +193 -0
- package/pennyfarthing-dist/scripts/misc/statusline.sh +259 -0
- package/pennyfarthing-dist/scripts/misc/uninstall.sh +269 -0
- package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +160 -0
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +417 -0
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +54 -0
- package/pennyfarthing-dist/scripts/sprint/README.md +29 -0
- package/pennyfarthing-dist/scripts/sprint/archive-story.sh +139 -0
- package/pennyfarthing-dist/scripts/sprint/available-stories.sh +97 -0
- package/pennyfarthing-dist/scripts/sprint/check-story.sh +164 -0
- package/pennyfarthing-dist/scripts/sprint/get-epic-field.sh +58 -0
- package/pennyfarthing-dist/scripts/sprint/get-story-field.sh +69 -0
- package/pennyfarthing-dist/scripts/sprint/import-epic-to-future.sh +10 -0
- package/pennyfarthing-dist/scripts/sprint/import_epic_to_future.py +270 -0
- package/pennyfarthing-dist/scripts/sprint/list-future.sh +151 -0
- package/pennyfarthing-dist/scripts/sprint/new-sprint.sh +116 -0
- package/pennyfarthing-dist/scripts/sprint/promote-epic.sh +154 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-common.sh +415 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-info.sh +39 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-metrics.sh +230 -0
- package/pennyfarthing-dist/scripts/sprint/sprint-status.sh +134 -0
- package/pennyfarthing-dist/scripts/story/README.md +23 -0
- package/pennyfarthing-dist/scripts/story/create-story.sh +19 -0
- package/pennyfarthing-dist/scripts/story/size-story.sh +18 -0
- package/pennyfarthing-dist/scripts/story/story-template.sh +18 -0
- package/pennyfarthing-dist/scripts/test/README.md +23 -0
- package/pennyfarthing-dist/scripts/test/ensure-swebench-data.sh +59 -0
- package/pennyfarthing-dist/scripts/test/ground-truth-judge.py +220 -0
- package/pennyfarthing-dist/scripts/test/swebench-judge.py +374 -0
- package/pennyfarthing-dist/scripts/test/test-cache.sh +165 -0
- package/pennyfarthing-dist/scripts/test/test-setup.sh +337 -0
- package/pennyfarthing-dist/scripts/tests/check.test.sh +582 -0
- package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +515 -0
- package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +599 -0
- package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +332 -0
- package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +573 -0
- package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +859 -0
- package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +662 -0
- package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +589 -0
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +105 -0
- package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +597 -0
- package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +514 -0
- package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +517 -0
- package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +331 -0
- package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +647 -0
- package/pennyfarthing-dist/scripts/theme/README.md +22 -0
- package/pennyfarthing-dist/scripts/theme/compute-theme-tiers.sh +13 -0
- package/pennyfarthing-dist/scripts/theme/compute_theme_tiers.py +402 -0
- package/pennyfarthing-dist/scripts/theme/list-themes.sh +73 -0
- package/pennyfarthing-dist/scripts/theme/update-theme-tiers.sh +97 -0
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +576 -0
- package/pennyfarthing-dist/scripts/workflow/README.md +28 -0
- package/pennyfarthing-dist/scripts/workflow/check.py +502 -0
- package/pennyfarthing-dist/scripts/workflow/check.sh +24 -0
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +159 -0
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +228 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +61 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +13 -0
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +130 -0
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +40 -0
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +163 -0
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +138 -0
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +256 -0
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +167 -0
- package/pennyfarthing-dist/skills/agentic-patterns/SKILL.md +242 -0
- package/pennyfarthing-dist/skills/changelog/SKILL.md +367 -0
- package/pennyfarthing-dist/skills/code-review/SKILL.md +168 -0
- package/pennyfarthing-dist/skills/context-engineering/SKILL.md +274 -0
- package/pennyfarthing-dist/skills/cyclist/SKILL.md +88 -0
- package/pennyfarthing-dist/skills/dev-patterns/SKILL.md +437 -0
- package/pennyfarthing-dist/skills/finalize-run/SKILL.md +258 -0
- package/pennyfarthing-dist/skills/jira/SKILL.md +484 -0
- package/pennyfarthing-dist/skills/judge/SKILL.md +636 -0
- package/pennyfarthing-dist/skills/just/SKILL.md +403 -0
- package/pennyfarthing-dist/skills/mermaid/SKILL.md +240 -0
- package/pennyfarthing-dist/skills/otel/skill.md +223 -0
- package/pennyfarthing-dist/skills/permissions/skill.md +172 -0
- package/pennyfarthing-dist/skills/persona-benchmark/SKILL.md +178 -0
- package/pennyfarthing-dist/skills/skill-registry.schema.json +107 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +393 -0
- package/pennyfarthing-dist/skills/sprint/scripts/archive-story.sh +101 -0
- package/pennyfarthing-dist/skills/sprint/scripts/available-stories.sh +97 -0
- package/pennyfarthing-dist/skills/sprint/scripts/check-story.sh +164 -0
- package/pennyfarthing-dist/skills/sprint/scripts/create-jira-epic.sh +101 -0
- package/pennyfarthing-dist/skills/sprint/scripts/new-sprint.sh +116 -0
- package/pennyfarthing-dist/skills/sprint/scripts/promote-epic.sh +164 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-info.sh +39 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sprint-status.sh +147 -0
- package/pennyfarthing-dist/skills/sprint/scripts/sync-epic-jira.sh +86 -0
- package/pennyfarthing-dist/skills/sprint/skill.md +465 -0
- package/pennyfarthing-dist/skills/story/scripts/create-story.sh +159 -0
- package/pennyfarthing-dist/skills/story/scripts/size-story.sh +198 -0
- package/pennyfarthing-dist/skills/story/scripts/story-template.sh +162 -0
- package/pennyfarthing-dist/skills/story/skill.md +219 -0
- package/pennyfarthing-dist/skills/systematic-debugging/SKILL.md +390 -0
- package/pennyfarthing-dist/skills/testing/SKILL.md +99 -0
- package/pennyfarthing-dist/skills/testing/references/troubleshooting.md +124 -0
- package/pennyfarthing-dist/skills/theme/skill.md +129 -0
- package/pennyfarthing-dist/skills/theme-creation/SKILL.md +174 -0
- package/pennyfarthing-dist/skills/workflow/scripts/list-workflows.sh +91 -0
- package/pennyfarthing-dist/skills/workflow/scripts/resume-workflow.sh +163 -0
- package/pennyfarthing-dist/skills/workflow/scripts/show-workflow.sh +138 -0
- package/pennyfarthing-dist/skills/workflow/scripts/start-workflow.sh +273 -0
- package/pennyfarthing-dist/skills/workflow/scripts/workflow-status.sh +167 -0
- package/pennyfarthing-dist/skills/workflow/skill.md +337 -0
- package/pennyfarthing-dist/skills/yq/SKILL.md +264 -0
- package/pennyfarthing-dist/templates/LEADERBOARD.schema.yaml +187 -0
- package/pennyfarthing-dist/templates/LEADERBOARD.template.md +59 -0
- package/pennyfarthing-dist/templates/agent-scopes.yaml.template +276 -0
- package/pennyfarthing-dist/templates/pennyfarthing-settings.yaml.template +61 -0
- package/pennyfarthing-dist/templates/persona-config.yaml.template +22 -0
- package/pennyfarthing-dist/templates/preferences.yaml.template +15 -0
- package/pennyfarthing-dist/templates/settings.local.json.template +101 -0
- package/pennyfarthing-dist/templates/setup-env.sh.template +18 -0
- package/pennyfarthing-dist/templates/shared-context.md.template +70 -0
- package/pennyfarthing-dist/templates/sidecar/decisions.md.template +40 -0
- package/pennyfarthing-dist/templates/sidecar/gotchas.md.template +37 -0
- package/pennyfarthing-dist/templates/sidecar/patterns.md.template +34 -0
- package/pennyfarthing-dist/workflows/agent-docs.yaml +70 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-01-initialize.md +101 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-01b-continue.md +93 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-02-context.md +115 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-03-patterns.md +133 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-04-components.md +138 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-05-interfaces.md +133 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-06-risks.md +142 -0
- package/pennyfarthing-dist/workflows/architecture/steps/step-07-document.md +160 -0
- package/pennyfarthing-dist/workflows/architecture/templates/architecture-decision.md +102 -0
- package/pennyfarthing-dist/workflows/architecture.yaml +65 -0
- package/pennyfarthing-dist/workflows/bdd.yaml +60 -0
- package/pennyfarthing-dist/workflows/brainstorming/brain-methods.csv +62 -0
- package/pennyfarthing-dist/workflows/brainstorming/checklist.md +44 -0
- package/pennyfarthing-dist/workflows/brainstorming/instructions.md +736 -0
- package/pennyfarthing-dist/workflows/brainstorming/workflow.yaml +49 -0
- package/pennyfarthing-dist/workflows/code-review/checklist.md +23 -0
- package/pennyfarthing-dist/workflows/code-review/instructions.md +234 -0
- package/pennyfarthing-dist/workflows/code-review/workflow.yaml +51 -0
- package/pennyfarthing-dist/workflows/dev-story/checklist.md +80 -0
- package/pennyfarthing-dist/workflows/dev-story/instructions.xml +410 -0
- package/pennyfarthing-dist/workflows/dev-story/workflow.yaml +50 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-01-validate-prerequisites.md +256 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-02-design-epics.md +233 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-03-create-stories.md +272 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-04-final-validation.md +153 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/steps/step-05-import-to-future.md +122 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/templates/epics-template.md +57 -0
- package/pennyfarthing-dist/workflows/epics-and-stories/workflow.yaml +28 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-01-analyze.md +101 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-02-categorize.md +116 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-03-execute.md +224 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-04-verify.md +88 -0
- package/pennyfarthing-dist/workflows/git-cleanup/steps/step-05-complete.md +79 -0
- package/pennyfarthing-dist/workflows/git-cleanup.yaml +59 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-01-document-discovery.md +190 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-02-prd-analysis.md +178 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-03-epic-coverage-validation.md +179 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-04-ux-alignment.md +139 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-05-epic-quality-review.md +252 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/steps/step-06-final-assessment.md +133 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/templates/readiness-report-template.md +4 -0
- package/pennyfarthing-dist/workflows/implementation-readiness/workflow.yaml +40 -0
- package/pennyfarthing-dist/workflows/prd/data/domain-complexity.csv +13 -0
- package/pennyfarthing-dist/workflows/prd/data/prd-purpose.md +197 -0
- package/pennyfarthing-dist/workflows/prd/data/project-types.csv +11 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-01-init.md +191 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-01b-continue.md +153 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-02-discovery.md +224 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-03-success.md +226 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-04-journeys.md +213 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-05-domain.md +207 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-06-innovation.md +226 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-07-project-type.md +237 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-08-scoping.md +228 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-09-functional.md +231 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-10-nonfunctional.md +242 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-11-polish.md +217 -0
- package/pennyfarthing-dist/workflows/prd/steps-c/step-12-complete.md +180 -0
- package/pennyfarthing-dist/workflows/prd/steps-e/step-e-01-discovery.md +247 -0
- package/pennyfarthing-dist/workflows/prd/steps-e/step-e-01b-legacy-conversion.md +208 -0
- package/pennyfarthing-dist/workflows/prd/steps-e/step-e-02-review.md +249 -0
- package/pennyfarthing-dist/workflows/prd/steps-e/step-e-03-edit.md +253 -0
- package/pennyfarthing-dist/workflows/prd/steps-e/step-e-04-complete.md +168 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-01-discovery.md +218 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-02-format-detection.md +191 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-02b-parity-check.md +209 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-03-density-validation.md +174 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-05-measurability-validation.md +228 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-06-traceability-validation.md +217 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-09-project-type-validation.md +263 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-10-smart-validation.md +209 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-12-completeness-validation.md +242 -0
- package/pennyfarthing-dist/workflows/prd/steps-v/step-v-13-report-complete.md +232 -0
- package/pennyfarthing-dist/workflows/prd/templates/prd-template.md +10 -0
- package/pennyfarthing-dist/workflows/prd/workflow.yaml +42 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-01-init.md +177 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-01b-continue.md +161 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-02-vision.md +199 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-03-users.md +202 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-04-metrics.md +205 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-05-scope.md +219 -0
- package/pennyfarthing-dist/workflows/product-brief/steps/step-06-complete.md +194 -0
- package/pennyfarthing-dist/workflows/product-brief/templates/product-brief.template.md +10 -0
- package/pennyfarthing-dist/workflows/product-brief/workflow.yaml +31 -0
- package/pennyfarthing-dist/workflows/project-context/project-context-template.md +21 -0
- package/pennyfarthing-dist/workflows/project-context/steps/step-01-discover.md +184 -0
- package/pennyfarthing-dist/workflows/project-context/steps/step-02-generate.md +318 -0
- package/pennyfarthing-dist/workflows/project-context/steps/step-03-complete.md +278 -0
- package/pennyfarthing-dist/workflows/project-context/workflow.yaml +27 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-01-mode-detection.md +156 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-02-context-gathering.md +120 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-03-execute.md +113 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-04-self-check.md +113 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-05-adversarial-review.md +106 -0
- package/pennyfarthing-dist/workflows/quick-dev/steps/step-06-resolve-findings.md +140 -0
- package/pennyfarthing-dist/workflows/quick-dev/workflow.yaml +27 -0
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-01-understand.md +189 -0
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-02-investigate.md +144 -0
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-03-generate.md +128 -0
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-04-review.md +191 -0
- package/pennyfarthing-dist/workflows/quick-spec/tech-spec-template.md +74 -0
- package/pennyfarthing-dist/workflows/quick-spec/workflow.yaml +27 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-01-init.md +137 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-02-domain-analysis.md +229 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-03-competitive-landscape.md +238 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-04-regulatory-focus.md +206 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-05-technical-trends.md +234 -0
- package/pennyfarthing-dist/workflows/research/steps-domain/step-06-research-synthesis.md +443 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-01-init.md +182 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-02-customer-behavior.md +237 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-02-customer-insights.md +200 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-03-customer-pain-points.md +249 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-04-customer-decisions.md +259 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-05-competitive-analysis.md +177 -0
- package/pennyfarthing-dist/workflows/research/steps-market/step-06-research-completion.md +475 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-01-init.md +137 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-02-technical-overview.md +239 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-03-integration-patterns.md +248 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-04-architectural-patterns.md +202 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-05-implementation-research.md +239 -0
- package/pennyfarthing-dist/workflows/research/steps-technical/step-06-research-synthesis.md +486 -0
- package/pennyfarthing-dist/workflows/research/templates/research.template.md +29 -0
- package/pennyfarthing-dist/workflows/research/workflow.yaml +45 -0
- package/pennyfarthing-dist/workflows/retrospective/checklist.md +31 -0
- package/pennyfarthing-dist/workflows/retrospective/instructions.md +1443 -0
- package/pennyfarthing-dist/workflows/retrospective/workflow.yaml +50 -0
- package/pennyfarthing-dist/workflows/sprint-planning/checklist.md +33 -0
- package/pennyfarthing-dist/workflows/sprint-planning/sprint-status-template.yaml +55 -0
- package/pennyfarthing-dist/workflows/sprint-planning/steps/step-01-parse-epic-files.md +54 -0
- package/pennyfarthing-dist/workflows/sprint-planning/steps/step-02-build-sprint-status.md +44 -0
- package/pennyfarthing-dist/workflows/sprint-planning/steps/step-03-status-detection.md +64 -0
- package/pennyfarthing-dist/workflows/sprint-planning/steps/step-04-generate-status-file.md +73 -0
- package/pennyfarthing-dist/workflows/sprint-planning/steps/step-05-validate-and-report.md +56 -0
- package/pennyfarthing-dist/workflows/sprint-planning/workflow.yaml +34 -0
- package/pennyfarthing-dist/workflows/tdd.yaml +50 -0
- package/pennyfarthing-dist/workflows/trivial.yaml +40 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-01-init.md +135 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-01b-continue.md +127 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-02-discovery.md +190 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-03-core-experience.md +216 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-04-emotional-response.md +219 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-05-inspiration.md +234 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-06-design-system.md +252 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-07-defining-experience.md +254 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-08-visual-foundation.md +224 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-09-design-directions.md +224 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-10-user-journeys.md +241 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-11-component-strategy.md +248 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-12-ux-patterns.md +237 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-13-responsive-accessibility.md +264 -0
- package/pennyfarthing-dist/workflows/ux-design/steps/step-14-complete.md +228 -0
- package/pennyfarthing-dist/workflows/ux-design/ux-design-template.md +13 -0
- package/pennyfarthing-dist/workflows/ux-design/workflow.yaml +41 -0
- package/pennyfarthing_scripts/README.md +66 -0
- package/pennyfarthing_scripts/__init__.py +17 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira.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__/sprint.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bellmode_hook.py +154 -0
- package/pennyfarthing_scripts/brownfield/__init__.py +35 -0
- package/pennyfarthing_scripts/brownfield/__main__.py +7 -0
- 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/brownfield/cli.py +131 -0
- package/pennyfarthing_scripts/brownfield/discover.py +753 -0
- package/pennyfarthing_scripts/common/__init__.py +49 -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/config.py +91 -0
- package/pennyfarthing_scripts/common/output.py +180 -0
- package/pennyfarthing_scripts/config.py +21 -0
- package/pennyfarthing_scripts/git/__init__.py +29 -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/create_branches.py +439 -0
- package/pennyfarthing_scripts/git/status_all.py +310 -0
- package/pennyfarthing_scripts/hooks.py +455 -0
- package/pennyfarthing_scripts/jira/__init__.py +93 -0
- package/pennyfarthing_scripts/jira/__main__.py +10 -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__/compat.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/epic.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/jira/__pycache__/story.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/bidirectional.py +561 -0
- package/pennyfarthing_scripts/jira/claim.py +211 -0
- package/pennyfarthing_scripts/jira/cli.py +150 -0
- package/pennyfarthing_scripts/jira/client.py +613 -0
- package/pennyfarthing_scripts/jira/epic.py +176 -0
- package/pennyfarthing_scripts/jira/story.py +219 -0
- package/pennyfarthing_scripts/jira/sync.py +350 -0
- package/pennyfarthing_scripts/jira_bidirectional_sync.py +37 -0
- package/pennyfarthing_scripts/jira_epic_creation.py +30 -0
- package/pennyfarthing_scripts/jira_sync.py +36 -0
- package/pennyfarthing_scripts/jira_sync_story.py +30 -0
- package/pennyfarthing_scripts/output.py +37 -0
- package/pennyfarthing_scripts/preflight/__init__.py +17 -0
- package/pennyfarthing_scripts/preflight/__main__.py +10 -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/preflight/cli.py +141 -0
- package/pennyfarthing_scripts/preflight/finish.py +382 -0
- package/pennyfarthing_scripts/pretooluse_hook.py +142 -0
- package/pennyfarthing_scripts/prime/__init__.py +125 -0
- package/pennyfarthing_scripts/prime/__main__.py +8 -0
- package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/__main__.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__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/cli.py +375 -0
- package/pennyfarthing_scripts/prime/loader.py +239 -0
- 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/sprint/__init__.py +66 -0
- package/pennyfarthing_scripts/sprint/__main__.py +10 -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__/cli.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__/validator.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/archive.py +108 -0
- package/pennyfarthing_scripts/sprint/cli.py +124 -0
- package/pennyfarthing_scripts/sprint/loader.py +193 -0
- package/pennyfarthing_scripts/sprint/status.py +122 -0
- package/pennyfarthing_scripts/sprint/validator.py +405 -0
- package/pennyfarthing_scripts/sprint/work.py +192 -0
- package/pennyfarthing_scripts/story/__init__.py +67 -0
- package/pennyfarthing_scripts/story/__main__.py +10 -0
- package/pennyfarthing_scripts/story/cli.py +105 -0
- package/pennyfarthing_scripts/story/create.py +167 -0
- package/pennyfarthing_scripts/story/size.py +113 -0
- package/pennyfarthing_scripts/story/template.py +151 -0
- package/pennyfarthing_scripts/swebench.py +216 -0
- package/pennyfarthing_scripts/tests/__init__.py +1 -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_brownfield.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_prime.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/conftest.py +106 -0
- package/pennyfarthing_scripts/tests/test_brownfield.py +842 -0
- package/pennyfarthing_scripts/tests/test_cli_modules.py +245 -0
- package/pennyfarthing_scripts/tests/test_common.py +180 -0
- package/pennyfarthing_scripts/tests/test_git_utils.py +866 -0
- package/pennyfarthing_scripts/tests/test_jira_package.py +334 -0
- package/pennyfarthing_scripts/tests/test_package_structure.py +372 -0
- package/pennyfarthing_scripts/tests/test_prime.py +1050 -0
- package/pennyfarthing_scripts/tests/test_sprint_package.py +236 -0
- package/pennyfarthing_scripts/tests/test_sprint_validator.py +675 -0
- package/pennyfarthing_scripts/tests/test_story_package.py +156 -0
- package/pennyfarthing_scripts/welcome_hook.py +157 -0
- package/pennyfarthing_scripts/workflow.py +183 -0
- package/dist/cli/utils/files.d.ts +0 -72
- package/dist/cli/utils/files.d.ts.map +0 -1
- package/dist/cli/utils/files.js +0 -164
- package/dist/cli/utils/files.js.map +0 -1
- package/dist/cli/workspace.test.js +0 -156
- package/dist/cli/workspace.test.js.map +0 -1
- /package/{bin → packages/core/bin}/pennyfarthing.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/context-reader.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.js +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/epics-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/index.js +0 -0
- /package/{dist → packages/core/dist}/bmad/index.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.js +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/status-sync.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-exporter.test.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/bmad/story-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/command.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/cyclist.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor-legacy.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/doctor.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/init.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/skill.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/theme.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/uninstall.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/update.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.js +0 -0
- /package/{dist → packages/core/dist}/cli/commands/version.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/customization.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/cyclist-migration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/index.js +0 -0
- /package/{dist → packages/core/dist}/cli/index.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/ocean-profiles.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/theme-maker.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/constants.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/logger.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/manifest.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/node-modules.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/prompts.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/symlinks.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/themes.test.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.js +0 -0
- /package/{dist → packages/core/dist}/cli/utils/version.js.map +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/cli/workspace.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/index.js +0 -0
- /package/{dist → packages/core/dist}/index.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-epic-creation.test.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.js.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.js +0 -0
- /package/{dist → packages/core/dist}/jira/jira-sprint-sync.test.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/index.js +0 -0
- /package/{dist → packages/core/dist}/permissions/index.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.js +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.js.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/permissions/permission-schema.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.js +0 -0
- /package/{dist → packages/core/dist}/scripts/add-ocean-profiles.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.js +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/benchmark-integration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/debugging-scenarios.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-all-spiders.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-report.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider-report.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/generate-spider.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.js +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/job-fair-aggregator.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/run-ci.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.js +0 -0
- /package/{dist → packages/core/dist}/scripts/theme-detail.test.js.map +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.d.ts +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.js +0 -0
- /package/{dist → packages/core/dist}/scripts/validate-ocean-profiles.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.js +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/gate-handler.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.js +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-finish.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.js +0 -0
- /package/{dist → packages/core/dist}/workflow/generic-sm-setup.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.js +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/handoff.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/index.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/index.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/index.js +0 -0
- /package/{dist → packages/core/dist}/workflow/index.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.js +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/session-state.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/sm-subagents.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.js +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/step-parser.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/story-workflow-routing.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.js +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/test-cache.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.js +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/trimodal.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.js +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/variable-resolver.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-executor.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-loader.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-migration.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-permissions.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-router.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-schema.test.js.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.d.ts +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.d.ts.map +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.js +0 -0
- /package/{dist → packages/core/dist}/workflow/workflow-stepped-schema.test.js.map +0 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Individual Portrait Generator for Pennyfarthing Themes
|
|
4
|
+
|
|
5
|
+
Generates 10 individual portraits per theme using Stable Diffusion SDXL on M3 Max (MPS).
|
|
6
|
+
Reads visual prompts from theme YAML files in two locations:
|
|
7
|
+
- Built-in: pennyfarthing-dist/personas/themes/
|
|
8
|
+
- Custom: .claude/pennyfarthing/themes/ (takes precedence)
|
|
9
|
+
|
|
10
|
+
Output: pennyfarthing-dist/personas/portraits/{theme}/{slug}-{OCEAN}.png (512x512px each)
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
python3 scripts/generate-portraits.py [--dry-run] [--theme THEME]
|
|
14
|
+
python3 scripts/generate-portraits.py --theme gilligans-island --dry-run
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import os
|
|
19
|
+
import sys
|
|
20
|
+
import warnings
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
from datetime import datetime
|
|
23
|
+
|
|
24
|
+
# Suppress progress bars before importing torch/diffusers
|
|
25
|
+
os.environ["TQDM_DISABLE"] = "1"
|
|
26
|
+
|
|
27
|
+
# Suppress CUDA warnings on MPS (Apple Silicon)
|
|
28
|
+
warnings.filterwarnings("ignore", message=".*CUDA is not available.*")
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
import yaml
|
|
32
|
+
except ImportError:
|
|
33
|
+
print("Missing PyYAML: pip install pyyaml")
|
|
34
|
+
sys.exit(1)
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
import torch
|
|
38
|
+
from diffusers import StableDiffusionXLPipeline, DPMSolverMultistepScheduler
|
|
39
|
+
from diffusers.utils import logging as diffusers_logging
|
|
40
|
+
from PIL import Image
|
|
41
|
+
HAS_TORCH = True
|
|
42
|
+
# Suppress diffusers progress bar
|
|
43
|
+
diffusers_logging.disable_progress_bar()
|
|
44
|
+
except ImportError as e:
|
|
45
|
+
HAS_TORCH = False
|
|
46
|
+
TORCH_ERROR = str(e)
|
|
47
|
+
|
|
48
|
+
# CLIP tokenizer for accurate token counting (optional - falls back to word estimate)
|
|
49
|
+
try:
|
|
50
|
+
from transformers import CLIPTokenizer
|
|
51
|
+
CLIP_TOKENIZER = CLIPTokenizer.from_pretrained("openai/clip-vit-large-patch14")
|
|
52
|
+
HAS_CLIP_TOKENIZER = True
|
|
53
|
+
except Exception:
|
|
54
|
+
CLIP_TOKENIZER = None
|
|
55
|
+
HAS_CLIP_TOKENIZER = False
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Configuration
|
|
59
|
+
SCRIPT_DIR = Path(__file__).parent.resolve()
|
|
60
|
+
|
|
61
|
+
# Find PROJECT_ROOT by walking up until we find pennyfarthing-dist at the expected level
|
|
62
|
+
# Script lives at: {PROJECT_ROOT}/pennyfarthing-dist/scripts/portraits/generate-portraits.py
|
|
63
|
+
def _find_project_root() -> Path:
|
|
64
|
+
"""Find project root by looking for pennyfarthing-dist or .git marker."""
|
|
65
|
+
current = SCRIPT_DIR
|
|
66
|
+
# Walk up from portraits/ -> scripts/ -> pennyfarthing-dist/ -> PROJECT_ROOT
|
|
67
|
+
for _ in range(5): # Safety limit
|
|
68
|
+
# Check if this looks like the project root
|
|
69
|
+
if (current / "pennyfarthing-dist" / "personas" / "themes").exists():
|
|
70
|
+
return current
|
|
71
|
+
if (current / ".git").exists() and (current / "pennyfarthing-dist").exists():
|
|
72
|
+
return current
|
|
73
|
+
current = current.parent
|
|
74
|
+
# Fallback: assume old structure (script in {root}/scripts/portraits/)
|
|
75
|
+
return SCRIPT_DIR.parent.parent
|
|
76
|
+
|
|
77
|
+
PROJECT_ROOT = _find_project_root()
|
|
78
|
+
BUILTIN_THEMES_DIR = PROJECT_ROOT / "pennyfarthing-dist" / "personas" / "themes"
|
|
79
|
+
CUSTOM_THEMES_DIR = PROJECT_ROOT / ".claude" / "pennyfarthing" / "themes"
|
|
80
|
+
OUTPUT_DIR = PROJECT_ROOT / "pennyfarthing-dist" / "personas" / "portraits"
|
|
81
|
+
MODEL_ID = "stabilityai/stable-diffusion-xl-base-1.0"
|
|
82
|
+
|
|
83
|
+
# SDXL generates at 1024x1024, we'll resize to 512x512
|
|
84
|
+
GENERATION_SIZE = 1024
|
|
85
|
+
OUTPUT_SIZE = 512
|
|
86
|
+
|
|
87
|
+
# Generation parameters
|
|
88
|
+
NUM_INFERENCE_STEPS = 30
|
|
89
|
+
GUIDANCE_SCALE = 7.5
|
|
90
|
+
|
|
91
|
+
# CLIP token limit - prompts are truncated beyond this
|
|
92
|
+
CLIP_MAX_TOKENS = 77
|
|
93
|
+
|
|
94
|
+
# Role order for the 10 agents
|
|
95
|
+
ROLES = [
|
|
96
|
+
"orchestrator", "sm", "tea", "dev", "reviewer",
|
|
97
|
+
"architect", "pm", "tech-writer", "ux-designer", "devops"
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
# Default style suffix (visual description comes first for emphasis)
|
|
101
|
+
# Themes can override this by setting 'portrait_style' in their theme metadata
|
|
102
|
+
DEFAULT_STYLE_SUFFIX = ", traditional woodcut portrait bust, black and white, bold linework, crosshatching, medieval style"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def to_slug(name: str) -> str:
|
|
106
|
+
"""Convert a name to URL-safe slug (lowercase kebab-case)."""
|
|
107
|
+
import re
|
|
108
|
+
slug = name.lower()
|
|
109
|
+
slug = re.sub(r'[^a-z0-9]+', '-', slug)
|
|
110
|
+
slug = re.sub(r'^-|-$', '', slug)
|
|
111
|
+
return slug
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def count_clip_tokens(text: str) -> int:
|
|
115
|
+
"""Count CLIP tokens in text. Uses actual tokenizer if available, else estimates."""
|
|
116
|
+
if HAS_CLIP_TOKENIZER and CLIP_TOKENIZER:
|
|
117
|
+
tokens = CLIP_TOKENIZER.encode(text)
|
|
118
|
+
return len(tokens)
|
|
119
|
+
else:
|
|
120
|
+
# Fallback: estimate ~1.3 tokens per word (empirical average for CLIP)
|
|
121
|
+
return int(len(text.split()) * 1.3)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def truncate_prompt_to_clip_limit(visual: str, style_suffix: str, max_tokens: int = CLIP_MAX_TOKENS) -> tuple[str, bool]:
|
|
125
|
+
"""Truncate prompt to fit within CLIP token limit.
|
|
126
|
+
|
|
127
|
+
Strategy: Prioritize the visual description over the style suffix.
|
|
128
|
+
If combined prompt exceeds limit, progressively trim the visual description.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
tuple: (truncated_prompt, was_truncated)
|
|
132
|
+
"""
|
|
133
|
+
combined = f"{visual}{style_suffix}"
|
|
134
|
+
token_count = count_clip_tokens(combined)
|
|
135
|
+
|
|
136
|
+
if token_count <= max_tokens:
|
|
137
|
+
return combined, False
|
|
138
|
+
|
|
139
|
+
# Need to truncate - prioritize visual by trimming words from end
|
|
140
|
+
visual_words = visual.split()
|
|
141
|
+
style_tokens = count_clip_tokens(style_suffix)
|
|
142
|
+
available_for_visual = max_tokens - style_tokens - 2 # Buffer for safety
|
|
143
|
+
|
|
144
|
+
# Binary search for optimal truncation point
|
|
145
|
+
while visual_words and count_clip_tokens(" ".join(visual_words)) > available_for_visual:
|
|
146
|
+
visual_words = visual_words[:-1]
|
|
147
|
+
|
|
148
|
+
truncated_visual = " ".join(visual_words)
|
|
149
|
+
if truncated_visual and not truncated_visual.endswith((",", ".", ";")):
|
|
150
|
+
truncated_visual = truncated_visual.rstrip(",. ")
|
|
151
|
+
|
|
152
|
+
return f"{truncated_visual}{style_suffix}", True
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def ocean_suffix(ocean: dict) -> str:
|
|
156
|
+
"""Generate OCEAN suffix from scores (e.g., '54432' for O=5,C=4,E=4,A=3,N=2)."""
|
|
157
|
+
return f"{ocean['O']}{ocean['C']}{ocean['E']}{ocean['A']}{ocean['N']}"
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def generate_portrait_filename(short_name: str, ocean: dict) -> str:
|
|
161
|
+
"""Generate portrait filename from shortName and OCEAN scores.
|
|
162
|
+
|
|
163
|
+
Format: {shortName-slug}-{OCEAN}.png (e.g., 'yoda-54242.png')
|
|
164
|
+
"""
|
|
165
|
+
slug = to_slug(short_name)
|
|
166
|
+
return f"{slug}-{ocean_suffix(ocean)}.png"
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def parse_theme_file(theme_path: Path) -> dict:
|
|
170
|
+
"""Parse theme YAML file to extract visual prompts for each agent."""
|
|
171
|
+
with open(theme_path, "r", encoding="utf-8") as f:
|
|
172
|
+
data = yaml.safe_load(f)
|
|
173
|
+
|
|
174
|
+
theme_metadata = data.get("theme", {})
|
|
175
|
+
result = {
|
|
176
|
+
"theme": theme_path.stem,
|
|
177
|
+
"source": theme_metadata.get("source", ""),
|
|
178
|
+
"portrait_style": theme_metadata.get("portrait_style", None),
|
|
179
|
+
"characters": {}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
agents = data.get("agents", {})
|
|
183
|
+
for role, agent_data in agents.items():
|
|
184
|
+
if isinstance(agent_data, dict) and "visual" in agent_data:
|
|
185
|
+
# Get shortName, fallback to first word of character name
|
|
186
|
+
character = agent_data.get("character", role)
|
|
187
|
+
short_name = agent_data.get("shortName", character.split()[0])
|
|
188
|
+
ocean = agent_data.get("ocean", {})
|
|
189
|
+
|
|
190
|
+
# Generate filename if OCEAN scores are available
|
|
191
|
+
if ocean and all(k in ocean for k in ['O', 'C', 'E', 'A', 'N']):
|
|
192
|
+
filename = generate_portrait_filename(short_name, ocean)
|
|
193
|
+
else:
|
|
194
|
+
# Fallback to role-based name if no OCEAN scores
|
|
195
|
+
filename = f"{role}.png"
|
|
196
|
+
|
|
197
|
+
result["characters"][role] = {
|
|
198
|
+
"name": character,
|
|
199
|
+
"shortName": short_name,
|
|
200
|
+
"visual": agent_data["visual"],
|
|
201
|
+
"ocean": ocean,
|
|
202
|
+
"filename": filename
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return result
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def build_portrait_prompt(visual: str, style_suffix: str = None) -> tuple[str, bool, int]:
|
|
209
|
+
"""Build a prompt for portrait generation with CLIP token limit enforcement.
|
|
210
|
+
|
|
211
|
+
Args:
|
|
212
|
+
visual: The character's visual description from theme YAML
|
|
213
|
+
style_suffix: Optional theme-specific style suffix. Falls back to DEFAULT_STYLE_SUFFIX.
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
tuple: (prompt, was_truncated, token_count)
|
|
217
|
+
"""
|
|
218
|
+
suffix = style_suffix if style_suffix is not None else DEFAULT_STYLE_SUFFIX
|
|
219
|
+
prompt, was_truncated = truncate_prompt_to_clip_limit(visual, suffix)
|
|
220
|
+
token_count = count_clip_tokens(prompt)
|
|
221
|
+
return prompt, was_truncated, token_count
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def load_pipeline():
|
|
225
|
+
"""Load SDXL pipeline on MPS."""
|
|
226
|
+
print("\nLoading SDXL model on MPS...")
|
|
227
|
+
print("(First run downloads ~6.5GB model)")
|
|
228
|
+
|
|
229
|
+
# Use float32 on MPS to avoid NaN issues with float16
|
|
230
|
+
pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
231
|
+
MODEL_ID,
|
|
232
|
+
torch_dtype=torch.float32,
|
|
233
|
+
use_safetensors=True,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
|
237
|
+
pipe = pipe.to("mps")
|
|
238
|
+
pipe.enable_attention_slicing()
|
|
239
|
+
|
|
240
|
+
print("Model loaded.\n")
|
|
241
|
+
return pipe
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def generate_portrait(pipe, prompt: str, seed: int = 42) -> "Image.Image":
|
|
245
|
+
"""Generate a single portrait."""
|
|
246
|
+
# Use CPU generator for MPS compatibility
|
|
247
|
+
generator = torch.Generator().manual_seed(seed)
|
|
248
|
+
|
|
249
|
+
with torch.no_grad():
|
|
250
|
+
result = pipe(
|
|
251
|
+
prompt=prompt,
|
|
252
|
+
negative_prompt="color, grayscale, photorealistic, blurry, deformed",
|
|
253
|
+
width=GENERATION_SIZE,
|
|
254
|
+
height=GENERATION_SIZE,
|
|
255
|
+
num_inference_steps=NUM_INFERENCE_STEPS,
|
|
256
|
+
guidance_scale=GUIDANCE_SCALE,
|
|
257
|
+
generator=generator,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
image = result.images[0]
|
|
261
|
+
# Resize to output size
|
|
262
|
+
return image.resize((OUTPUT_SIZE, OUTPUT_SIZE), Image.Resampling.LANCZOS)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def main():
|
|
266
|
+
parser = argparse.ArgumentParser(description="Generate individual portraits from theme YAML files")
|
|
267
|
+
parser.add_argument("--dry-run", action="store_true", help="List without generating")
|
|
268
|
+
parser.add_argument("--theme", type=str, help="Generate only this theme")
|
|
269
|
+
parser.add_argument("--role", type=str, help="Generate only this role (with --theme)")
|
|
270
|
+
parser.add_argument("--seed", type=int, default=42, help="Random seed")
|
|
271
|
+
parser.add_argument("--skip-existing", action="store_true", help="Skip existing files")
|
|
272
|
+
parser.add_argument("--output-dir", type=str, help="Output to different directory (default: pennyfarthing-dist/personas/portraits)")
|
|
273
|
+
args = parser.parse_args()
|
|
274
|
+
|
|
275
|
+
# Determine output directory
|
|
276
|
+
output_base = Path(args.output_dir) if args.output_dir else OUTPUT_DIR
|
|
277
|
+
|
|
278
|
+
# Find theme files from both built-in and custom directories
|
|
279
|
+
# Custom themes take precedence over built-in themes with same name
|
|
280
|
+
theme_map = {}
|
|
281
|
+
|
|
282
|
+
# First add built-in themes
|
|
283
|
+
if BUILTIN_THEMES_DIR.exists():
|
|
284
|
+
for tf in BUILTIN_THEMES_DIR.glob("*.yaml"):
|
|
285
|
+
theme_map[tf.stem] = tf
|
|
286
|
+
|
|
287
|
+
# Then add/override with custom themes
|
|
288
|
+
if CUSTOM_THEMES_DIR.exists():
|
|
289
|
+
for tf in CUSTOM_THEMES_DIR.glob("*.yaml"):
|
|
290
|
+
theme_map[tf.stem] = tf
|
|
291
|
+
|
|
292
|
+
theme_files = sorted(theme_map.values(), key=lambda p: p.stem)
|
|
293
|
+
|
|
294
|
+
if args.theme:
|
|
295
|
+
if args.theme in theme_map:
|
|
296
|
+
theme_files = [theme_map[args.theme]]
|
|
297
|
+
else:
|
|
298
|
+
print(f"Theme '{args.theme}' not found")
|
|
299
|
+
print(f" Searched: {BUILTIN_THEMES_DIR}")
|
|
300
|
+
print(f" Searched: {CUSTOM_THEMES_DIR}")
|
|
301
|
+
sys.exit(1)
|
|
302
|
+
|
|
303
|
+
print(f"Theme sources:")
|
|
304
|
+
print(f" Built-in: {BUILTIN_THEMES_DIR}")
|
|
305
|
+
print(f" Custom: {CUSTOM_THEMES_DIR}")
|
|
306
|
+
print(f"Found {len(theme_files)} themes")
|
|
307
|
+
print(f"Output: {output_base}/{{theme}}/{{slug}}-{{OCEAN}}.png")
|
|
308
|
+
|
|
309
|
+
if args.dry_run:
|
|
310
|
+
print(f"\nCLIP token limit: {CLIP_MAX_TOKENS} tokens")
|
|
311
|
+
print(f"Tokenizer: {'CLIP (accurate)' if HAS_CLIP_TOKENIZER else 'word estimate (fallback)'}")
|
|
312
|
+
print("\nDry run - portraits to generate:")
|
|
313
|
+
truncation_warnings = []
|
|
314
|
+
for tf in theme_files:
|
|
315
|
+
parsed = parse_theme_file(tf)
|
|
316
|
+
theme_dir = output_base / parsed["theme"]
|
|
317
|
+
char_count = len(parsed["characters"])
|
|
318
|
+
style_desc = parsed["portrait_style"][:60] + "..." if parsed["portrait_style"] and len(parsed["portrait_style"]) > 60 else parsed["portrait_style"]
|
|
319
|
+
style_display = style_desc if style_desc else "(default woodcut)"
|
|
320
|
+
print(f"\n {parsed['theme']}/ ({char_count} characters with visual)")
|
|
321
|
+
print(f" Style: {style_display}")
|
|
322
|
+
for role in ROLES:
|
|
323
|
+
if role in parsed["characters"]:
|
|
324
|
+
char = parsed["characters"][role]
|
|
325
|
+
out_path = theme_dir / char["filename"]
|
|
326
|
+
status = "EXISTS" if out_path.exists() else "PENDING"
|
|
327
|
+
|
|
328
|
+
# Check token count and truncation
|
|
329
|
+
prompt, was_truncated, token_count = build_portrait_prompt(char["visual"], parsed["portrait_style"])
|
|
330
|
+
token_status = f"{token_count}tok"
|
|
331
|
+
if was_truncated:
|
|
332
|
+
token_status = f"⚠️ {token_count}tok TRUNCATED"
|
|
333
|
+
truncation_warnings.append((parsed["theme"], role, char["filename"]))
|
|
334
|
+
|
|
335
|
+
visual_preview = char["visual"][:40] + "..." if len(char["visual"]) > 40 else char["visual"]
|
|
336
|
+
print(f" [{status}] {char['filename']} ({token_status}): {visual_preview}")
|
|
337
|
+
else:
|
|
338
|
+
print(f" [SKIP] {role}: no visual field")
|
|
339
|
+
|
|
340
|
+
if truncation_warnings:
|
|
341
|
+
print(f"\n{'='*60}")
|
|
342
|
+
print(f"⚠️ WARNING: {len(truncation_warnings)} prompts will be truncated!")
|
|
343
|
+
print(f" CLIP limit is {CLIP_MAX_TOKENS} tokens. Consider shortening:")
|
|
344
|
+
for theme, role, filename in truncation_warnings[:10]:
|
|
345
|
+
print(f" - {theme}/{filename} ({role})")
|
|
346
|
+
if len(truncation_warnings) > 10:
|
|
347
|
+
print(f" ... and {len(truncation_warnings) - 10} more")
|
|
348
|
+
return
|
|
349
|
+
|
|
350
|
+
# Check for torch
|
|
351
|
+
if not HAS_TORCH:
|
|
352
|
+
print(f"Missing required package: {TORCH_ERROR}")
|
|
353
|
+
print("\nInstall: pip install diffusers transformers accelerate torch pillow")
|
|
354
|
+
sys.exit(1)
|
|
355
|
+
|
|
356
|
+
# Load model
|
|
357
|
+
pipe = load_pipeline()
|
|
358
|
+
|
|
359
|
+
# Track results
|
|
360
|
+
successful = 0
|
|
361
|
+
failed = []
|
|
362
|
+
truncated = []
|
|
363
|
+
start_time = datetime.now()
|
|
364
|
+
|
|
365
|
+
total_themes = len(theme_files)
|
|
366
|
+
for theme_idx, tf in enumerate(theme_files, 1):
|
|
367
|
+
parsed = parse_theme_file(tf)
|
|
368
|
+
theme = parsed["theme"]
|
|
369
|
+
theme_dir = output_base / theme
|
|
370
|
+
theme_dir.mkdir(parents=True, exist_ok=True)
|
|
371
|
+
|
|
372
|
+
roles_to_gen = [args.role] if args.role else ROLES
|
|
373
|
+
print(f"\n[{theme_idx}/{total_themes}] Theme: {theme}")
|
|
374
|
+
|
|
375
|
+
for role in roles_to_gen:
|
|
376
|
+
if role not in parsed["characters"]:
|
|
377
|
+
continue
|
|
378
|
+
|
|
379
|
+
char = parsed["characters"][role]
|
|
380
|
+
out_path = theme_dir / char["filename"]
|
|
381
|
+
if args.skip_existing and out_path.exists():
|
|
382
|
+
print(f" SKIP (exists): {char['filename']}")
|
|
383
|
+
continue
|
|
384
|
+
|
|
385
|
+
prompt, was_truncated, token_count = build_portrait_prompt(char["visual"], parsed["portrait_style"])
|
|
386
|
+
|
|
387
|
+
if was_truncated:
|
|
388
|
+
truncated.append((theme, char["filename"], token_count))
|
|
389
|
+
print(f" WARNING: Truncated {char['filename']} to {token_count} tokens")
|
|
390
|
+
|
|
391
|
+
print(f" Generating: {char['filename']} ({char['name']})...")
|
|
392
|
+
print(f" Prompt: {prompt}")
|
|
393
|
+
try:
|
|
394
|
+
# Vary seed per character for diversity (base_seed + role_index)
|
|
395
|
+
role_seed = args.seed + ROLES.index(role)
|
|
396
|
+
image = generate_portrait(pipe, prompt, seed=role_seed)
|
|
397
|
+
image.save(out_path, "PNG")
|
|
398
|
+
successful += 1
|
|
399
|
+
print(f" DONE: {char['filename']}")
|
|
400
|
+
except Exception as e:
|
|
401
|
+
failed.append((theme, char["filename"], str(e)))
|
|
402
|
+
print(f" FAILED: {char['filename']}: {e}")
|
|
403
|
+
|
|
404
|
+
# Summary
|
|
405
|
+
elapsed = datetime.now() - start_time
|
|
406
|
+
print(f"\n{'='*50}")
|
|
407
|
+
print(f"Complete: {successful} portraits in {elapsed}")
|
|
408
|
+
if truncated:
|
|
409
|
+
print(f"Truncated: {len(truncated)} prompts exceeded {CLIP_MAX_TOKENS} token limit")
|
|
410
|
+
if failed:
|
|
411
|
+
print(f"Failed: {len(failed)}")
|
|
412
|
+
for t, r, e in failed:
|
|
413
|
+
print(f" - {t}/{r}: {e}")
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
if __name__ == "__main__":
|
|
417
|
+
main()
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Portrait Generator Wrapper
|
|
4
|
+
# Activates venv and runs generate-portraits.py with all arguments
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# ./scripts/generate-portraits.sh --theme arthurian-mythos --dry-run
|
|
8
|
+
# ./scripts/generate-portraits.sh --theme shakespeare
|
|
9
|
+
# ./scripts/generate-portraits.sh --theme star-trek-tos --output-dir /tmp/portraits
|
|
10
|
+
# ./scripts/generate-portraits.sh --help
|
|
11
|
+
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
|
|
14
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
15
|
+
|
|
16
|
+
# Find PROJECT_ROOT by looking for .pennyfarthing or pennyfarthing-dist marker
|
|
17
|
+
_dir="$SCRIPT_DIR"
|
|
18
|
+
while [[ ! -d "$_dir/.pennyfarthing" ]] && [[ ! -d "$_dir/pennyfarthing-dist" ]] && [[ "$_dir" != "/" ]]; do
|
|
19
|
+
_dir="$(dirname "$_dir")"
|
|
20
|
+
done
|
|
21
|
+
PROJECT_ROOT="$_dir"
|
|
22
|
+
|
|
23
|
+
# If we're in the pennyfarthing repo itself, look for .venv there
|
|
24
|
+
# If we're in a user project, .venv should be at project root
|
|
25
|
+
VENV_DIR="$PROJECT_ROOT/.venv"
|
|
26
|
+
PYTHON_SCRIPT="$SCRIPT_DIR/generate-portraits.py"
|
|
27
|
+
|
|
28
|
+
# Check venv exists
|
|
29
|
+
if [[ ! -d "$VENV_DIR" ]]; then
|
|
30
|
+
echo "Error: Virtual environment not found at $VENV_DIR"
|
|
31
|
+
echo "Create it with: python3 -m venv .venv"
|
|
32
|
+
echo "Then install: pip install diffusers transformers accelerate torch pillow pyyaml"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Check Python script exists
|
|
37
|
+
if [[ ! -f "$PYTHON_SCRIPT" ]]; then
|
|
38
|
+
echo "Error: generate-portraits.py not found at $PYTHON_SCRIPT"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# Activate venv and run
|
|
43
|
+
source "$VENV_DIR/bin/activate"
|
|
44
|
+
|
|
45
|
+
# Verify torch is available
|
|
46
|
+
if ! python -c "import torch" 2>/dev/null; then
|
|
47
|
+
echo "Error: torch not installed in venv"
|
|
48
|
+
echo "Install with: pip install diffusers transformers accelerate torch pillow"
|
|
49
|
+
deactivate
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Run the portrait generator with all passed arguments
|
|
54
|
+
python "$PYTHON_SCRIPT" "$@"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Sprint Scripts
|
|
2
|
+
|
|
3
|
+
Scripts for sprint YAML operations and sprint management.
|
|
4
|
+
|
|
5
|
+
## Scripts
|
|
6
|
+
|
|
7
|
+
| Script | Purpose |
|
|
8
|
+
|--------|---------|
|
|
9
|
+
| `sprint-status.sh` | Show current sprint status and metrics |
|
|
10
|
+
| `sprint-info.sh` | Display sprint information |
|
|
11
|
+
| `available-stories.sh` | List available stories in backlog |
|
|
12
|
+
| `archive-story.sh` | Archive completed story to sprint archive |
|
|
13
|
+
| `check-story.sh` | Check story details and readiness |
|
|
14
|
+
| `new-sprint.sh` | Create a new sprint |
|
|
15
|
+
| `promote-epic.sh` | Move epic from planning to current sprint |
|
|
16
|
+
| `sprint-common.sh` | Shared sprint utilities (library) |
|
|
17
|
+
| `sprint-metrics.sh` | Calculate sprint metrics |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
.pennyfarthing/scripts/sprint/sprint-status.sh
|
|
23
|
+
.pennyfarthing/scripts/sprint/available-stories.sh
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Ownership
|
|
27
|
+
|
|
28
|
+
- **Primary users:** SM agent, `/sprint` skill
|
|
29
|
+
- **Maintained by:** Core Pennyfarthing team
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Archive a completed story from current-sprint.yaml to the sprint archive
|
|
3
|
+
# Usage: .pennyfarthing/scripts/sprint/archive-story.sh <story-id> [pr-number] [--apply]
|
|
4
|
+
#
|
|
5
|
+
# Example: .pennyfarthing/scripts/sprint/archive-story.sh MSSCI-11945 368
|
|
6
|
+
# .pennyfarthing/scripts/sprint/archive-story.sh MSSCI-11945 368 --apply
|
|
7
|
+
#
|
|
8
|
+
# Options:
|
|
9
|
+
# --apply Also remove story from current-sprint.yaml (atomic operation)
|
|
10
|
+
|
|
11
|
+
set -euo pipefail
|
|
12
|
+
|
|
13
|
+
STORY_ID="${1:-}"
|
|
14
|
+
PR_NUMBER=""
|
|
15
|
+
APPLY_FLAG=false
|
|
16
|
+
|
|
17
|
+
# Parse positional and flag arguments
|
|
18
|
+
shift || true
|
|
19
|
+
for arg in "$@"; do
|
|
20
|
+
case $arg in
|
|
21
|
+
--apply)
|
|
22
|
+
APPLY_FLAG=true
|
|
23
|
+
;;
|
|
24
|
+
*)
|
|
25
|
+
# If not a flag, it's the PR number
|
|
26
|
+
if [[ -z "$PR_NUMBER" ]]; then
|
|
27
|
+
PR_NUMBER="$arg"
|
|
28
|
+
fi
|
|
29
|
+
;;
|
|
30
|
+
esac
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
if [[ -z "$STORY_ID" ]]; then
|
|
34
|
+
echo "Usage: archive-story.sh <story-id> [pr-number] [--apply]"
|
|
35
|
+
echo "Example: archive-story.sh MSSCI-11945 368"
|
|
36
|
+
echo " archive-story.sh MSSCI-11945 368 --apply"
|
|
37
|
+
echo ""
|
|
38
|
+
echo "Options:"
|
|
39
|
+
echo " --apply Also remove story from current-sprint.yaml"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# PROJECT_ROOT should be set by find-root.sh, but find it if not
|
|
44
|
+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
45
|
+
d="$PWD"
|
|
46
|
+
while [[ ! -d "$d/.pennyfarthing" ]] && [[ "$d" != "/" ]]; do
|
|
47
|
+
d="$(dirname "$d")"
|
|
48
|
+
done
|
|
49
|
+
PROJECT_ROOT="$d"
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
SPRINT_FILE="$PROJECT_ROOT/sprint/current-sprint.yaml"
|
|
53
|
+
|
|
54
|
+
if [[ ! -f "$SPRINT_FILE" ]]; then
|
|
55
|
+
echo "Error: Sprint file not found at $SPRINT_FILE"
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Extract sprint name to determine archive file
|
|
60
|
+
# Try jira_sprint_name first (newer format), then fall back to name (older format)
|
|
61
|
+
SPRINT_NAME=$(grep -E "^\s+jira_sprint_name:" "$SPRINT_FILE" | head -1 | sed 's/.*TO Sprint \([0-9]*\).*/\1/')
|
|
62
|
+
if [[ -z "$SPRINT_NAME" ]]; then
|
|
63
|
+
SPRINT_NAME=$(grep -E "^\s+name:" "$SPRINT_FILE" | head -1 | sed 's/.*"TO Sprint \([0-9]*\)".*/\1/')
|
|
64
|
+
fi
|
|
65
|
+
if [[ -z "$SPRINT_NAME" ]]; then
|
|
66
|
+
echo "Error: Could not extract sprint name from $SPRINT_FILE"
|
|
67
|
+
exit 1
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
ARCHIVE_FILE="$PROJECT_ROOT/sprint/archive/sprint-${SPRINT_NAME}-completed.yaml"
|
|
71
|
+
|
|
72
|
+
# Check if archive file exists
|
|
73
|
+
if [[ ! -f "$ARCHIVE_FILE" ]]; then
|
|
74
|
+
echo "Error: Archive file not found at $ARCHIVE_FILE"
|
|
75
|
+
echo "Create it first with new-sprint.sh or manually"
|
|
76
|
+
exit 1
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# Use yq to extract story data
|
|
80
|
+
if ! command -v yq &> /dev/null; then
|
|
81
|
+
echo "Error: yq is required but not installed"
|
|
82
|
+
echo "Install with: brew install yq"
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
# Find the story in current sprint
|
|
87
|
+
STORY_DATA=$(yq eval ".epics[].stories[] | select(.id == \"$STORY_ID\")" "$SPRINT_FILE")
|
|
88
|
+
|
|
89
|
+
if [[ -z "$STORY_DATA" ]]; then
|
|
90
|
+
echo "Error: Story $STORY_ID not found in $SPRINT_FILE"
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
# Extract story fields
|
|
95
|
+
TITLE=$(echo "$STORY_DATA" | yq eval '.title' -)
|
|
96
|
+
POINTS=$(echo "$STORY_DATA" | yq eval '.points' -)
|
|
97
|
+
EPIC_ID=$(yq eval ".epics[] | select(.stories[].id == \"$STORY_ID\") | .id" "$SPRINT_FILE" | head -1)
|
|
98
|
+
|
|
99
|
+
# Get today's date
|
|
100
|
+
COMPLETED_DATE=$(date +%Y-%m-%d)
|
|
101
|
+
|
|
102
|
+
# Build the archive entry
|
|
103
|
+
echo ""
|
|
104
|
+
echo "Archiving story:"
|
|
105
|
+
echo " ID: $STORY_ID"
|
|
106
|
+
echo " Title: $TITLE"
|
|
107
|
+
echo " Points: $POINTS"
|
|
108
|
+
echo " Epic: $EPIC_ID"
|
|
109
|
+
echo " Completed: $COMPLETED_DATE"
|
|
110
|
+
[[ -n "$PR_NUMBER" ]] && echo " PR: $PR_NUMBER"
|
|
111
|
+
echo ""
|
|
112
|
+
|
|
113
|
+
# Append to archive file
|
|
114
|
+
{
|
|
115
|
+
echo " - id: $STORY_ID"
|
|
116
|
+
echo " epic: $EPIC_ID"
|
|
117
|
+
echo " title: \"$TITLE\""
|
|
118
|
+
echo " points: $POINTS"
|
|
119
|
+
echo " completed: $COMPLETED_DATE"
|
|
120
|
+
[[ -n "$PR_NUMBER" ]] && echo " pr: $PR_NUMBER"
|
|
121
|
+
} >> "$ARCHIVE_FILE"
|
|
122
|
+
|
|
123
|
+
echo "Added to $ARCHIVE_FILE"
|
|
124
|
+
|
|
125
|
+
# Remove from current sprint (if --apply)
|
|
126
|
+
if $APPLY_FLAG; then
|
|
127
|
+
echo ""
|
|
128
|
+
echo "Removing story from current sprint..."
|
|
129
|
+
yq eval -i "del(.epics[].stories[] | select(.id == \"$STORY_ID\"))" "$SPRINT_FILE"
|
|
130
|
+
echo "✓ Story removed from $SPRINT_FILE"
|
|
131
|
+
echo ""
|
|
132
|
+
echo "If the epic has no more stories, you may want to remove the empty epic section."
|
|
133
|
+
else
|
|
134
|
+
echo ""
|
|
135
|
+
echo "To also remove from $SPRINT_FILE, re-run with --apply:"
|
|
136
|
+
echo " .pennyfarthing/scripts/sprint/archive-story.sh $STORY_ID ${PR_NUMBER:-<pr>} --apply"
|
|
137
|
+
echo ""
|
|
138
|
+
echo "Or manually: yq eval -i 'del(.epics[].stories[] | select(.id == \"$STORY_ID\"))' $SPRINT_FILE"
|
|
139
|
+
fi
|