@pennyfarthing/core 7.0.2 → 7.4.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/{packages/core/dist → dist}/cli/commands/cyclist.d.ts +2 -2
- package/{packages/core/dist → dist}/cli/commands/cyclist.d.ts.map +1 -1
- package/{packages/core/dist → dist}/cli/commands/cyclist.js +8 -9
- package/dist/cli/commands/cyclist.js.map +1 -0
- package/{packages/core/dist → dist}/cli/commands/cyclist.test.js +6 -4
- package/dist/cli/commands/cyclist.test.js.map +1 -0
- package/{packages/core/dist → dist}/cli/commands/update.d.ts.map +1 -1
- package/{packages/core/dist → dist}/cli/commands/update.js +9 -136
- package/dist/cli/commands/update.js.map +1 -0
- package/{packages/core/dist → dist}/cli/cyclist-migration.test.js +4 -3
- package/{packages/core/dist → dist}/cli/cyclist-migration.test.js.map +1 -1
- package/{packages/core/dist → dist}/cli/utils/constants.d.ts +7 -1
- package/dist/cli/utils/constants.d.ts.map +1 -0
- package/{packages/core/dist → dist}/cli/utils/constants.js +4 -2
- package/{packages/core/dist → dist}/cli/utils/constants.js.map +1 -1
- package/{packages/core/dist → dist}/cli/utils/themes.d.ts +1 -4
- package/{packages/core/dist → dist}/cli/utils/themes.d.ts.map +1 -1
- package/{packages/core/dist → dist}/cli/utils/themes.js +2 -22
- package/dist/cli/utils/themes.js.map +1 -0
- package/dist/cli/utils/themes.test.d.ts +12 -0
- package/{packages/core/dist → dist}/cli/utils/themes.test.js +16 -13
- package/dist/cli/utils/themes.test.js.map +1 -0
- package/{packages/core/dist → dist}/cli/workspace.test.js +5 -8
- package/{packages/core/dist → dist}/cli/workspace.test.js.map +1 -1
- package/{packages/core/dist → dist}/index.d.ts +1 -0
- package/{packages/core/dist → dist}/index.d.ts.map +1 -1
- package/{packages/core/dist → dist}/index.js +10 -0
- package/{packages/core/dist → dist}/index.js.map +1 -1
- package/dist/jira/jira-epic-creation.d.ts +109 -0
- package/dist/jira/jira-epic-creation.d.ts.map +1 -0
- package/dist/jira/jira-epic-creation.js +253 -0
- package/dist/jira/jira-epic-creation.js.map +1 -0
- package/dist/jira/jira-epic-creation.test.d.ts +16 -0
- package/dist/jira/jira-epic-creation.test.d.ts.map +1 -0
- package/dist/jira/jira-epic-creation.test.js +387 -0
- package/dist/jira/jira-epic-creation.test.js.map +1 -0
- package/dist/jira/jira-sprint-sync.d.ts +247 -0
- package/dist/jira/jira-sprint-sync.d.ts.map +1 -0
- package/dist/jira/jira-sprint-sync.js +670 -0
- package/dist/jira/jira-sprint-sync.js.map +1 -0
- package/dist/jira/jira-sprint-sync.test.d.ts +16 -0
- package/dist/jira/jira-sprint-sync.test.d.ts.map +1 -0
- package/dist/jira/jira-sprint-sync.test.js +845 -0
- package/dist/jira/jira-sprint-sync.test.js.map +1 -0
- package/{packages/core/dist → dist}/scripts/generate-spider.d.ts +11 -1
- package/{packages/core/dist → dist}/scripts/generate-spider.d.ts.map +1 -1
- package/{packages/core/dist → dist}/scripts/generate-spider.js +24 -1
- package/dist/scripts/generate-spider.js.map +1 -0
- package/{packages/core/dist → dist}/scripts/generate-spider.test.js +6 -4
- package/dist/scripts/generate-spider.test.js.map +1 -0
- package/dist/workflow/gate-handler.d.ts +94 -0
- package/dist/workflow/gate-handler.d.ts.map +1 -0
- package/dist/workflow/gate-handler.js +189 -0
- package/dist/workflow/gate-handler.js.map +1 -0
- package/dist/workflow/gate-handler.test.d.ts +14 -0
- package/dist/workflow/gate-handler.test.d.ts.map +1 -0
- package/dist/workflow/gate-handler.test.js +543 -0
- package/dist/workflow/gate-handler.test.js.map +1 -0
- package/{packages/core/dist → dist}/workflow/generic-handoff.d.ts +46 -0
- package/{packages/core/dist → dist}/workflow/generic-handoff.d.ts.map +1 -1
- package/{packages/core/dist → dist}/workflow/generic-handoff.js +53 -0
- package/{packages/core/dist → dist}/workflow/generic-handoff.js.map +1 -1
- package/{packages/core/dist → dist}/workflow/generic-handoff.test.js +2 -2
- package/{packages/core/dist → dist}/workflow/generic-handoff.test.js.map +1 -1
- package/dist/workflow/index.d.ts +16 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +24 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/session-state.d.ts +92 -0
- package/dist/workflow/session-state.d.ts.map +1 -0
- package/dist/workflow/session-state.js +198 -0
- package/dist/workflow/session-state.js.map +1 -0
- package/dist/workflow/session-state.test.d.ts +8 -0
- package/dist/workflow/session-state.test.d.ts.map +1 -0
- package/dist/workflow/session-state.test.js +551 -0
- package/dist/workflow/session-state.test.js.map +1 -0
- package/dist/workflow/step-parser.d.ts +45 -0
- package/dist/workflow/step-parser.d.ts.map +1 -0
- package/dist/workflow/step-parser.js +147 -0
- package/dist/workflow/step-parser.js.map +1 -0
- package/dist/workflow/step-parser.test.d.ts +14 -0
- package/dist/workflow/step-parser.test.d.ts.map +1 -0
- package/dist/workflow/step-parser.test.js +470 -0
- package/dist/workflow/step-parser.test.js.map +1 -0
- package/dist/workflow/trimodal.d.ts +86 -0
- package/dist/workflow/trimodal.d.ts.map +1 -0
- package/dist/workflow/trimodal.js +118 -0
- package/dist/workflow/trimodal.js.map +1 -0
- package/dist/workflow/trimodal.test.d.ts +11 -0
- package/dist/workflow/trimodal.test.d.ts.map +1 -0
- package/dist/workflow/trimodal.test.js +395 -0
- package/dist/workflow/trimodal.test.js.map +1 -0
- package/dist/workflow/variable-resolver.d.ts +67 -0
- package/dist/workflow/variable-resolver.d.ts.map +1 -0
- package/dist/workflow/variable-resolver.js +156 -0
- package/dist/workflow/variable-resolver.js.map +1 -0
- package/dist/workflow/variable-resolver.test.d.ts +14 -0
- package/dist/workflow/variable-resolver.test.d.ts.map +1 -0
- package/dist/workflow/variable-resolver.test.js +400 -0
- package/dist/workflow/variable-resolver.test.js.map +1 -0
- package/dist/workflow/workflow-executor.d.ts +163 -0
- package/dist/workflow/workflow-executor.d.ts.map +1 -0
- package/dist/workflow/workflow-executor.js +197 -0
- package/dist/workflow/workflow-executor.js.map +1 -0
- package/dist/workflow/workflow-executor.test.d.ts +8 -0
- package/dist/workflow/workflow-executor.test.d.ts.map +1 -0
- package/dist/workflow/workflow-executor.test.js +444 -0
- package/dist/workflow/workflow-executor.test.js.map +1 -0
- package/{packages/core/dist → dist}/workflow/workflow-loader.test.js +5 -5
- package/dist/workflow/workflow-loader.test.js.map +1 -0
- package/{packages/core/dist → dist}/workflow/workflow-migration.test.js +8 -9
- package/{packages/core/dist → dist}/workflow/workflow-migration.test.js.map +1 -1
- package/dist/workflow/workflow-permissions.d.ts +55 -0
- package/dist/workflow/workflow-permissions.d.ts.map +1 -0
- package/dist/workflow/workflow-permissions.js +64 -0
- package/dist/workflow/workflow-permissions.js.map +1 -0
- package/dist/workflow/workflow-permissions.test.d.ts +15 -0
- package/dist/workflow/workflow-permissions.test.d.ts.map +1 -0
- package/dist/workflow/workflow-permissions.test.js +301 -0
- package/dist/workflow/workflow-permissions.test.js.map +1 -0
- package/{packages/core/dist → dist}/workflow/workflow-schema.d.ts +61 -2
- package/dist/workflow/workflow-schema.d.ts.map +1 -0
- package/dist/workflow/workflow-schema.js +454 -0
- package/dist/workflow/workflow-schema.js.map +1 -0
- package/{packages/core/dist → dist}/workflow/workflow-schema.test.js +6 -6
- package/{packages/core/dist → dist}/workflow/workflow-schema.test.js.map +1 -1
- package/dist/workflow/workflow-stepped-schema.test.d.ts +18 -0
- package/dist/workflow/workflow-stepped-schema.test.d.ts.map +1 -0
- package/dist/workflow/workflow-stepped-schema.test.js +608 -0
- package/dist/workflow/workflow-stepped-schema.test.js.map +1 -0
- package/package.json +38 -32
- package/README.md +0 -301
- package/packages/core/dist/cli/commands/cyclist.js.map +0 -1
- package/packages/core/dist/cli/commands/cyclist.test.js.map +0 -1
- package/packages/core/dist/cli/commands/update.js.map +0 -1
- package/packages/core/dist/cli/utils/constants.d.ts.map +0 -1
- package/packages/core/dist/cli/utils/themes.js.map +0 -1
- package/packages/core/dist/cli/utils/themes.test.d.ts +0 -12
- package/packages/core/dist/cli/utils/themes.test.js.map +0 -1
- package/packages/core/dist/scripts/generate-all-faces.d.ts +0 -10
- package/packages/core/dist/scripts/generate-all-faces.d.ts.map +0 -1
- package/packages/core/dist/scripts/generate-all-faces.js +0 -256
- package/packages/core/dist/scripts/generate-all-faces.js.map +0 -1
- package/packages/core/dist/scripts/generate-all-faces.test.d.ts +0 -17
- package/packages/core/dist/scripts/generate-all-faces.test.d.ts.map +0 -1
- package/packages/core/dist/scripts/generate-all-faces.test.js +0 -372
- package/packages/core/dist/scripts/generate-all-faces.test.js.map +0 -1
- package/packages/core/dist/scripts/generate-ascii-face.d.ts +0 -52
- package/packages/core/dist/scripts/generate-ascii-face.d.ts.map +0 -1
- package/packages/core/dist/scripts/generate-ascii-face.js +0 -155
- package/packages/core/dist/scripts/generate-ascii-face.js.map +0 -1
- package/packages/core/dist/scripts/generate-face.d.ts +0 -52
- package/packages/core/dist/scripts/generate-face.d.ts.map +0 -1
- package/packages/core/dist/scripts/generate-face.js +0 -199
- package/packages/core/dist/scripts/generate-face.js.map +0 -1
- package/packages/core/dist/scripts/generate-face.test.d.ts +0 -13
- package/packages/core/dist/scripts/generate-face.test.d.ts.map +0 -1
- package/packages/core/dist/scripts/generate-face.test.js +0 -301
- package/packages/core/dist/scripts/generate-face.test.js.map +0 -1
- package/packages/core/dist/scripts/generate-spider.js.map +0 -1
- package/packages/core/dist/scripts/generate-spider.test.js.map +0 -1
- package/packages/core/dist/workflow/workflow-loader.test.js.map +0 -1
- package/packages/core/dist/workflow/workflow-schema.d.ts.map +0 -1
- package/packages/core/dist/workflow/workflow-schema.js +0 -230
- package/packages/core/dist/workflow/workflow-schema.js.map +0 -1
- package/pennyfarthing-dist/agents/README.md +0 -411
- package/pennyfarthing-dist/agents/architect.md +0 -185
- package/pennyfarthing-dist/agents/dev.md +0 -239
- package/pennyfarthing-dist/agents/devops.md +0 -197
- package/pennyfarthing-dist/agents/generic-handoff.md +0 -454
- package/pennyfarthing-dist/agents/generic-sm-finish.md +0 -261
- package/pennyfarthing-dist/agents/generic-sm-setup.md +0 -214
- package/pennyfarthing-dist/agents/orchestrator.md +0 -333
- package/pennyfarthing-dist/agents/pm.md +0 -164
- package/pennyfarthing-dist/agents/reviewer-preflight.md +0 -182
- package/pennyfarthing-dist/agents/reviewer.md +0 -335
- package/pennyfarthing-dist/agents/sm-file-summary.md +0 -109
- package/pennyfarthing-dist/agents/sm-handoff.md +0 -97
- package/pennyfarthing-dist/agents/sm.md +0 -509
- package/pennyfarthing-dist/agents/tea.md +0 -205
- package/pennyfarthing-dist/agents/tech-writer.md +0 -148
- package/pennyfarthing-dist/agents/testing-runner.md +0 -423
- package/pennyfarthing-dist/agents/ux-designer.md +0 -158
- package/pennyfarthing-dist/agents/workflow-status-check.md +0 -332
- package/pennyfarthing-dist/commands/architect.md +0 -62
- package/pennyfarthing-dist/commands/benchmark-control.md +0 -69
- package/pennyfarthing-dist/commands/benchmark.md +0 -467
- package/pennyfarthing-dist/commands/brainstorm.md +0 -91
- package/pennyfarthing-dist/commands/check.md +0 -156
- package/pennyfarthing-dist/commands/chore.md +0 -178
- package/pennyfarthing-dist/commands/close-epic.md +0 -136
- package/pennyfarthing-dist/commands/continue-session.md +0 -184
- package/pennyfarthing-dist/commands/create-branches-from-story.md +0 -374
- package/pennyfarthing-dist/commands/create-theme.md +0 -29
- package/pennyfarthing-dist/commands/dev.md +0 -60
- package/pennyfarthing-dist/commands/devops.md +0 -59
- package/pennyfarthing-dist/commands/git-cleanup.md +0 -340
- package/pennyfarthing-dist/commands/health-check.md +0 -108
- package/pennyfarthing-dist/commands/help.md +0 -264
- package/pennyfarthing-dist/commands/job-fair.md +0 -102
- package/pennyfarthing-dist/commands/list-themes.md +0 -17
- package/pennyfarthing-dist/commands/new-work.md +0 -127
- package/pennyfarthing-dist/commands/orchestrator.md +0 -56
- package/pennyfarthing-dist/commands/parallel-work.md +0 -71
- package/pennyfarthing-dist/commands/party-mode.md +0 -67
- package/pennyfarthing-dist/commands/permissions.md +0 -193
- package/pennyfarthing-dist/commands/pm.md +0 -60
- package/pennyfarthing-dist/commands/prime.md +0 -140
- package/pennyfarthing-dist/commands/release.md +0 -58
- package/pennyfarthing-dist/commands/repo-status.md +0 -49
- package/pennyfarthing-dist/commands/retro.md +0 -200
- package/pennyfarthing-dist/commands/reviewer.md +0 -64
- package/pennyfarthing-dist/commands/run-ci.md +0 -116
- package/pennyfarthing-dist/commands/set-theme.md +0 -52
- package/pennyfarthing-dist/commands/show-theme.md +0 -21
- package/pennyfarthing-dist/commands/sm.md +0 -70
- package/pennyfarthing-dist/commands/solo.md +0 -411
- package/pennyfarthing-dist/commands/sprint-planning.md +0 -109
- package/pennyfarthing-dist/commands/start-epic.md +0 -156
- package/pennyfarthing-dist/commands/sync-epic-to-jira.md +0 -184
- package/pennyfarthing-dist/commands/sync-work-with-sprint.md +0 -376
- package/pennyfarthing-dist/commands/tea.md +0 -63
- package/pennyfarthing-dist/commands/tech-writer.md +0 -53
- package/pennyfarthing-dist/commands/theme-maker.md +0 -671
- package/pennyfarthing-dist/commands/update-domain-docs.md +0 -83
- package/pennyfarthing-dist/commands/ux-designer.md +0 -62
- package/pennyfarthing-dist/commands/work.md +0 -111
- package/pennyfarthing-dist/guides/AGENT-COORDINATION.md +0 -480
- package/pennyfarthing-dist/guides/AGENT-SCOPES.md +0 -201
- package/pennyfarthing-dist/guides/HOOKS.md +0 -230
- package/pennyfarthing-dist/guides/PROMPT-PATTERNS.md +0 -338
- package/pennyfarthing-dist/guides/SESSION-ARTIFACTS.md +0 -193
- package/pennyfarthing-dist/guides/agent-template-strategic.md +0 -148
- package/pennyfarthing-dist/guides/agent-template-tactical.md +0 -162
- package/pennyfarthing-dist/guides/patterns/approval-gates-pattern.md +0 -746
- package/pennyfarthing-dist/guides/patterns/fan-out-fan-in-pattern.md +0 -574
- package/pennyfarthing-dist/guides/patterns/helper-delegation-pattern.md +0 -488
- package/pennyfarthing-dist/guides/patterns/tdd-flow-pattern.md +0 -402
- package/pennyfarthing-dist/guides/permission-protocol.md +0 -188
- package/pennyfarthing-dist/guides/persona-loading.md +0 -46
- package/pennyfarthing-dist/guides/persona-system.md +0 -294
- package/pennyfarthing-dist/guides/shared-agent-behavior.md +0 -388
- package/pennyfarthing-dist/guides/shared-context.md +0 -147
- package/pennyfarthing-dist/guides/strategic-agent-behavior.md +0 -348
- package/pennyfarthing-dist/guides/tactical-agent-behavior.md +0 -1041
- package/pennyfarthing-dist/guides/workflow-schema.md +0 -195
- package/pennyfarthing-dist/guides/worktree-mode.md +0 -113
- package/pennyfarthing-dist/output-styles/teaching.md +0 -33
- package/pennyfarthing-dist/output-styles/terse.md +0 -20
- package/pennyfarthing-dist/output-styles/verbose.md +0 -28
- package/pennyfarthing-dist/personas/themes/1984.yaml +0 -312
- package/pennyfarthing-dist/personas/themes/a-team.yaml +0 -207
- package/pennyfarthing-dist/personas/themes/agatha-christie.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/alice-in-wonderland.yaml +0 -330
- package/pennyfarthing-dist/personas/themes/all-stars.yaml +0 -332
- package/pennyfarthing-dist/personas/themes/ancient-philosophers.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/ancient-strategists.yaml +0 -306
- package/pennyfarthing-dist/personas/themes/arcane.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/arthurian-mythos.yaml +0 -331
- package/pennyfarthing-dist/personas/themes/avatar-the-last-airbender.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/babylon-5.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/battlestar-galactica.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/better-call-saul.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/big-lebowski.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/black-sails.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/blade-runner.yaml +0 -295
- package/pennyfarthing-dist/personas/themes/bobiverse.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/breaking-bad.yaml +0 -327
- package/pennyfarthing-dist/personas/themes/catch-22.yaml +0 -316
- package/pennyfarthing-dist/personas/themes/classical-composers.yaml +0 -310
- package/pennyfarthing-dist/personas/themes/control.yaml +0 -197
- package/pennyfarthing-dist/personas/themes/count-of-monte-cristo.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/cowboy-bebop.yaml +0 -323
- package/pennyfarthing-dist/personas/themes/deadwood.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/dickens.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/discworld.yaml +0 -332
- package/pennyfarthing-dist/personas/themes/doctor-who.yaml +0 -290
- package/pennyfarthing-dist/personas/themes/don-quixote.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/dune.yaml +0 -307
- package/pennyfarthing-dist/personas/themes/enlightenment-thinkers.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/expeditionary-force.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/fargo.yaml +0 -330
- package/pennyfarthing-dist/personas/themes/film-auteurs.yaml +0 -312
- package/pennyfarthing-dist/personas/themes/firefly.yaml +0 -328
- package/pennyfarthing-dist/personas/themes/foundation.yaml +0 -290
- package/pennyfarthing-dist/personas/themes/futurama.yaml +0 -321
- package/pennyfarthing-dist/personas/themes/game-of-thrones.yaml +0 -290
- package/pennyfarthing-dist/personas/themes/gilligans-island.yaml +0 -243
- package/pennyfarthing-dist/personas/themes/gothic-literature.yaml +0 -308
- package/pennyfarthing-dist/personas/themes/great-gatsby.yaml +0 -308
- package/pennyfarthing-dist/personas/themes/greek-mythology.yaml +0 -330
- package/pennyfarthing-dist/personas/themes/hannibal.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/harry-potter.yaml +0 -324
- package/pennyfarthing-dist/personas/themes/his-dark-materials.yaml +0 -291
- package/pennyfarthing-dist/personas/themes/historical-figures.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/hitchhikers-guide.yaml +0 -331
- package/pennyfarthing-dist/personas/themes/house-md.yaml +0 -321
- package/pennyfarthing-dist/personas/themes/imperial-radch.yaml +0 -289
- package/pennyfarthing-dist/personas/themes/inspector-morse.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/jane-austen.yaml +0 -287
- package/pennyfarthing-dist/personas/themes/jazz-legends.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/justified.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/legion-of-doom.yaml +0 -219
- package/pennyfarthing-dist/personas/themes/les-miserables.yaml +0 -299
- package/pennyfarthing-dist/personas/themes/lord-of-the-rings.yaml +0 -334
- package/pennyfarthing-dist/personas/themes/lovecraft-mythos.yaml +0 -334
- package/pennyfarthing-dist/personas/themes/mad-max.yaml +0 -355
- package/pennyfarthing-dist/personas/themes/mad-men.yaml +0 -289
- package/pennyfarthing-dist/personas/themes/marvel-mcu.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/mash.yaml +0 -334
- package/pennyfarthing-dist/personas/themes/mass-effect.yaml +0 -289
- package/pennyfarthing-dist/personas/themes/military-commanders.yaml +0 -306
- package/pennyfarthing-dist/personas/themes/moby-dick.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/monty-python.yaml +0 -303
- package/pennyfarthing-dist/personas/themes/neuromancer.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/norse-mythology.yaml +0 -329
- package/pennyfarthing-dist/personas/themes/parks-and-rec.yaml +0 -242
- package/pennyfarthing-dist/personas/themes/peaky-blinders.yaml +0 -298
- package/pennyfarthing-dist/personas/themes/princess-bride.yaml +0 -220
- package/pennyfarthing-dist/personas/themes/renaissance-masters.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/rome.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/russian-masters.yaml +0 -318
- package/pennyfarthing-dist/personas/themes/sandman.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/scientific-revolutionaries.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/shakespeare.yaml +0 -301
- package/pennyfarthing-dist/personas/themes/sherlock-holmes.yaml +0 -289
- package/pennyfarthing-dist/personas/themes/snow-crash.yaml +0 -288
- package/pennyfarthing-dist/personas/themes/software-pioneers.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/star-trek-tng.yaml +0 -230
- package/pennyfarthing-dist/personas/themes/star-trek-tos.yaml +0 -210
- package/pennyfarthing-dist/personas/themes/star-wars.yaml +0 -303
- package/pennyfarthing-dist/personas/themes/succession.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/superfriends.yaml +0 -208
- package/pennyfarthing-dist/personas/themes/ted-lasso.yaml +0 -236
- package/pennyfarthing-dist/personas/themes/the-americans.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/the-crown.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/the-expanse.yaml +0 -213
- package/pennyfarthing-dist/personas/themes/the-good-place.yaml +0 -322
- package/pennyfarthing-dist/personas/themes/the-matrix.yaml +0 -353
- package/pennyfarthing-dist/personas/themes/the-odyssey.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/the-office.yaml +0 -330
- package/pennyfarthing-dist/personas/themes/the-simpsons.yaml +0 -308
- package/pennyfarthing-dist/personas/themes/the-sopranos.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/the-wire.yaml +0 -311
- package/pennyfarthing-dist/personas/themes/the-witcher.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/twin-peaks.yaml +0 -302
- package/pennyfarthing-dist/personas/themes/vorkosigan-saga.yaml +0 -300
- package/pennyfarthing-dist/personas/themes/watchmen.yaml +0 -291
- package/pennyfarthing-dist/personas/themes/west-wing.yaml +0 -291
- package/pennyfarthing-dist/personas/themes/world-explorers.yaml +0 -320
- package/pennyfarthing-dist/personas/themes/wwii-leaders.yaml +0 -307
- package/pennyfarthing-dist/personas/themes/x-files.yaml +0 -302
- package/pennyfarthing-dist/scripts/add-short-names.mjs +0 -264
- package/pennyfarthing-dist/scripts/agent-session.sh +0 -367
- package/pennyfarthing-dist/scripts/check-context.sh +0 -187
- package/pennyfarthing-dist/scripts/check.sh +0 -497
- package/pennyfarthing-dist/scripts/deploy.sh +0 -284
- package/pennyfarthing-dist/scripts/doctor-dogfood.sh +0 -395
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +0 -61
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +0 -66
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +0 -35
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +0 -166
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +0 -50
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +0 -71
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +0 -54
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +0 -98
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +0 -59
- package/pennyfarthing-dist/scripts/install-git-hooks.sh +0 -91
- package/pennyfarthing-dist/scripts/prime.sh +0 -161
- package/pennyfarthing-dist/scripts/release.sh +0 -198
- package/pennyfarthing-dist/scripts/repo-utils.sh +0 -778
- package/pennyfarthing-dist/scripts/run-ci.sh +0 -219
- package/pennyfarthing-dist/scripts/run.sh +0 -65
- package/pennyfarthing-dist/scripts/statusline.sh +0 -264
- package/pennyfarthing-dist/scripts/tests/check.test.sh +0 -582
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +0 -107
- package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +0 -597
- package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +0 -514
- package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +0 -517
- package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +0 -331
- package/pennyfarthing-dist/scripts/uninstall.sh +0 -271
- package/pennyfarthing-dist/scripts/utils/background-tasks.sh +0 -177
- package/pennyfarthing-dist/scripts/utils/check-status.sh +0 -251
- package/pennyfarthing-dist/scripts/utils/checkpoint.sh +0 -136
- package/pennyfarthing-dist/scripts/utils/common.sh +0 -157
- package/pennyfarthing-dist/scripts/utils/create-feature-branches.sh +0 -230
- package/pennyfarthing-dist/scripts/utils/file-lock.sh +0 -269
- package/pennyfarthing-dist/scripts/utils/find-related-work.sh +0 -231
- package/pennyfarthing-dist/scripts/utils/find-root.sh +0 -33
- package/pennyfarthing-dist/scripts/utils/generate-skill-docs.sh +0 -110
- package/pennyfarthing-dist/scripts/utils/git-status-all.sh +0 -127
- package/pennyfarthing-dist/scripts/utils/ground-truth-judge.py +0 -289
- package/pennyfarthing-dist/scripts/utils/jira/jira-lib.mjs +0 -443
- package/pennyfarthing-dist/scripts/utils/jira/jira-sync-story.mjs +0 -208
- package/pennyfarthing-dist/scripts/utils/jira/jira-sync.mjs +0 -198
- package/pennyfarthing-dist/scripts/utils/jira-claim-story.sh +0 -162
- package/pennyfarthing-dist/scripts/utils/jira-lib.sh +0 -463
- package/pennyfarthing-dist/scripts/utils/jira-sync-story.sh +0 -8
- package/pennyfarthing-dist/scripts/utils/jira-sync.sh +0 -8
- package/pennyfarthing-dist/scripts/utils/log-skill-usage.sh +0 -74
- package/pennyfarthing-dist/scripts/utils/logging.sh +0 -186
- package/pennyfarthing-dist/scripts/utils/repo-scan.sh +0 -141
- package/pennyfarthing-dist/scripts/utils/retry.sh +0 -76
- package/pennyfarthing-dist/scripts/utils/run-timestamp.sh +0 -7
- package/pennyfarthing-dist/scripts/utils/session-cleanup.sh +0 -319
- package/pennyfarthing-dist/scripts/utils/skill-usage-report.sh +0 -193
- package/pennyfarthing-dist/scripts/utils/sprint-common.sh +0 -286
- package/pennyfarthing-dist/scripts/utils/sprint-metrics.sh +0 -241
- package/pennyfarthing-dist/scripts/utils/swebench-judge.py +0 -400
- package/pennyfarthing-dist/scripts/utils/sync-epic-to-jira.sh +0 -16
- package/pennyfarthing-dist/scripts/utils/test-setup.sh +0 -337
- package/pennyfarthing-dist/scripts/utils/validate-subagent-frontmatter.sh +0 -160
- package/pennyfarthing-dist/scripts/worktree-manager.sh +0 -498
- package/pennyfarthing-dist/skills/agentic-patterns/SKILL.md +0 -236
- package/pennyfarthing-dist/skills/changelog/SKILL.md +0 -367
- package/pennyfarthing-dist/skills/code-review/SKILL.md +0 -168
- package/pennyfarthing-dist/skills/context-engineering/SKILL.md +0 -268
- package/pennyfarthing-dist/skills/cyclist/SKILL.md +0 -171
- package/pennyfarthing-dist/skills/dev-patterns/SKILL.md +0 -421
- package/pennyfarthing-dist/skills/finalize-run/SKILL.md +0 -258
- package/pennyfarthing-dist/skills/jira/SKILL.md +0 -281
- package/pennyfarthing-dist/skills/judge/SKILL.md +0 -524
- package/pennyfarthing-dist/skills/just/SKILL.md +0 -160
- package/pennyfarthing-dist/skills/mermaid/SKILL.md +0 -240
- package/pennyfarthing-dist/skills/otel/skill.md +0 -222
- package/pennyfarthing-dist/skills/permissions/skill.md +0 -172
- package/pennyfarthing-dist/skills/persona-benchmark/SKILL.md +0 -173
- package/pennyfarthing-dist/skills/skill-registry.schema.json +0 -102
- package/pennyfarthing-dist/skills/skill-registry.yaml +0 -335
- package/pennyfarthing-dist/skills/sprint-context/SKILL.md +0 -120
- package/pennyfarthing-dist/skills/story-management/SKILL.md +0 -208
- package/pennyfarthing-dist/skills/testing/SKILL.md +0 -99
- package/pennyfarthing-dist/skills/testing/references/troubleshooting.md +0 -124
- package/pennyfarthing-dist/skills/theme/skill.md +0 -129
- package/pennyfarthing-dist/skills/theme-creation/SKILL.md +0 -169
- package/pennyfarthing-dist/skills/workflow/SKILL.md +0 -160
- package/pennyfarthing-dist/skills/yq/SKILL.md +0 -264
- package/pennyfarthing-dist/templates/LEADERBOARD.schema.yaml +0 -187
- package/pennyfarthing-dist/templates/LEADERBOARD.template.md +0 -59
- package/pennyfarthing-dist/templates/agent-scopes.yaml.template +0 -276
- package/pennyfarthing-dist/templates/pennyfarthing-settings.yaml.template +0 -61
- package/pennyfarthing-dist/templates/persona-config.yaml.template +0 -22
- package/pennyfarthing-dist/templates/preferences.yaml.template +0 -15
- package/pennyfarthing-dist/templates/settings.local.json.template +0 -90
- package/pennyfarthing-dist/templates/setup-env.sh.template +0 -18
- package/pennyfarthing-dist/templates/shared-context.md.template +0 -70
- package/pennyfarthing-dist/templates/sidecar/decisions.md.template +0 -40
- package/pennyfarthing-dist/templates/sidecar/gotchas.md.template +0 -37
- package/pennyfarthing-dist/templates/sidecar/patterns.md.template +0 -34
- package/pennyfarthing-dist/workflows/agent-docs.yaml +0 -70
- package/pennyfarthing-dist/workflows/bdd.yaml +0 -58
- package/pennyfarthing-dist/workflows/tdd.yaml +0 -50
- package/pennyfarthing-dist/workflows/trivial.yaml +0 -40
- /package/{packages/core/bin → bin}/pennyfarthing.js +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.js +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.test.js +0 -0
- /package/{packages/core/dist → dist}/bmad/context-reader.test.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.js +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.test.js +0 -0
- /package/{packages/core/dist → dist}/bmad/epics-parser.test.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/index.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/index.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/index.js +0 -0
- /package/{packages/core/dist → dist}/bmad/index.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.js +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.test.js +0 -0
- /package/{packages/core/dist → dist}/bmad/status-sync.test.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.js +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.test.js +0 -0
- /package/{packages/core/dist → dist}/bmad/story-exporter.test.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.js +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.js.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.test.js +0 -0
- /package/{packages/core/dist → dist}/bmad/story-parser.test.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/command.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/command.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/command.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/command.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/cyclist.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/cyclist.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/doctor.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/doctor.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/doctor.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/doctor.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/init.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/init.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/init.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/init.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/skill.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/skill.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/skill.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/skill.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/theme.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/theme.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/theme.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/theme.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/uninstall.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/uninstall.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/uninstall.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/uninstall.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/update.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/version.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/commands/version.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/commands/version.js +0 -0
- /package/{packages/core/dist → dist}/cli/commands/version.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/customization.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/customization.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/customization.test.js +0 -0
- /package/{packages/core/dist → dist}/cli/customization.test.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/cyclist-migration.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/cyclist-migration.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/index.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/index.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/index.js +0 -0
- /package/{packages/core/dist → dist}/cli/index.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/ocean-profiles.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/ocean-profiles.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/ocean-profiles.test.js +0 -0
- /package/{packages/core/dist → dist}/cli/ocean-profiles.test.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/theme-maker.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/theme-maker.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/theme-maker.test.js +0 -0
- /package/{packages/core/dist → dist}/cli/theme-maker.test.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/files.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/files.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/files.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/files.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/logger.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/logger.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/logger.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/logger.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/manifest.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/manifest.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/manifest.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/manifest.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/node-modules.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/node-modules.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/node-modules.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/node-modules.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/prompts.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/prompts.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/prompts.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/prompts.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/symlinks.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/symlinks.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/symlinks.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/symlinks.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/themes.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/version.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/utils/version.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/cli/utils/version.js +0 -0
- /package/{packages/core/dist → dist}/cli/utils/version.js.map +0 -0
- /package/{packages/core/dist → dist}/cli/workspace.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/cli/workspace.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/permissions/index.d.ts +0 -0
- /package/{packages/core/dist → dist}/permissions/index.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/permissions/index.js +0 -0
- /package/{packages/core/dist → dist}/permissions/index.js.map +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.d.ts +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.js +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.js.map +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.test.js +0 -0
- /package/{packages/core/dist → dist}/permissions/permission-schema.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/add-ocean-profiles.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/add-ocean-profiles.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/add-ocean-profiles.js +0 -0
- /package/{packages/core/dist → dist}/scripts/add-ocean-profiles.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.js +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/benchmark-integration.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/debugging-scenarios.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/debugging-scenarios.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/debugging-scenarios.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/debugging-scenarios.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-all-spiders.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-all-spiders.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-all-spiders.js +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-all-spiders.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.js +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-report.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.js +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider-report.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/generate-spider.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.js +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/job-fair-aggregator.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/run-ci.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/run-ci.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/run-ci.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/run-ci.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/theme-detail.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/theme-detail.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/theme-detail.test.js +0 -0
- /package/{packages/core/dist → dist}/scripts/theme-detail.test.js.map +0 -0
- /package/{packages/core/dist → dist}/scripts/validate-ocean-profiles.d.ts +0 -0
- /package/{packages/core/dist → dist}/scripts/validate-ocean-profiles.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/scripts/validate-ocean-profiles.js +0 -0
- /package/{packages/core/dist → dist}/scripts/validate-ocean-profiles.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-handoff.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-handoff.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-finish.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-finish.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-finish.js +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-finish.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-setup.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-setup.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-setup.js +0 -0
- /package/{packages/core/dist → dist}/workflow/generic-sm-setup.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/sm-subagents.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/sm-subagents.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/sm-subagents.test.js +0 -0
- /package/{packages/core/dist → dist}/workflow/sm-subagents.test.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/story-workflow-routing.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/story-workflow-routing.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/story-workflow-routing.test.js +0 -0
- /package/{packages/core/dist → dist}/workflow/story-workflow-routing.test.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.js +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.test.js +0 -0
- /package/{packages/core/dist → dist}/workflow/test-cache.test.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.js +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-loader.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-migration.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-migration.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.js +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.test.d.ts.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.test.js +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-router.test.js.map +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-schema.test.d.ts +0 -0
- /package/{packages/core/dist → dist}/workflow/workflow-schema.test.d.ts.map +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Resolver for MSSCI-12081
|
|
3
|
+
*
|
|
4
|
+
* Resolves {variable} placeholders in step file content from multiple sources
|
|
5
|
+
* with priority-based fallback chain.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Represents a source of variable values
|
|
9
|
+
*/
|
|
10
|
+
export interface VariableSource {
|
|
11
|
+
/** Name of this source (e.g., 'workflow', 'session', 'environment') */
|
|
12
|
+
name: string;
|
|
13
|
+
/** Priority level (lower number = higher priority) */
|
|
14
|
+
priority: number;
|
|
15
|
+
/** Map of variable names to their values */
|
|
16
|
+
values: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Result of variable resolution
|
|
20
|
+
*/
|
|
21
|
+
export interface ResolveResult {
|
|
22
|
+
/** Content with variables resolved (unresolved variables left as-is) */
|
|
23
|
+
content: string;
|
|
24
|
+
/** List of variables that were successfully resolved */
|
|
25
|
+
resolved: string[];
|
|
26
|
+
/** List of variables that could not be resolved */
|
|
27
|
+
unresolved: string[];
|
|
28
|
+
/** Map of variable name to source name that provided the value */
|
|
29
|
+
sources: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options for the convenience resolveStepVariables function
|
|
33
|
+
*/
|
|
34
|
+
export interface ResolveStepOptions {
|
|
35
|
+
/** Variables from workflow YAML (highest priority) */
|
|
36
|
+
workflowVars?: Record<string, unknown>;
|
|
37
|
+
/** Variables from session file */
|
|
38
|
+
sessionVars?: Record<string, string>;
|
|
39
|
+
/** Path to config file */
|
|
40
|
+
configPath?: string;
|
|
41
|
+
/** Project root path (for {project_root} variable) */
|
|
42
|
+
projectRoot?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resolve variables in content from prioritized sources
|
|
46
|
+
*
|
|
47
|
+
* @param content - The content containing {variable} placeholders
|
|
48
|
+
* @param sources - Array of variable sources, sorted by priority
|
|
49
|
+
* @returns ResolveResult with resolved content and metadata
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveVariables(content: string, sources: VariableSource[]): ResolveResult;
|
|
52
|
+
/**
|
|
53
|
+
* Convenience function to resolve variables in step file content
|
|
54
|
+
*
|
|
55
|
+
* Automatically builds sources from:
|
|
56
|
+
* 1. Workflow variables (priority 1)
|
|
57
|
+
* 2. Session variables (priority 2)
|
|
58
|
+
* 3. Config file values (priority 3)
|
|
59
|
+
* 4. Environment/system variables (priority 4)
|
|
60
|
+
* 5. Default values (priority 5)
|
|
61
|
+
*
|
|
62
|
+
* @param stepContent - The step file content to process
|
|
63
|
+
* @param options - Optional configuration for variable sources
|
|
64
|
+
* @returns ResolveResult with resolved content and metadata
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveStepVariables(stepContent: string, options?: ResolveStepOptions): ResolveResult;
|
|
67
|
+
//# sourceMappingURL=variable-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-resolver.d.ts","sourceRoot":"","sources":["../../src/workflow/variable-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,mDAAmD;IACnD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AA0CD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,cAAc,EAAE,GACxB,aAAa,CAyCf;AAaD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,aAAa,CAmDf"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable Resolver for MSSCI-12081
|
|
3
|
+
*
|
|
4
|
+
* Resolves {variable} placeholders in step file content from multiple sources
|
|
5
|
+
* with priority-based fallback chain.
|
|
6
|
+
*/
|
|
7
|
+
// Regex to match valid variable names: {name} where name starts with letter or underscore
|
|
8
|
+
// followed by letters, numbers, or underscores.
|
|
9
|
+
// Uses negative lookbehind to avoid matching inside nested braces like {outer_{inner}}
|
|
10
|
+
const VARIABLE_REGEX = /(?<!\{[^}]*)\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g;
|
|
11
|
+
/**
|
|
12
|
+
* Convert a value to string, handling various types
|
|
13
|
+
*/
|
|
14
|
+
function valueToString(value) {
|
|
15
|
+
if (value === null || value === undefined) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (typeof value === 'string') {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
22
|
+
return String(value);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Look up a variable in sources by priority
|
|
28
|
+
*/
|
|
29
|
+
function lookupVariable(varName, sortedSources) {
|
|
30
|
+
for (const source of sortedSources) {
|
|
31
|
+
if (varName in source.values) {
|
|
32
|
+
const rawValue = source.values[varName];
|
|
33
|
+
const value = valueToString(rawValue);
|
|
34
|
+
if (value !== null) {
|
|
35
|
+
return { value, sourceName: source.name };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Resolve variables in content from prioritized sources
|
|
43
|
+
*
|
|
44
|
+
* @param content - The content containing {variable} placeholders
|
|
45
|
+
* @param sources - Array of variable sources, sorted by priority
|
|
46
|
+
* @returns ResolveResult with resolved content and metadata
|
|
47
|
+
*/
|
|
48
|
+
export function resolveVariables(content, sources) {
|
|
49
|
+
const resolved = [];
|
|
50
|
+
const unresolved = [];
|
|
51
|
+
const sourceMap = {};
|
|
52
|
+
// Sort sources by priority (lower number = higher priority)
|
|
53
|
+
// Stable sort preserves array order for same priority
|
|
54
|
+
const sortedSources = [...sources].sort((a, b) => a.priority - b.priority);
|
|
55
|
+
// Find all variable references in content
|
|
56
|
+
const matches = content.matchAll(VARIABLE_REGEX);
|
|
57
|
+
const seenVars = new Set();
|
|
58
|
+
for (const match of matches) {
|
|
59
|
+
const varName = match[1];
|
|
60
|
+
if (seenVars.has(varName)) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
seenVars.add(varName);
|
|
64
|
+
const lookup = lookupVariable(varName, sortedSources);
|
|
65
|
+
if (lookup) {
|
|
66
|
+
resolved.push(varName);
|
|
67
|
+
sourceMap[varName] = lookup.sourceName;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
unresolved.push(varName);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// Replace variables in content
|
|
74
|
+
const resolvedContent = content.replace(VARIABLE_REGEX, (match, varName) => {
|
|
75
|
+
const lookup = lookupVariable(varName, sortedSources);
|
|
76
|
+
return lookup ? lookup.value : match;
|
|
77
|
+
});
|
|
78
|
+
return {
|
|
79
|
+
content: resolvedContent,
|
|
80
|
+
resolved,
|
|
81
|
+
unresolved,
|
|
82
|
+
sources: sourceMap,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get current date in YYYY-MM-DD format
|
|
87
|
+
*/
|
|
88
|
+
function getCurrentDate() {
|
|
89
|
+
const now = new Date();
|
|
90
|
+
const year = now.getFullYear();
|
|
91
|
+
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
92
|
+
const day = String(now.getDate()).padStart(2, '0');
|
|
93
|
+
return `${year}-${month}-${day}`;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Convenience function to resolve variables in step file content
|
|
97
|
+
*
|
|
98
|
+
* Automatically builds sources from:
|
|
99
|
+
* 1. Workflow variables (priority 1)
|
|
100
|
+
* 2. Session variables (priority 2)
|
|
101
|
+
* 3. Config file values (priority 3)
|
|
102
|
+
* 4. Environment/system variables (priority 4)
|
|
103
|
+
* 5. Default values (priority 5)
|
|
104
|
+
*
|
|
105
|
+
* @param stepContent - The step file content to process
|
|
106
|
+
* @param options - Optional configuration for variable sources
|
|
107
|
+
* @returns ResolveResult with resolved content and metadata
|
|
108
|
+
*/
|
|
109
|
+
export function resolveStepVariables(stepContent, options) {
|
|
110
|
+
const sources = [];
|
|
111
|
+
// Priority 1: Workflow variables
|
|
112
|
+
if (options?.workflowVars) {
|
|
113
|
+
const workflowValues = {};
|
|
114
|
+
for (const [key, value] of Object.entries(options.workflowVars)) {
|
|
115
|
+
const strValue = valueToString(value);
|
|
116
|
+
if (strValue !== null) {
|
|
117
|
+
workflowValues[key] = strValue;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
sources.push({
|
|
121
|
+
name: 'workflow',
|
|
122
|
+
priority: 1,
|
|
123
|
+
values: workflowValues,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// Priority 2: Session variables
|
|
127
|
+
if (options?.sessionVars) {
|
|
128
|
+
sources.push({
|
|
129
|
+
name: 'session',
|
|
130
|
+
priority: 2,
|
|
131
|
+
values: options.sessionVars,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
// Priority 4: Environment/system variables
|
|
135
|
+
const envValues = {
|
|
136
|
+
date: getCurrentDate(),
|
|
137
|
+
};
|
|
138
|
+
if (options?.projectRoot) {
|
|
139
|
+
envValues.project_root = options.projectRoot;
|
|
140
|
+
}
|
|
141
|
+
sources.push({
|
|
142
|
+
name: 'environment',
|
|
143
|
+
priority: 4,
|
|
144
|
+
values: envValues,
|
|
145
|
+
});
|
|
146
|
+
// Priority 5: Default values
|
|
147
|
+
sources.push({
|
|
148
|
+
name: 'defaults',
|
|
149
|
+
priority: 5,
|
|
150
|
+
values: {
|
|
151
|
+
planning_artifacts: 'planning-artifacts/',
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
return resolveVariables(stepContent, sources);
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=variable-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-resolver.js","sourceRoot":"","sources":["../../src/workflow/variable-resolver.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story MSSCI-12081: Variable resolver with priority chain
|
|
3
|
+
*
|
|
4
|
+
* These tests define the contract for resolving {variable} placeholders
|
|
5
|
+
* in step file content from multiple sources with priority ordering.
|
|
6
|
+
*
|
|
7
|
+
* Expected interface:
|
|
8
|
+
* - resolveVariables(content: string, sources: VariableSource[]): ResolveResult
|
|
9
|
+
* - resolveStepVariables(stepContent: string, options?): ResolveResult
|
|
10
|
+
*
|
|
11
|
+
* Run with: npm test
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=variable-resolver.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variable-resolver.test.d.ts","sourceRoot":"","sources":["../../src/workflow/variable-resolver.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for Story MSSCI-12081: Variable resolver with priority chain
|
|
3
|
+
*
|
|
4
|
+
* These tests define the contract for resolving {variable} placeholders
|
|
5
|
+
* in step file content from multiple sources with priority ordering.
|
|
6
|
+
*
|
|
7
|
+
* Expected interface:
|
|
8
|
+
* - resolveVariables(content: string, sources: VariableSource[]): ResolveResult
|
|
9
|
+
* - resolveStepVariables(stepContent: string, options?): ResolveResult
|
|
10
|
+
*
|
|
11
|
+
* Run with: npm test
|
|
12
|
+
*/
|
|
13
|
+
import { describe, it } from 'node:test';
|
|
14
|
+
import assert from 'node:assert';
|
|
15
|
+
// Import will fail until implementation exists - this confirms RED state
|
|
16
|
+
import { resolveVariables, resolveStepVariables, } from './variable-resolver.js';
|
|
17
|
+
describe('Variable Resolver (MSSCI-12081)', () => {
|
|
18
|
+
describe('AC1: Resolves variables from workflow YAML', () => {
|
|
19
|
+
it('should resolve a single variable from source', () => {
|
|
20
|
+
const content = 'Write output to {output_file}.';
|
|
21
|
+
const sources = [
|
|
22
|
+
{ name: 'workflow', priority: 1, values: { output_file: 'results.md' } }
|
|
23
|
+
];
|
|
24
|
+
const result = resolveVariables(content, sources);
|
|
25
|
+
assert.strictEqual(result.content, 'Write output to results.md.');
|
|
26
|
+
assert.deepStrictEqual(result.resolved, ['output_file']);
|
|
27
|
+
assert.deepStrictEqual(result.unresolved, []);
|
|
28
|
+
assert.strictEqual(result.sources['output_file'], 'workflow');
|
|
29
|
+
});
|
|
30
|
+
it('should resolve multiple variables in one string', () => {
|
|
31
|
+
const content = 'Project: {project_name} | Version: {version}';
|
|
32
|
+
const sources = [
|
|
33
|
+
{ name: 'workflow', priority: 1, values: { project_name: 'pennyfarthing', version: '7.0.2' } }
|
|
34
|
+
];
|
|
35
|
+
const result = resolveVariables(content, sources);
|
|
36
|
+
assert.strictEqual(result.content, 'Project: pennyfarthing | Version: 7.0.2');
|
|
37
|
+
assert.ok(result.resolved.includes('project_name'));
|
|
38
|
+
assert.ok(result.resolved.includes('version'));
|
|
39
|
+
assert.strictEqual(result.resolved.length, 2);
|
|
40
|
+
});
|
|
41
|
+
it('should resolve same variable appearing multiple times', () => {
|
|
42
|
+
const content = '{name} is here. Hello, {name}!';
|
|
43
|
+
const sources = [
|
|
44
|
+
{ name: 'workflow', priority: 1, values: { name: 'Sam' } }
|
|
45
|
+
];
|
|
46
|
+
const result = resolveVariables(content, sources);
|
|
47
|
+
assert.strictEqual(result.content, 'Sam is here. Hello, Sam!');
|
|
48
|
+
// resolved should list variable once, not twice
|
|
49
|
+
assert.deepStrictEqual(result.resolved, ['name']);
|
|
50
|
+
});
|
|
51
|
+
it('should handle content with no variables', () => {
|
|
52
|
+
const content = 'This content has no variables at all.';
|
|
53
|
+
const sources = [
|
|
54
|
+
{ name: 'workflow', priority: 1, values: { unused: 'value' } }
|
|
55
|
+
];
|
|
56
|
+
const result = resolveVariables(content, sources);
|
|
57
|
+
assert.strictEqual(result.content, content);
|
|
58
|
+
assert.deepStrictEqual(result.resolved, []);
|
|
59
|
+
assert.deepStrictEqual(result.unresolved, []);
|
|
60
|
+
});
|
|
61
|
+
it('should handle empty sources array', () => {
|
|
62
|
+
const content = 'Value: {some_var}';
|
|
63
|
+
const sources = [];
|
|
64
|
+
const result = resolveVariables(content, sources);
|
|
65
|
+
assert.strictEqual(result.content, 'Value: {some_var}');
|
|
66
|
+
assert.deepStrictEqual(result.resolved, []);
|
|
67
|
+
assert.deepStrictEqual(result.unresolved, ['some_var']);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
describe('AC2: Falls back through priority chain', () => {
|
|
71
|
+
it('should resolve from highest priority source first', () => {
|
|
72
|
+
const content = 'Theme: {theme}';
|
|
73
|
+
const sources = [
|
|
74
|
+
{ name: 'workflow', priority: 1, values: { theme: 'west-wing' } },
|
|
75
|
+
{ name: 'session', priority: 2, values: { theme: 'star-trek' } },
|
|
76
|
+
{ name: 'config', priority: 3, values: { theme: 'discworld' } },
|
|
77
|
+
];
|
|
78
|
+
const result = resolveVariables(content, sources);
|
|
79
|
+
assert.strictEqual(result.content, 'Theme: west-wing');
|
|
80
|
+
assert.strictEqual(result.sources['theme'], 'workflow');
|
|
81
|
+
});
|
|
82
|
+
it('should fall back to lower priority when higher priority lacks variable', () => {
|
|
83
|
+
const content = 'Project: {project_root}';
|
|
84
|
+
const sources = [
|
|
85
|
+
{ name: 'workflow', priority: 1, values: {} },
|
|
86
|
+
{ name: 'session', priority: 2, values: {} },
|
|
87
|
+
{ name: 'environment', priority: 4, values: { project_root: '/Users/keithavery/Projects/pennyfarthing' } },
|
|
88
|
+
];
|
|
89
|
+
const result = resolveVariables(content, sources);
|
|
90
|
+
assert.strictEqual(result.content, 'Project: /Users/keithavery/Projects/pennyfarthing');
|
|
91
|
+
assert.strictEqual(result.sources['project_root'], 'environment');
|
|
92
|
+
});
|
|
93
|
+
it('should resolve different variables from different sources', () => {
|
|
94
|
+
const content = '{story_id} in {project_root} with {theme}';
|
|
95
|
+
const sources = [
|
|
96
|
+
{ name: 'workflow', priority: 1, values: { theme: 'west-wing' } },
|
|
97
|
+
{ name: 'session', priority: 2, values: { story_id: 'MSSCI-12081' } },
|
|
98
|
+
{ name: 'environment', priority: 4, values: { project_root: '/home/user/project' } },
|
|
99
|
+
];
|
|
100
|
+
const result = resolveVariables(content, sources);
|
|
101
|
+
assert.strictEqual(result.content, 'MSSCI-12081 in /home/user/project with west-wing');
|
|
102
|
+
assert.strictEqual(result.sources['theme'], 'workflow');
|
|
103
|
+
assert.strictEqual(result.sources['story_id'], 'session');
|
|
104
|
+
assert.strictEqual(result.sources['project_root'], 'environment');
|
|
105
|
+
});
|
|
106
|
+
it('should respect priority ordering regardless of array order', () => {
|
|
107
|
+
const content = 'Value: {key}';
|
|
108
|
+
// Sources provided out of priority order
|
|
109
|
+
const sources = [
|
|
110
|
+
{ name: 'config', priority: 3, values: { key: 'from-config' } },
|
|
111
|
+
{ name: 'workflow', priority: 1, values: { key: 'from-workflow' } },
|
|
112
|
+
{ name: 'defaults', priority: 5, values: { key: 'from-defaults' } },
|
|
113
|
+
{ name: 'session', priority: 2, values: { key: 'from-session' } },
|
|
114
|
+
];
|
|
115
|
+
const result = resolveVariables(content, sources);
|
|
116
|
+
assert.strictEqual(result.content, 'Value: from-workflow');
|
|
117
|
+
assert.strictEqual(result.sources['key'], 'workflow');
|
|
118
|
+
});
|
|
119
|
+
it('should handle sources with same priority (first wins)', () => {
|
|
120
|
+
const content = 'Value: {var}';
|
|
121
|
+
const sources = [
|
|
122
|
+
{ name: 'source-a', priority: 1, values: { var: 'a-value' } },
|
|
123
|
+
{ name: 'source-b', priority: 1, values: { var: 'b-value' } },
|
|
124
|
+
];
|
|
125
|
+
const result = resolveVariables(content, sources);
|
|
126
|
+
// First source with matching priority wins
|
|
127
|
+
assert.strictEqual(result.content, 'Value: a-value');
|
|
128
|
+
assert.strictEqual(result.sources['var'], 'source-a');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
describe('AC3: Standard variables documented and working', () => {
|
|
132
|
+
it('should resolve project_root from environment source', () => {
|
|
133
|
+
const content = 'Root: {project_root}';
|
|
134
|
+
const sources = [
|
|
135
|
+
{ name: 'environment', priority: 4, values: { project_root: '/abs/path/to/project' } },
|
|
136
|
+
];
|
|
137
|
+
const result = resolveVariables(content, sources);
|
|
138
|
+
assert.strictEqual(result.content, 'Root: /abs/path/to/project');
|
|
139
|
+
});
|
|
140
|
+
it('should resolve date variable with YYYY-MM-DD format', () => {
|
|
141
|
+
const content = 'Today: {date}';
|
|
142
|
+
const sources = [
|
|
143
|
+
{ name: 'system', priority: 4, values: { date: '2026-01-20' } },
|
|
144
|
+
];
|
|
145
|
+
const result = resolveVariables(content, sources);
|
|
146
|
+
assert.strictEqual(result.content, 'Today: 2026-01-20');
|
|
147
|
+
// Verify date format matches pattern
|
|
148
|
+
assert.match(result.content, /\d{4}-\d{2}-\d{2}/);
|
|
149
|
+
});
|
|
150
|
+
it('should resolve story_id from session source', () => {
|
|
151
|
+
const content = 'Working on {story_id}';
|
|
152
|
+
const sources = [
|
|
153
|
+
{ name: 'session', priority: 2, values: { story_id: 'MSSCI-12081' } },
|
|
154
|
+
];
|
|
155
|
+
const result = resolveVariables(content, sources);
|
|
156
|
+
assert.strictEqual(result.content, 'Working on MSSCI-12081');
|
|
157
|
+
});
|
|
158
|
+
it('should resolve output_file from workflow source', () => {
|
|
159
|
+
const content = 'Write to {output_file}';
|
|
160
|
+
const sources = [
|
|
161
|
+
{ name: 'workflow', priority: 1, values: { output_file: 'analysis-output.md' } },
|
|
162
|
+
];
|
|
163
|
+
const result = resolveVariables(content, sources);
|
|
164
|
+
assert.strictEqual(result.content, 'Write to analysis-output.md');
|
|
165
|
+
});
|
|
166
|
+
it('should resolve planning_artifacts from defaults', () => {
|
|
167
|
+
const content = 'Artifacts in {planning_artifacts}';
|
|
168
|
+
const sources = [
|
|
169
|
+
{ name: 'defaults', priority: 5, values: { planning_artifacts: 'planning-artifacts/' } },
|
|
170
|
+
];
|
|
171
|
+
const result = resolveVariables(content, sources);
|
|
172
|
+
assert.strictEqual(result.content, 'Artifacts in planning-artifacts/');
|
|
173
|
+
});
|
|
174
|
+
it('should resolve all standard variables together', () => {
|
|
175
|
+
const content = `# Analysis for {story_id}
|
|
176
|
+
|
|
177
|
+
Project: {project_root}
|
|
178
|
+
Date: {date}
|
|
179
|
+
Output: {output_file}
|
|
180
|
+
Artifacts: {planning_artifacts}
|
|
181
|
+
`;
|
|
182
|
+
const sources = [
|
|
183
|
+
{ name: 'workflow', priority: 1, values: { output_file: 'report.md' } },
|
|
184
|
+
{ name: 'session', priority: 2, values: { story_id: 'MSSCI-12081' } },
|
|
185
|
+
{ name: 'environment', priority: 4, values: {
|
|
186
|
+
project_root: '/Users/keithavery/Projects/pennyfarthing',
|
|
187
|
+
date: '2026-01-20'
|
|
188
|
+
} },
|
|
189
|
+
{ name: 'defaults', priority: 5, values: { planning_artifacts: 'planning-artifacts/' } },
|
|
190
|
+
];
|
|
191
|
+
const result = resolveVariables(content, sources);
|
|
192
|
+
assert.ok(result.content.includes('MSSCI-12081'));
|
|
193
|
+
assert.ok(result.content.includes('/Users/keithavery/Projects/pennyfarthing'));
|
|
194
|
+
assert.ok(result.content.includes('2026-01-20'));
|
|
195
|
+
assert.ok(result.content.includes('report.md'));
|
|
196
|
+
assert.ok(result.content.includes('planning-artifacts/'));
|
|
197
|
+
assert.strictEqual(result.resolved.length, 5);
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
describe('AC4: Unresolved variables flagged with warning', () => {
|
|
201
|
+
it('should leave unresolved variable as-is in content', () => {
|
|
202
|
+
const content = 'Value: {missing_var}';
|
|
203
|
+
const sources = [
|
|
204
|
+
{ name: 'workflow', priority: 1, values: { other_var: 'something' } },
|
|
205
|
+
];
|
|
206
|
+
const result = resolveVariables(content, sources);
|
|
207
|
+
assert.strictEqual(result.content, 'Value: {missing_var}');
|
|
208
|
+
});
|
|
209
|
+
it('should track unresolved variables in result', () => {
|
|
210
|
+
const content = '{found} and {not_found} and {also_missing}';
|
|
211
|
+
const sources = [
|
|
212
|
+
{ name: 'workflow', priority: 1, values: { found: 'yes' } },
|
|
213
|
+
];
|
|
214
|
+
const result = resolveVariables(content, sources);
|
|
215
|
+
assert.strictEqual(result.content, 'yes and {not_found} and {also_missing}');
|
|
216
|
+
assert.deepStrictEqual(result.resolved, ['found']);
|
|
217
|
+
assert.ok(result.unresolved.includes('not_found'));
|
|
218
|
+
assert.ok(result.unresolved.includes('also_missing'));
|
|
219
|
+
assert.strictEqual(result.unresolved.length, 2);
|
|
220
|
+
});
|
|
221
|
+
it('should not include unresolved variables in sources map', () => {
|
|
222
|
+
const content = '{resolved_var} {unresolved_var}';
|
|
223
|
+
const sources = [
|
|
224
|
+
{ name: 'workflow', priority: 1, values: { resolved_var: 'value' } },
|
|
225
|
+
];
|
|
226
|
+
const result = resolveVariables(content, sources);
|
|
227
|
+
assert.ok('resolved_var' in result.sources);
|
|
228
|
+
assert.ok(!('unresolved_var' in result.sources));
|
|
229
|
+
});
|
|
230
|
+
it('should list each unresolved variable only once', () => {
|
|
231
|
+
const content = '{missing} appears twice: {missing}';
|
|
232
|
+
const sources = [];
|
|
233
|
+
const result = resolveVariables(content, sources);
|
|
234
|
+
assert.strictEqual(result.content, '{missing} appears twice: {missing}');
|
|
235
|
+
assert.deepStrictEqual(result.unresolved, ['missing']);
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
describe('Edge Cases', () => {
|
|
239
|
+
it('should match valid variable names only (letters, numbers, underscores)', () => {
|
|
240
|
+
const content = '{valid_name} {valid123} {_underscore_start}';
|
|
241
|
+
const sources = [
|
|
242
|
+
{ name: 'test', priority: 1, values: {
|
|
243
|
+
valid_name: 'a',
|
|
244
|
+
valid123: 'b',
|
|
245
|
+
_underscore_start: 'c'
|
|
246
|
+
} },
|
|
247
|
+
];
|
|
248
|
+
const result = resolveVariables(content, sources);
|
|
249
|
+
assert.strictEqual(result.content, 'a b c');
|
|
250
|
+
});
|
|
251
|
+
it('should not match variables starting with numbers', () => {
|
|
252
|
+
const content = '{123invalid} {9lives}';
|
|
253
|
+
const sources = [
|
|
254
|
+
{ name: 'test', priority: 1, values: { '123invalid': 'no', '9lives': 'no' } },
|
|
255
|
+
];
|
|
256
|
+
const result = resolveVariables(content, sources);
|
|
257
|
+
// Should remain unchanged (invalid variable syntax)
|
|
258
|
+
assert.strictEqual(result.content, '{123invalid} {9lives}');
|
|
259
|
+
assert.deepStrictEqual(result.resolved, []);
|
|
260
|
+
// These aren't variables, so they shouldn't be in unresolved either
|
|
261
|
+
assert.deepStrictEqual(result.unresolved, []);
|
|
262
|
+
});
|
|
263
|
+
it('should not match nested variables', () => {
|
|
264
|
+
const content = '{outer_{inner}}';
|
|
265
|
+
const sources = [
|
|
266
|
+
{ name: 'test', priority: 1, values: { outer_inner: 'nested', inner: 'value' } },
|
|
267
|
+
];
|
|
268
|
+
const result = resolveVariables(content, sources);
|
|
269
|
+
// Nested syntax is not supported - should not parse as a variable
|
|
270
|
+
assert.strictEqual(result.content, '{outer_{inner}}');
|
|
271
|
+
});
|
|
272
|
+
it('should handle empty string value as valid resolution', () => {
|
|
273
|
+
const content = 'Value: [{empty_value}]';
|
|
274
|
+
const sources = [
|
|
275
|
+
{ name: 'test', priority: 1, values: { empty_value: '' } },
|
|
276
|
+
];
|
|
277
|
+
const result = resolveVariables(content, sources);
|
|
278
|
+
assert.strictEqual(result.content, 'Value: []');
|
|
279
|
+
assert.deepStrictEqual(result.resolved, ['empty_value']);
|
|
280
|
+
assert.deepStrictEqual(result.unresolved, []);
|
|
281
|
+
});
|
|
282
|
+
it('should treat null value as unresolved', () => {
|
|
283
|
+
const content = 'Value: {null_value}';
|
|
284
|
+
const sources = [
|
|
285
|
+
{ name: 'test', priority: 1, values: { null_value: null } },
|
|
286
|
+
];
|
|
287
|
+
const result = resolveVariables(content, sources);
|
|
288
|
+
assert.strictEqual(result.content, 'Value: {null_value}');
|
|
289
|
+
assert.deepStrictEqual(result.unresolved, ['null_value']);
|
|
290
|
+
});
|
|
291
|
+
it('should treat undefined value as unresolved', () => {
|
|
292
|
+
const content = 'Value: {undefined_value}';
|
|
293
|
+
const sources = [
|
|
294
|
+
{ name: 'test', priority: 1, values: { undefined_value: undefined } },
|
|
295
|
+
];
|
|
296
|
+
const result = resolveVariables(content, sources);
|
|
297
|
+
assert.strictEqual(result.content, 'Value: {undefined_value}');
|
|
298
|
+
assert.deepStrictEqual(result.unresolved, ['undefined_value']);
|
|
299
|
+
});
|
|
300
|
+
it('should convert number values to strings', () => {
|
|
301
|
+
const content = 'Count: {count} | Points: {points}';
|
|
302
|
+
const sources = [
|
|
303
|
+
{ name: 'test', priority: 1, values: {
|
|
304
|
+
count: 42,
|
|
305
|
+
points: 3.14
|
|
306
|
+
} },
|
|
307
|
+
];
|
|
308
|
+
const result = resolveVariables(content, sources);
|
|
309
|
+
assert.strictEqual(result.content, 'Count: 42 | Points: 3.14');
|
|
310
|
+
});
|
|
311
|
+
it('should convert boolean values to strings', () => {
|
|
312
|
+
const content = 'Enabled: {enabled} | Debug: {debug}';
|
|
313
|
+
const sources = [
|
|
314
|
+
{ name: 'test', priority: 1, values: {
|
|
315
|
+
enabled: true,
|
|
316
|
+
debug: false
|
|
317
|
+
} },
|
|
318
|
+
];
|
|
319
|
+
const result = resolveVariables(content, sources);
|
|
320
|
+
assert.strictEqual(result.content, 'Enabled: true | Debug: false');
|
|
321
|
+
});
|
|
322
|
+
it('should handle curly braces that are not variables', () => {
|
|
323
|
+
const content = 'JSON: { "key": "value" } and regex: [a-z]{3}';
|
|
324
|
+
const sources = [];
|
|
325
|
+
const result = resolveVariables(content, sources);
|
|
326
|
+
// These aren't valid variable patterns - should remain unchanged
|
|
327
|
+
assert.strictEqual(result.content, 'JSON: { "key": "value" } and regex: [a-z]{3}');
|
|
328
|
+
});
|
|
329
|
+
it('should handle special characters in variable values', () => {
|
|
330
|
+
const content = 'Path: {path}';
|
|
331
|
+
const sources = [
|
|
332
|
+
{ name: 'test', priority: 1, values: { path: '/home/user/Documents & Files/project' } },
|
|
333
|
+
];
|
|
334
|
+
const result = resolveVariables(content, sources);
|
|
335
|
+
assert.strictEqual(result.content, 'Path: /home/user/Documents & Files/project');
|
|
336
|
+
});
|
|
337
|
+
it('should handle multiline content', () => {
|
|
338
|
+
const content = `Line 1: {var1}
|
|
339
|
+
Line 2: {var2}
|
|
340
|
+
Line 3: {var3}`;
|
|
341
|
+
const sources = [
|
|
342
|
+
{ name: 'test', priority: 1, values: { var1: 'a', var2: 'b', var3: 'c' } },
|
|
343
|
+
];
|
|
344
|
+
const result = resolveVariables(content, sources);
|
|
345
|
+
assert.strictEqual(result.content, `Line 1: a
|
|
346
|
+
Line 2: b
|
|
347
|
+
Line 3: c`);
|
|
348
|
+
});
|
|
349
|
+
it('should handle variable in markdown code block', () => {
|
|
350
|
+
const content = '```\nconfig: {config_path}\n```';
|
|
351
|
+
const sources = [
|
|
352
|
+
{ name: 'test', priority: 1, values: { config_path: '/etc/app.yaml' } },
|
|
353
|
+
];
|
|
354
|
+
const result = resolveVariables(content, sources);
|
|
355
|
+
assert.strictEqual(result.content, '```\nconfig: /etc/app.yaml\n```');
|
|
356
|
+
});
|
|
357
|
+
it('should handle empty content', () => {
|
|
358
|
+
const content = '';
|
|
359
|
+
const sources = [
|
|
360
|
+
{ name: 'test', priority: 1, values: { unused: 'value' } },
|
|
361
|
+
];
|
|
362
|
+
const result = resolveVariables(content, sources);
|
|
363
|
+
assert.strictEqual(result.content, '');
|
|
364
|
+
assert.deepStrictEqual(result.resolved, []);
|
|
365
|
+
assert.deepStrictEqual(result.unresolved, []);
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
describe('resolveStepVariables convenience function', () => {
|
|
369
|
+
it('should build sources from workflow, session, and config', () => {
|
|
370
|
+
const content = '{workflow_var} and {story_id} and {project_root}';
|
|
371
|
+
const result = resolveStepVariables(content, {
|
|
372
|
+
workflowVars: { workflow_var: 'from-workflow' },
|
|
373
|
+
sessionVars: { story_id: 'MSSCI-12081' },
|
|
374
|
+
projectRoot: '/Users/keithavery/Projects/pennyfarthing',
|
|
375
|
+
});
|
|
376
|
+
assert.strictEqual(result.content, 'from-workflow and MSSCI-12081 and /Users/keithavery/Projects/pennyfarthing');
|
|
377
|
+
});
|
|
378
|
+
it('should include system defaults (date, planning_artifacts)', () => {
|
|
379
|
+
const content = 'Date: {date} | Artifacts: {planning_artifacts}';
|
|
380
|
+
const result = resolveStepVariables(content, {});
|
|
381
|
+
// Date should be current date in YYYY-MM-DD format
|
|
382
|
+
assert.match(result.content, /Date: \d{4}-\d{2}-\d{2}/);
|
|
383
|
+
// planning_artifacts should have default value
|
|
384
|
+
assert.ok(result.content.includes('planning-artifacts/'));
|
|
385
|
+
});
|
|
386
|
+
it('should work with no options provided', () => {
|
|
387
|
+
const content = 'No variables here.';
|
|
388
|
+
const result = resolveStepVariables(content);
|
|
389
|
+
assert.strictEqual(result.content, 'No variables here.');
|
|
390
|
+
});
|
|
391
|
+
it('should allow workflow vars to override system defaults', () => {
|
|
392
|
+
const content = 'Artifacts: {planning_artifacts}';
|
|
393
|
+
const result = resolveStepVariables(content, {
|
|
394
|
+
workflowVars: { planning_artifacts: 'custom-artifacts/' },
|
|
395
|
+
});
|
|
396
|
+
assert.strictEqual(result.content, 'Artifacts: custom-artifacts/');
|
|
397
|
+
});
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
//# sourceMappingURL=variable-resolver.test.js.map
|