@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,372 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story 31-4: Migrate TDD Flow to Workflow Definition
|
|
3
|
+
*
|
|
4
|
+
* These tests verify that the workflow YAML files correctly capture
|
|
5
|
+
* the hardcoded TDD flow from the SM agent. This is a migration verification
|
|
6
|
+
* test suite - it ensures the YAML definitions match expected behavior.
|
|
7
|
+
*
|
|
8
|
+
* Acceptance Criteria:
|
|
9
|
+
* - AC1: tdd.yaml workflow exists in pennyfarthing-dist/workflows/
|
|
10
|
+
* - AC2: Defines SM → TEA → Dev → Reviewer → SM phases
|
|
11
|
+
* - AC3: Scale routing (1-2 pts skip TEA) preserved via trivial.yaml
|
|
12
|
+
* - AC4: Existing /new-work behavior unchanged (regression tested)
|
|
13
|
+
*
|
|
14
|
+
* Run with: npm test
|
|
15
|
+
*/
|
|
16
|
+
import { describe, it } from 'node:test';
|
|
17
|
+
import assert from 'node:assert';
|
|
18
|
+
import { dirname, join } from 'node:path';
|
|
19
|
+
import { fileURLToPath } from 'node:url';
|
|
20
|
+
import { existsSync } from 'node:fs';
|
|
21
|
+
import { loadWorkflowFile, loadWorkflowsFromDir } from './workflow-loader.js';
|
|
22
|
+
import { routeStoryToWorkflow } from './workflow-router.js';
|
|
23
|
+
// =============================================================================
|
|
24
|
+
// Test Setup - Find workflow directory
|
|
25
|
+
// =============================================================================
|
|
26
|
+
function findMonorepoRoot(startDir) {
|
|
27
|
+
let dir = startDir;
|
|
28
|
+
for (let i = 0; i < 10; i++) {
|
|
29
|
+
if (existsSync(join(dir, 'pennyfarthing-dist'))) {
|
|
30
|
+
return dir;
|
|
31
|
+
}
|
|
32
|
+
const parent = dirname(dir);
|
|
33
|
+
if (parent === dir)
|
|
34
|
+
break;
|
|
35
|
+
dir = parent;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
40
|
+
const monorepoRoot = findMonorepoRoot(__dirname);
|
|
41
|
+
const workflowsDir = monorepoRoot ? join(monorepoRoot, 'pennyfarthing-dist', 'workflows') : null;
|
|
42
|
+
// =============================================================================
|
|
43
|
+
// AC1: tdd.yaml workflow exists in pennyfarthing-dist/workflows/
|
|
44
|
+
// =============================================================================
|
|
45
|
+
describe('AC1: tdd.yaml workflow exists', () => {
|
|
46
|
+
it('should find pennyfarthing-dist/workflows directory', () => {
|
|
47
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
48
|
+
assert.ok(existsSync(workflowsDir), `Workflows directory should exist: ${workflowsDir}`);
|
|
49
|
+
});
|
|
50
|
+
it('should load tdd.yaml from pennyfarthing-dist/workflows/', () => {
|
|
51
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
52
|
+
const tddPath = join(workflowsDir, 'tdd.yaml');
|
|
53
|
+
assert.ok(existsSync(tddPath), `tdd.yaml should exist at: ${tddPath}`);
|
|
54
|
+
const result = loadWorkflowFile(tddPath);
|
|
55
|
+
assert.ok(result.success, `tdd.yaml should load successfully: ${JSON.stringify(result.errors)}`);
|
|
56
|
+
assert.ok(result.workflow, 'Should have workflow object');
|
|
57
|
+
assert.strictEqual(result.workflow.name, 'tdd', 'Workflow name should be "tdd"');
|
|
58
|
+
});
|
|
59
|
+
it('should load trivial.yaml from pennyfarthing-dist/workflows/', () => {
|
|
60
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
61
|
+
const trivialPath = join(workflowsDir, 'trivial.yaml');
|
|
62
|
+
assert.ok(existsSync(trivialPath), `trivial.yaml should exist at: ${trivialPath}`);
|
|
63
|
+
const result = loadWorkflowFile(trivialPath);
|
|
64
|
+
assert.ok(result.success, `trivial.yaml should load successfully: ${JSON.stringify(result.errors)}`);
|
|
65
|
+
assert.ok(result.workflow, 'Should have workflow object');
|
|
66
|
+
assert.strictEqual(result.workflow.name, 'trivial', 'Workflow name should be "trivial"');
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// AC2: Defines SM → TEA → Dev → Reviewer → SM phases
|
|
71
|
+
// =============================================================================
|
|
72
|
+
describe('AC2: TDD workflow defines correct phases', () => {
|
|
73
|
+
it('should have exactly 5 phases in tdd.yaml', () => {
|
|
74
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
75
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
76
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
77
|
+
assert.strictEqual(result.workflow.phases.length, 5, 'TDD workflow should have 5 phases');
|
|
78
|
+
});
|
|
79
|
+
it('should define phases in order: setup(SM) → red(TEA) → green(Dev) → review(Reviewer) → finish(SM)', () => {
|
|
80
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
81
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
82
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
83
|
+
const phases = result.workflow.phases;
|
|
84
|
+
const expectedFlow = [
|
|
85
|
+
{ name: 'setup', agent: 'sm' },
|
|
86
|
+
{ name: 'red', agent: 'tea' },
|
|
87
|
+
{ name: 'green', agent: 'dev' },
|
|
88
|
+
{ name: 'review', agent: 'reviewer' },
|
|
89
|
+
{ name: 'finish', agent: 'sm' }
|
|
90
|
+
];
|
|
91
|
+
expectedFlow.forEach((expected, i) => {
|
|
92
|
+
assert.strictEqual(phases[i].name, expected.name, `Phase ${i} should be "${expected.name}"`);
|
|
93
|
+
assert.strictEqual(phases[i].agent, expected.agent, `Phase ${i} agent should be "${expected.agent}"`);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
it('should have RED phase with tests_fail gate', () => {
|
|
97
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
98
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
99
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
100
|
+
const redPhase = result.workflow.phases.find(p => p.name === 'red');
|
|
101
|
+
assert.ok(redPhase, 'Should have RED phase');
|
|
102
|
+
assert.ok(redPhase.gate, 'RED phase should have a gate');
|
|
103
|
+
assert.strictEqual(redPhase.gate.type, 'tests_fail', 'RED phase gate should be tests_fail');
|
|
104
|
+
});
|
|
105
|
+
it('should have GREEN phase with tests_pass gate', () => {
|
|
106
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
107
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
108
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
109
|
+
const greenPhase = result.workflow.phases.find(p => p.name === 'green');
|
|
110
|
+
assert.ok(greenPhase, 'Should have GREEN phase');
|
|
111
|
+
assert.ok(greenPhase.gate, 'GREEN phase should have a gate');
|
|
112
|
+
assert.strictEqual(greenPhase.gate.type, 'tests_pass', 'GREEN phase gate should be tests_pass');
|
|
113
|
+
});
|
|
114
|
+
it('should have REVIEW phase with approval gate', () => {
|
|
115
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
116
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
117
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
118
|
+
const reviewPhase = result.workflow.phases.find(p => p.name === 'review');
|
|
119
|
+
assert.ok(reviewPhase, 'Should have REVIEW phase');
|
|
120
|
+
assert.ok(reviewPhase.gate, 'REVIEW phase should have a gate');
|
|
121
|
+
assert.strictEqual(reviewPhase.gate.type, 'approval', 'REVIEW phase gate should be approval');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
// =============================================================================
|
|
125
|
+
// AC3: Scale routing (1-2 pts skip TEA) preserved via trivial.yaml
|
|
126
|
+
// =============================================================================
|
|
127
|
+
describe('AC3: Scale-adaptive routing preserved', () => {
|
|
128
|
+
it('should route 1-point chore to trivial workflow (skips TEA)', () => {
|
|
129
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
130
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
131
|
+
assert.ok(workflows.length >= 2, 'Should have at least 2 workflows');
|
|
132
|
+
const story = {
|
|
133
|
+
id: 'test-1',
|
|
134
|
+
type: 'chore',
|
|
135
|
+
points: 1
|
|
136
|
+
};
|
|
137
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
138
|
+
assert.ok(result, 'Should route to a workflow');
|
|
139
|
+
assert.strictEqual(result.workflow.name, 'trivial', '1-pt chore should route to trivial');
|
|
140
|
+
});
|
|
141
|
+
it('should route 2-point fix to trivial workflow (skips TEA)', () => {
|
|
142
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
143
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
144
|
+
const story = {
|
|
145
|
+
id: 'test-2',
|
|
146
|
+
type: 'fix',
|
|
147
|
+
points: 2
|
|
148
|
+
};
|
|
149
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
150
|
+
assert.ok(result, 'Should route to a workflow');
|
|
151
|
+
assert.strictEqual(result.workflow.name, 'trivial', '2-pt fix should route to trivial');
|
|
152
|
+
});
|
|
153
|
+
it('should route 3-point feature to tdd workflow (includes TEA)', () => {
|
|
154
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
155
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
156
|
+
const story = {
|
|
157
|
+
id: 'test-3',
|
|
158
|
+
type: 'feature',
|
|
159
|
+
points: 3
|
|
160
|
+
};
|
|
161
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
162
|
+
assert.ok(result, 'Should route to a workflow');
|
|
163
|
+
assert.strictEqual(result.workflow.name, 'tdd', '3-pt feature should route to tdd');
|
|
164
|
+
});
|
|
165
|
+
it('should route 5-point feature to tdd workflow (includes TEA)', () => {
|
|
166
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
167
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
168
|
+
const story = {
|
|
169
|
+
id: 'test-5',
|
|
170
|
+
type: 'feature',
|
|
171
|
+
points: 5
|
|
172
|
+
};
|
|
173
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
174
|
+
assert.ok(result, 'Should route to a workflow');
|
|
175
|
+
assert.strictEqual(result.workflow.name, 'tdd', '5-pt feature should route to tdd');
|
|
176
|
+
});
|
|
177
|
+
it('should route 8-point feature to tdd workflow (complex story)', () => {
|
|
178
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
179
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
180
|
+
const story = {
|
|
181
|
+
id: 'test-8',
|
|
182
|
+
type: 'feature',
|
|
183
|
+
points: 8
|
|
184
|
+
};
|
|
185
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
186
|
+
assert.ok(result, 'Should route to a workflow');
|
|
187
|
+
assert.strictEqual(result.workflow.name, 'tdd', '8-pt feature should route to tdd');
|
|
188
|
+
});
|
|
189
|
+
it('trivial workflow should NOT include TEA phase', () => {
|
|
190
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
191
|
+
const result = loadWorkflowFile(join(workflowsDir, 'trivial.yaml'));
|
|
192
|
+
assert.ok(result.success && result.workflow, 'Should load trivial.yaml');
|
|
193
|
+
const agents = result.workflow.phases.map(p => p.agent);
|
|
194
|
+
assert.ok(!agents.includes('tea'), 'Trivial workflow should not include TEA agent');
|
|
195
|
+
});
|
|
196
|
+
it('trivial workflow should have 4 phases: SM → Dev → Reviewer → SM', () => {
|
|
197
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
198
|
+
const result = loadWorkflowFile(join(workflowsDir, 'trivial.yaml'));
|
|
199
|
+
assert.ok(result.success && result.workflow, 'Should load trivial.yaml');
|
|
200
|
+
assert.strictEqual(result.workflow.phases.length, 4, 'Trivial workflow should have 4 phases');
|
|
201
|
+
const expectedFlow = [
|
|
202
|
+
{ name: 'setup', agent: 'sm' },
|
|
203
|
+
{ name: 'implement', agent: 'dev' },
|
|
204
|
+
{ name: 'review', agent: 'reviewer' },
|
|
205
|
+
{ name: 'finish', agent: 'sm' }
|
|
206
|
+
];
|
|
207
|
+
expectedFlow.forEach((expected, i) => {
|
|
208
|
+
assert.strictEqual(result.workflow.phases[i].agent, expected.agent, `Phase ${i} agent should be "${expected.agent}"`);
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
// =============================================================================
|
|
213
|
+
// AC4: Existing /new-work behavior unchanged (regression tested)
|
|
214
|
+
// =============================================================================
|
|
215
|
+
describe('AC4: /new-work behavior regression tests', () => {
|
|
216
|
+
/**
|
|
217
|
+
* These tests verify the routing behavior matches the hardcoded logic in SM agent:
|
|
218
|
+
*
|
|
219
|
+
* From sm.md:
|
|
220
|
+
* | 1-2 pts (chore/fix) | Trivial | SM → Dev (skip TEA) |
|
|
221
|
+
* | 3-5 pts | Standard | SM → TEA → Dev |
|
|
222
|
+
* | 8+ pts | Complex | SM → TEA → Dev |
|
|
223
|
+
*/
|
|
224
|
+
it('feature type defaults to TDD workflow', () => {
|
|
225
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
226
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
227
|
+
const story = {
|
|
228
|
+
id: 'regression-1',
|
|
229
|
+
type: 'feature'
|
|
230
|
+
// No points specified - should still route to tdd
|
|
231
|
+
};
|
|
232
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
233
|
+
assert.ok(result, 'Should route to a workflow');
|
|
234
|
+
assert.strictEqual(result.workflow.name, 'tdd', 'feature type should default to tdd');
|
|
235
|
+
});
|
|
236
|
+
it('enhancement type routes to TDD workflow', () => {
|
|
237
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
238
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
239
|
+
const story = {
|
|
240
|
+
id: 'regression-2',
|
|
241
|
+
type: 'enhancement',
|
|
242
|
+
points: 5
|
|
243
|
+
};
|
|
244
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
245
|
+
assert.ok(result, 'Should route to a workflow');
|
|
246
|
+
assert.strictEqual(result.workflow.name, 'tdd', 'enhancement should route to tdd');
|
|
247
|
+
});
|
|
248
|
+
it('chore type with low points routes to trivial workflow', () => {
|
|
249
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
250
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
251
|
+
const story = {
|
|
252
|
+
id: 'regression-3',
|
|
253
|
+
type: 'chore',
|
|
254
|
+
points: 1
|
|
255
|
+
};
|
|
256
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
257
|
+
assert.ok(result, 'Should route to a workflow');
|
|
258
|
+
assert.strictEqual(result.workflow.name, 'trivial', 'chore with 1 pt should route to trivial');
|
|
259
|
+
});
|
|
260
|
+
it('fix type with 2 points routes to trivial workflow', () => {
|
|
261
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
262
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
263
|
+
const story = {
|
|
264
|
+
id: 'regression-4',
|
|
265
|
+
type: 'fix',
|
|
266
|
+
points: 2
|
|
267
|
+
};
|
|
268
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
269
|
+
assert.ok(result, 'Should route to a workflow');
|
|
270
|
+
assert.strictEqual(result.workflow.name, 'trivial', 'fix with 2 pts should route to trivial');
|
|
271
|
+
});
|
|
272
|
+
it('refactor type with 2 points routes to trivial workflow', () => {
|
|
273
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
274
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
275
|
+
const story = {
|
|
276
|
+
id: 'regression-5',
|
|
277
|
+
type: 'refactor',
|
|
278
|
+
points: 2
|
|
279
|
+
};
|
|
280
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
281
|
+
assert.ok(result, 'Should route to a workflow');
|
|
282
|
+
assert.strictEqual(result.workflow.name, 'trivial', 'refactor with 2 pts should route to trivial');
|
|
283
|
+
});
|
|
284
|
+
it('boundary: 2-point feature routes to tdd (type wins over points)', () => {
|
|
285
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
286
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
287
|
+
// This is a key regression test - features should use TDD even at low points
|
|
288
|
+
// because type takes priority in the current routing logic
|
|
289
|
+
const story = {
|
|
290
|
+
id: 'boundary-1',
|
|
291
|
+
type: 'feature',
|
|
292
|
+
points: 2
|
|
293
|
+
};
|
|
294
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
295
|
+
assert.ok(result, 'Should route to a workflow');
|
|
296
|
+
// Feature type matches tdd.yaml, and tdd has default: true
|
|
297
|
+
// The question is: does type match or default apply?
|
|
298
|
+
// According to priority: type match > points > default
|
|
299
|
+
// tdd.yaml has types: [feature, enhancement] AND points.min: 3
|
|
300
|
+
// So 2-pt feature shouldn't match tdd's triggers (needs min 3)
|
|
301
|
+
// But tdd has default: true, so it should fall back to tdd anyway
|
|
302
|
+
assert.strictEqual(result.workflow.name, 'tdd', '2-pt feature should route to tdd (default fallback)');
|
|
303
|
+
});
|
|
304
|
+
it('boundary: 3-point chore routes based on type not points', () => {
|
|
305
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
306
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
307
|
+
// 3-point chore: chore type matches trivial, but points exceed max: 2
|
|
308
|
+
// This tests AND logic - both type AND points must match
|
|
309
|
+
const story = {
|
|
310
|
+
id: 'boundary-2',
|
|
311
|
+
type: 'chore',
|
|
312
|
+
points: 3
|
|
313
|
+
};
|
|
314
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
315
|
+
assert.ok(result, 'Should route to a workflow');
|
|
316
|
+
// trivial.yaml has: types: [chore, fix, refactor], points.max: 2
|
|
317
|
+
// With AND logic, 3-pt chore exceeds max, so trivial doesn't match
|
|
318
|
+
// Falls back to tdd (default: true)
|
|
319
|
+
assert.strictEqual(result.workflow.name, 'tdd', '3-pt chore should fall back to tdd (exceeds trivial max)');
|
|
320
|
+
});
|
|
321
|
+
it('story with no type falls back to default workflow', () => {
|
|
322
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
323
|
+
const { workflows } = loadWorkflowsFromDir(workflowsDir);
|
|
324
|
+
const story = {
|
|
325
|
+
id: 'default-1',
|
|
326
|
+
points: 5
|
|
327
|
+
// No type specified
|
|
328
|
+
};
|
|
329
|
+
const result = routeStoryToWorkflow(story, workflows);
|
|
330
|
+
assert.ok(result, 'Should route to a workflow');
|
|
331
|
+
assert.strictEqual(result.workflow.name, 'tdd', 'No type should fall back to tdd (default)');
|
|
332
|
+
});
|
|
333
|
+
it('tdd.yaml has default: true trigger', () => {
|
|
334
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
335
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
336
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
337
|
+
assert.ok(result.workflow.triggers, 'tdd.yaml should have triggers');
|
|
338
|
+
assert.strictEqual(result.workflow.triggers.default, true, 'tdd.yaml should be the default workflow');
|
|
339
|
+
});
|
|
340
|
+
it('tdd.yaml triggers include feature and enhancement types', () => {
|
|
341
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
342
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
343
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
344
|
+
const types = result.workflow.triggers?.types || [];
|
|
345
|
+
assert.ok(types.includes('feature'), 'tdd.yaml should trigger on feature type');
|
|
346
|
+
assert.ok(types.includes('enhancement'), 'tdd.yaml should trigger on enhancement type');
|
|
347
|
+
});
|
|
348
|
+
it('trivial.yaml triggers include chore, fix, refactor types', () => {
|
|
349
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
350
|
+
const result = loadWorkflowFile(join(workflowsDir, 'trivial.yaml'));
|
|
351
|
+
assert.ok(result.success && result.workflow, 'Should load trivial.yaml');
|
|
352
|
+
const types = result.workflow.triggers?.types || [];
|
|
353
|
+
assert.ok(types.includes('chore'), 'trivial.yaml should trigger on chore type');
|
|
354
|
+
assert.ok(types.includes('fix'), 'trivial.yaml should trigger on fix type');
|
|
355
|
+
assert.ok(types.includes('refactor'), 'trivial.yaml should trigger on refactor type');
|
|
356
|
+
});
|
|
357
|
+
it('trivial.yaml has points.max: 2', () => {
|
|
358
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
359
|
+
const result = loadWorkflowFile(join(workflowsDir, 'trivial.yaml'));
|
|
360
|
+
assert.ok(result.success && result.workflow, 'Should load trivial.yaml');
|
|
361
|
+
const pointsMax = result.workflow.triggers?.points?.max;
|
|
362
|
+
assert.strictEqual(pointsMax, 2, 'trivial.yaml should have points.max: 2');
|
|
363
|
+
});
|
|
364
|
+
it('tdd.yaml has points.min: 3', () => {
|
|
365
|
+
assert.ok(workflowsDir, 'Could not find monorepo root');
|
|
366
|
+
const result = loadWorkflowFile(join(workflowsDir, 'tdd.yaml'));
|
|
367
|
+
assert.ok(result.success && result.workflow, 'Should load tdd.yaml');
|
|
368
|
+
const pointsMin = result.workflow.triggers?.points?.min;
|
|
369
|
+
assert.strictEqual(pointsMin, 3, 'tdd.yaml should have points.min: 3');
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
//# sourceMappingURL=workflow-migration.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-migration.test.js","sourceRoot":"","sources":["../../src/workflow/workflow-migration.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAA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,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACxC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,8BAA8B,CAAC,CAAC;QAExD,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAa,EAAE,cAAc,CAAC,CAAC,CAAC;QACrE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,0BAA0B,CAAC,CAAC;QAEzE,MAAM,SAAS,GAAG,MAAM,CAAC,QAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC;QACzD,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,EAAE,wCAAwC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,8BAA8B,CAAC,CAAC;QAExD,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,YAAa,EAAE,UAAU,CAAC,CAAC,CAAC;QACjE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QAErE,MAAM,SAAS,GAAG,MAAM,CAAC,QAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC;QACzD,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,EAAE,oCAAoC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Router
|
|
3
|
+
*
|
|
4
|
+
* Routes stories to appropriate workflows based on explicit tags,
|
|
5
|
+
* trigger rules, and defaults.
|
|
6
|
+
*
|
|
7
|
+
* Priority algorithm:
|
|
8
|
+
* 1. Explicit workflow: tag on story
|
|
9
|
+
* 2. Trigger tag match (story tags intersect workflow trigger tags)
|
|
10
|
+
* 3. Type match (story type in workflow trigger types)
|
|
11
|
+
* 4. Points match (story points within workflow trigger range)
|
|
12
|
+
* 5. Default workflow fallback
|
|
13
|
+
*/
|
|
14
|
+
import type { WorkflowDefinition } from './workflow-loader.js';
|
|
15
|
+
/**
|
|
16
|
+
* Story metadata used for routing decisions
|
|
17
|
+
*/
|
|
18
|
+
export interface StoryMetadata {
|
|
19
|
+
/** Story identifier (e.g., "31-3") */
|
|
20
|
+
id: string;
|
|
21
|
+
/** Story type: feature, bug, chore, docs, etc. */
|
|
22
|
+
type?: string;
|
|
23
|
+
/** Story tags including workflow:xyz for explicit routing */
|
|
24
|
+
tags?: string[];
|
|
25
|
+
/** Story points for points-based routing */
|
|
26
|
+
points?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Result of routing a story to a workflow
|
|
30
|
+
*/
|
|
31
|
+
export interface RoutingResult {
|
|
32
|
+
/** The matched workflow */
|
|
33
|
+
workflow: WorkflowDefinition;
|
|
34
|
+
/** Human-readable reason for the match (for debugging) */
|
|
35
|
+
reason: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Route a story to the appropriate workflow
|
|
39
|
+
*
|
|
40
|
+
* @param story - Story metadata for routing decisions
|
|
41
|
+
* @param workflows - Available workflow definitions
|
|
42
|
+
* @returns Routing result with matched workflow and reason, or null if no match
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const story = { id: '31-3', type: 'feature', points: 3 };
|
|
47
|
+
* const result = routeStoryToWorkflow(story, workflows);
|
|
48
|
+
* if (result) {
|
|
49
|
+
* console.log(`Using workflow: ${result.workflow.name}`);
|
|
50
|
+
* console.log(`Reason: ${result.reason}`);
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function routeStoryToWorkflow(story: StoryMetadata, workflows: WorkflowDefinition[]): RoutingResult | null;
|
|
55
|
+
//# sourceMappingURL=workflow-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-router.d.ts","sourceRoot":"","sources":["../../src/workflow/workflow-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;CAChB;AAiDD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,kBAAkB,EAAE,GAC9B,aAAa,GAAG,IAAI,CAoCtB"}
|