gsd-pi 2.41.0 → 2.42.0-dev.eedc83f
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 +92 -29
- package/dist/cli-web-branch.d.ts +6 -0
- package/dist/cli-web-branch.js +17 -0
- package/dist/cli.js +15 -1
- package/dist/onboarding.js +2 -1
- package/dist/resource-loader.js +39 -6
- package/dist/resources/extensions/async-jobs/async-bash-tool.js +52 -4
- package/dist/resources/extensions/gsd/auto/loop.js +89 -1
- package/dist/resources/extensions/gsd/auto/phases.js +28 -10
- package/dist/resources/extensions/gsd/auto/session.js +6 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +8 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +19 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +7 -0
- package/dist/resources/extensions/gsd/auto-prompts.js +1 -1
- package/dist/resources/extensions/gsd/auto-recovery.js +12 -4
- package/dist/resources/extensions/gsd/auto-start.js +8 -3
- package/dist/resources/extensions/gsd/auto-worktree.js +147 -13
- package/dist/resources/extensions/gsd/auto.js +64 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +199 -164
- package/dist/resources/extensions/gsd/bootstrap/journal-tools.js +62 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +2 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +25 -3
- package/dist/resources/extensions/gsd/bootstrap/tool-call-loop-guard.js +7 -2
- package/dist/resources/extensions/gsd/commands/catalog.js +40 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +1 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +146 -0
- package/dist/resources/extensions/gsd/context-injector.js +74 -0
- package/dist/resources/extensions/gsd/context-store.js +4 -3
- package/dist/resources/extensions/gsd/custom-execution-policy.js +47 -0
- package/dist/resources/extensions/gsd/custom-verification.js +145 -0
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +164 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -0
- package/dist/resources/extensions/gsd/db-writer.js +5 -2
- package/dist/resources/extensions/gsd/definition-loader.js +352 -0
- package/dist/resources/extensions/gsd/detection.js +20 -1
- package/dist/resources/extensions/gsd/dev-execution-policy.js +24 -0
- package/dist/resources/extensions/gsd/dev-workflow-engine.js +82 -0
- package/dist/resources/extensions/gsd/doctor-checks.js +31 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +10 -0
- package/dist/resources/extensions/gsd/doctor.js +11 -1
- package/dist/resources/extensions/gsd/engine-resolver.js +40 -0
- package/dist/resources/extensions/gsd/engine-types.js +8 -0
- package/dist/resources/extensions/gsd/execution-policy.js +8 -0
- package/dist/resources/extensions/gsd/exit-command.js +12 -2
- package/dist/resources/extensions/gsd/export.js +9 -13
- package/dist/resources/extensions/gsd/extension-manifest.json +2 -2
- package/dist/resources/extensions/gsd/files.js +28 -11
- package/dist/resources/extensions/gsd/forensics.js +94 -3
- package/dist/resources/extensions/gsd/git-constants.js +1 -0
- package/dist/resources/extensions/gsd/git-service.js +73 -3
- package/dist/resources/extensions/gsd/graph.js +225 -0
- package/dist/resources/extensions/gsd/gsd-db.js +25 -8
- package/dist/resources/extensions/gsd/guided-flow-queue.js +1 -1
- package/dist/resources/extensions/gsd/guided-flow.js +7 -3
- package/dist/resources/extensions/gsd/journal.js +85 -0
- package/dist/resources/extensions/gsd/md-importer.js +5 -0
- package/dist/resources/extensions/gsd/milestone-ids.js +1 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +3 -2
- package/dist/resources/extensions/gsd/post-unit-hooks.js +24 -412
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences.js +60 -8
- package/dist/resources/extensions/gsd/prompt-loader.js +34 -4
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +11 -10
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +2 -2
- package/dist/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/dist/resources/extensions/gsd/prompts/forensics.md +12 -5
- package/dist/resources/extensions/gsd/prompts/queue.md +1 -1
- package/dist/resources/extensions/gsd/repo-identity.js +92 -7
- package/dist/resources/extensions/gsd/rule-registry.js +489 -0
- package/dist/resources/extensions/gsd/rule-types.js +6 -0
- package/dist/resources/extensions/gsd/run-manager.js +134 -0
- package/dist/resources/extensions/gsd/service-tier.js +147 -0
- package/dist/resources/extensions/gsd/session-lock.js +2 -2
- package/dist/resources/extensions/gsd/structured-data-formatter.js +2 -1
- package/dist/resources/extensions/gsd/templates/decisions.md +2 -2
- package/dist/resources/extensions/gsd/workflow-engine.js +7 -0
- package/dist/resources/extensions/gsd/workflow-templates.js +13 -1
- package/dist/resources/extensions/gsd/worktree-manager.js +20 -6
- package/dist/resources/extensions/gsd/worktree-resolver.js +21 -4
- package/dist/resources/extensions/mcp-client/index.js +2 -1
- package/dist/resources/extensions/search-the-web/tool-search.js +3 -3
- package/dist/resources/extensions/subagent/index.js +7 -3
- package/dist/resources/extensions/voice/index.js +4 -4
- package/dist/resources/skills/create-workflow/SKILL.md +103 -0
- package/dist/resources/skills/create-workflow/references/feature-patterns.md +128 -0
- package/dist/resources/skills/create-workflow/references/verification-policies.md +76 -0
- package/dist/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
- package/dist/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
- package/dist/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
- package/dist/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
- package/dist/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
- package/dist/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
- package/dist/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +13 -13
- package/dist/web/standalone/.next/build-manifest.json +4 -4
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +5 -5
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +13 -13
- package/dist/web/standalone/.next/server/chunks/229.js +3 -3
- package/dist/web/standalone/.next/server/chunks/471.js +3 -3
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/4024.c195dc1fdd2adbea.js +9 -0
- package/dist/web/standalone/.next/static/chunks/app/_not-found/page-f2a7482d42a5614b.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/layout-a16c7a7ecdf0c2cf.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/page-b9367c5ae13b99c6.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{main-app-2f2ee7b85712c2bd.js → main-app-fdab67f7802d7832.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-9afaaebf6042a1d7.js → webpack-fa307370fcf9fb2c.js} +1 -1
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/dist/web-mode.d.ts +4 -0
- package/dist/web-mode.js +69 -11
- package/package.json +1 -1
- package/packages/native/src/__tests__/text.test.mjs +33 -0
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +2 -0
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +6 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/src/agent.test.ts +53 -0
- package/packages/pi-agent-core/src/agent.ts +3 -0
- package/packages/pi-agent-core/src/types.ts +6 -0
- package/packages/pi-agent-core/tsconfig.json +1 -1
- package/packages/pi-ai/dist/models.d.ts +5 -3
- package/packages/pi-ai/dist/models.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +801 -1468
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +1135 -1588
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +60 -2
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +1543 -0
- package/packages/pi-ai/src/models.generated.ts +1140 -1593
- package/packages/pi-ai/src/models.ts +7 -4
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +74 -2
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +8 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +29 -2
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +60 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js +3 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +18 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.js +23 -0
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.d.ts +6 -0
- package/packages/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-manager.js +63 -11
- package/packages/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +20 -6
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +6 -5
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +3 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +9 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +34 -10
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +7 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +68 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +30 -2
- package/packages/pi-coding-agent/src/core/discovery-cache.test.ts +4 -2
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +18 -0
- package/packages/pi-coding-agent/src/core/lsp/client.ts +29 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +3 -0
- package/packages/pi-coding-agent/src/core/package-manager.ts +99 -58
- package/packages/pi-coding-agent/src/core/resource-loader.ts +24 -6
- package/packages/pi-coding-agent/src/core/system-prompt.ts +6 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/extension-editor.ts +3 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +10 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +11 -7
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +36 -11
- package/pkg/package.json +1 -1
- package/src/resources/extensions/async-jobs/async-bash-timeout.test.ts +122 -0
- package/src/resources/extensions/async-jobs/async-bash-tool.ts +40 -4
- package/src/resources/extensions/gsd/auto/loop-deps.ts +5 -1
- package/src/resources/extensions/gsd/auto/loop.ts +101 -1
- package/src/resources/extensions/gsd/auto/phases.ts +30 -10
- package/src/resources/extensions/gsd/auto/session.ts +6 -0
- package/src/resources/extensions/gsd/auto/types.ts +4 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +9 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +25 -5
- package/src/resources/extensions/gsd/auto-post-unit.ts +8 -0
- package/src/resources/extensions/gsd/auto-prompts.ts +1 -1
- package/src/resources/extensions/gsd/auto-recovery.ts +12 -4
- package/src/resources/extensions/gsd/auto-start.ts +8 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +162 -18
- package/src/resources/extensions/gsd/auto.ts +71 -2
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +209 -162
- package/src/resources/extensions/gsd/bootstrap/journal-tools.ts +62 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +2 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +25 -4
- package/src/resources/extensions/gsd/bootstrap/tool-call-loop-guard.ts +9 -2
- package/src/resources/extensions/gsd/commands/catalog.ts +40 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +1 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +164 -0
- package/src/resources/extensions/gsd/context-injector.ts +100 -0
- package/src/resources/extensions/gsd/context-store.ts +4 -3
- package/src/resources/extensions/gsd/custom-execution-policy.ts +73 -0
- package/src/resources/extensions/gsd/custom-verification.ts +180 -0
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +216 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -0
- package/src/resources/extensions/gsd/db-writer.ts +6 -2
- package/src/resources/extensions/gsd/definition-loader.ts +462 -0
- package/src/resources/extensions/gsd/detection.ts +20 -1
- package/src/resources/extensions/gsd/dev-execution-policy.ts +51 -0
- package/src/resources/extensions/gsd/dev-workflow-engine.ts +110 -0
- package/src/resources/extensions/gsd/doctor-checks.ts +32 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +13 -0
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +12 -1
- package/src/resources/extensions/gsd/engine-resolver.ts +57 -0
- package/src/resources/extensions/gsd/engine-types.ts +71 -0
- package/src/resources/extensions/gsd/execution-policy.ts +43 -0
- package/src/resources/extensions/gsd/exit-command.ts +14 -2
- package/src/resources/extensions/gsd/export.ts +8 -15
- package/src/resources/extensions/gsd/extension-manifest.json +2 -2
- package/src/resources/extensions/gsd/files.ts +29 -12
- package/src/resources/extensions/gsd/forensics.ts +101 -3
- package/src/resources/extensions/gsd/git-constants.ts +1 -0
- package/src/resources/extensions/gsd/git-service.ts +76 -6
- package/src/resources/extensions/gsd/graph.ts +312 -0
- package/src/resources/extensions/gsd/gsd-db.ts +37 -8
- package/src/resources/extensions/gsd/guided-flow-queue.ts +1 -1
- package/src/resources/extensions/gsd/guided-flow.ts +7 -3
- package/src/resources/extensions/gsd/journal.ts +134 -0
- package/src/resources/extensions/gsd/md-importer.ts +6 -0
- package/src/resources/extensions/gsd/milestone-ids.ts +1 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +3 -2
- package/src/resources/extensions/gsd/post-unit-hooks.ts +24 -462
- package/src/resources/extensions/gsd/preferences-types.ts +6 -0
- package/src/resources/extensions/gsd/preferences.ts +63 -6
- package/src/resources/extensions/gsd/prompt-loader.ts +35 -4
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +11 -10
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +2 -2
- package/src/resources/extensions/gsd/prompts/discuss.md +1 -1
- package/src/resources/extensions/gsd/prompts/forensics.md +12 -5
- package/src/resources/extensions/gsd/prompts/queue.md +1 -1
- package/src/resources/extensions/gsd/repo-identity.ts +95 -7
- package/src/resources/extensions/gsd/rule-registry.ts +599 -0
- package/src/resources/extensions/gsd/rule-types.ts +68 -0
- package/src/resources/extensions/gsd/run-manager.ts +180 -0
- package/src/resources/extensions/gsd/service-tier.ts +184 -0
- package/src/resources/extensions/gsd/session-lock.ts +2 -2
- package/src/resources/extensions/gsd/structured-data-formatter.ts +3 -1
- package/src/resources/extensions/gsd/templates/decisions.md +2 -2
- package/src/resources/extensions/gsd/tests/activity-log.test.ts +31 -69
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +103 -120
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/auto-secrets-gate.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +202 -0
- package/src/resources/extensions/gsd/tests/bundled-workflow-defs.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/captures.test.ts +12 -1
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +283 -0
- package/src/resources/extensions/gsd/tests/context-injector.test.ts +313 -0
- package/src/resources/extensions/gsd/tests/context-store.test.ts +10 -5
- package/src/resources/extensions/gsd/tests/continue-here.test.ts +20 -20
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +540 -0
- package/src/resources/extensions/gsd/tests/custom-verification.test.ts +382 -0
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +339 -0
- package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/definition-loader.test.ts +778 -0
- package/src/resources/extensions/gsd/tests/dev-engine-wrapper.test.ts +318 -0
- package/src/resources/extensions/gsd/tests/doctor-completion-deferral.test.ts +15 -10
- package/src/resources/extensions/gsd/tests/doctor-fixlevel.test.ts +5 -4
- package/src/resources/extensions/gsd/tests/doctor-roadmap-summary-atomicity.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/doctor-task-done-missing-summary-slice-loop.test.ts +174 -0
- package/src/resources/extensions/gsd/tests/e2e-workflow-pipeline-integration.test.ts +476 -0
- package/src/resources/extensions/gsd/tests/engine-interfaces-contract.test.ts +271 -0
- package/src/resources/extensions/gsd/tests/exit-command.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/forensics-dedup.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/forensics-issue-routing.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/git-locale.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +599 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +8 -1
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +7 -7
- package/src/resources/extensions/gsd/tests/iterate-engine-integration.test.ts +429 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +513 -0
- package/src/resources/extensions/gsd/tests/journal-query-tool.test.ts +147 -0
- package/src/resources/extensions/gsd/tests/journal.test.ts +341 -0
- package/src/resources/extensions/gsd/tests/manifest-status.test.ts +73 -82
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +31 -1
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/milestone-id-reservation.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/parsers.test.ts +110 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +47 -25
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +3 -1
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +61 -1
- package/src/resources/extensions/gsd/tests/routing-history.test.ts +11 -22
- package/src/resources/extensions/gsd/tests/rule-registry.test.ts +413 -0
- package/src/resources/extensions/gsd/tests/run-manager.test.ts +229 -0
- package/src/resources/extensions/gsd/tests/service-tier.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/skill-lifecycle.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/stalled-tool-recovery.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/structured-data-formatter.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/symlink-numbered-variants.test.ts +151 -0
- package/src/resources/extensions/gsd/tests/tool-call-loop-guard.test.ts +45 -0
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +117 -0
- package/src/resources/extensions/gsd/tests/triage-dispatch.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +156 -263
- package/src/resources/extensions/gsd/tests/windows-path-normalization.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +4 -0
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +135 -0
- package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +203 -106
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +78 -3
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +74 -0
- package/src/resources/extensions/gsd/types.ts +3 -0
- package/src/resources/extensions/gsd/workflow-engine.ts +38 -0
- package/src/resources/extensions/gsd/workflow-templates.ts +12 -1
- package/src/resources/extensions/gsd/worktree-manager.ts +21 -6
- package/src/resources/extensions/gsd/worktree-resolver.ts +32 -11
- package/src/resources/extensions/mcp-client/index.ts +5 -1
- package/src/resources/extensions/search-the-web/tool-search.ts +3 -3
- package/src/resources/extensions/subagent/index.ts +7 -3
- package/src/resources/extensions/voice/index.ts +4 -4
- package/src/resources/skills/create-workflow/SKILL.md +103 -0
- package/src/resources/skills/create-workflow/references/feature-patterns.md +128 -0
- package/src/resources/skills/create-workflow/references/verification-policies.md +76 -0
- package/src/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
- package/src/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
- package/src/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
- package/src/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
- package/src/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
- package/src/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
- package/src/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
- package/dist/web/standalone/.next/static/chunks/4024.279c423e4661ece1.js +0 -9
- package/dist/web/standalone/.next/static/chunks/app/_not-found/page-e07acdb7dd069836.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/layout-745c6ed5fea5fb06.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/page-801b53eff6e83579.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-e6255954dccfcf0a.js +0 -1
- /package/dist/web/standalone/.next/static/{Ute3pMouVczQyT15qrBBO → JUBX5FUR73jiViQU5a-Cx}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{Ute3pMouVczQyT15qrBBO → JUBX5FUR73jiViQU5a-Cx}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<feature_patterns>
|
|
2
|
+
Advanced workflow features: `context_from`, `iterate`, and `params`. Each section includes a complete YAML example.
|
|
3
|
+
|
|
4
|
+
**Feature 1: `context_from` — Context Chaining**
|
|
5
|
+
|
|
6
|
+
Injects artifacts from prior steps as context when the current step runs. The value is an array of step IDs.
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
version: 1
|
|
10
|
+
name: research-and-synthesize
|
|
11
|
+
steps:
|
|
12
|
+
- id: gather
|
|
13
|
+
name: Gather sources
|
|
14
|
+
prompt: "Find and summarize the top 5 sources on the topic."
|
|
15
|
+
produces:
|
|
16
|
+
- sources.md
|
|
17
|
+
|
|
18
|
+
- id: analyze
|
|
19
|
+
name: Analyze sources
|
|
20
|
+
prompt: "Analyze the gathered sources for key themes."
|
|
21
|
+
requires:
|
|
22
|
+
- gather
|
|
23
|
+
context_from:
|
|
24
|
+
- gather
|
|
25
|
+
produces:
|
|
26
|
+
- analysis.md
|
|
27
|
+
|
|
28
|
+
- id: synthesize
|
|
29
|
+
name: Write synthesis
|
|
30
|
+
prompt: "Synthesize the analysis into a coherent report."
|
|
31
|
+
requires:
|
|
32
|
+
- analyze
|
|
33
|
+
context_from:
|
|
34
|
+
- gather
|
|
35
|
+
- analyze
|
|
36
|
+
produces:
|
|
37
|
+
- report.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
How it works:
|
|
41
|
+
- `context_from: [gather]` means the engine includes artifacts from the `gather` step when executing `analyze`.
|
|
42
|
+
- You can reference multiple prior steps: `context_from: [gather, analyze]`.
|
|
43
|
+
- The referenced steps must exist in the workflow (they are validated as step IDs).
|
|
44
|
+
- `context_from` does not imply a dependency — if you want the step to wait, also add the ID to `requires`.
|
|
45
|
+
|
|
46
|
+
**Feature 2: `iterate` — Fan-Out Iteration**
|
|
47
|
+
|
|
48
|
+
Reads an artifact, applies a regex pattern, and creates one sub-execution per match. The capture group extracts the iteration variable.
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
version: 1
|
|
52
|
+
name: file-by-file-review
|
|
53
|
+
steps:
|
|
54
|
+
- id: inventory
|
|
55
|
+
name: List files to review
|
|
56
|
+
prompt: "List all TypeScript files in src/ that need review, one per line."
|
|
57
|
+
produces:
|
|
58
|
+
- file-list.txt
|
|
59
|
+
|
|
60
|
+
- id: review
|
|
61
|
+
name: Review each file
|
|
62
|
+
prompt: "Review the file for code quality issues."
|
|
63
|
+
requires:
|
|
64
|
+
- inventory
|
|
65
|
+
iterate:
|
|
66
|
+
source: file-list.txt
|
|
67
|
+
pattern: "^(.+\\.ts)$"
|
|
68
|
+
produces:
|
|
69
|
+
- reviews/
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
How it works:
|
|
73
|
+
- `source`: Path to an artifact (relative to the run directory). Must not contain `..`.
|
|
74
|
+
- `pattern`: A regex string applied with the global flag. Must contain at least one capture group `(...)`.
|
|
75
|
+
- The engine reads the source artifact, applies the pattern, and creates one execution per match.
|
|
76
|
+
- Each capture group match becomes available as the iteration variable.
|
|
77
|
+
- The regex is validated at definition-load time — invalid regex or missing capture groups are rejected.
|
|
78
|
+
|
|
79
|
+
Pattern requirements:
|
|
80
|
+
- Must be a valid JavaScript regex.
|
|
81
|
+
- Must contain at least one non-lookahead capture group: `(...)` not `(?:...)`.
|
|
82
|
+
- Example valid patterns: `^(.+)$`, `- (.+\.ts)`, `\[(.+?)\]`.
|
|
83
|
+
|
|
84
|
+
**Feature 3: `params` — Parameterized Workflows**
|
|
85
|
+
|
|
86
|
+
Define default parameter values at the top level. Use `{{ key }}` placeholders in step prompts. CLI overrides take precedence.
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
version: 1
|
|
90
|
+
name: blog-post
|
|
91
|
+
description: Generate a blog post on a configurable topic.
|
|
92
|
+
params:
|
|
93
|
+
topic: "AI in healthcare"
|
|
94
|
+
audience: "technical professionals"
|
|
95
|
+
word_count: "1500"
|
|
96
|
+
steps:
|
|
97
|
+
- id: outline
|
|
98
|
+
name: Create outline
|
|
99
|
+
prompt: "Create a detailed outline for a blog post about {{ topic }} targeting {{ audience }}."
|
|
100
|
+
produces:
|
|
101
|
+
- outline.md
|
|
102
|
+
|
|
103
|
+
- id: draft
|
|
104
|
+
name: Write draft
|
|
105
|
+
prompt: "Write a {{ word_count }}-word blog post about {{ topic }} for {{ audience }} based on the outline."
|
|
106
|
+
requires:
|
|
107
|
+
- outline
|
|
108
|
+
context_from:
|
|
109
|
+
- outline
|
|
110
|
+
produces:
|
|
111
|
+
- draft.md
|
|
112
|
+
verify:
|
|
113
|
+
policy: content-heuristic
|
|
114
|
+
minSize: 500
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
How it works:
|
|
118
|
+
- `params` is a top-level object mapping string keys to string default values.
|
|
119
|
+
- `{{ key }}` in any step prompt is replaced with the corresponding param value.
|
|
120
|
+
- Merge order: definition `params` (defaults) ← CLI overrides (win).
|
|
121
|
+
- After substitution, any remaining `{{ key }}` that has no value causes an error — all placeholders must resolve.
|
|
122
|
+
- Parameter values must not contain `..` (path traversal guard).
|
|
123
|
+
- Keys in `{{ }}` match `\w+` (letters, digits, underscore).
|
|
124
|
+
|
|
125
|
+
Common usage:
|
|
126
|
+
- Make workflows reusable across different topics, projects, or configurations.
|
|
127
|
+
- Users override defaults at run time: `/gsd workflow run blog-post topic="Rust performance"`.
|
|
128
|
+
</feature_patterns>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<verification_policies>
|
|
2
|
+
The `verify` field on a step defines how the engine validates the step's output. It must be an object with a `policy` field set to one of four values.
|
|
3
|
+
|
|
4
|
+
**Policy 1: `content-heuristic`**
|
|
5
|
+
|
|
6
|
+
Checks the artifact content against size and pattern criteria. All sub-fields are optional.
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
verify:
|
|
10
|
+
policy: content-heuristic
|
|
11
|
+
minSize: 500 # optional — minimum byte size of the artifact
|
|
12
|
+
pattern: "## Summary" # optional — string pattern that must appear in the artifact
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Fields:
|
|
16
|
+
- `policy`: `"content-heuristic"` (required)
|
|
17
|
+
- `minSize`: number (optional) — minimum artifact size in bytes
|
|
18
|
+
- `pattern`: string (optional) — text pattern to match in the artifact content
|
|
19
|
+
|
|
20
|
+
Use when: You want a lightweight sanity check that the step produced substantive output.
|
|
21
|
+
|
|
22
|
+
**Policy 2: `shell-command`**
|
|
23
|
+
|
|
24
|
+
Runs a shell command to verify the step's output. The command's exit code determines pass/fail.
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
verify:
|
|
28
|
+
policy: shell-command
|
|
29
|
+
command: "test -f output/report.md && wc -l output/report.md | awk '{print ($1 > 10)}'"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Fields:
|
|
33
|
+
- `policy`: `"shell-command"` (required)
|
|
34
|
+
- `command`: string (required, non-empty) — shell command to execute
|
|
35
|
+
|
|
36
|
+
Use when: You need programmatic verification — file existence, test suite execution, linting, compilation, etc.
|
|
37
|
+
|
|
38
|
+
**Policy 3: `prompt-verify`**
|
|
39
|
+
|
|
40
|
+
Sends a verification prompt to an LLM to evaluate the step's output.
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
verify:
|
|
44
|
+
policy: prompt-verify
|
|
45
|
+
prompt: "Review the generated API documentation. Does it cover all endpoints with request/response examples? Answer PASS or FAIL with reasoning."
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Fields:
|
|
49
|
+
- `policy`: `"prompt-verify"` (required)
|
|
50
|
+
- `prompt`: string (required, non-empty) — the verification prompt sent to the LLM
|
|
51
|
+
|
|
52
|
+
Use when: Verification requires judgment that can't be expressed as a shell command — quality assessment, completeness review, style conformance.
|
|
53
|
+
|
|
54
|
+
**Policy 4: `human-review`**
|
|
55
|
+
|
|
56
|
+
Pauses execution and waits for a human to approve or reject the step's output.
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
verify:
|
|
60
|
+
policy: human-review
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Fields:
|
|
64
|
+
- `policy`: `"human-review"` (required)
|
|
65
|
+
- No additional fields.
|
|
66
|
+
|
|
67
|
+
Use when: The step produces work that requires human judgment — design decisions, public-facing content, security-sensitive changes.
|
|
68
|
+
|
|
69
|
+
**Validation Details:**
|
|
70
|
+
|
|
71
|
+
The engine validates the `verify` object at definition-load time:
|
|
72
|
+
- `policy` must be one of the four strings above. Any other value is rejected.
|
|
73
|
+
- `shell-command` requires a non-empty `command` field. Missing or empty `command` is rejected.
|
|
74
|
+
- `prompt-verify` requires a non-empty `prompt` field. Missing or empty `prompt` is rejected.
|
|
75
|
+
- `content-heuristic` and `human-review` have no required sub-fields beyond `policy`.
|
|
76
|
+
</verification_policies>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<schema_reference>
|
|
2
|
+
V1 Workflow Definition Schema — complete field-by-field reference extracted from `definition-loader.ts`.
|
|
3
|
+
|
|
4
|
+
**Top-Level Fields:**
|
|
5
|
+
|
|
6
|
+
| Field | Type | Required | Default | Description |
|
|
7
|
+
|-------|------|----------|---------|-------------|
|
|
8
|
+
| `version` | number | **yes** | — | Must be exactly `1`. |
|
|
9
|
+
| `name` | string | **yes** | — | Non-empty workflow name. |
|
|
10
|
+
| `description` | string | no | `undefined` | Optional human-readable description. |
|
|
11
|
+
| `params` | object | no | `undefined` | Key-value map of parameter defaults. Values must be strings. Used for `{{ key }}` substitution in step prompts. |
|
|
12
|
+
| `steps` | array | **yes** | — | Non-empty array of step objects. |
|
|
13
|
+
|
|
14
|
+
**Step Fields:**
|
|
15
|
+
|
|
16
|
+
| Field | Type | Required | Default | Description |
|
|
17
|
+
|-------|------|----------|---------|-------------|
|
|
18
|
+
| `id` | string | **yes** | — | Unique identifier within the workflow. Must be non-empty. No two steps can share an ID. |
|
|
19
|
+
| `name` | string | **yes** | — | Human-readable step name. Must be non-empty. |
|
|
20
|
+
| `prompt` | string | **yes** | — | The prompt dispatched for this step. Must be non-empty. Supports `{{ key }}` parameter placeholders. |
|
|
21
|
+
| `requires` | string[] | no | `[]` | IDs of steps that must complete before this step runs. Alternative name: `depends_on`. |
|
|
22
|
+
| `depends_on` | string[] | no | `[]` | Alias for `requires`. If both are present, `requires` takes precedence. |
|
|
23
|
+
| `produces` | string[] | no | `[]` | Artifact paths produced by this step (relative to run directory). Paths must not contain `..`. |
|
|
24
|
+
| `context_from` | string[] | no | `undefined` | Step IDs whose artifacts are injected as context when this step runs. |
|
|
25
|
+
| `verify` | object | no | `undefined` | Verification policy for this step. See verification-policies.md for details. |
|
|
26
|
+
| `iterate` | object | no | `undefined` | Fan-out iteration config. See feature-patterns.md for details. |
|
|
27
|
+
|
|
28
|
+
**Validation Rules:**
|
|
29
|
+
|
|
30
|
+
1. `version` must be exactly `1` (number, not string).
|
|
31
|
+
2. `name` must be a non-empty string.
|
|
32
|
+
3. `steps` must be a non-empty array of objects.
|
|
33
|
+
4. Each step must have non-empty `id`, `name`, and `prompt`.
|
|
34
|
+
5. Step IDs must be unique — duplicates are rejected.
|
|
35
|
+
6. Dependencies must reference existing step IDs — dangling references are rejected.
|
|
36
|
+
7. A step cannot depend on itself.
|
|
37
|
+
8. The dependency graph must be acyclic — cycles are detected and rejected.
|
|
38
|
+
9. `produces` paths and `iterate.source` must not contain `..` (path traversal guard).
|
|
39
|
+
10. Unknown top-level or step-level fields are silently accepted for forward compatibility.
|
|
40
|
+
|
|
41
|
+
**Type Notes:**
|
|
42
|
+
|
|
43
|
+
- `requires` / `depends_on`: The engine reads `requires` first. If absent, it falls back to `depends_on`. Both must be arrays of strings if present.
|
|
44
|
+
- `params` values must be strings. During substitution, each `{{ key }}` in a step prompt is replaced with the merged param value (definition defaults ← CLI overrides). Any unresolved placeholder after substitution causes an error.
|
|
45
|
+
- Parameter values and `produces` paths are guarded against path traversal (`..` is rejected).
|
|
46
|
+
</schema_reference>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Example: Blog Post Pipeline
|
|
2
|
+
# Demonstrates: context chaining (context_from), parameters (params),
|
|
3
|
+
# and content-heuristic verification across a 3-step linear chain.
|
|
4
|
+
|
|
5
|
+
version: 1
|
|
6
|
+
name: blog-post-pipeline
|
|
7
|
+
description: >-
|
|
8
|
+
Research a topic, create an outline, and draft a blog post.
|
|
9
|
+
Uses params for topic/audience, context_from for chaining,
|
|
10
|
+
and content-heuristic verification at every step.
|
|
11
|
+
|
|
12
|
+
params:
|
|
13
|
+
topic: "AI"
|
|
14
|
+
audience: "developers"
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- id: research
|
|
18
|
+
name: Research the topic
|
|
19
|
+
prompt: >-
|
|
20
|
+
Research the topic "{{ topic }}" for an audience of {{ audience }}.
|
|
21
|
+
Write detailed findings including key trends, important facts,
|
|
22
|
+
and relevant examples. Save the results to research.md.
|
|
23
|
+
requires: []
|
|
24
|
+
produces:
|
|
25
|
+
- research.md
|
|
26
|
+
verify:
|
|
27
|
+
policy: content-heuristic
|
|
28
|
+
minSize: 200
|
|
29
|
+
|
|
30
|
+
- id: outline
|
|
31
|
+
name: Create an outline
|
|
32
|
+
prompt: >-
|
|
33
|
+
Using the research findings, create a structured blog post outline
|
|
34
|
+
targeting {{ audience }}. Include section headings, key points
|
|
35
|
+
for each section, and a logical flow. Save to outline.md.
|
|
36
|
+
requires:
|
|
37
|
+
- research
|
|
38
|
+
context_from:
|
|
39
|
+
- research
|
|
40
|
+
produces:
|
|
41
|
+
- outline.md
|
|
42
|
+
verify:
|
|
43
|
+
policy: content-heuristic
|
|
44
|
+
|
|
45
|
+
- id: draft
|
|
46
|
+
name: Write the draft
|
|
47
|
+
prompt: >-
|
|
48
|
+
Write a complete blog post draft following the outline.
|
|
49
|
+
The post should be engaging for {{ audience }}, cover all
|
|
50
|
+
outlined sections, and include a compelling introduction
|
|
51
|
+
and conclusion. Save to draft.md.
|
|
52
|
+
requires:
|
|
53
|
+
- outline
|
|
54
|
+
context_from:
|
|
55
|
+
- outline
|
|
56
|
+
produces:
|
|
57
|
+
- draft.md
|
|
58
|
+
verify:
|
|
59
|
+
policy: content-heuristic
|
|
60
|
+
minSize: 500
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Example: Code Audit
|
|
2
|
+
# Demonstrates: iterate (fan-out over file list), shell-command verification,
|
|
3
|
+
# prompt-verify, and content-heuristic across a 3-step workflow.
|
|
4
|
+
|
|
5
|
+
version: 1
|
|
6
|
+
name: code-audit
|
|
7
|
+
description: >-
|
|
8
|
+
Inventory TypeScript files, audit each one for quality issues,
|
|
9
|
+
and produce a consolidated report. Uses iterate to fan-out
|
|
10
|
+
audits across discovered files.
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- id: inventory
|
|
14
|
+
name: Inventory source files
|
|
15
|
+
prompt: >-
|
|
16
|
+
List all TypeScript source files in the project that should
|
|
17
|
+
be audited. Write one file path per line as a Markdown list
|
|
18
|
+
item (e.g. "- src/index.ts"). Save the list to inventory.md.
|
|
19
|
+
requires: []
|
|
20
|
+
produces:
|
|
21
|
+
- inventory.md
|
|
22
|
+
verify:
|
|
23
|
+
policy: content-heuristic
|
|
24
|
+
|
|
25
|
+
- id: audit-file
|
|
26
|
+
name: Audit individual file
|
|
27
|
+
prompt: >-
|
|
28
|
+
Review the file for code quality issues including unused imports,
|
|
29
|
+
missing error handling, type safety gaps, and potential bugs.
|
|
30
|
+
Document each finding with the line number and a recommended fix.
|
|
31
|
+
Append results to audit-results.md.
|
|
32
|
+
requires:
|
|
33
|
+
- inventory
|
|
34
|
+
context_from:
|
|
35
|
+
- inventory
|
|
36
|
+
produces:
|
|
37
|
+
- audit-results.md
|
|
38
|
+
iterate:
|
|
39
|
+
source: inventory.md
|
|
40
|
+
pattern: "^- (.+\\.ts)$"
|
|
41
|
+
verify:
|
|
42
|
+
policy: shell-command
|
|
43
|
+
command: "test -f audit-results.md"
|
|
44
|
+
|
|
45
|
+
- id: report
|
|
46
|
+
name: Compile audit report
|
|
47
|
+
prompt: >-
|
|
48
|
+
Compile all individual file audit results into a single
|
|
49
|
+
comprehensive audit report. Group findings by severity
|
|
50
|
+
(critical, warning, info), include summary statistics,
|
|
51
|
+
and provide prioritized recommendations. Save to audit-report.md.
|
|
52
|
+
requires:
|
|
53
|
+
- audit-file
|
|
54
|
+
context_from:
|
|
55
|
+
- audit-file
|
|
56
|
+
produces:
|
|
57
|
+
- audit-report.md
|
|
58
|
+
verify:
|
|
59
|
+
policy: prompt-verify
|
|
60
|
+
prompt: "Does the report cover all audited files and group findings by severity? Answer PASS or FAIL."
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Example: Release Checklist
|
|
2
|
+
# Demonstrates: diamond dependency pattern (version-bump and test-suite
|
|
3
|
+
# both depend on changelog, publish depends on both), shell-command
|
|
4
|
+
# verification, and human-review policy.
|
|
5
|
+
|
|
6
|
+
version: 1
|
|
7
|
+
name: release-checklist
|
|
8
|
+
description: >-
|
|
9
|
+
Prepare a software release: generate changelog, bump version,
|
|
10
|
+
run tests, and publish release notes. Uses a diamond dependency
|
|
11
|
+
pattern where publish waits for both version-bump and test-suite.
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- id: changelog
|
|
15
|
+
name: Generate changelog
|
|
16
|
+
prompt: >-
|
|
17
|
+
Review recent commits and generate a changelog draft.
|
|
18
|
+
Group changes by category (features, fixes, breaking changes).
|
|
19
|
+
Follow Keep a Changelog format. Save to CHANGELOG-draft.md.
|
|
20
|
+
requires: []
|
|
21
|
+
produces:
|
|
22
|
+
- CHANGELOG-draft.md
|
|
23
|
+
verify:
|
|
24
|
+
policy: content-heuristic
|
|
25
|
+
|
|
26
|
+
- id: version-bump
|
|
27
|
+
name: Bump version number
|
|
28
|
+
prompt: >-
|
|
29
|
+
Based on the changelog, determine the appropriate semver bump
|
|
30
|
+
(major, minor, or patch). Write the new version number to
|
|
31
|
+
version.txt as a single line (e.g. "1.2.3").
|
|
32
|
+
requires:
|
|
33
|
+
- changelog
|
|
34
|
+
produces:
|
|
35
|
+
- version.txt
|
|
36
|
+
verify:
|
|
37
|
+
policy: shell-command
|
|
38
|
+
command: "grep -E '^[0-9]+\\.[0-9]+\\.[0-9]+$' version.txt"
|
|
39
|
+
|
|
40
|
+
- id: test-suite
|
|
41
|
+
name: Run test suite
|
|
42
|
+
prompt: >-
|
|
43
|
+
Run the full test suite and capture results. Include test
|
|
44
|
+
counts (passed, failed, skipped), execution time, and any
|
|
45
|
+
failure details. Save results to test-results.md.
|
|
46
|
+
requires:
|
|
47
|
+
- changelog
|
|
48
|
+
produces:
|
|
49
|
+
- test-results.md
|
|
50
|
+
verify:
|
|
51
|
+
policy: shell-command
|
|
52
|
+
command: "test -f test-results.md"
|
|
53
|
+
|
|
54
|
+
- id: publish
|
|
55
|
+
name: Publish release
|
|
56
|
+
prompt: >-
|
|
57
|
+
Compile the final release notes combining the changelog,
|
|
58
|
+
version number, and test results. Format for GitHub Releases
|
|
59
|
+
with proper Markdown. Save to release-notes.md.
|
|
60
|
+
requires:
|
|
61
|
+
- version-bump
|
|
62
|
+
- test-suite
|
|
63
|
+
produces:
|
|
64
|
+
- release-notes.md
|
|
65
|
+
verify:
|
|
66
|
+
policy: human-review
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: my-workflow
|
|
3
|
+
# description: A brief description of what this workflow accomplishes.
|
|
4
|
+
|
|
5
|
+
# params:
|
|
6
|
+
# topic: "default value"
|
|
7
|
+
# target: "another default"
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- id: step-one
|
|
11
|
+
name: First step
|
|
12
|
+
prompt: "Describe what this step should accomplish."
|
|
13
|
+
# requires: []
|
|
14
|
+
produces:
|
|
15
|
+
- output.md
|
|
16
|
+
# context_from:
|
|
17
|
+
# - some-prior-step
|
|
18
|
+
# verify:
|
|
19
|
+
# policy: content-heuristic
|
|
20
|
+
# minSize: 100
|
|
21
|
+
# pattern: "## Summary"
|
|
22
|
+
# verify:
|
|
23
|
+
# policy: shell-command
|
|
24
|
+
# command: "test -f output.md"
|
|
25
|
+
# verify:
|
|
26
|
+
# policy: prompt-verify
|
|
27
|
+
# prompt: "Does the output meet quality standards? Answer PASS or FAIL."
|
|
28
|
+
# verify:
|
|
29
|
+
# policy: human-review
|
|
30
|
+
# iterate:
|
|
31
|
+
# source: file-list.txt
|
|
32
|
+
# pattern: "^(.+)$"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<workflow>
|
|
2
|
+
Guide the user through creating a workflow definition from scratch. Follow these phases in order.
|
|
3
|
+
|
|
4
|
+
<required_reading>
|
|
5
|
+
Before starting, read these references so you can answer schema questions accurately:
|
|
6
|
+
- `../references/yaml-schema-v1.md` — all fields, types, and constraints
|
|
7
|
+
- `../references/verification-policies.md` — the four verify policies
|
|
8
|
+
- `../references/feature-patterns.md` — context_from, iterate, params patterns
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<phase name="purpose">
|
|
12
|
+
Ask the user:
|
|
13
|
+
- "What does this workflow accomplish? Give me a one-sentence description."
|
|
14
|
+
- "What should the workflow be named?" (suggest a kebab-case name based on their description)
|
|
15
|
+
|
|
16
|
+
Record: `name`, `description`.
|
|
17
|
+
</phase>
|
|
18
|
+
|
|
19
|
+
<phase name="steps">
|
|
20
|
+
Ask the user:
|
|
21
|
+
- "What are the main steps? List them in order. For each step, give a short name and what it should do."
|
|
22
|
+
|
|
23
|
+
For each step the user describes:
|
|
24
|
+
1. Generate an `id` (lowercase, short, descriptive — e.g., `gather`, `analyze`, `write-draft`).
|
|
25
|
+
2. Confirm the `name` (human-readable).
|
|
26
|
+
3. Write the `prompt` — this is the instruction the engine dispatches. It should be detailed enough for an LLM to execute independently.
|
|
27
|
+
4. Ask: "Does this step depend on any previous steps?" → populate `requires`.
|
|
28
|
+
5. Ask: "What files or artifacts does this step produce?" → populate `produces`.
|
|
29
|
+
</phase>
|
|
30
|
+
|
|
31
|
+
<phase name="verification">
|
|
32
|
+
For each step, ask:
|
|
33
|
+
- "How should we verify this step's output?"
|
|
34
|
+
- **No verification needed** → omit `verify`
|
|
35
|
+
- **Check that the output exists and has content** → `content-heuristic`
|
|
36
|
+
- **Run a shell command to validate** → `shell-command` (ask for the command)
|
|
37
|
+
- **Have an LLM review the output** → `prompt-verify` (ask for the verification prompt)
|
|
38
|
+
- **Require human approval** → `human-review`
|
|
39
|
+
|
|
40
|
+
Refer to `../references/verification-policies.md` for the exact YAML structure of each policy.
|
|
41
|
+
</phase>
|
|
42
|
+
|
|
43
|
+
<phase name="context_chaining">
|
|
44
|
+
Ask:
|
|
45
|
+
- "Should any step receive artifacts from earlier steps as context?"
|
|
46
|
+
|
|
47
|
+
If yes, for each such step:
|
|
48
|
+
- Ask which prior steps to pull context from → populate `context_from`.
|
|
49
|
+
- Remind the user: `context_from` does not imply a dependency. If the step should wait for the context source, it must also list it in `requires`.
|
|
50
|
+
</phase>
|
|
51
|
+
|
|
52
|
+
<phase name="parameters">
|
|
53
|
+
Ask:
|
|
54
|
+
- "Should any values in this workflow be configurable at run time? (e.g., a topic, a target directory, a language)"
|
|
55
|
+
|
|
56
|
+
If yes:
|
|
57
|
+
- Define each parameter with a default value in top-level `params`.
|
|
58
|
+
- Replace hardcoded values in step prompts with `{{ key }}` placeholders.
|
|
59
|
+
- Explain: "Users can override these when running the workflow."
|
|
60
|
+
</phase>
|
|
61
|
+
|
|
62
|
+
<phase name="iteration">
|
|
63
|
+
Ask:
|
|
64
|
+
- "Does any step need to fan out — running once per item in a list? (e.g., review each file, process each section)"
|
|
65
|
+
|
|
66
|
+
If yes:
|
|
67
|
+
- Identify the source artifact (the list to iterate over).
|
|
68
|
+
- Define the `pattern` regex with a capture group to extract each item.
|
|
69
|
+
- Set `iterate.source` and `iterate.pattern` on the step.
|
|
70
|
+
- Refer to `../references/feature-patterns.md` for examples.
|
|
71
|
+
</phase>
|
|
72
|
+
|
|
73
|
+
<phase name="assemble">
|
|
74
|
+
Assemble the complete YAML definition:
|
|
75
|
+
|
|
76
|
+
1. Start with `version: 1`.
|
|
77
|
+
2. Add `name` and `description`.
|
|
78
|
+
3. Add `params` if any were defined.
|
|
79
|
+
4. Add `steps` in dependency order.
|
|
80
|
+
5. For each step, include all configured fields in this order: `id`, `name`, `prompt`, `requires`, `produces`, `context_from`, `verify`, `iterate`.
|
|
81
|
+
6. Use 2-space indentation.
|
|
82
|
+
|
|
83
|
+
Show the complete YAML to the user for review.
|
|
84
|
+
|
|
85
|
+
Ask: "Does this look correct? Any changes?"
|
|
86
|
+
|
|
87
|
+
Apply any requested changes.
|
|
88
|
+
</phase>
|
|
89
|
+
|
|
90
|
+
<phase name="write">
|
|
91
|
+
Write the file to `.gsd/workflow-defs/<name>.yaml`.
|
|
92
|
+
|
|
93
|
+
Tell the user:
|
|
94
|
+
- "Definition saved to `.gsd/workflow-defs/<name>.yaml`."
|
|
95
|
+
- "Run `/gsd workflow validate <name>` to check it against the schema."
|
|
96
|
+
- "Run `/gsd workflow run <name>` to execute it."
|
|
97
|
+
</phase>
|
|
98
|
+
|
|
99
|
+
<success_criteria>
|
|
100
|
+
- A valid YAML file exists at `.gsd/workflow-defs/<name>.yaml`
|
|
101
|
+
- The definition passes `validateDefinition()` from `definition-loader.ts`
|
|
102
|
+
- The user has reviewed and approved the definition
|
|
103
|
+
</success_criteria>
|
|
104
|
+
</workflow>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<workflow>
|
|
2
|
+
Guide the user through creating a workflow definition by customizing an existing template.
|
|
3
|
+
|
|
4
|
+
<required_reading>
|
|
5
|
+
Before starting, read these references for schema details:
|
|
6
|
+
- `../references/yaml-schema-v1.md` — all fields, types, and constraints
|
|
7
|
+
- `../references/verification-policies.md` — the four verify policies
|
|
8
|
+
- `../references/feature-patterns.md` — context_from, iterate, params patterns
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<phase name="choose_template">
|
|
12
|
+
List the available templates in `templates/`:
|
|
13
|
+
|
|
14
|
+
1. **workflow-definition.yaml** — Blank scaffold with all fields shown as comments. Best for: starting with the full schema visible.
|
|
15
|
+
2. **blog-post-pipeline.yaml** — Linear 3-step chain with `params` (topic, audience) and `content-heuristic` verification. Best for: workflows with sequential steps and configurable inputs.
|
|
16
|
+
3. **code-audit.yaml** — 3 steps using `iterate` to fan out over a file list, with `shell-command` verification. Best for: workflows that process each item in a list.
|
|
17
|
+
4. **release-checklist.yaml** — 4 steps with diamond dependencies and `human-review` verification. Best for: workflows with branching/merging dependency graphs.
|
|
18
|
+
|
|
19
|
+
Ask: "Which template would you like to start from?"
|
|
20
|
+
|
|
21
|
+
Read the chosen template file from `templates/`.
|
|
22
|
+
</phase>
|
|
23
|
+
|
|
24
|
+
<phase name="understand">
|
|
25
|
+
Show the user the template contents and explain:
|
|
26
|
+
- What each step does
|
|
27
|
+
- How the dependencies flow
|
|
28
|
+
- What features it demonstrates (params, context_from, iterate, verify)
|
|
29
|
+
|
|
30
|
+
Ask: "What do you want this workflow to do instead? I'll help you adapt the template."
|
|
31
|
+
</phase>
|
|
32
|
+
|
|
33
|
+
<phase name="customize">
|
|
34
|
+
Based on the user's goal, walk through customization:
|
|
35
|
+
|
|
36
|
+
1. **Rename**: Change `name` and `description` to match the new purpose.
|
|
37
|
+
2. **Adjust steps**: Add, remove, or modify steps. For each change:
|
|
38
|
+
- Update `id` and `name` to reflect the new purpose.
|
|
39
|
+
- Rewrite `prompt` for the new task.
|
|
40
|
+
- Update `requires` to reflect new dependency order.
|
|
41
|
+
- Update `produces` for new artifact paths.
|
|
42
|
+
3. **Modify params**: Add or remove parameters. Update `{{ key }}` placeholders in prompts to match.
|
|
43
|
+
4. **Change verification**: Switch verify policies or adjust policy-specific fields.
|
|
44
|
+
5. **Add/remove features**: Add `context_from`, `iterate`, or `params` if the new workflow needs them.
|
|
45
|
+
|
|
46
|
+
Show the modified YAML after each round of changes. Ask: "Any more changes?"
|
|
47
|
+
</phase>
|
|
48
|
+
|
|
49
|
+
<phase name="validate_and_write">
|
|
50
|
+
Once the user approves:
|
|
51
|
+
|
|
52
|
+
1. Review the YAML for common issues:
|
|
53
|
+
- All step IDs are unique.
|
|
54
|
+
- All `requires` references point to existing step IDs.
|
|
55
|
+
- No circular dependencies.
|
|
56
|
+
- All `{{ key }}` placeholders have corresponding `params` entries.
|
|
57
|
+
- No `..` in `produces` paths or `iterate.source`.
|
|
58
|
+
|
|
59
|
+
2. Write to `.gsd/workflow-defs/<name>.yaml`.
|
|
60
|
+
|
|
61
|
+
3. Tell the user:
|
|
62
|
+
- "Definition saved to `.gsd/workflow-defs/<name>.yaml`."
|
|
63
|
+
- "Run `/gsd workflow validate <name>` to check it against the schema."
|
|
64
|
+
- "Run `/gsd workflow run <name>` to execute it."
|
|
65
|
+
</phase>
|
|
66
|
+
|
|
67
|
+
<success_criteria>
|
|
68
|
+
- A valid YAML file exists at `.gsd/workflow-defs/<name>.yaml`
|
|
69
|
+
- The definition is a meaningful customization of the template, not a copy
|
|
70
|
+
- The user has reviewed and approved the definition
|
|
71
|
+
</success_criteria>
|
|
72
|
+
</workflow>
|