@pennyfarthing/core 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +293 -0
- package/package.json +58 -0
- package/packages/core/bin/pennyfarthing.js +14 -0
- package/packages/core/dist/bmad/context-reader.d.ts +71 -0
- package/packages/core/dist/bmad/context-reader.d.ts.map +1 -0
- package/packages/core/dist/bmad/context-reader.js +369 -0
- package/packages/core/dist/bmad/context-reader.js.map +1 -0
- package/packages/core/dist/bmad/context-reader.test.d.ts +71 -0
- package/packages/core/dist/bmad/context-reader.test.d.ts.map +1 -0
- package/packages/core/dist/bmad/context-reader.test.js +878 -0
- package/packages/core/dist/bmad/context-reader.test.js.map +1 -0
- package/packages/core/dist/bmad/epics-parser.d.ts +61 -0
- package/packages/core/dist/bmad/epics-parser.d.ts.map +1 -0
- package/packages/core/dist/bmad/epics-parser.js +331 -0
- package/packages/core/dist/bmad/epics-parser.js.map +1 -0
- package/packages/core/dist/bmad/epics-parser.test.d.ts +7 -0
- package/packages/core/dist/bmad/epics-parser.test.d.ts.map +1 -0
- package/packages/core/dist/bmad/epics-parser.test.js +449 -0
- package/packages/core/dist/bmad/epics-parser.test.js.map +1 -0
- package/packages/core/dist/bmad/index.d.ts +11 -0
- package/packages/core/dist/bmad/index.d.ts.map +1 -0
- package/packages/core/dist/bmad/index.js +24 -0
- package/packages/core/dist/bmad/index.js.map +1 -0
- package/packages/core/dist/bmad/status-sync.d.ts +173 -0
- package/packages/core/dist/bmad/status-sync.d.ts.map +1 -0
- package/packages/core/dist/bmad/status-sync.js +463 -0
- package/packages/core/dist/bmad/status-sync.js.map +1 -0
- package/packages/core/dist/bmad/status-sync.test.d.ts +7 -0
- package/packages/core/dist/bmad/status-sync.test.d.ts.map +1 -0
- package/packages/core/dist/bmad/status-sync.test.js +702 -0
- package/packages/core/dist/bmad/status-sync.test.js.map +1 -0
- package/packages/core/dist/bmad/story-exporter.d.ts +55 -0
- package/packages/core/dist/bmad/story-exporter.d.ts.map +1 -0
- package/packages/core/dist/bmad/story-exporter.js +170 -0
- package/packages/core/dist/bmad/story-exporter.js.map +1 -0
- package/packages/core/dist/bmad/story-exporter.test.d.ts +51 -0
- package/packages/core/dist/bmad/story-exporter.test.d.ts.map +1 -0
- package/packages/core/dist/bmad/story-exporter.test.js +603 -0
- package/packages/core/dist/bmad/story-exporter.test.js.map +1 -0
- package/packages/core/dist/bmad/story-parser.d.ts +44 -0
- package/packages/core/dist/bmad/story-parser.d.ts.map +1 -0
- package/packages/core/dist/bmad/story-parser.js +307 -0
- package/packages/core/dist/bmad/story-parser.js.map +1 -0
- package/packages/core/dist/bmad/story-parser.test.d.ts +44 -0
- package/packages/core/dist/bmad/story-parser.test.d.ts.map +1 -0
- package/packages/core/dist/bmad/story-parser.test.js +693 -0
- package/packages/core/dist/bmad/story-parser.test.js.map +1 -0
- package/packages/core/dist/cli/commands/command.d.ts +28 -0
- package/packages/core/dist/cli/commands/command.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/command.js +399 -0
- package/packages/core/dist/cli/commands/command.js.map +1 -0
- package/packages/core/dist/cli/commands/cyclist.d.ts +46 -0
- package/packages/core/dist/cli/commands/cyclist.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/cyclist.js +191 -0
- package/packages/core/dist/cli/commands/cyclist.js.map +1 -0
- package/packages/core/dist/cli/commands/cyclist.test.d.ts +13 -0
- package/packages/core/dist/cli/commands/cyclist.test.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/cyclist.test.js +243 -0
- package/packages/core/dist/cli/commands/cyclist.test.js.map +1 -0
- package/packages/core/dist/cli/commands/doctor.d.ts +9 -0
- package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/doctor.js +652 -0
- package/packages/core/dist/cli/commands/doctor.js.map +1 -0
- package/packages/core/dist/cli/commands/init.d.ts +8 -0
- package/packages/core/dist/cli/commands/init.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/init.js +524 -0
- package/packages/core/dist/cli/commands/init.js.map +1 -0
- package/packages/core/dist/cli/commands/skill.d.ts +28 -0
- package/packages/core/dist/cli/commands/skill.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/skill.js +416 -0
- package/packages/core/dist/cli/commands/skill.js.map +1 -0
- package/packages/core/dist/cli/commands/theme.d.ts +21 -0
- package/packages/core/dist/cli/commands/theme.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/theme.js +201 -0
- package/packages/core/dist/cli/commands/theme.js.map +1 -0
- package/packages/core/dist/cli/commands/uninstall.d.ts +8 -0
- package/packages/core/dist/cli/commands/uninstall.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/uninstall.js +237 -0
- package/packages/core/dist/cli/commands/uninstall.js.map +1 -0
- package/packages/core/dist/cli/commands/update.d.ts +9 -0
- package/packages/core/dist/cli/commands/update.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/update.js +545 -0
- package/packages/core/dist/cli/commands/update.js.map +1 -0
- package/packages/core/dist/cli/commands/version.d.ts +2 -0
- package/packages/core/dist/cli/commands/version.d.ts.map +1 -0
- package/packages/core/dist/cli/commands/version.js +28 -0
- package/packages/core/dist/cli/commands/version.js.map +1 -0
- package/packages/core/dist/cli/customization.test.d.ts +12 -0
- package/packages/core/dist/cli/customization.test.d.ts.map +1 -0
- package/packages/core/dist/cli/customization.test.js +84 -0
- package/packages/core/dist/cli/customization.test.js.map +1 -0
- package/packages/core/dist/cli/cyclist-migration.test.d.ts +16 -0
- package/packages/core/dist/cli/cyclist-migration.test.d.ts.map +1 -0
- package/packages/core/dist/cli/cyclist-migration.test.js +224 -0
- package/packages/core/dist/cli/cyclist-migration.test.js.map +1 -0
- package/packages/core/dist/cli/index.d.ts +3 -0
- package/packages/core/dist/cli/index.d.ts.map +1 -0
- package/packages/core/dist/cli/index.js +174 -0
- package/packages/core/dist/cli/index.js.map +1 -0
- package/packages/core/dist/cli/ocean-profiles.test.d.ts +13 -0
- package/packages/core/dist/cli/ocean-profiles.test.d.ts.map +1 -0
- package/packages/core/dist/cli/ocean-profiles.test.js +134 -0
- package/packages/core/dist/cli/ocean-profiles.test.js.map +1 -0
- package/packages/core/dist/cli/theme-maker.test.d.ts +11 -0
- package/packages/core/dist/cli/theme-maker.test.d.ts.map +1 -0
- package/packages/core/dist/cli/theme-maker.test.js +356 -0
- package/packages/core/dist/cli/theme-maker.test.js.map +1 -0
- package/packages/core/dist/cli/utils/constants.d.ts +60 -0
- package/packages/core/dist/cli/utils/constants.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/constants.js +52 -0
- package/packages/core/dist/cli/utils/constants.js.map +1 -0
- package/packages/core/dist/cli/utils/files.d.ts +71 -0
- package/packages/core/dist/cli/utils/files.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/files.js +162 -0
- package/packages/core/dist/cli/utils/files.js.map +1 -0
- package/packages/core/dist/cli/utils/logger.d.ts +26 -0
- package/packages/core/dist/cli/utils/logger.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/logger.js +88 -0
- package/packages/core/dist/cli/utils/logger.js.map +1 -0
- package/packages/core/dist/cli/utils/manifest.d.ts +47 -0
- package/packages/core/dist/cli/utils/manifest.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/manifest.js +90 -0
- package/packages/core/dist/cli/utils/manifest.js.map +1 -0
- package/packages/core/dist/cli/utils/node-modules.d.ts +6 -0
- package/packages/core/dist/cli/utils/node-modules.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/node-modules.js +22 -0
- package/packages/core/dist/cli/utils/node-modules.js.map +1 -0
- package/packages/core/dist/cli/utils/prompts.d.ts +34 -0
- package/packages/core/dist/cli/utils/prompts.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/prompts.js +93 -0
- package/packages/core/dist/cli/utils/prompts.js.map +1 -0
- package/packages/core/dist/cli/utils/symlinks.d.ts +29 -0
- package/packages/core/dist/cli/utils/symlinks.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/symlinks.js +181 -0
- package/packages/core/dist/cli/utils/symlinks.js.map +1 -0
- package/packages/core/dist/cli/utils/themes.d.ts +104 -0
- package/packages/core/dist/cli/utils/themes.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/themes.js +393 -0
- package/packages/core/dist/cli/utils/themes.js.map +1 -0
- package/packages/core/dist/cli/utils/themes.test.d.ts +12 -0
- package/packages/core/dist/cli/utils/themes.test.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/themes.test.js +144 -0
- package/packages/core/dist/cli/utils/themes.test.js.map +1 -0
- package/packages/core/dist/cli/utils/version.d.ts +10 -0
- package/packages/core/dist/cli/utils/version.d.ts.map +1 -0
- package/packages/core/dist/cli/utils/version.js +63 -0
- package/packages/core/dist/cli/utils/version.js.map +1 -0
- package/packages/core/dist/cli/workspace.test.d.ts +8 -0
- package/packages/core/dist/cli/workspace.test.d.ts.map +1 -0
- package/packages/core/dist/cli/workspace.test.js +154 -0
- package/packages/core/dist/cli/workspace.test.js.map +1 -0
- package/packages/core/dist/index.d.ts +6 -0
- package/packages/core/dist/index.d.ts.map +1 -0
- package/packages/core/dist/index.js +10 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/permissions/index.d.ts +9 -0
- package/packages/core/dist/permissions/index.d.ts.map +1 -0
- package/packages/core/dist/permissions/index.js +13 -0
- package/packages/core/dist/permissions/index.js.map +1 -0
- package/packages/core/dist/permissions/permission-schema.d.ts +89 -0
- package/packages/core/dist/permissions/permission-schema.d.ts.map +1 -0
- package/packages/core/dist/permissions/permission-schema.js +120 -0
- package/packages/core/dist/permissions/permission-schema.js.map +1 -0
- package/packages/core/dist/permissions/permission-schema.test.d.ts +40 -0
- package/packages/core/dist/permissions/permission-schema.test.d.ts.map +1 -0
- package/packages/core/dist/permissions/permission-schema.test.js +367 -0
- package/packages/core/dist/permissions/permission-schema.test.js.map +1 -0
- package/packages/core/dist/scripts/add-ocean-profiles.d.ts +9 -0
- package/packages/core/dist/scripts/add-ocean-profiles.d.ts.map +1 -0
- package/packages/core/dist/scripts/add-ocean-profiles.js +695 -0
- package/packages/core/dist/scripts/add-ocean-profiles.js.map +1 -0
- package/packages/core/dist/scripts/benchmark-integration.d.ts +182 -0
- package/packages/core/dist/scripts/benchmark-integration.d.ts.map +1 -0
- package/packages/core/dist/scripts/benchmark-integration.js +691 -0
- package/packages/core/dist/scripts/benchmark-integration.js.map +1 -0
- package/packages/core/dist/scripts/benchmark-integration.test.d.ts +13 -0
- package/packages/core/dist/scripts/benchmark-integration.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/benchmark-integration.test.js +680 -0
- package/packages/core/dist/scripts/benchmark-integration.test.js.map +1 -0
- package/packages/core/dist/scripts/debugging-scenarios.test.d.ts +18 -0
- package/packages/core/dist/scripts/debugging-scenarios.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/debugging-scenarios.test.js +317 -0
- package/packages/core/dist/scripts/debugging-scenarios.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-all-faces.d.ts +10 -0
- package/packages/core/dist/scripts/generate-all-faces.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-all-faces.js +256 -0
- package/packages/core/dist/scripts/generate-all-faces.js.map +1 -0
- package/packages/core/dist/scripts/generate-all-faces.test.d.ts +17 -0
- package/packages/core/dist/scripts/generate-all-faces.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-all-faces.test.js +372 -0
- package/packages/core/dist/scripts/generate-all-faces.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-all-spiders.d.ts +10 -0
- package/packages/core/dist/scripts/generate-all-spiders.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-all-spiders.js +306 -0
- package/packages/core/dist/scripts/generate-all-spiders.js.map +1 -0
- package/packages/core/dist/scripts/generate-ascii-face.d.ts +52 -0
- package/packages/core/dist/scripts/generate-ascii-face.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-ascii-face.js +155 -0
- package/packages/core/dist/scripts/generate-ascii-face.js.map +1 -0
- package/packages/core/dist/scripts/generate-face.d.ts +52 -0
- package/packages/core/dist/scripts/generate-face.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-face.js +199 -0
- package/packages/core/dist/scripts/generate-face.js.map +1 -0
- package/packages/core/dist/scripts/generate-face.test.d.ts +13 -0
- package/packages/core/dist/scripts/generate-face.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-face.test.js +301 -0
- package/packages/core/dist/scripts/generate-face.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-report.d.ts +65 -0
- package/packages/core/dist/scripts/generate-report.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-report.js +378 -0
- package/packages/core/dist/scripts/generate-report.js.map +1 -0
- package/packages/core/dist/scripts/generate-report.test.d.ts +13 -0
- package/packages/core/dist/scripts/generate-report.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-report.test.js +363 -0
- package/packages/core/dist/scripts/generate-report.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider-report.d.ts +65 -0
- package/packages/core/dist/scripts/generate-spider-report.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-spider-report.js +366 -0
- package/packages/core/dist/scripts/generate-spider-report.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider-report.test.d.ts +13 -0
- package/packages/core/dist/scripts/generate-spider-report.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-spider-report.test.js +367 -0
- package/packages/core/dist/scripts/generate-spider-report.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider.d.ts +37 -0
- package/packages/core/dist/scripts/generate-spider.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-spider.js +315 -0
- package/packages/core/dist/scripts/generate-spider.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider.test.d.ts +14 -0
- package/packages/core/dist/scripts/generate-spider.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/generate-spider.test.js +269 -0
- package/packages/core/dist/scripts/generate-spider.test.js.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts +150 -0
- package/packages/core/dist/scripts/job-fair-aggregator.d.ts.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.js +547 -0
- package/packages/core/dist/scripts/job-fair-aggregator.js.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.test.d.ts +14 -0
- package/packages/core/dist/scripts/job-fair-aggregator.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/job-fair-aggregator.test.js +616 -0
- package/packages/core/dist/scripts/job-fair-aggregator.test.js.map +1 -0
- package/packages/core/dist/scripts/run-ci.test.d.ts +20 -0
- package/packages/core/dist/scripts/run-ci.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/run-ci.test.js +127 -0
- package/packages/core/dist/scripts/run-ci.test.js.map +1 -0
- package/packages/core/dist/scripts/theme-detail.test.d.ts +10 -0
- package/packages/core/dist/scripts/theme-detail.test.d.ts.map +1 -0
- package/packages/core/dist/scripts/theme-detail.test.js +199 -0
- package/packages/core/dist/scripts/theme-detail.test.js.map +1 -0
- package/packages/core/dist/scripts/validate-ocean-profiles.d.ts +9 -0
- package/packages/core/dist/scripts/validate-ocean-profiles.d.ts.map +1 -0
- package/packages/core/dist/scripts/validate-ocean-profiles.js +130 -0
- package/packages/core/dist/scripts/validate-ocean-profiles.js.map +1 -0
- package/packages/core/dist/workflow/generic-handoff.d.ts +235 -0
- package/packages/core/dist/workflow/generic-handoff.d.ts.map +1 -0
- package/packages/core/dist/workflow/generic-handoff.js +358 -0
- package/packages/core/dist/workflow/generic-handoff.js.map +1 -0
- package/packages/core/dist/workflow/generic-handoff.test.d.ts +21 -0
- package/packages/core/dist/workflow/generic-handoff.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/generic-handoff.test.js +499 -0
- package/packages/core/dist/workflow/generic-handoff.test.js.map +1 -0
- package/packages/core/dist/workflow/generic-sm-finish.d.ts +89 -0
- package/packages/core/dist/workflow/generic-sm-finish.d.ts.map +1 -0
- package/packages/core/dist/workflow/generic-sm-finish.js +157 -0
- package/packages/core/dist/workflow/generic-sm-finish.js.map +1 -0
- package/packages/core/dist/workflow/generic-sm-setup.d.ts +138 -0
- package/packages/core/dist/workflow/generic-sm-setup.d.ts.map +1 -0
- package/packages/core/dist/workflow/generic-sm-setup.js +382 -0
- package/packages/core/dist/workflow/generic-sm-setup.js.map +1 -0
- package/packages/core/dist/workflow/sm-subagents.test.d.ts +23 -0
- package/packages/core/dist/workflow/sm-subagents.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/sm-subagents.test.js +727 -0
- package/packages/core/dist/workflow/sm-subagents.test.js.map +1 -0
- package/packages/core/dist/workflow/story-workflow-routing.test.d.ts +17 -0
- package/packages/core/dist/workflow/story-workflow-routing.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/story-workflow-routing.test.js +559 -0
- package/packages/core/dist/workflow/story-workflow-routing.test.js.map +1 -0
- package/packages/core/dist/workflow/test-cache.d.ts +131 -0
- package/packages/core/dist/workflow/test-cache.d.ts.map +1 -0
- package/packages/core/dist/workflow/test-cache.js +226 -0
- package/packages/core/dist/workflow/test-cache.js.map +1 -0
- package/packages/core/dist/workflow/test-cache.test.d.ts +17 -0
- package/packages/core/dist/workflow/test-cache.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/test-cache.test.js +438 -0
- package/packages/core/dist/workflow/test-cache.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-loader.d.ts +76 -0
- package/packages/core/dist/workflow/workflow-loader.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-loader.js +133 -0
- package/packages/core/dist/workflow/workflow-loader.js.map +1 -0
- package/packages/core/dist/workflow/workflow-loader.test.d.ts +15 -0
- package/packages/core/dist/workflow/workflow-loader.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-loader.test.js +354 -0
- package/packages/core/dist/workflow/workflow-loader.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-migration.test.d.ts +17 -0
- package/packages/core/dist/workflow/workflow-migration.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-migration.test.js +372 -0
- package/packages/core/dist/workflow/workflow-migration.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-router.d.ts +55 -0
- package/packages/core/dist/workflow/workflow-router.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-router.js +245 -0
- package/packages/core/dist/workflow/workflow-router.js.map +1 -0
- package/packages/core/dist/workflow/workflow-router.test.d.ts +20 -0
- package/packages/core/dist/workflow/workflow-router.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-router.test.js +607 -0
- package/packages/core/dist/workflow/workflow-router.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-schema.d.ts +98 -0
- package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-schema.js +230 -0
- package/packages/core/dist/workflow/workflow-schema.js.map +1 -0
- package/packages/core/dist/workflow/workflow-schema.test.d.ts +45 -0
- package/packages/core/dist/workflow/workflow-schema.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/workflow-schema.test.js +512 -0
- package/packages/core/dist/workflow/workflow-schema.test.js.map +1 -0
- package/pennyfarthing-dist/agents/README.md +397 -0
- package/pennyfarthing-dist/agents/architect.md +171 -0
- package/pennyfarthing-dist/agents/dev.md +225 -0
- package/pennyfarthing-dist/agents/devops.md +183 -0
- package/pennyfarthing-dist/agents/generic-handoff.md +451 -0
- package/pennyfarthing-dist/agents/generic-sm-finish.md +261 -0
- package/pennyfarthing-dist/agents/generic-sm-setup.md +214 -0
- package/pennyfarthing-dist/agents/orchestrator.md +316 -0
- package/pennyfarthing-dist/agents/pm.md +153 -0
- package/pennyfarthing-dist/agents/reviewer-preflight.md +224 -0
- package/pennyfarthing-dist/agents/reviewer.md +315 -0
- package/pennyfarthing-dist/agents/sm-file-summary.md +109 -0
- package/pennyfarthing-dist/agents/sm-handoff.md +97 -0
- package/pennyfarthing-dist/agents/sm.md +480 -0
- package/pennyfarthing-dist/agents/tea.md +191 -0
- package/pennyfarthing-dist/agents/tech-writer.md +148 -0
- package/pennyfarthing-dist/agents/testing-runner.md +420 -0
- package/pennyfarthing-dist/agents/ux-designer.md +158 -0
- package/pennyfarthing-dist/agents/workflow-status-check.md +332 -0
- package/pennyfarthing-dist/commands/architect.md +62 -0
- package/pennyfarthing-dist/commands/benchmark-control.md +69 -0
- package/pennyfarthing-dist/commands/benchmark.md +467 -0
- package/pennyfarthing-dist/commands/brainstorm.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 +136 -0
- package/pennyfarthing-dist/commands/continue-session.md +184 -0
- package/pennyfarthing-dist/commands/create-branches-from-story.md +374 -0
- package/pennyfarthing-dist/commands/create-theme.md +29 -0
- package/pennyfarthing-dist/commands/dev.md +60 -0
- package/pennyfarthing-dist/commands/devops.md +59 -0
- package/pennyfarthing-dist/commands/git-cleanup.md +340 -0
- package/pennyfarthing-dist/commands/health-check.md +108 -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 +17 -0
- package/pennyfarthing-dist/commands/new-work.md +127 -0
- package/pennyfarthing-dist/commands/orchestrator.md +56 -0
- package/pennyfarthing-dist/commands/parallel-work.md +71 -0
- package/pennyfarthing-dist/commands/party-mode.md +67 -0
- package/pennyfarthing-dist/commands/permissions.md +193 -0
- package/pennyfarthing-dist/commands/pm.md +60 -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 +64 -0
- package/pennyfarthing-dist/commands/run-ci.md +116 -0
- package/pennyfarthing-dist/commands/set-theme.md +52 -0
- package/pennyfarthing-dist/commands/show-theme.md +21 -0
- package/pennyfarthing-dist/commands/sm.md +70 -0
- package/pennyfarthing-dist/commands/solo.md +411 -0
- package/pennyfarthing-dist/commands/sprint-planning.md +109 -0
- package/pennyfarthing-dist/commands/start-epic.md +156 -0
- package/pennyfarthing-dist/commands/sync-epic-to-jira.md +184 -0
- package/pennyfarthing-dist/commands/sync-work-with-sprint.md +376 -0
- package/pennyfarthing-dist/commands/tea.md +63 -0
- package/pennyfarthing-dist/commands/tech-writer.md +53 -0
- package/pennyfarthing-dist/commands/theme-maker.md +671 -0
- package/pennyfarthing-dist/commands/update-domain-docs.md +83 -0
- package/pennyfarthing-dist/commands/ux-designer.md +62 -0
- package/pennyfarthing-dist/commands/work.md +111 -0
- package/pennyfarthing-dist/guides/AGENT-COORDINATION.md +480 -0
- package/pennyfarthing-dist/guides/AGENT-SCOPES.md +201 -0
- package/pennyfarthing-dist/guides/HOOKS.md +230 -0
- package/pennyfarthing-dist/guides/PROMPT-PATTERNS.md +338 -0
- package/pennyfarthing-dist/guides/SESSION-ARTIFACTS.md +193 -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/patterns/approval-gates-pattern.md +746 -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/persona-system.md +294 -0
- package/pennyfarthing-dist/guides/shared-agent-behavior.md +388 -0
- package/pennyfarthing-dist/guides/shared-context.md +147 -0
- package/pennyfarthing-dist/guides/strategic-agent-behavior.md +348 -0
- package/pennyfarthing-dist/guides/tactical-agent-behavior.md +1041 -0
- package/pennyfarthing-dist/guides/workflow-schema.md +195 -0
- package/pennyfarthing-dist/guides/worktree-mode.md +113 -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 +312 -0
- package/pennyfarthing-dist/personas/themes/a-team.yaml +207 -0
- package/pennyfarthing-dist/personas/themes/agatha-christie.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/alice-in-wonderland.yaml +330 -0
- package/pennyfarthing-dist/personas/themes/all-stars.yaml +332 -0
- package/pennyfarthing-dist/personas/themes/ancient-philosophers.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/ancient-strategists.yaml +306 -0
- package/pennyfarthing-dist/personas/themes/arcane.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/arthurian-mythos.yaml +331 -0
- package/pennyfarthing-dist/personas/themes/avatar-the-last-airbender.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/babylon-5.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/better-call-saul.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/big-lebowski.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/black-sails.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/blade-runner.yaml +295 -0
- package/pennyfarthing-dist/personas/themes/bobiverse.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/breaking-bad.yaml +327 -0
- package/pennyfarthing-dist/personas/themes/catch-22.yaml +316 -0
- package/pennyfarthing-dist/personas/themes/classical-composers.yaml +310 -0
- package/pennyfarthing-dist/personas/themes/control.yaml +197 -0
- package/pennyfarthing-dist/personas/themes/count-of-monte-cristo.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/cowboy-bebop.yaml +323 -0
- package/pennyfarthing-dist/personas/themes/deadwood.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/dickens.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/discworld.yaml +332 -0
- package/pennyfarthing-dist/personas/themes/doctor-who.yaml +290 -0
- package/pennyfarthing-dist/personas/themes/don-quixote.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/dune.yaml +307 -0
- package/pennyfarthing-dist/personas/themes/enlightenment-thinkers.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/expeditionary-force.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/fargo.yaml +330 -0
- package/pennyfarthing-dist/personas/themes/film-auteurs.yaml +312 -0
- package/pennyfarthing-dist/personas/themes/firefly.yaml +328 -0
- package/pennyfarthing-dist/personas/themes/foundation.yaml +290 -0
- package/pennyfarthing-dist/personas/themes/futurama.yaml +321 -0
- package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +290 -0
- package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +243 -0
- package/pennyfarthing-dist/personas/themes/gothic-literature.yaml +308 -0
- package/pennyfarthing-dist/personas/themes/great-gatsby.yaml +308 -0
- package/pennyfarthing-dist/personas/themes/greek-mythology.yaml +330 -0
- package/pennyfarthing-dist/personas/themes/hannibal.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/harry-potter.yaml +324 -0
- package/pennyfarthing-dist/personas/themes/his-dark-materials.yaml +291 -0
- package/pennyfarthing-dist/personas/themes/historical-figures.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +331 -0
- package/pennyfarthing-dist/personas/themes/house-md.yaml +321 -0
- package/pennyfarthing-dist/personas/themes/imperial-radch.yaml +289 -0
- package/pennyfarthing-dist/personas/themes/inspector-morse.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/jane-austen.yaml +287 -0
- package/pennyfarthing-dist/personas/themes/jazz-legends.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/justified.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/legion-of-doom.yaml +219 -0
- package/pennyfarthing-dist/personas/themes/les-miserables.yaml +299 -0
- package/pennyfarthing-dist/personas/themes/lord-of-the-rings.yaml +334 -0
- package/pennyfarthing-dist/personas/themes/lovecraft-mythos.yaml +334 -0
- package/pennyfarthing-dist/personas/themes/mad-max.yaml +355 -0
- package/pennyfarthing-dist/personas/themes/mad-men.yaml +289 -0
- package/pennyfarthing-dist/personas/themes/marvel-mcu.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/mash.yaml +334 -0
- package/pennyfarthing-dist/personas/themes/mass-effect.yaml +289 -0
- package/pennyfarthing-dist/personas/themes/military-commanders.yaml +306 -0
- package/pennyfarthing-dist/personas/themes/moby-dick.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/monty-python.yaml +303 -0
- package/pennyfarthing-dist/personas/themes/neuromancer.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/norse-mythology.yaml +329 -0
- package/pennyfarthing-dist/personas/themes/parks-and-rec.yaml +242 -0
- package/pennyfarthing-dist/personas/themes/peaky-blinders.yaml +298 -0
- package/pennyfarthing-dist/personas/themes/princess-bride.yaml +220 -0
- package/pennyfarthing-dist/personas/themes/renaissance-masters.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/rome.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/russian-masters.yaml +318 -0
- package/pennyfarthing-dist/personas/themes/sandman.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/scientific-revolutionaries.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/shakespeare.yaml +301 -0
- package/pennyfarthing-dist/personas/themes/sherlock-holmes.yaml +289 -0
- package/pennyfarthing-dist/personas/themes/snow-crash.yaml +288 -0
- package/pennyfarthing-dist/personas/themes/software-pioneers.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/star-trek-tng.yaml +230 -0
- package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +210 -0
- package/pennyfarthing-dist/personas/themes/star-wars.yaml +303 -0
- package/pennyfarthing-dist/personas/themes/succession.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/superfriends.yaml +208 -0
- package/pennyfarthing-dist/personas/themes/ted-lasso.yaml +236 -0
- package/pennyfarthing-dist/personas/themes/the-americans.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/the-crown.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/the-expanse.yaml +213 -0
- package/pennyfarthing-dist/personas/themes/the-good-place.yaml +322 -0
- package/pennyfarthing-dist/personas/themes/the-matrix.yaml +353 -0
- package/pennyfarthing-dist/personas/themes/the-odyssey.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/the-office.yaml +330 -0
- package/pennyfarthing-dist/personas/themes/the-simpsons.yaml +308 -0
- package/pennyfarthing-dist/personas/themes/the-sopranos.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/the-wire.yaml +311 -0
- package/pennyfarthing-dist/personas/themes/the-witcher.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/twin-peaks.yaml +302 -0
- package/pennyfarthing-dist/personas/themes/vorkosigan-saga.yaml +300 -0
- package/pennyfarthing-dist/personas/themes/watchmen.yaml +291 -0
- package/pennyfarthing-dist/personas/themes/west-wing.yaml +291 -0
- package/pennyfarthing-dist/personas/themes/world-explorers.yaml +320 -0
- package/pennyfarthing-dist/personas/themes/wwii-leaders.yaml +307 -0
- package/pennyfarthing-dist/personas/themes/x-files.yaml +302 -0
- package/pennyfarthing-dist/scripts/add-short-names.mjs +264 -0
- package/pennyfarthing-dist/scripts/agent-session.sh +367 -0
- package/pennyfarthing-dist/scripts/check-context.sh +187 -0
- package/pennyfarthing-dist/scripts/check.sh +497 -0
- package/pennyfarthing-dist/scripts/deploy.sh +284 -0
- package/pennyfarthing-dist/scripts/doctor-dogfood.sh +360 -0
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +61 -0
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +66 -0
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +35 -0
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +166 -0
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +50 -0
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +71 -0
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +54 -0
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +98 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +59 -0
- package/pennyfarthing-dist/scripts/install-git-hooks.sh +91 -0
- package/pennyfarthing-dist/scripts/prime.sh +161 -0
- package/pennyfarthing-dist/scripts/release.sh +198 -0
- package/pennyfarthing-dist/scripts/repo-utils.sh +778 -0
- package/pennyfarthing-dist/scripts/run-ci.sh +219 -0
- package/pennyfarthing-dist/scripts/run.sh +65 -0
- package/pennyfarthing-dist/scripts/statusline.sh +264 -0
- package/pennyfarthing-dist/scripts/tests/check.test.sh +582 -0
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +107 -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/uninstall.sh +271 -0
- package/pennyfarthing-dist/scripts/utils/background-tasks.sh +177 -0
- package/pennyfarthing-dist/scripts/utils/check-status.sh +251 -0
- package/pennyfarthing-dist/scripts/utils/checkpoint.sh +136 -0
- package/pennyfarthing-dist/scripts/utils/common.sh +157 -0
- package/pennyfarthing-dist/scripts/utils/create-feature-branches.sh +230 -0
- package/pennyfarthing-dist/scripts/utils/file-lock.sh +269 -0
- package/pennyfarthing-dist/scripts/utils/find-related-work.sh +231 -0
- package/pennyfarthing-dist/scripts/utils/find-root.sh +33 -0
- package/pennyfarthing-dist/scripts/utils/generate-skill-docs.sh +110 -0
- package/pennyfarthing-dist/scripts/utils/git-status-all.sh +127 -0
- package/pennyfarthing-dist/scripts/utils/ground-truth-judge.py +289 -0
- package/pennyfarthing-dist/scripts/utils/jira/jira-lib.mjs +443 -0
- package/pennyfarthing-dist/scripts/utils/jira/jira-sync-story.mjs +208 -0
- package/pennyfarthing-dist/scripts/utils/jira/jira-sync.mjs +198 -0
- package/pennyfarthing-dist/scripts/utils/jira-claim-story.sh +162 -0
- package/pennyfarthing-dist/scripts/utils/jira-lib.sh +463 -0
- package/pennyfarthing-dist/scripts/utils/jira-sync-story.sh +8 -0
- package/pennyfarthing-dist/scripts/utils/jira-sync.sh +8 -0
- package/pennyfarthing-dist/scripts/utils/log-skill-usage.sh +74 -0
- package/pennyfarthing-dist/scripts/utils/logging.sh +186 -0
- package/pennyfarthing-dist/scripts/utils/repo-scan.sh +141 -0
- package/pennyfarthing-dist/scripts/utils/retry.sh +76 -0
- package/pennyfarthing-dist/scripts/utils/run-timestamp.sh +7 -0
- package/pennyfarthing-dist/scripts/utils/session-cleanup.sh +319 -0
- package/pennyfarthing-dist/scripts/utils/skill-usage-report.sh +193 -0
- package/pennyfarthing-dist/scripts/utils/sprint-common.sh +286 -0
- package/pennyfarthing-dist/scripts/utils/sprint-metrics.sh +241 -0
- package/pennyfarthing-dist/scripts/utils/swebench-judge.py +400 -0
- package/pennyfarthing-dist/scripts/utils/sync-epic-to-jira.sh +16 -0
- package/pennyfarthing-dist/scripts/utils/test-setup.sh +337 -0
- package/pennyfarthing-dist/scripts/utils/validate-subagent-frontmatter.sh +160 -0
- package/pennyfarthing-dist/scripts/worktree-manager.sh +498 -0
- package/pennyfarthing-dist/skills/agentic-patterns/SKILL.md +236 -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 +268 -0
- package/pennyfarthing-dist/skills/cyclist/SKILL.md +117 -0
- package/pennyfarthing-dist/skills/dev-patterns/SKILL.md +421 -0
- package/pennyfarthing-dist/skills/finalize-run/SKILL.md +258 -0
- package/pennyfarthing-dist/skills/jira/SKILL.md +281 -0
- package/pennyfarthing-dist/skills/judge/SKILL.md +524 -0
- package/pennyfarthing-dist/skills/just/SKILL.md +160 -0
- package/pennyfarthing-dist/skills/mermaid/SKILL.md +240 -0
- package/pennyfarthing-dist/skills/otel/skill.md +222 -0
- package/pennyfarthing-dist/skills/permissions/skill.md +172 -0
- package/pennyfarthing-dist/skills/persona-benchmark/SKILL.md +173 -0
- package/pennyfarthing-dist/skills/skill-registry.schema.json +102 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +335 -0
- package/pennyfarthing-dist/skills/sprint-context/SKILL.md +120 -0
- package/pennyfarthing-dist/skills/story-management/SKILL.md +208 -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 +169 -0
- package/pennyfarthing-dist/skills/workflow/SKILL.md +160 -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 +90 -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/bdd.yaml +58 -0
- package/pennyfarthing-dist/workflows/tdd.yaml +50 -0
- package/pennyfarthing-dist/workflows/trivial.yaml +40 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
#!/usr/bin/env zsh
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Deploy script for Pennyfarthing
|
|
5
|
+
# Usage: ./scripts/deploy.sh [OPTIONS] <major|minor|patch>
|
|
6
|
+
#
|
|
7
|
+
# Options:
|
|
8
|
+
# -y, --yes Skip confirmation prompt
|
|
9
|
+
# --dry-run Show what would happen without executing
|
|
10
|
+
#
|
|
11
|
+
# Steps:
|
|
12
|
+
# 1. Bump version in VERSION, package.json, README.md
|
|
13
|
+
# 2. Commit version bump to current branch
|
|
14
|
+
# 3. Merge to develop (if not already on develop)
|
|
15
|
+
# 4. Merge develop to main
|
|
16
|
+
# 5. Tag the release on main
|
|
17
|
+
# 6. Push everything (develop, main, tags)
|
|
18
|
+
# 7. Create GitHub release from tag
|
|
19
|
+
# 8. Return to develop
|
|
20
|
+
|
|
21
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
22
|
+
|
|
23
|
+
# Use exported PROJECT_ROOT from run.sh, or detect it
|
|
24
|
+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
|
|
25
|
+
# Find PROJECT_ROOT by looking for .claude/ marker
|
|
26
|
+
_dir="$PWD"
|
|
27
|
+
while [[ ! -d "$_dir/.claude" ]] && [[ "$_dir" != "/" ]]; do
|
|
28
|
+
_dir="$(dirname "$_dir")"
|
|
29
|
+
done
|
|
30
|
+
if [[ -d "$_dir/.claude" ]]; then
|
|
31
|
+
PROJECT_ROOT="$_dir"
|
|
32
|
+
else
|
|
33
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
34
|
+
fi
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
VERSION_FILE="$PROJECT_ROOT/VERSION"
|
|
38
|
+
|
|
39
|
+
# Colors for output
|
|
40
|
+
RED='\033[0;31m'
|
|
41
|
+
GREEN='\033[0;32m'
|
|
42
|
+
YELLOW='\033[1;33m'
|
|
43
|
+
NC='\033[0m' # No Color
|
|
44
|
+
|
|
45
|
+
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
|
|
46
|
+
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
|
|
47
|
+
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
|
48
|
+
log_dry() { echo -e "${YELLOW}[DRY-RUN]${NC} $1"; }
|
|
49
|
+
|
|
50
|
+
# Parse arguments
|
|
51
|
+
BUMP_TYPE=""
|
|
52
|
+
DRY_RUN=false
|
|
53
|
+
|
|
54
|
+
while [[ $# -gt 0 ]]; do
|
|
55
|
+
case $1 in
|
|
56
|
+
--dry-run)
|
|
57
|
+
DRY_RUN=true
|
|
58
|
+
shift
|
|
59
|
+
;;
|
|
60
|
+
major|minor|patch)
|
|
61
|
+
BUMP_TYPE="$1"
|
|
62
|
+
shift
|
|
63
|
+
;;
|
|
64
|
+
*)
|
|
65
|
+
echo "Usage: $0 [--dry-run] <major|minor|patch>"
|
|
66
|
+
echo ""
|
|
67
|
+
echo "Options:"
|
|
68
|
+
echo " --dry-run Show what would happen without executing"
|
|
69
|
+
echo ""
|
|
70
|
+
echo "Examples:"
|
|
71
|
+
echo " $0 patch # 1.2.3 -> 1.2.4"
|
|
72
|
+
echo " $0 minor # 1.2.3 -> 1.3.0"
|
|
73
|
+
echo " $0 major --dry-run # Preview major bump"
|
|
74
|
+
exit 1
|
|
75
|
+
;;
|
|
76
|
+
esac
|
|
77
|
+
done
|
|
78
|
+
|
|
79
|
+
if [[ -z "$BUMP_TYPE" ]]; then
|
|
80
|
+
echo "Usage: $0 [--dry-run] <major|minor|patch>"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
# Helper to run or log commands
|
|
85
|
+
run() {
|
|
86
|
+
if $DRY_RUN; then
|
|
87
|
+
log_dry "$*"
|
|
88
|
+
else
|
|
89
|
+
"$@"
|
|
90
|
+
fi
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if $DRY_RUN; then
|
|
94
|
+
echo -e "${YELLOW}=== DRY RUN MODE - No changes will be made ===${NC}"
|
|
95
|
+
echo ""
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# Check for clean working directory
|
|
99
|
+
if [[ -n $(git -C "$PROJECT_ROOT" status --porcelain) ]]; then
|
|
100
|
+
log_error "Working directory is not clean. Commit or stash changes first."
|
|
101
|
+
git -C "$PROJECT_ROOT" status --short
|
|
102
|
+
exit 1
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
# Get current branch
|
|
106
|
+
CURRENT_BRANCH=$(git -C "$PROJECT_ROOT" branch --show-current)
|
|
107
|
+
log_info "Current branch: $CURRENT_BRANCH"
|
|
108
|
+
|
|
109
|
+
# Read current version (create VERSION file if it doesn't exist)
|
|
110
|
+
if [[ ! -f "$VERSION_FILE" ]]; then
|
|
111
|
+
echo "0.0.0" > "$VERSION_FILE"
|
|
112
|
+
log_warn "Created VERSION file with initial version 0.0.0"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
CURRENT_VERSION=$(cat "$VERSION_FILE")
|
|
116
|
+
log_info "Current version: $CURRENT_VERSION"
|
|
117
|
+
|
|
118
|
+
# Parse version components
|
|
119
|
+
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
|
|
120
|
+
|
|
121
|
+
# Bump version
|
|
122
|
+
case "$BUMP_TYPE" in
|
|
123
|
+
major)
|
|
124
|
+
MAJOR=$((MAJOR + 1))
|
|
125
|
+
MINOR=0
|
|
126
|
+
PATCH=0
|
|
127
|
+
;;
|
|
128
|
+
minor)
|
|
129
|
+
MINOR=$((MINOR + 1))
|
|
130
|
+
PATCH=0
|
|
131
|
+
;;
|
|
132
|
+
patch)
|
|
133
|
+
PATCH=$((PATCH + 1))
|
|
134
|
+
;;
|
|
135
|
+
esac
|
|
136
|
+
|
|
137
|
+
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
|
138
|
+
log_info "New version: $NEW_VERSION"
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
# Step 1: Update version files
|
|
142
|
+
if $DRY_RUN; then
|
|
143
|
+
log_dry "echo $NEW_VERSION > VERSION"
|
|
144
|
+
log_dry "Update package.json: $CURRENT_VERSION -> $NEW_VERSION"
|
|
145
|
+
log_dry "Update README.md version badge"
|
|
146
|
+
log_dry "Update package-lock.json"
|
|
147
|
+
log_dry "Update CHANGELOG.md version links and header"
|
|
148
|
+
else
|
|
149
|
+
echo "$NEW_VERSION" > "$VERSION_FILE"
|
|
150
|
+
log_info "Updated VERSION file"
|
|
151
|
+
|
|
152
|
+
if [[ -f "$PROJECT_ROOT/package.json" ]]; then
|
|
153
|
+
sed -i '' "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$PROJECT_ROOT/package.json"
|
|
154
|
+
log_info "Updated package.json"
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
if [[ -f "$PROJECT_ROOT/README.md" ]]; then
|
|
158
|
+
sed -i '' "s/\*\*v$CURRENT_VERSION\*\*/\*\*v$NEW_VERSION\*\*/" "$PROJECT_ROOT/README.md"
|
|
159
|
+
log_info "Updated README.md"
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
if [[ -f "$PROJECT_ROOT/package.json" ]]; then
|
|
163
|
+
(cd "$PROJECT_ROOT" && npm install --package-lock-only --silent 2>/dev/null) || true
|
|
164
|
+
log_info "Updated package-lock.json"
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
# Update CHANGELOG.md - add version entry and update links
|
|
168
|
+
if [[ -f "$PROJECT_ROOT/CHANGELOG.md" ]]; then
|
|
169
|
+
TODAY=$(date +%Y-%m-%d)
|
|
170
|
+
|
|
171
|
+
# Update [Unreleased] link to point to new version
|
|
172
|
+
sed -i '' "s|\[Unreleased\]: https://github.com/1898andCo/pennyfarthing/compare/v$CURRENT_VERSION...HEAD|[Unreleased]: https://github.com/1898andCo/pennyfarthing/compare/v$NEW_VERSION...HEAD\n[$NEW_VERSION]: https://github.com/1898andCo/pennyfarthing/compare/v$CURRENT_VERSION...v$NEW_VERSION|" "$PROJECT_ROOT/CHANGELOG.md"
|
|
173
|
+
|
|
174
|
+
# Check if [Unreleased] section has content or just placeholder
|
|
175
|
+
if grep -q "^\*No unreleased changes\*$" "$PROJECT_ROOT/CHANGELOG.md"; then
|
|
176
|
+
log_warn "CHANGELOG.md has no unreleased changes documented"
|
|
177
|
+
log_warn "Consider adding release notes before pushing"
|
|
178
|
+
else
|
|
179
|
+
# Move [Unreleased] content to new version section
|
|
180
|
+
# This is complex - for now just add an empty version header
|
|
181
|
+
log_info "Updated CHANGELOG.md version links"
|
|
182
|
+
fi
|
|
183
|
+
|
|
184
|
+
# Add new version header if not present
|
|
185
|
+
if ! grep -q "## \[$NEW_VERSION\]" "$PROJECT_ROOT/CHANGELOG.md"; then
|
|
186
|
+
sed -i '' "s|## \[Unreleased\]|## [Unreleased]\n\n*No unreleased changes*\n\n---\n\n## [$NEW_VERSION] - $TODAY|" "$PROJECT_ROOT/CHANGELOG.md"
|
|
187
|
+
log_info "Added CHANGELOG.md version header for $NEW_VERSION"
|
|
188
|
+
fi
|
|
189
|
+
fi
|
|
190
|
+
fi
|
|
191
|
+
|
|
192
|
+
# Step 2: Commit version bump
|
|
193
|
+
if $DRY_RUN; then
|
|
194
|
+
log_dry "git commit -m 'chore: bump version to $NEW_VERSION'"
|
|
195
|
+
else
|
|
196
|
+
git -C "$PROJECT_ROOT" add VERSION package.json package-lock.json README.md CHANGELOG.md 2>/dev/null || true
|
|
197
|
+
git -C "$PROJECT_ROOT" commit -m "chore: bump version to $NEW_VERSION"
|
|
198
|
+
log_info "Committed version bump"
|
|
199
|
+
fi
|
|
200
|
+
|
|
201
|
+
# Step 3: Merge to develop if not already on develop
|
|
202
|
+
if [[ "$CURRENT_BRANCH" != "develop" ]]; then
|
|
203
|
+
if $DRY_RUN; then
|
|
204
|
+
log_dry "git checkout develop && git merge $CURRENT_BRANCH"
|
|
205
|
+
else
|
|
206
|
+
log_info "Merging $CURRENT_BRANCH to develop..."
|
|
207
|
+
git -C "$PROJECT_ROOT" checkout develop
|
|
208
|
+
git -C "$PROJECT_ROOT" pull origin develop --ff-only || {
|
|
209
|
+
log_warn "Could not fast-forward develop. Attempting merge..."
|
|
210
|
+
git -C "$PROJECT_ROOT" pull origin develop --no-rebase
|
|
211
|
+
}
|
|
212
|
+
git -C "$PROJECT_ROOT" merge "$CURRENT_BRANCH" -m "Merge $CURRENT_BRANCH into develop for release $NEW_VERSION"
|
|
213
|
+
log_info "Merged to develop"
|
|
214
|
+
fi
|
|
215
|
+
else
|
|
216
|
+
log_info "Already on develop, skipping merge"
|
|
217
|
+
fi
|
|
218
|
+
|
|
219
|
+
# Step 4: Merge develop to main
|
|
220
|
+
TAG_NAME="v$NEW_VERSION"
|
|
221
|
+
if $DRY_RUN; then
|
|
222
|
+
log_dry "git checkout main && git merge develop"
|
|
223
|
+
log_dry "git tag -a $TAG_NAME -m 'Release $NEW_VERSION'"
|
|
224
|
+
log_dry "git push origin develop main --tags"
|
|
225
|
+
log_dry "gh release create $TAG_NAME --title 'Release $NEW_VERSION' --notes-from-tag --verify-tag"
|
|
226
|
+
log_dry "git checkout develop"
|
|
227
|
+
else
|
|
228
|
+
log_info "Merging develop to main..."
|
|
229
|
+
git -C "$PROJECT_ROOT" checkout main
|
|
230
|
+
git -C "$PROJECT_ROOT" pull origin main --ff-only || {
|
|
231
|
+
log_warn "Could not fast-forward main. Attempting merge..."
|
|
232
|
+
git -C "$PROJECT_ROOT" pull origin main --no-rebase
|
|
233
|
+
}
|
|
234
|
+
git -C "$PROJECT_ROOT" merge develop -m "Merge develop into main for release $NEW_VERSION"
|
|
235
|
+
log_info "Merged to main"
|
|
236
|
+
|
|
237
|
+
# Step 5: Create annotated tag
|
|
238
|
+
log_info "Creating tag: $TAG_NAME"
|
|
239
|
+
git -C "$PROJECT_ROOT" tag -a "$TAG_NAME" -m "Release $NEW_VERSION"
|
|
240
|
+
|
|
241
|
+
# Step 6: Push everything
|
|
242
|
+
log_info "Pushing develop..."
|
|
243
|
+
git -C "$PROJECT_ROOT" push origin develop
|
|
244
|
+
|
|
245
|
+
log_info "Pushing main..."
|
|
246
|
+
git -C "$PROJECT_ROOT" push origin main
|
|
247
|
+
|
|
248
|
+
log_info "Pushing tags..."
|
|
249
|
+
git -C "$PROJECT_ROOT" push origin --tags
|
|
250
|
+
|
|
251
|
+
# Step 7: Create GitHub release
|
|
252
|
+
log_info "Creating GitHub release..."
|
|
253
|
+
if command -v gh &> /dev/null; then
|
|
254
|
+
gh release create "$TAG_NAME" \
|
|
255
|
+
--title "Release $NEW_VERSION" \
|
|
256
|
+
--notes-from-tag \
|
|
257
|
+
--verify-tag
|
|
258
|
+
log_info "GitHub release created: $TAG_NAME"
|
|
259
|
+
else
|
|
260
|
+
log_warn "gh CLI not installed - skipping GitHub release creation"
|
|
261
|
+
log_warn "Create release manually at: https://github.com/1898andCo/pennyfarthing/releases/new"
|
|
262
|
+
fi
|
|
263
|
+
|
|
264
|
+
# Step 8: Return to develop
|
|
265
|
+
log_info "Returning to develop..."
|
|
266
|
+
git -C "$PROJECT_ROOT" checkout develop
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
echo ""
|
|
270
|
+
if $DRY_RUN; then
|
|
271
|
+
log_info "Dry run complete. No changes made."
|
|
272
|
+
echo ""
|
|
273
|
+
echo " Would release version: $NEW_VERSION"
|
|
274
|
+
echo " Would create tag: $TAG_NAME"
|
|
275
|
+
echo " Would create GitHub release: $TAG_NAME"
|
|
276
|
+
else
|
|
277
|
+
log_info "Deploy complete!"
|
|
278
|
+
echo ""
|
|
279
|
+
echo " Version: $NEW_VERSION"
|
|
280
|
+
echo " Tag: $TAG_NAME"
|
|
281
|
+
echo " GitHub release: https://github.com/1898andCo/pennyfarthing/releases/tag/$TAG_NAME"
|
|
282
|
+
echo " Branches pushed: develop, main"
|
|
283
|
+
fi
|
|
284
|
+
echo ""
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# doctor-dogfood.sh - Health check for Pennyfarthing developers (dogfooding)
|
|
3
|
+
#
|
|
4
|
+
# Usage: ./pennyfarthing-dist/scripts/doctor-dogfood.sh [--fix]
|
|
5
|
+
#
|
|
6
|
+
# Checks and optionally fixes common setup issues for developers working
|
|
7
|
+
# on the pennyfarthing repo itself.
|
|
8
|
+
|
|
9
|
+
set -uo pipefail
|
|
10
|
+
|
|
11
|
+
FIX_MODE=false
|
|
12
|
+
if [[ "${1:-}" == "--fix" ]]; then
|
|
13
|
+
FIX_MODE=true
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Colors (if terminal supports them)
|
|
17
|
+
if [[ -t 1 ]]; then
|
|
18
|
+
RED='\033[0;31m'
|
|
19
|
+
GREEN='\033[0;32m'
|
|
20
|
+
YELLOW='\033[0;33m'
|
|
21
|
+
NC='\033[0m' # No Color
|
|
22
|
+
else
|
|
23
|
+
RED=''
|
|
24
|
+
GREEN=''
|
|
25
|
+
YELLOW=''
|
|
26
|
+
NC=''
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
ERRORS=0
|
|
30
|
+
WARNINGS=0
|
|
31
|
+
FIXED=0
|
|
32
|
+
|
|
33
|
+
ok() {
|
|
34
|
+
echo -e "${GREEN}OK${NC} $1"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
warn() {
|
|
38
|
+
echo -e "${YELLOW}WARN${NC} $1"
|
|
39
|
+
((WARNINGS++))
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
fail() {
|
|
43
|
+
echo -e "${RED}FAIL${NC} $1"
|
|
44
|
+
((ERRORS++))
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
fix() {
|
|
48
|
+
echo -e "${GREEN}FIX${NC} $1"
|
|
49
|
+
((FIXED++))
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Find project root
|
|
53
|
+
find_project_root() {
|
|
54
|
+
local dir="$PWD"
|
|
55
|
+
while [[ ! -d "$dir/pennyfarthing-dist" ]] && [[ "$dir" != "/" ]]; do
|
|
56
|
+
dir="$(dirname "$dir")"
|
|
57
|
+
done
|
|
58
|
+
if [[ -d "$dir/pennyfarthing-dist" ]]; then
|
|
59
|
+
echo "$dir"
|
|
60
|
+
else
|
|
61
|
+
echo ""
|
|
62
|
+
fi
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
PROJECT_ROOT="$(find_project_root)"
|
|
66
|
+
|
|
67
|
+
echo "Pennyfarthing Dogfooding Doctor"
|
|
68
|
+
echo "================================"
|
|
69
|
+
echo ""
|
|
70
|
+
|
|
71
|
+
# Check we're in the right place
|
|
72
|
+
if [[ -z "$PROJECT_ROOT" ]]; then
|
|
73
|
+
fail "Not in pennyfarthing repo (no pennyfarthing-dist/ found)"
|
|
74
|
+
exit 1
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
cd "$PROJECT_ROOT"
|
|
78
|
+
ok "Project root: $PROJECT_ROOT"
|
|
79
|
+
|
|
80
|
+
echo ""
|
|
81
|
+
echo "Checking prerequisites..."
|
|
82
|
+
echo ""
|
|
83
|
+
|
|
84
|
+
# Check Node.js
|
|
85
|
+
if command -v node &>/dev/null; then
|
|
86
|
+
NODE_VERSION=$(node --version)
|
|
87
|
+
ok "Node.js: $NODE_VERSION"
|
|
88
|
+
else
|
|
89
|
+
fail "Node.js not installed"
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
# Check npm
|
|
93
|
+
if command -v npm &>/dev/null; then
|
|
94
|
+
NPM_VERSION=$(npm --version)
|
|
95
|
+
ok "npm: $NPM_VERSION"
|
|
96
|
+
else
|
|
97
|
+
fail "npm not installed"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# Check yq (for sprint YAML manipulation)
|
|
101
|
+
if command -v yq &>/dev/null; then
|
|
102
|
+
YQ_VERSION=$(yq --version 2>&1 | head -1)
|
|
103
|
+
ok "yq: $YQ_VERSION"
|
|
104
|
+
else
|
|
105
|
+
warn "yq not installed (needed for post-merge hook)"
|
|
106
|
+
if $FIX_MODE; then
|
|
107
|
+
echo " Run: brew install yq"
|
|
108
|
+
fi
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
# Check jira CLI (optional)
|
|
112
|
+
if command -v jira &>/dev/null; then
|
|
113
|
+
ok "jira CLI: installed"
|
|
114
|
+
else
|
|
115
|
+
warn "jira CLI not installed (optional, for Jira sync)"
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
echo ""
|
|
119
|
+
echo "Checking symlinks..."
|
|
120
|
+
echo ""
|
|
121
|
+
|
|
122
|
+
# Check .claude/pennyfarthing symlink
|
|
123
|
+
if [[ -L ".claude/pennyfarthing" ]]; then
|
|
124
|
+
TARGET=$(readlink ".claude/pennyfarthing")
|
|
125
|
+
if [[ "$TARGET" == "../pennyfarthing-dist" ]]; then
|
|
126
|
+
ok ".claude/pennyfarthing -> ../pennyfarthing-dist"
|
|
127
|
+
else
|
|
128
|
+
fail ".claude/pennyfarthing points to wrong target: $TARGET"
|
|
129
|
+
fi
|
|
130
|
+
elif [[ -d ".claude/pennyfarthing" ]]; then
|
|
131
|
+
fail ".claude/pennyfarthing is a directory, should be symlink"
|
|
132
|
+
else
|
|
133
|
+
fail ".claude/pennyfarthing missing"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Check scripts directory/symlink
|
|
137
|
+
if [[ -L "scripts" ]]; then
|
|
138
|
+
TARGET=$(readlink "scripts")
|
|
139
|
+
ok "scripts -> $TARGET"
|
|
140
|
+
elif [[ -d "scripts" ]]; then
|
|
141
|
+
# Check if contents are symlinks to pennyfarthing-dist
|
|
142
|
+
if [[ -L "scripts/agent-session.sh" ]]; then
|
|
143
|
+
ok "scripts/ directory with symlinks (dogfooding setup)"
|
|
144
|
+
else
|
|
145
|
+
warn "scripts/ is a directory but contents may not be symlinked"
|
|
146
|
+
fi
|
|
147
|
+
else
|
|
148
|
+
fail "scripts/ missing"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
echo ""
|
|
152
|
+
echo "Checking git hooks..."
|
|
153
|
+
echo ""
|
|
154
|
+
|
|
155
|
+
# Check git hooks
|
|
156
|
+
HOOKS=("pre-commit" "pre-push" "post-merge")
|
|
157
|
+
for hook in "${HOOKS[@]}"; do
|
|
158
|
+
hook_path=".git/hooks/$hook"
|
|
159
|
+
expected_target="../../pennyfarthing-dist/scripts/hooks/${hook}.sh"
|
|
160
|
+
|
|
161
|
+
if [[ -L "$hook_path" ]]; then
|
|
162
|
+
actual_target=$(readlink "$hook_path")
|
|
163
|
+
if [[ "$actual_target" == "$expected_target" ]]; then
|
|
164
|
+
ok "$hook hook -> $expected_target"
|
|
165
|
+
else
|
|
166
|
+
warn "$hook hook points to: $actual_target"
|
|
167
|
+
if $FIX_MODE; then
|
|
168
|
+
ln -sf "$expected_target" "$hook_path"
|
|
169
|
+
fix "$hook hook updated"
|
|
170
|
+
fi
|
|
171
|
+
fi
|
|
172
|
+
elif [[ -f "$hook_path" ]]; then
|
|
173
|
+
# Check if it's our hook (contains pennyfarthing marker)
|
|
174
|
+
if grep -q "pennyfarthing" "$hook_path" 2>/dev/null; then
|
|
175
|
+
ok "$hook hook (file, pennyfarthing)"
|
|
176
|
+
else
|
|
177
|
+
warn "$hook hook exists but is not pennyfarthing hook"
|
|
178
|
+
if $FIX_MODE; then
|
|
179
|
+
mv "$hook_path" "${hook_path}.backup"
|
|
180
|
+
ln -sf "$expected_target" "$hook_path"
|
|
181
|
+
fix "$hook hook replaced (backup saved)"
|
|
182
|
+
fi
|
|
183
|
+
fi
|
|
184
|
+
else
|
|
185
|
+
fail "$hook hook missing"
|
|
186
|
+
if $FIX_MODE; then
|
|
187
|
+
ln -sf "$expected_target" "$hook_path"
|
|
188
|
+
fix "$hook hook installed"
|
|
189
|
+
fi
|
|
190
|
+
fi
|
|
191
|
+
done
|
|
192
|
+
|
|
193
|
+
echo ""
|
|
194
|
+
echo "Checking build..."
|
|
195
|
+
echo ""
|
|
196
|
+
|
|
197
|
+
# Check if dist/ is up to date
|
|
198
|
+
if [[ -d "dist" ]]; then
|
|
199
|
+
# Check if any src file is newer than its dist counterpart
|
|
200
|
+
OUTDATED=false
|
|
201
|
+
for src_file in src/cli/commands/*.ts; do
|
|
202
|
+
if [[ -f "$src_file" ]]; then
|
|
203
|
+
base=$(basename "$src_file" .ts)
|
|
204
|
+
dist_file="dist/cli/commands/${base}.js"
|
|
205
|
+
if [[ -f "$dist_file" ]]; then
|
|
206
|
+
if [[ "$src_file" -nt "$dist_file" ]]; then
|
|
207
|
+
OUTDATED=true
|
|
208
|
+
break
|
|
209
|
+
fi
|
|
210
|
+
fi
|
|
211
|
+
fi
|
|
212
|
+
done
|
|
213
|
+
|
|
214
|
+
if $OUTDATED; then
|
|
215
|
+
warn "dist/ may be outdated (run: npm run build)"
|
|
216
|
+
if $FIX_MODE; then
|
|
217
|
+
npm run build >/dev/null 2>&1
|
|
218
|
+
fix "Rebuilt dist/"
|
|
219
|
+
fi
|
|
220
|
+
else
|
|
221
|
+
ok "dist/ appears up to date"
|
|
222
|
+
fi
|
|
223
|
+
else
|
|
224
|
+
fail "dist/ directory missing"
|
|
225
|
+
if $FIX_MODE; then
|
|
226
|
+
npm run build >/dev/null 2>&1
|
|
227
|
+
fix "Built dist/"
|
|
228
|
+
fi
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
# Check node_modules
|
|
232
|
+
if [[ -d "node_modules" ]]; then
|
|
233
|
+
ok "node_modules/ exists"
|
|
234
|
+
else
|
|
235
|
+
fail "node_modules/ missing (run: npm install)"
|
|
236
|
+
if $FIX_MODE; then
|
|
237
|
+
npm install >/dev/null 2>&1
|
|
238
|
+
fix "Installed dependencies"
|
|
239
|
+
fi
|
|
240
|
+
fi
|
|
241
|
+
|
|
242
|
+
echo ""
|
|
243
|
+
echo "Checking for broken symlinks..."
|
|
244
|
+
echo ""
|
|
245
|
+
|
|
246
|
+
# Find broken symlinks in key directories
|
|
247
|
+
BROKEN_LINKS=$(find .claude pennyfarthing-dist scripts -type l ! -exec test -e {} \; -print 2>/dev/null)
|
|
248
|
+
if [[ -n "$BROKEN_LINKS" ]]; then
|
|
249
|
+
while IFS= read -r link; do
|
|
250
|
+
fail "Broken symlink: $link"
|
|
251
|
+
if $FIX_MODE; then
|
|
252
|
+
rm "$link" 2>/dev/null && fix "Removed $link"
|
|
253
|
+
fi
|
|
254
|
+
done <<< "$BROKEN_LINKS"
|
|
255
|
+
else
|
|
256
|
+
ok "No broken symlinks"
|
|
257
|
+
fi
|
|
258
|
+
|
|
259
|
+
echo ""
|
|
260
|
+
echo "Checking file locations..."
|
|
261
|
+
echo ""
|
|
262
|
+
|
|
263
|
+
# Check for files that should be in pennyfarthing-dist but aren't
|
|
264
|
+
# Only check directories that are NOT symlinks (symlink dirs are fine)
|
|
265
|
+
MISPLACED=0
|
|
266
|
+
|
|
267
|
+
# .claude/agents should be a symlink, not a real directory with files
|
|
268
|
+
if [[ -d ".claude/agents" ]] && [[ ! -L ".claude/agents" ]]; then
|
|
269
|
+
warn ".pennyfarthing/agents/ is a directory, should be symlink to pennyfarthing/agents"
|
|
270
|
+
((MISPLACED++))
|
|
271
|
+
fi
|
|
272
|
+
|
|
273
|
+
# .claude/commands should be a symlink
|
|
274
|
+
if [[ -d ".claude/commands" ]] && [[ ! -L ".claude/commands" ]]; then
|
|
275
|
+
warn ".claude/commands/ is a directory, should be symlink to pennyfarthing/commands"
|
|
276
|
+
((MISPLACED++))
|
|
277
|
+
fi
|
|
278
|
+
|
|
279
|
+
# .claude/skills should be a symlink
|
|
280
|
+
if [[ -d ".claude/skills" ]] && [[ ! -L ".claude/skills" ]]; then
|
|
281
|
+
warn ".claude/skills/ is a directory, should be symlink to pennyfarthing/skills"
|
|
282
|
+
((MISPLACED++))
|
|
283
|
+
fi
|
|
284
|
+
|
|
285
|
+
if [[ $MISPLACED -eq 0 ]]; then
|
|
286
|
+
ok "All .claude/ directories properly symlinked"
|
|
287
|
+
fi
|
|
288
|
+
|
|
289
|
+
echo ""
|
|
290
|
+
echo "Checking scripts/ structure..."
|
|
291
|
+
echo ""
|
|
292
|
+
|
|
293
|
+
# Count distributed vs local scripts
|
|
294
|
+
DIST_SCRIPTS=0
|
|
295
|
+
LOCAL_SCRIPTS=0
|
|
296
|
+
if compgen -G "scripts/*.sh" > /dev/null 2>&1; then
|
|
297
|
+
for f in scripts/*.sh; do
|
|
298
|
+
if [[ -L "$f" ]]; then
|
|
299
|
+
((DIST_SCRIPTS++))
|
|
300
|
+
elif [[ -f "$f" ]]; then
|
|
301
|
+
((LOCAL_SCRIPTS++))
|
|
302
|
+
fi
|
|
303
|
+
done
|
|
304
|
+
fi
|
|
305
|
+
|
|
306
|
+
ok "$DIST_SCRIPTS distributed scripts (symlinks to pennyfarthing-dist/)"
|
|
307
|
+
if [[ $LOCAL_SCRIPTS -gt 0 ]]; then
|
|
308
|
+
ok "$LOCAL_SCRIPTS local scripts (dogfooding only, not in npm package)"
|
|
309
|
+
fi
|
|
310
|
+
|
|
311
|
+
echo ""
|
|
312
|
+
echo "Checking Claude Code integration..."
|
|
313
|
+
echo ""
|
|
314
|
+
|
|
315
|
+
# Check settings.local.json
|
|
316
|
+
if [[ -f ".claude/settings.local.json" ]]; then
|
|
317
|
+
ok ".claude/settings.local.json exists"
|
|
318
|
+
else
|
|
319
|
+
warn ".claude/settings.local.json missing"
|
|
320
|
+
fi
|
|
321
|
+
|
|
322
|
+
# Check persona config (priority: .pennyfarthing/ > .claude/local > .claude/shared)
|
|
323
|
+
if [[ -f ".pennyfarthing/config.local.yaml" ]]; then
|
|
324
|
+
THEME=$(grep "^theme:" ".pennyfarthing/config.local.yaml" | awk '{print $2}')
|
|
325
|
+
ok "Theme: ${THEME:-unknown} (.pennyfarthing/)"
|
|
326
|
+
elif [[ -f ".claude/persona-config.local.yaml" ]]; then
|
|
327
|
+
THEME=$(grep "^theme:" ".claude/persona-config.local.yaml" | awk '{print $2}')
|
|
328
|
+
ok "Theme: ${THEME:-unknown} (.claude/ local)"
|
|
329
|
+
elif [[ -f ".claude/persona-config.yaml" ]]; then
|
|
330
|
+
THEME=$(grep "^theme:" ".claude/persona-config.yaml" | awk '{print $2}')
|
|
331
|
+
ok "Theme: ${THEME:-unknown} (.claude/ shared)"
|
|
332
|
+
else
|
|
333
|
+
warn "No persona config found (will use default theme)"
|
|
334
|
+
fi
|
|
335
|
+
|
|
336
|
+
echo ""
|
|
337
|
+
echo "================================"
|
|
338
|
+
echo "Summary"
|
|
339
|
+
echo "================================"
|
|
340
|
+
echo ""
|
|
341
|
+
|
|
342
|
+
if [[ $ERRORS -eq 0 ]] && [[ $WARNINGS -eq 0 ]]; then
|
|
343
|
+
echo -e "${GREEN}All checks passed!${NC}"
|
|
344
|
+
elif [[ $ERRORS -eq 0 ]]; then
|
|
345
|
+
echo -e "${YELLOW}$WARNINGS warning(s), 0 errors${NC}"
|
|
346
|
+
else
|
|
347
|
+
echo -e "${RED}$ERRORS error(s), $WARNINGS warning(s)${NC}"
|
|
348
|
+
fi
|
|
349
|
+
|
|
350
|
+
if $FIX_MODE && [[ $FIXED -gt 0 ]]; then
|
|
351
|
+
echo -e "${GREEN}$FIXED issue(s) fixed${NC}"
|
|
352
|
+
fi
|
|
353
|
+
|
|
354
|
+
if [[ $ERRORS -gt 0 ]] && ! $FIX_MODE; then
|
|
355
|
+
echo ""
|
|
356
|
+
echo "Run with --fix to attempt automatic repairs:"
|
|
357
|
+
echo " ./pennyfarthing-dist/scripts/doctor-dogfood.sh --fix"
|
|
358
|
+
fi
|
|
359
|
+
|
|
360
|
+
exit $ERRORS
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env zsh
|
|
2
|
+
# Context circuit breaker hook: Block tool execution at 85% context usage
|
|
3
|
+
# Called by Claude Code before tool calls (PreToolUse)
|
|
4
|
+
#
|
|
5
|
+
# Input: JSON via stdin with tool_name, tool_input
|
|
6
|
+
# Output: Exit 0 to allow, Exit 2 to block (stderr shown to Claude)
|
|
7
|
+
#
|
|
8
|
+
# This hook provides a hard stop when context is critically high,
|
|
9
|
+
# unlike context-warning.sh which only warns.
|
|
10
|
+
|
|
11
|
+
# Read and discard stdin (required by hook protocol)
|
|
12
|
+
cat > /dev/null
|
|
13
|
+
|
|
14
|
+
# Find project root
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
16
|
+
source "$SCRIPT_DIR/../utils/find-root.sh" 2>/dev/null || true
|
|
17
|
+
|
|
18
|
+
# Get context percentage from check-context.sh
|
|
19
|
+
CONTEXT_SCRIPT="$SCRIPT_DIR/../check-context.sh"
|
|
20
|
+
if [[ ! -x "$CONTEXT_SCRIPT" ]]; then
|
|
21
|
+
# graceful degradation: if check-context.sh not found, allow the tool
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
# Run check-context.sh and parse output
|
|
26
|
+
eval "$("$CONTEXT_SCRIPT" 2>/dev/null)" 2>/dev/null
|
|
27
|
+
|
|
28
|
+
# graceful degradation: if we can't get context, allow the tool
|
|
29
|
+
if [[ -z "$CONTEXT_PERCENT" ]] || [[ "$CONTEXT_PERCENT" == "null" ]]; then
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Load critical threshold (default 85%)
|
|
34
|
+
CRITICAL_THRESHOLD="${CRITICAL_THRESHOLD:-85}"
|
|
35
|
+
|
|
36
|
+
# Check if at or above critical threshold
|
|
37
|
+
if [[ "$CONTEXT_PERCENT" -ge "$CRITICAL_THRESHOLD" ]] 2>/dev/null; then
|
|
38
|
+
# Send error message to stderr (Claude will see this)
|
|
39
|
+
cat >&2 << EOF
|
|
40
|
+
CONTEXT CIRCUIT BREAKER TRIGGERED
|
|
41
|
+
|
|
42
|
+
Context usage: ${CONTEXT_PERCENT}% - CRITICAL (threshold: ${CRITICAL_THRESHOLD}%)
|
|
43
|
+
|
|
44
|
+
Tool execution BLOCKED. You must stop and hand off.
|
|
45
|
+
|
|
46
|
+
Required actions:
|
|
47
|
+
1. Save checkpoint: Run checkpoint_save "{phase}" "{work_summary}"
|
|
48
|
+
2. Update session file with current progress
|
|
49
|
+
3. Commit any pending changes
|
|
50
|
+
4. Hand off to next agent OR tell user to start fresh session
|
|
51
|
+
|
|
52
|
+
DO NOT attempt further tool calls. This is a hard stop.
|
|
53
|
+
|
|
54
|
+
To resume later: /continue-session (story 3-4)
|
|
55
|
+
EOF
|
|
56
|
+
# Exit 2 blocks the tool execution
|
|
57
|
+
exit 2
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# Below threshold: allow the tool
|
|
61
|
+
exit 0
|