gsd-pi 2.41.0-dev.cac69f9 → 2.42.0-dev.97e9e30

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.
Files changed (115) hide show
  1. package/dist/resources/extensions/gsd/auto/loop.js +80 -0
  2. package/dist/resources/extensions/gsd/auto/phases.js +2 -2
  3. package/dist/resources/extensions/gsd/auto/session.js +6 -0
  4. package/dist/resources/extensions/gsd/auto-dashboard.js +2 -0
  5. package/dist/resources/extensions/gsd/auto.js +28 -1
  6. package/dist/resources/extensions/gsd/bootstrap/tool-call-loop-guard.js +7 -2
  7. package/dist/resources/extensions/gsd/commands/catalog.js +32 -0
  8. package/dist/resources/extensions/gsd/commands/handlers/workflow.js +146 -0
  9. package/dist/resources/extensions/gsd/context-injector.js +74 -0
  10. package/dist/resources/extensions/gsd/custom-execution-policy.js +47 -0
  11. package/dist/resources/extensions/gsd/custom-verification.js +145 -0
  12. package/dist/resources/extensions/gsd/custom-workflow-engine.js +164 -0
  13. package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -0
  14. package/dist/resources/extensions/gsd/definition-loader.js +352 -0
  15. package/dist/resources/extensions/gsd/dev-execution-policy.js +24 -0
  16. package/dist/resources/extensions/gsd/dev-workflow-engine.js +82 -0
  17. package/dist/resources/extensions/gsd/engine-resolver.js +40 -0
  18. package/dist/resources/extensions/gsd/engine-types.js +8 -0
  19. package/dist/resources/extensions/gsd/execution-policy.js +8 -0
  20. package/dist/resources/extensions/gsd/graph.js +225 -0
  21. package/dist/resources/extensions/gsd/run-manager.js +134 -0
  22. package/dist/resources/extensions/gsd/workflow-engine.js +7 -0
  23. package/dist/resources/skills/create-workflow/SKILL.md +103 -0
  24. package/dist/resources/skills/create-workflow/references/feature-patterns.md +128 -0
  25. package/dist/resources/skills/create-workflow/references/verification-policies.md +76 -0
  26. package/dist/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
  27. package/dist/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
  28. package/dist/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
  29. package/dist/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
  30. package/dist/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
  31. package/dist/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
  32. package/dist/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
  33. package/dist/web/standalone/.next/BUILD_ID +1 -1
  34. package/dist/web/standalone/.next/app-path-routes-manifest.json +15 -15
  35. package/dist/web/standalone/.next/build-manifest.json +2 -2
  36. package/dist/web/standalone/.next/prerender-manifest.json +3 -3
  37. package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
  38. package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
  39. package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  40. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  41. package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  42. package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  43. package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  44. package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  45. package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
  46. package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
  47. package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  48. package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  49. package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  50. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  51. package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  52. package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  53. package/dist/web/standalone/.next/server/app/index.html +1 -1
  54. package/dist/web/standalone/.next/server/app/index.rsc +1 -1
  55. package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  56. package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  57. package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  58. package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  59. package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  60. package/dist/web/standalone/.next/server/app-paths-manifest.json +15 -15
  61. package/dist/web/standalone/.next/server/pages/404.html +1 -1
  62. package/dist/web/standalone/.next/server/pages/500.html +2 -2
  63. package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
  64. package/package.json +1 -1
  65. package/packages/pi-coding-agent/package.json +1 -1
  66. package/pkg/package.json +1 -1
  67. package/src/resources/extensions/gsd/auto/loop.ts +91 -0
  68. package/src/resources/extensions/gsd/auto/phases.ts +2 -2
  69. package/src/resources/extensions/gsd/auto/session.ts +6 -0
  70. package/src/resources/extensions/gsd/auto-dashboard.ts +2 -0
  71. package/src/resources/extensions/gsd/auto.ts +31 -1
  72. package/src/resources/extensions/gsd/bootstrap/tool-call-loop-guard.ts +9 -2
  73. package/src/resources/extensions/gsd/commands/catalog.ts +32 -0
  74. package/src/resources/extensions/gsd/commands/handlers/workflow.ts +164 -0
  75. package/src/resources/extensions/gsd/context-injector.ts +100 -0
  76. package/src/resources/extensions/gsd/custom-execution-policy.ts +73 -0
  77. package/src/resources/extensions/gsd/custom-verification.ts +180 -0
  78. package/src/resources/extensions/gsd/custom-workflow-engine.ts +216 -0
  79. package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -0
  80. package/src/resources/extensions/gsd/definition-loader.ts +462 -0
  81. package/src/resources/extensions/gsd/dev-execution-policy.ts +51 -0
  82. package/src/resources/extensions/gsd/dev-workflow-engine.ts +110 -0
  83. package/src/resources/extensions/gsd/engine-resolver.ts +57 -0
  84. package/src/resources/extensions/gsd/engine-types.ts +71 -0
  85. package/src/resources/extensions/gsd/execution-policy.ts +43 -0
  86. package/src/resources/extensions/gsd/graph.ts +312 -0
  87. package/src/resources/extensions/gsd/run-manager.ts +180 -0
  88. package/src/resources/extensions/gsd/tests/bundled-workflow-defs.test.ts +180 -0
  89. package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +283 -0
  90. package/src/resources/extensions/gsd/tests/context-injector.test.ts +313 -0
  91. package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +540 -0
  92. package/src/resources/extensions/gsd/tests/custom-verification.test.ts +382 -0
  93. package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +339 -0
  94. package/src/resources/extensions/gsd/tests/dashboard-custom-engine.test.ts +87 -0
  95. package/src/resources/extensions/gsd/tests/definition-loader.test.ts +778 -0
  96. package/src/resources/extensions/gsd/tests/dev-engine-wrapper.test.ts +318 -0
  97. package/src/resources/extensions/gsd/tests/e2e-workflow-pipeline-integration.test.ts +476 -0
  98. package/src/resources/extensions/gsd/tests/engine-interfaces-contract.test.ts +271 -0
  99. package/src/resources/extensions/gsd/tests/graph-operations.test.ts +599 -0
  100. package/src/resources/extensions/gsd/tests/iterate-engine-integration.test.ts +429 -0
  101. package/src/resources/extensions/gsd/tests/run-manager.test.ts +229 -0
  102. package/src/resources/extensions/gsd/tests/tool-call-loop-guard.test.ts +45 -0
  103. package/src/resources/extensions/gsd/workflow-engine.ts +38 -0
  104. package/src/resources/skills/create-workflow/SKILL.md +103 -0
  105. package/src/resources/skills/create-workflow/references/feature-patterns.md +128 -0
  106. package/src/resources/skills/create-workflow/references/verification-policies.md +76 -0
  107. package/src/resources/skills/create-workflow/references/yaml-schema-v1.md +46 -0
  108. package/src/resources/skills/create-workflow/templates/blog-post-pipeline.yaml +60 -0
  109. package/src/resources/skills/create-workflow/templates/code-audit.yaml +60 -0
  110. package/src/resources/skills/create-workflow/templates/release-checklist.yaml +66 -0
  111. package/src/resources/skills/create-workflow/templates/workflow-definition.yaml +32 -0
  112. package/src/resources/skills/create-workflow/workflows/create-from-scratch.md +104 -0
  113. package/src/resources/skills/create-workflow/workflows/create-from-template.md +72 -0
  114. /package/dist/web/standalone/.next/static/{EnGUNqHeGbE0tuuUkTJVA → PXrI5DoWsm7rwAVnEU2rD}/_buildManifest.js +0 -0
  115. /package/dist/web/standalone/.next/static/{EnGUNqHeGbE0tuuUkTJVA → PXrI5DoWsm7rwAVnEU2rD}/_ssgManifest.js +0 -0
@@ -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>