@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,438 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story 31-8: Test Result Caching
|
|
3
|
+
*
|
|
4
|
+
* These tests verify the test cache module that eliminates redundant
|
|
5
|
+
* test runs in subagents by caching results in the session file.
|
|
6
|
+
*
|
|
7
|
+
* Test categories:
|
|
8
|
+
* 1. parseTestCache() - Parse cache from session file markdown
|
|
9
|
+
* 2. validateTestCache() - Validate cache freshness
|
|
10
|
+
* 3. formatTestCache() - Format cache for session file
|
|
11
|
+
* 4. createTestCacheEntry() - Create entry from results
|
|
12
|
+
* 5. shouldSkipTests() - Convenience function for subagents
|
|
13
|
+
*
|
|
14
|
+
* Run with: npm test
|
|
15
|
+
*/
|
|
16
|
+
import { describe, it } from 'node:test';
|
|
17
|
+
import assert from 'node:assert';
|
|
18
|
+
import { parseTestCache, validateTestCache, formatTestCache, createTestCacheEntry, shouldSkipTests, DEFAULT_CACHE_MAX_AGE_MINUTES } from './test-cache.js';
|
|
19
|
+
// Test fixtures
|
|
20
|
+
const VALID_CACHE_SECTION = `## Test Cache
|
|
21
|
+
|
|
22
|
+
| Field | Value |
|
|
23
|
+
|-------|-------|
|
|
24
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
25
|
+
| Git SHA | abc1234def5678 |
|
|
26
|
+
| Result | GREEN |
|
|
27
|
+
| Pass | 78 |
|
|
28
|
+
| Fail | 0 |
|
|
29
|
+
| Duration | 36s |
|
|
30
|
+
`;
|
|
31
|
+
const CACHE_WITH_SKIPS = `## Test Cache
|
|
32
|
+
|
|
33
|
+
| Field | Value |
|
|
34
|
+
|-------|-------|
|
|
35
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
36
|
+
| Git SHA | abc1234def5678 |
|
|
37
|
+
| Result | YELLOW |
|
|
38
|
+
| Pass | 75 |
|
|
39
|
+
| Fail | 0 |
|
|
40
|
+
| Skip | 3 |
|
|
41
|
+
| Duration | 34s |
|
|
42
|
+
`;
|
|
43
|
+
const CACHE_WITH_FAILURES = `## Test Cache
|
|
44
|
+
|
|
45
|
+
| Field | Value |
|
|
46
|
+
|-------|-------|
|
|
47
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
48
|
+
| Git SHA | abc1234def5678 |
|
|
49
|
+
| Result | RED |
|
|
50
|
+
| Pass | 70 |
|
|
51
|
+
| Fail | 8 |
|
|
52
|
+
| Duration | 42s |
|
|
53
|
+
`;
|
|
54
|
+
const SESSION_WITH_CACHE = `# Story 31-8: Eliminate Redundant Test Runs
|
|
55
|
+
|
|
56
|
+
| Field | Value |
|
|
57
|
+
|-------|-------|
|
|
58
|
+
| Story | 31-8 |
|
|
59
|
+
| Title | Eliminate redundant test runs in subagents |
|
|
60
|
+
| Points | 2 |
|
|
61
|
+
|
|
62
|
+
## Acceptance Criteria
|
|
63
|
+
|
|
64
|
+
- [ ] Test suite runs only once per TDD phase
|
|
65
|
+
|
|
66
|
+
${VALID_CACHE_SECTION}
|
|
67
|
+
|
|
68
|
+
## Technical Context
|
|
69
|
+
|
|
70
|
+
Some context here...
|
|
71
|
+
`;
|
|
72
|
+
const SESSION_WITHOUT_CACHE = `# Story 31-8: Eliminate Redundant Test Runs
|
|
73
|
+
|
|
74
|
+
| Field | Value |
|
|
75
|
+
|-------|-------|
|
|
76
|
+
| Story | 31-8 |
|
|
77
|
+
| Title | Eliminate redundant test runs in subagents |
|
|
78
|
+
|
|
79
|
+
## Acceptance Criteria
|
|
80
|
+
|
|
81
|
+
- [ ] Test suite runs only once per TDD phase
|
|
82
|
+
|
|
83
|
+
## Technical Context
|
|
84
|
+
|
|
85
|
+
Some context here...
|
|
86
|
+
`;
|
|
87
|
+
describe('Test Cache (31-8)', () => {
|
|
88
|
+
describe('parseTestCache() - Parse cache from session file', () => {
|
|
89
|
+
it('should parse valid cache section with all required fields', () => {
|
|
90
|
+
const entry = parseTestCache(SESSION_WITH_CACHE);
|
|
91
|
+
assert.ok(entry, 'Should parse cache entry');
|
|
92
|
+
assert.strictEqual(entry.lastRun, '2026-01-14T09:00:00Z');
|
|
93
|
+
assert.strictEqual(entry.gitSha, 'abc1234def5678');
|
|
94
|
+
assert.strictEqual(entry.result, 'GREEN');
|
|
95
|
+
assert.strictEqual(entry.passCount, 78);
|
|
96
|
+
assert.strictEqual(entry.failCount, 0);
|
|
97
|
+
assert.strictEqual(entry.durationSeconds, 36);
|
|
98
|
+
});
|
|
99
|
+
it('should parse cache with skip count', () => {
|
|
100
|
+
const entry = parseTestCache(CACHE_WITH_SKIPS);
|
|
101
|
+
assert.ok(entry, 'Should parse cache entry');
|
|
102
|
+
assert.strictEqual(entry.result, 'YELLOW');
|
|
103
|
+
assert.strictEqual(entry.passCount, 75);
|
|
104
|
+
assert.strictEqual(entry.failCount, 0);
|
|
105
|
+
assert.strictEqual(entry.skipCount, 3);
|
|
106
|
+
});
|
|
107
|
+
it('should parse cache with failures', () => {
|
|
108
|
+
const entry = parseTestCache(CACHE_WITH_FAILURES);
|
|
109
|
+
assert.ok(entry, 'Should parse cache entry');
|
|
110
|
+
assert.strictEqual(entry.result, 'RED');
|
|
111
|
+
assert.strictEqual(entry.passCount, 70);
|
|
112
|
+
assert.strictEqual(entry.failCount, 8);
|
|
113
|
+
});
|
|
114
|
+
it('should return null when no cache section exists', () => {
|
|
115
|
+
const entry = parseTestCache(SESSION_WITHOUT_CACHE);
|
|
116
|
+
assert.strictEqual(entry, null);
|
|
117
|
+
});
|
|
118
|
+
it('should return null for malformed cache table', () => {
|
|
119
|
+
const malformed = `## Test Cache
|
|
120
|
+
|
|
121
|
+
| Field | Value |
|
|
122
|
+
|-------|-------|
|
|
123
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
124
|
+
`; // Missing required fields
|
|
125
|
+
const entry = parseTestCache(malformed);
|
|
126
|
+
assert.strictEqual(entry, null);
|
|
127
|
+
});
|
|
128
|
+
it('should return null for invalid result value', () => {
|
|
129
|
+
const invalid = `## Test Cache
|
|
130
|
+
|
|
131
|
+
| Field | Value |
|
|
132
|
+
|-------|-------|
|
|
133
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
134
|
+
| Git SHA | abc1234 |
|
|
135
|
+
| Result | INVALID |
|
|
136
|
+
| Pass | 78 |
|
|
137
|
+
| Fail | 0 |
|
|
138
|
+
| Duration | 36s |
|
|
139
|
+
`;
|
|
140
|
+
const entry = parseTestCache(invalid);
|
|
141
|
+
assert.strictEqual(entry, null);
|
|
142
|
+
});
|
|
143
|
+
it('should handle case-insensitive field names', () => {
|
|
144
|
+
const mixedCase = `## Test Cache
|
|
145
|
+
|
|
146
|
+
| Field | Value |
|
|
147
|
+
|-------|-------|
|
|
148
|
+
| LAST RUN | 2026-01-14T09:00:00Z |
|
|
149
|
+
| Git Sha | abc1234 |
|
|
150
|
+
| result | green |
|
|
151
|
+
| PASS | 78 |
|
|
152
|
+
| fail | 0 |
|
|
153
|
+
| duration | 36s |
|
|
154
|
+
`;
|
|
155
|
+
const entry = parseTestCache(mixedCase);
|
|
156
|
+
assert.ok(entry, 'Should parse case-insensitive fields');
|
|
157
|
+
assert.strictEqual(entry.result, 'GREEN');
|
|
158
|
+
});
|
|
159
|
+
it('should handle duration with or without s suffix', () => {
|
|
160
|
+
const withS = `## Test Cache
|
|
161
|
+
|
|
162
|
+
| Field | Value |
|
|
163
|
+
|-------|-------|
|
|
164
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
165
|
+
| Git SHA | abc1234 |
|
|
166
|
+
| Result | GREEN |
|
|
167
|
+
| Pass | 78 |
|
|
168
|
+
| Fail | 0 |
|
|
169
|
+
| Duration | 36s |
|
|
170
|
+
`;
|
|
171
|
+
const withoutS = `## Test Cache
|
|
172
|
+
|
|
173
|
+
| Field | Value |
|
|
174
|
+
|-------|-------|
|
|
175
|
+
| Last Run | 2026-01-14T09:00:00Z |
|
|
176
|
+
| Git SHA | abc1234 |
|
|
177
|
+
| Result | GREEN |
|
|
178
|
+
| Pass | 78 |
|
|
179
|
+
| Fail | 0 |
|
|
180
|
+
| Duration | 36 |
|
|
181
|
+
`;
|
|
182
|
+
const entryWithS = parseTestCache(withS);
|
|
183
|
+
const entryWithoutS = parseTestCache(withoutS);
|
|
184
|
+
assert.ok(entryWithS, 'Should parse with s suffix');
|
|
185
|
+
assert.ok(entryWithoutS, 'Should parse without s suffix');
|
|
186
|
+
assert.strictEqual(entryWithS.durationSeconds, 36);
|
|
187
|
+
assert.strictEqual(entryWithoutS.durationSeconds, 36);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
describe('validateTestCache() - Validate cache freshness', () => {
|
|
191
|
+
it('should return valid for fresh cache with matching SHA', () => {
|
|
192
|
+
const now = new Date('2026-01-14T09:01:00Z'); // 1 minute after cache
|
|
193
|
+
const result = validateTestCache(SESSION_WITH_CACHE, {
|
|
194
|
+
currentGitSha: 'abc1234def5678',
|
|
195
|
+
currentTime: now
|
|
196
|
+
});
|
|
197
|
+
assert.strictEqual(result.valid, true);
|
|
198
|
+
assert.ok(result.reason.includes('Valid cache'));
|
|
199
|
+
assert.ok(result.entry);
|
|
200
|
+
});
|
|
201
|
+
it('should return invalid when cache not found', () => {
|
|
202
|
+
const result = validateTestCache(SESSION_WITHOUT_CACHE, {
|
|
203
|
+
currentGitSha: 'abc1234def5678'
|
|
204
|
+
});
|
|
205
|
+
assert.strictEqual(result.valid, false);
|
|
206
|
+
assert.ok(result.reason.includes('No test cache found'));
|
|
207
|
+
});
|
|
208
|
+
it('should return invalid when git SHA differs', () => {
|
|
209
|
+
const result = validateTestCache(SESSION_WITH_CACHE, {
|
|
210
|
+
currentGitSha: 'different1234567',
|
|
211
|
+
currentTime: new Date('2026-01-14T09:01:00Z')
|
|
212
|
+
});
|
|
213
|
+
assert.strictEqual(result.valid, false);
|
|
214
|
+
assert.ok(result.reason.includes('Code changed'));
|
|
215
|
+
assert.ok(result.entry, 'Should still return the entry');
|
|
216
|
+
});
|
|
217
|
+
it('should return invalid when cache is too old', () => {
|
|
218
|
+
const now = new Date('2026-01-14T09:15:00Z'); // 15 minutes after cache
|
|
219
|
+
const result = validateTestCache(SESSION_WITH_CACHE, {
|
|
220
|
+
currentGitSha: 'abc1234def5678',
|
|
221
|
+
currentTime: now,
|
|
222
|
+
maxAgeMinutes: 5
|
|
223
|
+
});
|
|
224
|
+
assert.strictEqual(result.valid, false);
|
|
225
|
+
assert.ok(result.reason.includes('Cache too old'));
|
|
226
|
+
});
|
|
227
|
+
it('should use default max age when not specified', () => {
|
|
228
|
+
const now = new Date('2026-01-14T09:04:00Z'); // 4 minutes after cache
|
|
229
|
+
const result = validateTestCache(SESSION_WITH_CACHE, {
|
|
230
|
+
currentGitSha: 'abc1234def5678',
|
|
231
|
+
currentTime: now
|
|
232
|
+
});
|
|
233
|
+
assert.strictEqual(result.valid, true); // 4min < 5min default
|
|
234
|
+
});
|
|
235
|
+
it('should allow custom max age', () => {
|
|
236
|
+
const now = new Date('2026-01-14T09:10:00Z'); // 10 minutes after cache
|
|
237
|
+
const resultDefault = validateTestCache(SESSION_WITH_CACHE, {
|
|
238
|
+
currentGitSha: 'abc1234def5678',
|
|
239
|
+
currentTime: now,
|
|
240
|
+
maxAgeMinutes: 5 // default
|
|
241
|
+
});
|
|
242
|
+
const resultExtended = validateTestCache(SESSION_WITH_CACHE, {
|
|
243
|
+
currentGitSha: 'abc1234def5678',
|
|
244
|
+
currentTime: now,
|
|
245
|
+
maxAgeMinutes: 15 // extended
|
|
246
|
+
});
|
|
247
|
+
assert.strictEqual(resultDefault.valid, false, 'Should fail with 5min limit');
|
|
248
|
+
assert.strictEqual(resultExtended.valid, true, 'Should pass with 15min limit');
|
|
249
|
+
});
|
|
250
|
+
it('should handle invalid timestamp in cache', () => {
|
|
251
|
+
const invalid = `## Test Cache
|
|
252
|
+
|
|
253
|
+
| Field | Value |
|
|
254
|
+
|-------|-------|
|
|
255
|
+
| Last Run | not-a-timestamp |
|
|
256
|
+
| Git SHA | abc1234 |
|
|
257
|
+
| Result | GREEN |
|
|
258
|
+
| Pass | 78 |
|
|
259
|
+
| Fail | 0 |
|
|
260
|
+
| Duration | 36s |
|
|
261
|
+
`;
|
|
262
|
+
const result = validateTestCache(invalid, {
|
|
263
|
+
currentGitSha: 'abc1234'
|
|
264
|
+
});
|
|
265
|
+
assert.strictEqual(result.valid, false);
|
|
266
|
+
assert.ok(result.reason.includes('Invalid timestamp'));
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
describe('formatTestCache() - Format cache for session file', () => {
|
|
270
|
+
it('should format basic cache entry', () => {
|
|
271
|
+
const entry = {
|
|
272
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
273
|
+
gitSha: 'abc1234def5678',
|
|
274
|
+
result: 'GREEN',
|
|
275
|
+
passCount: 78,
|
|
276
|
+
failCount: 0,
|
|
277
|
+
durationSeconds: 36
|
|
278
|
+
};
|
|
279
|
+
const formatted = formatTestCache(entry);
|
|
280
|
+
assert.ok(formatted.includes('## Test Cache'));
|
|
281
|
+
assert.ok(formatted.includes('| Last Run | 2026-01-14T09:00:00Z |'));
|
|
282
|
+
assert.ok(formatted.includes('| Git SHA | abc1234def5678 |'));
|
|
283
|
+
assert.ok(formatted.includes('| Result | GREEN |'));
|
|
284
|
+
assert.ok(formatted.includes('| Pass | 78 |'));
|
|
285
|
+
assert.ok(formatted.includes('| Fail | 0 |'));
|
|
286
|
+
assert.ok(formatted.includes('| Duration | 36s |'));
|
|
287
|
+
});
|
|
288
|
+
it('should include skip count when present', () => {
|
|
289
|
+
const entry = {
|
|
290
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
291
|
+
gitSha: 'abc1234def5678',
|
|
292
|
+
result: 'YELLOW',
|
|
293
|
+
passCount: 75,
|
|
294
|
+
failCount: 0,
|
|
295
|
+
skipCount: 3,
|
|
296
|
+
durationSeconds: 34
|
|
297
|
+
};
|
|
298
|
+
const formatted = formatTestCache(entry);
|
|
299
|
+
assert.ok(formatted.includes('| Skip | 3 |'));
|
|
300
|
+
});
|
|
301
|
+
it('should not include skip row when skipCount is undefined', () => {
|
|
302
|
+
const entry = {
|
|
303
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
304
|
+
gitSha: 'abc1234',
|
|
305
|
+
result: 'GREEN',
|
|
306
|
+
passCount: 78,
|
|
307
|
+
failCount: 0,
|
|
308
|
+
durationSeconds: 36
|
|
309
|
+
};
|
|
310
|
+
const formatted = formatTestCache(entry);
|
|
311
|
+
assert.ok(!formatted.includes('| Skip |'));
|
|
312
|
+
});
|
|
313
|
+
it('should produce valid markdown table', () => {
|
|
314
|
+
const entry = {
|
|
315
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
316
|
+
gitSha: 'abc1234',
|
|
317
|
+
result: 'RED',
|
|
318
|
+
passCount: 70,
|
|
319
|
+
failCount: 8,
|
|
320
|
+
durationSeconds: 42
|
|
321
|
+
};
|
|
322
|
+
const formatted = formatTestCache(entry);
|
|
323
|
+
const lines = formatted.split('\n').filter(l => l.trim());
|
|
324
|
+
// Should have header, separator, and at least 6 data rows
|
|
325
|
+
assert.ok(lines.length >= 8, `Should have at least 8 lines, got ${lines.length}`);
|
|
326
|
+
assert.ok(lines[0].includes('## Test Cache'));
|
|
327
|
+
assert.ok(lines[1].includes('| Field | Value |'));
|
|
328
|
+
assert.ok(lines[2].includes('|-------|-------|'));
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
describe('createTestCacheEntry() - Create entry from results', () => {
|
|
332
|
+
it('should create GREEN entry when no failures', () => {
|
|
333
|
+
const entry = createTestCacheEntry({ passCount: 78, failCount: 0, durationSeconds: 36 }, 'abc1234', new Date('2026-01-14T09:00:00Z'));
|
|
334
|
+
assert.strictEqual(entry.result, 'GREEN');
|
|
335
|
+
assert.strictEqual(entry.passCount, 78);
|
|
336
|
+
assert.strictEqual(entry.failCount, 0);
|
|
337
|
+
assert.strictEqual(entry.gitSha, 'abc1234');
|
|
338
|
+
assert.strictEqual(entry.lastRun, '2026-01-14T09:00:00.000Z');
|
|
339
|
+
});
|
|
340
|
+
it('should create RED entry when failures exist', () => {
|
|
341
|
+
const entry = createTestCacheEntry({ passCount: 70, failCount: 8, durationSeconds: 42 }, 'def5678');
|
|
342
|
+
assert.strictEqual(entry.result, 'RED');
|
|
343
|
+
assert.strictEqual(entry.failCount, 8);
|
|
344
|
+
});
|
|
345
|
+
it('should create YELLOW entry when skips exist but no failures', () => {
|
|
346
|
+
const entry = createTestCacheEntry({ passCount: 75, failCount: 0, skipCount: 3, durationSeconds: 34 }, 'ghi9012');
|
|
347
|
+
assert.strictEqual(entry.result, 'YELLOW');
|
|
348
|
+
assert.strictEqual(entry.skipCount, 3);
|
|
349
|
+
});
|
|
350
|
+
it('should prioritize RED over YELLOW when both failures and skips', () => {
|
|
351
|
+
const entry = createTestCacheEntry({ passCount: 65, failCount: 5, skipCount: 8, durationSeconds: 40 }, 'jkl3456');
|
|
352
|
+
assert.strictEqual(entry.result, 'RED', 'Failures should take priority');
|
|
353
|
+
});
|
|
354
|
+
it('should use current time when timestamp not provided', () => {
|
|
355
|
+
const before = new Date();
|
|
356
|
+
const entry = createTestCacheEntry({ passCount: 78, failCount: 0, durationSeconds: 36 }, 'abc1234');
|
|
357
|
+
const after = new Date();
|
|
358
|
+
const entryTime = new Date(entry.lastRun);
|
|
359
|
+
assert.ok(entryTime >= before, 'Entry time should be after call start');
|
|
360
|
+
assert.ok(entryTime <= after, 'Entry time should be before call end');
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
describe('shouldSkipTests() - Convenience function for subagents', () => {
|
|
364
|
+
it('should return skip=true for valid cache', () => {
|
|
365
|
+
const _now = new Date('2026-01-14T09:01:00Z');
|
|
366
|
+
const _result = shouldSkipTests(SESSION_WITH_CACHE, 'abc1234def5678', 5);
|
|
367
|
+
// Note: This test depends on the current time, so we use a mock
|
|
368
|
+
// For the implementation, we'll need to check if the validation
|
|
369
|
+
// passes with default time handling
|
|
370
|
+
});
|
|
371
|
+
it('should return skip=false when cache not found', () => {
|
|
372
|
+
const result = shouldSkipTests(SESSION_WITHOUT_CACHE, 'abc1234');
|
|
373
|
+
assert.strictEqual(result.skip, false);
|
|
374
|
+
assert.ok(result.reason.includes('No test cache found'));
|
|
375
|
+
assert.strictEqual(result.cachedResult, undefined);
|
|
376
|
+
});
|
|
377
|
+
it('should return skip=false when SHA differs', () => {
|
|
378
|
+
const result = shouldSkipTests(SESSION_WITH_CACHE, 'different1234');
|
|
379
|
+
assert.strictEqual(result.skip, false);
|
|
380
|
+
assert.ok(result.reason.includes('Code changed'));
|
|
381
|
+
});
|
|
382
|
+
it('should include cached result when valid', () => {
|
|
383
|
+
// For a truly time-independent test, we'd need dependency injection
|
|
384
|
+
// This test verifies the structure of the response
|
|
385
|
+
const withCache = parseTestCache(SESSION_WITH_CACHE);
|
|
386
|
+
assert.ok(withCache, 'Test setup: cache should parse');
|
|
387
|
+
// The shouldSkipTests function will return cachedResult only if valid
|
|
388
|
+
// Since we can't mock time easily, we verify the function signature
|
|
389
|
+
// Use very high max age (1 year in minutes) to ensure cache is always valid
|
|
390
|
+
const result = shouldSkipTests(SESSION_WITH_CACHE, 'abc1234def5678', 525600);
|
|
391
|
+
// With a very high max age, the cache should be valid
|
|
392
|
+
assert.strictEqual(result.skip, true);
|
|
393
|
+
assert.strictEqual(result.cachedResult, 'GREEN');
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
describe('DEFAULT_CACHE_MAX_AGE_MINUTES constant', () => {
|
|
397
|
+
it('should be 5 minutes', () => {
|
|
398
|
+
assert.strictEqual(DEFAULT_CACHE_MAX_AGE_MINUTES, 5);
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
describe('Round-trip: format and parse', () => {
|
|
402
|
+
it('should parse what was formatted', () => {
|
|
403
|
+
const original = {
|
|
404
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
405
|
+
gitSha: 'abc1234def5678',
|
|
406
|
+
result: 'GREEN',
|
|
407
|
+
passCount: 78,
|
|
408
|
+
failCount: 0,
|
|
409
|
+
durationSeconds: 36
|
|
410
|
+
};
|
|
411
|
+
const formatted = formatTestCache(original);
|
|
412
|
+
const parsed = parseTestCache(formatted);
|
|
413
|
+
assert.ok(parsed, 'Should parse formatted cache');
|
|
414
|
+
assert.strictEqual(parsed.lastRun, original.lastRun);
|
|
415
|
+
assert.strictEqual(parsed.gitSha, original.gitSha);
|
|
416
|
+
assert.strictEqual(parsed.result, original.result);
|
|
417
|
+
assert.strictEqual(parsed.passCount, original.passCount);
|
|
418
|
+
assert.strictEqual(parsed.failCount, original.failCount);
|
|
419
|
+
assert.strictEqual(parsed.durationSeconds, original.durationSeconds);
|
|
420
|
+
});
|
|
421
|
+
it('should handle skip count in round-trip', () => {
|
|
422
|
+
const original = {
|
|
423
|
+
lastRun: '2026-01-14T09:00:00Z',
|
|
424
|
+
gitSha: 'abc1234def5678',
|
|
425
|
+
result: 'YELLOW',
|
|
426
|
+
passCount: 75,
|
|
427
|
+
failCount: 0,
|
|
428
|
+
skipCount: 3,
|
|
429
|
+
durationSeconds: 34
|
|
430
|
+
};
|
|
431
|
+
const formatted = formatTestCache(original);
|
|
432
|
+
const parsed = parseTestCache(formatted);
|
|
433
|
+
assert.ok(parsed, 'Should parse formatted cache with skips');
|
|
434
|
+
assert.strictEqual(parsed.skipCount, 3);
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
//# sourceMappingURL=test-cache.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-cache.test.js","sourceRoot":"","sources":["../../src/workflow/test-cache.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAE9B,MAAM,iBAAiB,CAAC;AAEzB,gBAAgB;AAChB,MAAM,mBAAmB,GAAG;;;;;;;;;;CAU3B,CA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AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Loader
|
|
3
|
+
*
|
|
4
|
+
* Story 31-2: Load workflow definitions from YAML files
|
|
5
|
+
*
|
|
6
|
+
* This module provides functions to:
|
|
7
|
+
* - Load a single workflow YAML file
|
|
8
|
+
* - Load all workflows from a directory
|
|
9
|
+
* - Validate loaded workflows against the schema
|
|
10
|
+
*
|
|
11
|
+
* Uses validateWorkflow() from workflow-schema.ts (Story 31-1)
|
|
12
|
+
*/
|
|
13
|
+
import { type WorkflowDefinition, type WorkflowValidationError } from './workflow-schema.js';
|
|
14
|
+
/**
|
|
15
|
+
* Result of loading a single workflow file
|
|
16
|
+
*/
|
|
17
|
+
export interface WorkflowLoadResult {
|
|
18
|
+
/** Whether the load and validation succeeded */
|
|
19
|
+
success: boolean;
|
|
20
|
+
/** Path to the workflow file */
|
|
21
|
+
filePath: string;
|
|
22
|
+
/** Parsed and validated workflow (only present if success) */
|
|
23
|
+
workflow?: WorkflowDefinition;
|
|
24
|
+
/** Validation or parse errors (only present if failed) */
|
|
25
|
+
errors?: WorkflowValidationError[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of loading multiple workflows from a directory
|
|
29
|
+
*/
|
|
30
|
+
export interface WorkflowLoadResults {
|
|
31
|
+
/** Successfully loaded and validated workflows */
|
|
32
|
+
workflows: WorkflowDefinition[];
|
|
33
|
+
/** Files that failed to load or validate */
|
|
34
|
+
errors: Array<{
|
|
35
|
+
filePath: string;
|
|
36
|
+
errors: WorkflowValidationError[];
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Load and validate a single workflow YAML file
|
|
41
|
+
*
|
|
42
|
+
* @param filePath - Absolute or relative path to the workflow YAML file
|
|
43
|
+
* @returns Load result with workflow or errors
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const result = loadWorkflowFile('.claude/workflows/tdd.yaml');
|
|
48
|
+
* if (result.success) {
|
|
49
|
+
* console.log(`Loaded workflow: ${result.workflow.name}`);
|
|
50
|
+
* } else {
|
|
51
|
+
* console.error('Errors:', result.errors);
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function loadWorkflowFile(filePath: string): WorkflowLoadResult;
|
|
56
|
+
/**
|
|
57
|
+
* Load and validate all workflow YAML files from a directory
|
|
58
|
+
*
|
|
59
|
+
* Only processes files with .yaml or .yml extensions.
|
|
60
|
+
* Returns partial results - valid workflows are returned even if some fail.
|
|
61
|
+
*
|
|
62
|
+
* @param dirPath - Path to directory containing workflow files
|
|
63
|
+
* @returns Load results with workflows and errors
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const results = loadWorkflowsFromDir('.claude/workflows');
|
|
68
|
+
* console.log(`Loaded ${results.workflows.length} workflows`);
|
|
69
|
+
* if (results.errors.length > 0) {
|
|
70
|
+
* console.error(`${results.errors.length} files failed to load`);
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function loadWorkflowsFromDir(dirPath: string): WorkflowLoadResults;
|
|
75
|
+
export type { WorkflowDefinition, WorkflowPhase, WorkflowTriggers, WorkflowValidationError, WorkflowValidationResult } from './workflow-schema.js';
|
|
76
|
+
//# sourceMappingURL=workflow-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-loader.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAE7B,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,4CAA4C;IAC5C,MAAM,EAAE,KAAK,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,uBAAuB,EAAE,CAAC;KACnC,CAAC,CAAC;CACJ;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CAkDrE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAsCzE;AAGD,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Loader
|
|
3
|
+
*
|
|
4
|
+
* Story 31-2: Load workflow definitions from YAML files
|
|
5
|
+
*
|
|
6
|
+
* This module provides functions to:
|
|
7
|
+
* - Load a single workflow YAML file
|
|
8
|
+
* - Load all workflows from a directory
|
|
9
|
+
* - Validate loaded workflows against the schema
|
|
10
|
+
*
|
|
11
|
+
* Uses validateWorkflow() from workflow-schema.ts (Story 31-1)
|
|
12
|
+
*/
|
|
13
|
+
import { readFileSync, readdirSync, existsSync } from 'node:fs';
|
|
14
|
+
import { join } from 'node:path';
|
|
15
|
+
import { parse as parseYaml } from 'yaml';
|
|
16
|
+
import { validateWorkflow } from './workflow-schema.js';
|
|
17
|
+
/**
|
|
18
|
+
* Load and validate a single workflow YAML file
|
|
19
|
+
*
|
|
20
|
+
* @param filePath - Absolute or relative path to the workflow YAML file
|
|
21
|
+
* @returns Load result with workflow or errors
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const result = loadWorkflowFile('.claude/workflows/tdd.yaml');
|
|
26
|
+
* if (result.success) {
|
|
27
|
+
* console.log(`Loaded workflow: ${result.workflow.name}`);
|
|
28
|
+
* } else {
|
|
29
|
+
* console.error('Errors:', result.errors);
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function loadWorkflowFile(filePath) {
|
|
34
|
+
// 1. Read file from disk
|
|
35
|
+
let content;
|
|
36
|
+
try {
|
|
37
|
+
content = readFileSync(filePath, 'utf-8');
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
const message = err instanceof Error ? err.message : 'Unknown file read error';
|
|
41
|
+
return {
|
|
42
|
+
success: false,
|
|
43
|
+
filePath,
|
|
44
|
+
errors: [{
|
|
45
|
+
field: 'file',
|
|
46
|
+
message: message.includes('ENOENT') ? `File not found: ${filePath}` : message
|
|
47
|
+
}]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// 2. Parse YAML
|
|
51
|
+
let parsed;
|
|
52
|
+
try {
|
|
53
|
+
parsed = parseYaml(content);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
const message = err instanceof Error ? err.message : 'Unknown YAML parse error';
|
|
57
|
+
return {
|
|
58
|
+
success: false,
|
|
59
|
+
filePath,
|
|
60
|
+
errors: [{
|
|
61
|
+
field: 'yaml',
|
|
62
|
+
message: `YAML parse error: ${message}`
|
|
63
|
+
}]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// 3. Call validateWorkflow()
|
|
67
|
+
const result = validateWorkflow(parsed);
|
|
68
|
+
// 4. Return result
|
|
69
|
+
if (result.valid && result.workflow) {
|
|
70
|
+
return {
|
|
71
|
+
success: true,
|
|
72
|
+
filePath,
|
|
73
|
+
workflow: result.workflow
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
success: false,
|
|
78
|
+
filePath,
|
|
79
|
+
errors: result.errors
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Load and validate all workflow YAML files from a directory
|
|
84
|
+
*
|
|
85
|
+
* Only processes files with .yaml or .yml extensions.
|
|
86
|
+
* Returns partial results - valid workflows are returned even if some fail.
|
|
87
|
+
*
|
|
88
|
+
* @param dirPath - Path to directory containing workflow files
|
|
89
|
+
* @returns Load results with workflows and errors
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```typescript
|
|
93
|
+
* const results = loadWorkflowsFromDir('.claude/workflows');
|
|
94
|
+
* console.log(`Loaded ${results.workflows.length} workflows`);
|
|
95
|
+
* if (results.errors.length > 0) {
|
|
96
|
+
* console.error(`${results.errors.length} files failed to load`);
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export function loadWorkflowsFromDir(dirPath) {
|
|
101
|
+
const workflows = [];
|
|
102
|
+
const errors = [];
|
|
103
|
+
// 1. Check directory exists
|
|
104
|
+
if (!existsSync(dirPath)) {
|
|
105
|
+
return { workflows, errors };
|
|
106
|
+
}
|
|
107
|
+
// 2. List files and filter for .yaml/.yml extensions
|
|
108
|
+
let files;
|
|
109
|
+
try {
|
|
110
|
+
files = readdirSync(dirPath);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return { workflows, errors };
|
|
114
|
+
}
|
|
115
|
+
const yamlFiles = files.filter(f => f.endsWith('.yaml') || f.endsWith('.yml'));
|
|
116
|
+
// 3. Call loadWorkflowFile() for each
|
|
117
|
+
for (const file of yamlFiles) {
|
|
118
|
+
const filePath = join(dirPath, file);
|
|
119
|
+
const result = loadWorkflowFile(filePath);
|
|
120
|
+
// 4. Aggregate results
|
|
121
|
+
if (result.success && result.workflow) {
|
|
122
|
+
workflows.push(result.workflow);
|
|
123
|
+
}
|
|
124
|
+
else if (result.errors) {
|
|
125
|
+
errors.push({
|
|
126
|
+
filePath,
|
|
127
|
+
errors: result.errors
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return { workflows, errors };
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=workflow-loader.js.map
|