pi-workflow-engine 0.10.3 → 0.12.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/.pi/extensions/pi-workflow-engine/index.ts +418 -213
- package/.pi/extensions/pi-workflow-engine/src/advisory-schema.ts +11 -4
- package/.pi/extensions/pi-workflow-engine/src/agent-attempt.ts +147 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-limits.ts +35 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-replay.ts +399 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-retry.ts +116 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-runner-types.ts +91 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-runner.ts +154 -530
- package/.pi/extensions/pi-workflow-engine/src/agent-session-identity.ts +256 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-session-providers.ts +50 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-session.ts +368 -0
- package/.pi/extensions/pi-workflow-engine/src/agent-skills.ts +87 -39
- package/.pi/extensions/pi-workflow-engine/src/agent-workspace.ts +89 -0
- package/.pi/extensions/pi-workflow-engine/src/background-workflow-tool.ts +75 -0
- package/.pi/extensions/pi-workflow-engine/src/background-workflows.ts +492 -0
- package/.pi/extensions/pi-workflow-engine/src/budget.ts +10 -3
- package/.pi/extensions/pi-workflow-engine/src/cancellation.ts +55 -3
- package/.pi/extensions/pi-workflow-engine/src/command-completions.ts +36 -0
- package/.pi/extensions/pi-workflow-engine/src/concurrency.ts +230 -61
- package/.pi/extensions/pi-workflow-engine/src/diff-capture.ts +38 -55
- package/.pi/extensions/pi-workflow-engine/src/discovery.ts +70 -17
- package/.pi/extensions/pi-workflow-engine/src/dynamax-shortcuts.ts +59 -13
- package/.pi/extensions/pi-workflow-engine/src/dynamax.ts +123 -63
- package/.pi/extensions/pi-workflow-engine/src/engine.ts +357 -75
- package/.pi/extensions/pi-workflow-engine/src/filesystem-error.ts +4 -0
- package/.pi/extensions/pi-workflow-engine/src/finalizers.ts +66 -0
- package/.pi/extensions/pi-workflow-engine/src/identity-canonicalization.ts +138 -0
- package/.pi/extensions/pi-workflow-engine/src/identity-fingerprint.ts +15 -0
- package/.pi/extensions/pi-workflow-engine/src/inline-workflow.ts +10 -5
- package/.pi/extensions/pi-workflow-engine/src/journal.ts +156 -66
- package/.pi/extensions/pi-workflow-engine/src/model-profile-command.ts +167 -0
- package/.pi/extensions/pi-workflow-engine/src/model-profiles.ts +310 -0
- package/.pi/extensions/pi-workflow-engine/src/options.ts +96 -6
- package/.pi/extensions/pi-workflow-engine/src/pi-compat.ts +32 -0
- package/.pi/extensions/pi-workflow-engine/src/process-runner.ts +203 -39
- package/.pi/extensions/pi-workflow-engine/src/progress-types.ts +50 -0
- package/.pi/extensions/pi-workflow-engine/src/progress.ts +74 -122
- package/.pi/extensions/pi-workflow-engine/src/provider-usage-limit.ts +189 -0
- package/.pi/extensions/pi-workflow-engine/src/replay-path-identity.ts +48 -0
- package/.pi/extensions/pi-workflow-engine/src/research-contract.ts +89 -0
- package/.pi/extensions/pi-workflow-engine/src/research-evidence.ts +289 -0
- package/.pi/extensions/pi-workflow-engine/src/resume-context.ts +701 -0
- package/.pi/extensions/pi-workflow-engine/src/review/code-review-orchestration.ts +49 -0
- package/.pi/extensions/pi-workflow-engine/src/review/github-pr-comments.ts +75 -16
- package/.pi/extensions/pi-workflow-engine/src/review/review-actions.ts +83 -17
- package/.pi/extensions/pi-workflow-engine/src/review/review-budget.ts +45 -0
- package/.pi/extensions/pi-workflow-engine/src/review/review-fix-workflow.ts +117 -0
- package/.pi/extensions/pi-workflow-engine/src/review/review-handoff.ts +14 -66
- package/.pi/extensions/pi-workflow-engine/src/review/review-issues.ts +38 -12
- package/.pi/extensions/pi-workflow-engine/src/review/review-report.ts +42 -0
- package/.pi/extensions/pi-workflow-engine/src/review/review-results-flow.ts +18 -22
- package/.pi/extensions/pi-workflow-engine/src/review/review-results-viewer.ts +128 -56
- package/.pi/extensions/pi-workflow-engine/src/review/review-session-coordinator.ts +153 -0
- package/.pi/extensions/pi-workflow-engine/src/review/review-snapshot.ts +294 -0
- package/.pi/extensions/pi-workflow-engine/src/review-diff-target.ts +130 -0
- package/.pi/extensions/pi-workflow-engine/src/session-identity.ts +6 -0
- package/.pi/extensions/pi-workflow-engine/src/structured-output.ts +32 -0
- package/.pi/extensions/pi-workflow-engine/src/tool-capabilities.ts +44 -0
- package/.pi/extensions/pi-workflow-engine/src/tool-source-identity.ts +150 -0
- package/.pi/extensions/pi-workflow-engine/src/tree-fingerprint.ts +401 -0
- package/.pi/extensions/pi-workflow-engine/src/types.ts +87 -25
- package/.pi/extensions/pi-workflow-engine/src/ui/dynamax-editor-decoration.ts +220 -0
- package/.pi/extensions/pi-workflow-engine/src/ui/workflow-format.ts +26 -6
- package/.pi/extensions/pi-workflow-engine/src/ui/workflow-inspector.ts +88 -46
- package/.pi/extensions/pi-workflow-engine/src/ui/workflow-result-renderer.ts +7 -70
- package/.pi/extensions/pi-workflow-engine/src/ui/workflow-viewer-layout.ts +51 -0
- package/.pi/extensions/pi-workflow-engine/src/ui/workflow-widget.ts +12 -67
- package/.pi/extensions/pi-workflow-engine/src/unknown-error.ts +8 -0
- package/.pi/extensions/pi-workflow-engine/src/usage.ts +124 -16
- package/.pi/extensions/pi-workflow-engine/src/workflow-advisory-utils.ts +23 -3
- package/.pi/extensions/pi-workflow-engine/src/workflow-execution.ts +121 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-module.ts +19 -1
- package/.pi/extensions/pi-workflow-engine/src/workflow-run-background.ts +72 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-run-controller.ts +354 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-run-history.ts +162 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-run-record.ts +632 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-run-store.ts +172 -0
- package/.pi/extensions/pi-workflow-engine/src/workflow-usage-limit-scheduler.ts +80 -0
- package/.pi/extensions/pi-workflow-engine/src/workflows.ts +30 -3
- package/.pi/extensions/pi-workflow-engine/src/worktree.ts +321 -43
- package/.pi/extensions/pi-workflow-engine/workflows/code-review.ts +62 -64
- package/.pi/extensions/pi-workflow-engine/workflows/diagnose.ts +17 -17
- package/.pi/extensions/pi-workflow-engine/workflows/perf-review.ts +15 -16
- package/.pi/extensions/pi-workflow-engine/workflows/refactor-scout.ts +15 -15
- package/.pi/extensions/pi-workflow-engine/workflows/research.ts +170 -0
- package/README.md +82 -207
- package/USAGE.md +295 -21
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,259 +1,134 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
1
|
# pi-workflow-engine
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
[](https://github.com/timbrinded/pi-workflow-engine/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/pi-workflow-engine)
|
|
5
|
+
[](LICENSE)
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
**Multi-agent workflows for [pi](https://pi.dev).**
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
When a task benefits from independent review, competing hypotheses, or separate
|
|
10
|
+
verification, pi-workflow-engine fans it out to subagents and synthesizes one
|
|
11
|
+
result. Run a built-in workflow or add `dynamax` to a prompt so pi can compose a
|
|
12
|
+
one-off workflow for the task.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+

|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
pi install npm:pi-workflow-engine
|
|
17
|
-
```
|
|
16
|
+
## Quick start
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Requires **pi 0.80.10 or newer**.
|
|
20
19
|
|
|
21
20
|
```bash
|
|
22
|
-
pi install
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Restart pi, or run `/reload` in an open session, then confirm it loaded:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pi list
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
For project-local install:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
pi install npm:pi-workflow-engine -l
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Use Dynamax
|
|
38
|
-
|
|
39
|
-
Put the word `dynamax` in your prompt when you want pi to use a custom multi-agent workflow for the current task.
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
dynamax investigate why typecheck started failing after this branch
|
|
21
|
+
pi install npm:pi-workflow-engine
|
|
43
22
|
```
|
|
44
23
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
1. pi decides whether a saved workflow fits or whether to write a one-off workflow.
|
|
48
|
-
2. The workflow runs focused subagents in parallel.
|
|
49
|
-
3. You can watch phases, agents, findings, and logs in the workflow inspector.
|
|
50
|
-
4. You get a summarized result with evidence, risks, next steps, and workflow-level token/cost totals gathered from subagent sessions.
|
|
51
|
-
5. You can then ask pi to make changes using that result.
|
|
52
|
-
|
|
53
|
-
Workflow usage totals are reported on the workflow result itself. pi's built-in footer and `/session` stats may still show host-session usage only unless pi core adds a first-class extension usage API.
|
|
54
|
-
|
|
55
|
-
Dynamax is one-shot by default. It applies to the next agent run and then clears. Keep it on for the session with:
|
|
24
|
+
Restart pi or run `/reload`, then try either style:
|
|
56
25
|
|
|
57
26
|
```text
|
|
58
|
-
|
|
59
|
-
/workflow:dynamax status
|
|
60
|
-
/workflow:dynamax off
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The workflow inspector is available with:
|
|
27
|
+
dynamax investigate why typecheck started failing on this branch
|
|
64
28
|
|
|
65
|
-
|
|
66
|
-
/workflow
|
|
29
|
+
/workflow code-review
|
|
30
|
+
/workflow refactor-scout src/
|
|
31
|
+
/workflow diagnose "the schema migration broke typecheck"
|
|
67
32
|
```
|
|
68
33
|
|
|
69
|
-
|
|
34
|
+
Built-in workflows inspect and report by default; they do not edit your working
|
|
35
|
+
tree.
|
|
70
36
|
|
|
71
|
-
##
|
|
37
|
+
## What you get
|
|
72
38
|
|
|
73
|
-
|
|
39
|
+
- **Independent analysis.** Give correctness, testing, performance, or other
|
|
40
|
+
concerns to separate agents instead of asking one agent to cover everything.
|
|
41
|
+
- **Verified results.** Workflows can check and rank findings before presenting
|
|
42
|
+
a single synthesis.
|
|
43
|
+
- **Live visibility.** Follow phases and agents in the TUI, with usage and cost
|
|
44
|
+
totals when the provider reports them.
|
|
45
|
+
- **Controlled execution.** Concurrency, timeouts, agent counts, and token
|
|
46
|
+
budgets keep fan-out bounded.
|
|
47
|
+
- **Safe follow-up.** Advisory runs leave the checkout alone, while selected
|
|
48
|
+
review fixes can return isolated patch previews.
|
|
74
49
|
|
|
75
|
-
|
|
76
|
-
dynamax do an adversarial review of this branch. I want correctness bugs, hidden coupling, test gaps, and over-engineered parts called out separately.
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Expected result: several review angles run independently, likely findings are verified, duplicates are merged, and you get a ranked report with concrete evidence before deciding what to fix.
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
dynamax investigate this flaky test. Split the work between recent diffs, test setup, async timing, and external dependencies.
|
|
83
|
-
```
|
|
50
|
+
## Built-in workflows
|
|
84
51
|
|
|
85
|
-
|
|
52
|
+
| Workflow | Best used for |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `code-review` | PRs, branch diffs, ref ranges, or focused targets |
|
|
55
|
+
| `refactor-scout` | Small, defensible refactors without broad rewrites |
|
|
56
|
+
| `diagnose` | Competing explanations for bugs or failing commands |
|
|
57
|
+
| `perf-review` | Measured bottlenecks rather than performance guesses |
|
|
58
|
+
| `research` | Cited external evidence with independent claim verification |
|
|
86
59
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Expected result: separate agents inspect each approach, another pass looks for failure modes, and the final answer separates tradeoffs from the recommendation.
|
|
60
|
+
The `research` workflow needs an installed pi tool that can search or browse the
|
|
61
|
+
web. See the [built-in workflow guide](USAGE.md#built-in-workflows) for behavior
|
|
62
|
+
and requirements.
|
|
92
63
|
|
|
93
|
-
|
|
94
|
-
dynamax review this migration plan like a hostile reviewer. Focus on rollback, data loss, concurrency, and missing operational steps.
|
|
95
|
-
```
|
|
64
|
+
## Use Dynamax for one-off workflows
|
|
96
65
|
|
|
97
|
-
|
|
66
|
+
Use `dynamax` when no saved workflow quite fits and independent passes are
|
|
67
|
+
likely to change the answer:
|
|
98
68
|
|
|
99
69
|
```text
|
|
100
|
-
dynamax
|
|
70
|
+
dynamax review this branch for correctness, tests, and maintainability; verify every finding
|
|
71
|
+
dynamax investigate this flaky test using separate timing, fixture, diff, and external-state hypotheses
|
|
72
|
+
dynamax argue both implementation options, then have another agent challenge the recommendation
|
|
101
73
|
```
|
|
102
74
|
|
|
103
|
-
|
|
75
|
+
The token enables Dynamax for one turn. Sticky mode remains active for the pi
|
|
76
|
+
session:
|
|
104
77
|
|
|
105
78
|
```text
|
|
106
|
-
dynamax
|
|
79
|
+
/workflow:dynamax on
|
|
80
|
+
/workflow:dynamax off
|
|
81
|
+
/workflow:dynamax status
|
|
107
82
|
```
|
|
108
83
|
|
|
109
|
-
|
|
84
|
+
In the TUI, a standalone `dynamax` token receives a short moving-shine sweep and
|
|
85
|
+
then stays highlighted. Use `PI_DYNAMAX_EFFECT=static` or
|
|
86
|
+
`PI_DYNAMAX_EFFECT=off` to reduce or disable the cue; the
|
|
87
|
+
[prompt editor guide](USAGE.md#prompt-editor-cue) has the full details.
|
|
110
88
|
|
|
111
|
-
|
|
89
|
+
Tiny edits and straightforward questions are still better handled by one agent.
|
|
90
|
+
Dynamax is useful when independence or breadth materially improves the result.
|
|
112
91
|
|
|
113
|
-
|
|
92
|
+
## Review and inspect results
|
|
114
93
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/workflow refactor-scout src/
|
|
119
|
-
/workflow diagnose "typecheck fails after the schema change"
|
|
120
|
-
/workflow perf-review "workflow startup latency"
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Built-ins:
|
|
124
|
-
|
|
125
|
-
- `code-review`: reviews a PR, branch diff, ref range, or target.
|
|
126
|
-
- `refactor-scout`: finds small, safe refactor opportunities.
|
|
127
|
-
- `diagnose`: investigates a bug, failing command, or regression.
|
|
128
|
-
- `perf-review`: reviews a slow path or performance concern.
|
|
129
|
-
|
|
130
|
-
Useful flags:
|
|
94
|
+
`code-review` verifies, deduplicates, and ranks candidate findings. Open the
|
|
95
|
+
interactive findings view for follow-up, or bring back the latest result without
|
|
96
|
+
rerunning the workflow:
|
|
131
97
|
|
|
132
98
|
```text
|
|
133
|
-
/workflow code-review --inspect
|
|
134
99
|
/workflow code-review --result-viewer
|
|
135
|
-
/workflow
|
|
136
|
-
/workflow
|
|
137
|
-
/workflow code-review --budget=50000
|
|
138
|
-
/workflow code-review --resume <run-id>
|
|
139
|
-
/workflow code-review --refresh
|
|
100
|
+
/workflow:results
|
|
101
|
+
/workflow:inspector
|
|
140
102
|
```
|
|
141
103
|
|
|
142
|
-
|
|
104
|
+
The viewer can produce isolated patch previews for selected findings without
|
|
105
|
+
changing the active checkout. The [usage guide](USAGE.md#workflow-results)
|
|
106
|
+
covers review actions and recent run history.
|
|
143
107
|
|
|
144
|
-
|
|
108
|
+
## Create your own workflows
|
|
145
109
|
|
|
146
|
-
|
|
110
|
+
Saved workflows are TypeScript modules for repeatable orchestration; inline
|
|
111
|
+
workflows are useful for one-off Dynamax tasks. The
|
|
112
|
+
[workflow authoring guide](USAGE.md#author-a-saved-workflow) covers the API,
|
|
113
|
+
typed handoffs, model profiles, tool access, composition, and registration.
|
|
147
114
|
|
|
148
|
-
##
|
|
149
|
-
|
|
150
|
-
Use it for:
|
|
151
|
-
|
|
152
|
-
- adversarial reviews before you trust a plan or diff;
|
|
153
|
-
- debugging where several causes are plausible;
|
|
154
|
-
- design comparisons where you want both sides argued;
|
|
155
|
-
- refactor scouting where broad rewrites would be risky;
|
|
156
|
-
- performance investigations where measurement gaps matter;
|
|
157
|
-
- documentation reviews where consistency and reader expectations both matter.
|
|
158
|
-
|
|
159
|
-
Do not use it for every tiny task. A single prompt is still better for simple edits, one-file explanations, and obvious mechanical changes.
|
|
160
|
-
|
|
161
|
-
## Local Development
|
|
162
|
-
|
|
163
|
-
Only needed if you want to add workflows, customize workflows, or contribute. Using the package does not require a clone, install, or build step.
|
|
115
|
+
## Develop locally
|
|
164
116
|
|
|
165
117
|
```bash
|
|
166
118
|
git clone https://github.com/timbrinded/pi-workflow-engine
|
|
167
119
|
cd pi-workflow-engine
|
|
168
120
|
bun install
|
|
169
|
-
bun run typecheck
|
|
170
|
-
bun run test
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Load your working copy through the package manifest without installing it:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
pi -e .
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
If you also have the global package installed, pi may report duplicate `/workflow` or `workflow` tool diagnostics. Remove one source or load only this working copy:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
121
|
+
bun run typecheck && bun run test
|
|
182
122
|
pi -ne -e .
|
|
183
123
|
```
|
|
184
124
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
A workflow is a TypeScript module that exports `meta` plus a default async function. The `api` object gives you `agent`, `parallel`, `pipeline`, `workflow`, `phase`, `log`, and `progress`.
|
|
188
|
-
|
|
189
|
-
Guaranteed built-ins are statically registered:
|
|
190
|
-
|
|
191
|
-
1. Add `.pi/extensions/pi-workflow-engine/workflows/<name>.ts`.
|
|
192
|
-
2. Import it in `.pi/extensions/pi-workflow-engine/src/workflows.ts`.
|
|
193
|
-
3. Add it to `BUILTIN_WORKFLOWS`.
|
|
194
|
-
|
|
195
|
-
Drop-in workflows are also discovered best-effort from:
|
|
196
|
-
|
|
197
|
-
- `.pi/extensions/pi-workflow-engine/workflows/*.ts`
|
|
198
|
-
- `~/.pi/agent/workflows/*.ts`
|
|
199
|
-
|
|
200
|
-
Use `/workflow <name> --refresh` after adding a drop-in file.
|
|
201
|
-
|
|
202
|
-
Inline workflows are passed to the `workflow` tool as a script string. They are useful for one-off Dynamax orchestration. Inline v1 rules: no imports, no dynamic `import()`, pure-literal `meta`, schemas must use the injected `Type` value, and scripts run in-process with the extension's permissions.
|
|
203
|
-
|
|
204
|
-
### Technical Notes
|
|
125
|
+
`pi -ne -e .` loads the working copy without also loading an installed global
|
|
126
|
+
copy. There is no build step; pi loads the TypeScript extension directly.
|
|
205
127
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- A schema agent that finishes without calling `final_answer` is re-prompted once before returning `null`.
|
|
210
|
-
- Runs write completed `agent()` results to `.pi/.workflow-runs/<run-id>.jsonl`; `--resume <run-id>` replays the longest unchanged prefix and writes a fresh journal for the resumed run.
|
|
211
|
-
- `agent(..., { isolation: "worktree" })` runs in a disposable git worktree and returns `{ result, patch, changed }`; the user working tree is not mutated.
|
|
212
|
-
- A single run-level semaphore caps concurrent agents, so nested `parallel`, `pipeline`, and `workflow()` calls stay bounded.
|
|
213
|
-
- `parallel()` and `pipeline()` are fail-soft: recoverable branch failures, including budget backstops, become `null` slots while survivors continue. A genuine run abort still rejects.
|
|
214
|
-
- Built-in workflows stay statically imported so they share pi's bundled `typebox` identity.
|
|
215
|
-
- Set `thinkingLevel` per fan-out agent. Otherwise many subagents can inherit an expensive global reasoning level.
|
|
216
|
-
- Subagents receive no skills by default. Opt in per agent with `skills: ["skill-name"]`; clear prompt text like `include skill name` also works when `skills` is omitted.
|
|
217
|
-
- `tools` is a strict allowlist for subagents. Use `toolHints: ["search"]` to dynamically expose installed grep/find/search-like tools such as `ast-grep`, `mgrep`, `ffgrep`, or `fffind` without hard-coding a specific extension.
|
|
218
|
-
- Set `model` per agent only when needed: bare ids are Anthropic shorthand, and `provider/id` targets other providers.
|
|
219
|
-
Omitted models inherit the host/session default; malformed or unknown explicit refs fail fast.
|
|
128
|
+
For the complete command reference, model configuration, workflow authoring,
|
|
129
|
+
runtime controls, resume behavior, and troubleshooting, see
|
|
130
|
+
[USAGE.md](USAGE.md).
|
|
220
131
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
- `PI_WORKFLOW_PERF=1` enables per-run performance timing. This is timing-only; workflow usage/cost totals are reported separately when subagent usage is available.
|
|
226
|
-
- `PI_WORKFLOW_CONCURRENCY=N` sets the per-run agent cap. The default is `min(8, max(2, CPU count))`.
|
|
227
|
-
- `PI_WORKFLOW_PARALLEL_SUBMISSION_LIMIT=N` limits how many `parallel()` thunks are submitted at once.
|
|
228
|
-
- `PI_WORKFLOW_LANE_ITEM_LIMIT=N` caps retained progress lane items per lane.
|
|
229
|
-
|
|
230
|
-
No-LLM benchmark scripts:
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
bun run bench:concurrency -- --items 200 --concurrency 8 --json
|
|
234
|
-
bun run bench:discovery -- --iterations 3 --json
|
|
235
|
-
bun run bench:startup -- --json
|
|
236
|
-
bun run bench:ui -- --agents 1000 --lane-items 1000 --json
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### Layout
|
|
240
|
-
|
|
241
|
-
```text
|
|
242
|
-
.pi/
|
|
243
|
-
settings.json
|
|
244
|
-
extensions/pi-workflow-engine/
|
|
245
|
-
index.ts
|
|
246
|
-
src/
|
|
247
|
-
types.ts
|
|
248
|
-
agent-runner.ts
|
|
249
|
-
concurrency.ts
|
|
250
|
-
engine.ts
|
|
251
|
-
progress.ts
|
|
252
|
-
discovery.ts
|
|
253
|
-
workflows.ts
|
|
254
|
-
workflows/
|
|
255
|
-
code-review.ts
|
|
256
|
-
refactor-scout.ts
|
|
257
|
-
diagnose.ts
|
|
258
|
-
perf-review.ts
|
|
259
|
-
```
|
|
132
|
+
Questions and ideas are welcome in
|
|
133
|
+
[GitHub Issues](https://github.com/timbrinded/pi-workflow-engine/issues).
|
|
134
|
+
MIT licensed.
|