@davidorex/pi-workflows 0.14.6 → 0.28.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/CHANGELOG.md +199 -0
- package/README.md +12 -9
- package/agents/handoff-writer.agent.yaml +1 -1
- package/agents/requirements-gatherer.agent.yaml +1 -1
- package/dist/agent-spec.d.ts.map +1 -1
- package/dist/agent-spec.js +4 -3
- package/dist/agent-spec.js.map +1 -1
- package/dist/auth-required.d.ts +10 -0
- package/dist/auth-required.d.ts.map +1 -0
- package/dist/auth-required.js +10 -0
- package/dist/auth-required.js.map +1 -0
- package/dist/bundled-dirs.d.ts +2 -0
- package/dist/bundled-dirs.d.ts.map +1 -0
- package/dist/bundled-dirs.js +26 -0
- package/dist/bundled-dirs.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -14
- package/dist/index.js.map +1 -1
- package/dist/render-by-id.d.ts +62 -0
- package/dist/render-by-id.d.ts.map +1 -0
- package/dist/render-by-id.js +105 -0
- package/dist/render-by-id.js.map +1 -0
- package/dist/step-agent.js +1 -1
- package/dist/step-block.d.ts +5 -1
- package/dist/step-block.d.ts.map +1 -1
- package/dist/step-block.js +88 -40
- package/dist/step-block.js.map +1 -1
- package/dist/step-monitor.d.ts +1 -1
- package/dist/step-monitor.d.ts.map +1 -1
- package/dist/step-monitor.js +1 -1
- package/dist/step-monitor.js.map +1 -1
- package/dist/step-shared.d.ts +1 -1
- package/dist/step-shared.d.ts.map +1 -1
- package/dist/step-shared.js +16 -10
- package/dist/step-shared.js.map +1 -1
- package/dist/template-validation.d.ts.map +1 -1
- package/dist/template-validation.js +6 -6
- package/dist/template-validation.js.map +1 -1
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +2 -1
- package/dist/template.js.map +1 -1
- package/dist/test-helpers.d.ts +91 -0
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/test-helpers.js +185 -1
- package/dist/test-helpers.js.map +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +1 -1
- package/dist/types.d.ts +36 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow-discovery.d.ts.map +1 -1
- package/dist/workflow-discovery.js +2 -1
- package/dist/workflow-discovery.js.map +1 -1
- package/dist/workflow-executor.d.ts.map +1 -1
- package/dist/workflow-executor.js +23 -9
- package/dist/workflow-executor.js.map +1 -1
- package/dist/workflow-sdk.d.ts.map +1 -1
- package/dist/workflow-sdk.js +18 -11
- package/dist/workflow-sdk.js.map +1 -1
- package/dist/workflow-spec.js +99 -2
- package/dist/workflow-spec.js.map +1 -1
- package/package.json +17 -7
- package/skill-narrative.md +5 -3
- package/skills/pi-workflows/SKILL.md +46 -9
- package/skills/pi-workflows/references/bundled-resources.md +0 -36
- package/workflows/analyze-existing-project.workflow.yaml +1 -1
- package/workflows/init-new-project.workflow.yaml +1 -1
- package/workflows/plan-from-requirements.workflow.yaml +2 -2
- package/templates/analyzers/base-analyzer.md +0 -9
- package/templates/analyzers/patterns-task.md +0 -11
- package/templates/analyzers/patterns.md +0 -15
- package/templates/analyzers/quality-task.md +0 -11
- package/templates/analyzers/quality.md +0 -15
- package/templates/analyzers/structure-task.md +0 -17
- package/templates/analyzers/structure.md +0 -15
- package/templates/architecture-designer/task.md +0 -117
- package/templates/architecture-inferrer/task.md +0 -61
- package/templates/audit-finding-verifier/task.md +0 -59
- package/templates/audit-fixer/task.md +0 -67
- package/templates/audit-results-router/task.md +0 -37
- package/templates/decomposer/task.md +0 -56
- package/templates/explorer/system.md +0 -3
- package/templates/explorer/task.md +0 -9
- package/templates/gap-identifier/task.md +0 -103
- package/templates/gap-resolution-assessor/task.md +0 -48
- package/templates/handoff-writer/task.md +0 -101
- package/templates/investigator/task.md +0 -30
- package/templates/phase-author/task.md +0 -82
- package/templates/plan-creator/task.md +0 -143
- package/templates/plan-decomposer/task.md +0 -46
- package/templates/project-definer/task.md +0 -67
- package/templates/project-inferrer/task.md +0 -56
- package/templates/requirements-gatherer/task.md +0 -90
- package/templates/researcher/task.md +0 -26
- package/templates/shared/macros.md +0 -152
- package/templates/spec-implementer/task.md +0 -53
- package/templates/synthesizer/system.md +0 -3
- package/templates/synthesizer/task.md +0 -38
- package/templates/task-verifier/task.md +0 -44
- package/templates/task-worker/task.md +0 -52
- package/templates/verifier/task.md +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,204 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to `@davidorex/pi-workflows` are recorded here. Format follows [Keep a Changelog](https://keepachangelog.com/); entries are grounded in commits touching the published surface (`src/`, `schemas/`, `skills/`, `agents/`, `workflows/`). Versions are per-published-npm-release; the last published version is `0.26.0`. Tagged-but-unpublished work (`0.27.0` and later) lives under `[Unreleased]`.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.28.0] - 2026-06-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Read tools route through the shared `serializeForRead` helper
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Agent-template tree relocated out of `packages/pi-workflows/templates/` into `@davidorex/pi-jit-agents`; the five pi-workflows consumer call-sites resolve templates via the new `bundledTemplateDir()` export, and the `templates/` entry left pi-workflows' `files[]`
|
|
14
|
+
- Auth gating folded into per-package registry-derived gated-sets (`auth-required` surface)
|
|
15
|
+
- Per-item Nunjucks macro readers consume the `array_key`-aware canonical-macro-name registry via the `.macro_name` property
|
|
16
|
+
- Regenerated `SKILL.md` to reflect template relocation, new delegators, and registry changes
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Converge `/context init` onto a substrate-dir argument and correct the workflow-sdk scaffold-schemas claim in agent-facing source
|
|
20
|
+
- Neutralize `.project/` references in agent-reachable code strings and agent-facing guidance across block-api / lens / roadmap / context / compile / workflow-sdk / template-validation / monitors / index
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
- Scrubbed substrate-identity citations from the bundled agent, template, and render-by-id tool description string
|
|
24
|
+
|
|
25
|
+
## [0.26.0] - 2026-05-25
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Block-api surface symmetry: three new block-api primitives, three new `BlockSpec` variants, five new registered tools, and a `readBlockDir` extraction
|
|
29
|
+
- `appendToNestedArray` block-api primitive plus the workflow `nestedAppend` `BlockSpec`
|
|
30
|
+
- Composition-primitive surface symmetry: three composition tools, a Nunjucks global, macro wiring, and annotation backfill
|
|
31
|
+
- Per-item Nunjucks macros for spec-reviews, features, framework-gaps, layer-plans, and research blocks; `render_decision` and `render_conventions` macros for the legacy block library
|
|
32
|
+
- `workflow-resume` tool alongside the renamed execute tool
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- **BREAKING**: workflow tool renamed `workflow` → `workflow-execute`
|
|
36
|
+
- Migrated `/project` command/skill surface to `/context`, including the generated skill content
|
|
37
|
+
- Migrated pi-mono peer-deps from `@mariozechner/*` to `@earendil-works/*` at `^0.74.0`
|
|
38
|
+
- Retired per-item-macro duplication via shared helpers and a canonical-name registry map; retired seven residual debt items in one coordinated cross-package patch
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
- Empty-prefix guard, cross-block status-vocabulary check, and name-based error catches
|
|
42
|
+
- Module hygiene: `fileURLToPath` idiom and name-based error catches
|
|
43
|
+
- Completion atomic gates: test rewrites, `compileAgentSpec` BNF catch, loop/resume fixture cascade
|
|
44
|
+
- Canonicalize `tmpDir` via `fs.realpathSync` in the `step-shared` `resolveSchemaPath` `process.cwd`-fallback test
|
|
45
|
+
|
|
46
|
+
## [0.14.6] - 2026-04-28
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- Bumped pi-mono `0.63.1` → `0.70.2`; migrated TypeBox `v0.34` → `v1.x` via a hybrid import strategy
|
|
50
|
+
|
|
51
|
+
## [0.14.4] - 2026-04-07
|
|
52
|
+
|
|
53
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.14.2.
|
|
54
|
+
|
|
55
|
+
## [0.14.2] - 2026-04-06
|
|
56
|
+
|
|
57
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.14.1.
|
|
58
|
+
|
|
59
|
+
## [0.14.1] - 2026-04-06
|
|
60
|
+
|
|
61
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.13.0.
|
|
62
|
+
|
|
63
|
+
## [0.13.0] - 2026-04-06
|
|
64
|
+
|
|
65
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.12.0.
|
|
66
|
+
|
|
67
|
+
## [0.12.0] - 2026-04-06
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- Validation vocabulary surfaced in the skill generator (validator check registry); agent vocabulary extraction added to the skill generator
|
|
71
|
+
- `agentContracts()` and `validationChecks()` SDK functions; `/workflow status` enhanced with agent contracts and a validation-check count
|
|
72
|
+
- `contextBlocks` agent field plus shared block-rendering macros; static `inputSchema` required-key checking, `StepType` metadata validation, `contextBlocks` existence validation, and block-read schema tracing in the workflow validator
|
|
73
|
+
- Integration tests for `inputSchema` rejection and end-to-end workflow execution
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- Three-state validation status (clean / warnings / invalid) replaces the binary `valid` flag; the `valid` boolean removed in favor of the `status` field as sole signal
|
|
77
|
+
- Template validation is `contextBlocks`-aware, eliminating false positives; guarded-undefined template variables escalated from warning to error; null-schema warnings carry actionable suggestions
|
|
78
|
+
|
|
79
|
+
## [0.11.3] - 2026-04-04
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
- Guard completion on workflow success, enforce JSON output validation, and correct agent prompt instructions
|
|
83
|
+
|
|
84
|
+
## [0.11.0] - 2026-04-04
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
- `execute-task` workflow closing the task → verify → persist loop
|
|
88
|
+
- `task-worker` and `task-verifier` agent specs with templates and a verification schema
|
|
89
|
+
- `inputSchema` validation for agent steps, closing cross-block validation gaps
|
|
90
|
+
|
|
91
|
+
## [0.10.5] - 2026-04-02
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
- Added a `shell` expression filter to prevent single-quote injection in command steps
|
|
95
|
+
|
|
96
|
+
## [0.10.3] - 2026-04-02
|
|
97
|
+
|
|
98
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.10.2.
|
|
99
|
+
|
|
100
|
+
## [0.10.2] - 2026-04-02
|
|
101
|
+
|
|
102
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.10.1.
|
|
103
|
+
|
|
104
|
+
## [0.10.1] - 2026-04-02
|
|
105
|
+
|
|
106
|
+
### Changed
|
|
107
|
+
- Removed redundant `syncSkillsToUser` skill seeding to eliminate pi skill collisions
|
|
108
|
+
|
|
109
|
+
## [0.10.0] - 2026-04-02
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
- Completed five remaining issues: tool_call blocking, explicit template syntax, workflow YAML alignment
|
|
113
|
+
- Workflow-validation enhancements: textOutput type detection, array type checking, error accumulation
|
|
114
|
+
|
|
115
|
+
### Changed
|
|
116
|
+
- **BREAKING**: renamed the `gaps` block to `issues` with a new schema carrying `title`/`body`/`location`/`package` fields
|
|
117
|
+
|
|
118
|
+
### Fixed
|
|
119
|
+
- Resolved 17 issues across batches 1A/2A/3B/4A (template alignment, monitor safety, executor guards, test coverage) and 7 catalogued gaps across pi-project and pi-workflows
|
|
120
|
+
- Addressed three create-phase workflow gaps: template null guards, null traversal, spec freezing
|
|
121
|
+
|
|
122
|
+
## [0.9.2] - 2026-03-31
|
|
123
|
+
|
|
124
|
+
Lockstep release; no `@davidorex/pi-workflows` published-surface changes since 0.9.1.
|
|
125
|
+
|
|
126
|
+
## [0.9.1] - 2026-03-31
|
|
127
|
+
|
|
128
|
+
### Fixed
|
|
129
|
+
- DAG: surface invalid step references instead of silently dropping them; restrict bare `steps.` expression fallback to bare-expression contexts
|
|
130
|
+
- State: warn when `buildResult` uses output from a non-last step
|
|
131
|
+
- Workflow-spec: reject nested loop and parallel steps inside loop sub-steps; extracted `parseOutputSpec` helper
|
|
132
|
+
- step-monitor: extract token usage from `complete()` response; log error when `promptTemplate` render fails
|
|
133
|
+
- TUI: dispose previous widget pulse interval before creating a replacement
|
|
134
|
+
- workflow-discovery: log error on directory-scan failure instead of returning silently empty
|
|
135
|
+
- index: signal auto-resume via a `resumed` field in the workflow tool result
|
|
136
|
+
- types: `@deprecated` JSDoc on `StepSpec.workflow`
|
|
137
|
+
|
|
138
|
+
## [0.9.0] - 2026-03-29
|
|
139
|
+
|
|
140
|
+
### Added
|
|
141
|
+
- `block` step type: types, executor, dispatch, and expression filters; block-write schema detection in `validateWorkflow`; template-input alignment validation
|
|
142
|
+
- Migrated six workflow command steps to the block step type
|
|
143
|
+
|
|
144
|
+
### Changed
|
|
145
|
+
- Executed Plan 3 judgment-step restructuring across six workflows; aligned dependencies to the pi-mono pattern
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
- Reverted relaxed analysis output schemas (the relaxation was rolled back)
|
|
149
|
+
|
|
150
|
+
## [0.6.1] - 2026-03-28
|
|
151
|
+
|
|
152
|
+
### Added
|
|
153
|
+
- Support for array label fields in the workflow source picker for composite display
|
|
154
|
+
|
|
155
|
+
### Fixed
|
|
156
|
+
- Auto-parse JSON output into `result.output` when an agent/step declares `json` format
|
|
157
|
+
- Migrated parallel-analysis to typed output refs; parse string items in `append-block-item`
|
|
158
|
+
|
|
159
|
+
## [0.5.0] - 2026-03-28
|
|
160
|
+
|
|
161
|
+
### Changed
|
|
162
|
+
- Redesigned the workflow TUI with per-step colored bars and live metrics (plus conformance fixes)
|
|
163
|
+
|
|
164
|
+
## [0.4.1] - 2026-03-27
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
- Applied biome v2.4.9 auto-fixes; added the CI workflow and husky pre-commit, upgrading biome to v2.4.9
|
|
168
|
+
|
|
169
|
+
## [0.4.0] - 2026-03-27
|
|
170
|
+
|
|
171
|
+
### Added
|
|
172
|
+
- Sync extension skills to `~/.pi/agent/skills/` on activation
|
|
173
|
+
|
|
174
|
+
### Fixed
|
|
175
|
+
- Migrated `getApiKey(model)` to `getApiKeyAndHeaders(model)` for pi 0.63.1
|
|
176
|
+
|
|
177
|
+
## [0.3.4] - 2026-03-27
|
|
178
|
+
|
|
179
|
+
### Fixed
|
|
180
|
+
- Addressed five conformance audit findings across the extension packages
|
|
181
|
+
- Replaced package-specifier imports with Node builtins in workflow command steps
|
|
182
|
+
- Regenerated `SKILL.md` after conformance fixes
|
|
183
|
+
|
|
184
|
+
## [0.3.2] - 2026-03-26
|
|
185
|
+
|
|
186
|
+
### Fixed
|
|
187
|
+
- Replaced relative source imports with package specifiers in workflow command steps
|
|
188
|
+
|
|
189
|
+
## [0.3.1] - 2026-03-25
|
|
190
|
+
|
|
191
|
+
### Added
|
|
192
|
+
- `block:` schema-resolution prefix; `context` field on agent steps for narrative-flow injection
|
|
193
|
+
- Missing artifacts sections to four planning workflows
|
|
194
|
+
|
|
195
|
+
### Changed
|
|
196
|
+
- Refactored command registration to dispatch tables with dynamic completions and help
|
|
197
|
+
- Rewrote the skill generator for pi-compliant `SKILL.md` output (YAML frontmatter + XML tags)
|
|
198
|
+
|
|
199
|
+
### Fixed
|
|
200
|
+
- Made block artifact writes fatal
|
|
201
|
+
|
|
3
202
|
## [0.3.0] - 2026-03-18
|
|
4
203
|
|
|
5
204
|
## [0.2.0] - 2026-03-17
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ The schemas in `schemas/` (investigation-findings, decomposition-specs, executio
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pi install npm:@davidorex/pi-
|
|
12
|
+
pi install npm:@davidorex/pi-context # dependency
|
|
13
13
|
pi install npm:@davidorex/pi-workflows
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -27,10 +27,13 @@ Creates `.workflows/` for run state. Workflow YAML specs are discovered automati
|
|
|
27
27
|
|
|
28
28
|
pi-workflows replaces ad-hoc agent chaining with composable, typed workflow orchestration. Workflows are YAML specs. Steps run as subprocesses (`pi --mode json`) with their own context windows. The main conversation is the control plane; workflows are subordinate.
|
|
29
29
|
|
|
30
|
-
Workflows consume project blocks as typed input via `readBlock()` — structured data, not raw files. When workflow agents write back to project blocks, pi-
|
|
30
|
+
Workflows consume project blocks as typed input via `readBlock()` — structured data, not raw files. When workflow agents write back to project blocks, pi-context's schema validation enforces the shape at write time. The two extensions form a typed loop: project state → workflow input → agent output → validated project state.
|
|
31
31
|
|
|
32
|
-
**
|
|
33
|
-
- `workflow` —
|
|
32
|
+
**Tools registered:**
|
|
33
|
+
- `workflow-execute` — execute a named workflow with typed input (auto-resumes compatible incomplete runs unless `fresh: "true"`)
|
|
34
|
+
- `workflow-resume` — explicitly resume an incomplete workflow run by name + runId; rejects on no-match or runId mismatch
|
|
35
|
+
- `workflow-list`, `workflow-agents`, `workflow-validate`, `workflow-status`, `workflow-init` — discovery / inspection / scaffolding surfaces
|
|
36
|
+
- `render-item-by-id`, `enforce-budget` — per-item rendering + budget enforcement helpers
|
|
34
37
|
|
|
35
38
|
**Commands registered:**
|
|
36
39
|
- `/workflow init` — scaffold `.workflows/` directory for run state
|
|
@@ -129,9 +132,9 @@ Available filters: `length`, `keys`, `filter`, `json`, `upper`, `lower`, `trim`,
|
|
|
129
132
|
|
|
130
133
|
| Directory | Contents |
|
|
131
134
|
|-----------|----------|
|
|
132
|
-
| `agents/` |
|
|
133
|
-
| `schemas/` |
|
|
134
|
-
| `workflows/` |
|
|
135
|
+
| `agents/` | agent specs (`.agent.yaml`): investigator, decomposer, verifier, synthesizer, … — `ls agents/` or `availableAgents(cwd)` for the current set |
|
|
136
|
+
| `schemas/` | output schemas (`.schema.json`): investigation-findings, execution-results, … — `ls schemas/` for the current set |
|
|
137
|
+
| `workflows/` | workflow specs (`.workflow.yaml`): do-gap, create-phase, parallel-analysis, … — `ls workflows/` or `availableWorkflows(cwd)` for the current set |
|
|
135
138
|
| `templates/` | Nunjucks prompt templates organized by agent role |
|
|
136
139
|
|
|
137
140
|
## SDK (`src/workflow-sdk.ts`)
|
|
@@ -177,7 +180,7 @@ When working with this extension:
|
|
|
177
180
|
- **Read `src/dag.ts`** to understand how execution order is inferred from expressions
|
|
178
181
|
- **Read agent `.agent.yaml` files** in `agents/` to understand available agent capabilities
|
|
179
182
|
- **Read workflow `.workflow.yaml` files** in `workflows/` for examples of workflow structure
|
|
180
|
-
- Use the `workflow` tool to execute workflows — it handles discovery, input validation, checkpoint detection, and result formatting
|
|
183
|
+
- Use the `workflow-execute` tool to execute workflows — it handles discovery, input validation, checkpoint detection (auto-resume), and result formatting. Use `workflow-resume` for explicit-only resume by runId (rejects on no-match).
|
|
181
184
|
- The `/workflow list` command provides an interactive picker; `/workflow run <name>` runs directly
|
|
182
185
|
|
|
183
186
|
## Tests
|
|
@@ -190,6 +193,6 @@ Runs `tsx --test src/*.test.ts`. 500+ tests covering step types, expressions, DA
|
|
|
190
193
|
|
|
191
194
|
## Development
|
|
192
195
|
|
|
193
|
-
Part of the [`pi-project-workflows`](../../README.md) monorepo. All
|
|
196
|
+
Part of the [`pi-project-workflows`](../../README.md) monorepo. All four packages (pi-context, pi-jit-agents, pi-workflows, pi-behavior-monitors) are versioned in lockstep (current version in each `package.json`).
|
|
194
197
|
|
|
195
198
|
`npm run build` compiles TypeScript to `dist/` via `tsc`. The package ships `dist/`, not `src/` — the `pi.extensions` entry point is `./dist/index.js`.
|
|
@@ -8,7 +8,7 @@ input:
|
|
|
8
8
|
required: [project_state, path]
|
|
9
9
|
properties:
|
|
10
10
|
project_state:
|
|
11
|
-
description: Current project state (from
|
|
11
|
+
description: Current project state (from contextState() or /context status — includes phases, blocks, gaps, decisions, recent commits)
|
|
12
12
|
path:
|
|
13
13
|
type: string
|
|
14
14
|
description: Root path of the project
|
|
@@ -31,7 +31,7 @@ prompt:
|
|
|
31
31
|
- Output MUST be valid JSON conforming to the requirements.schema.json shape
|
|
32
32
|
- The top-level object has a single "requirements" array
|
|
33
33
|
- Every requirement has: id, description, type, status, priority (all required)
|
|
34
|
-
- IDs must be unique, formatted as REQ-
|
|
34
|
+
- IDs must be unique, formatted as REQ-NNN (zero-padded three-digit suffix)
|
|
35
35
|
- acceptance_criteria should be specific enough to verify without ambiguity
|
|
36
36
|
- Do NOT produce architecture decisions, module designs, or code
|
|
37
37
|
- "wont" priority requirements are valuable — they document conscious exclusions from the vision's scope_boundaries.out
|
package/dist/agent-spec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-spec.d.ts","sourceRoot":"","sources":["../src/agent-spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-spec.d.ts","sourceRoot":"","sources":["../src/agent-spec.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAiC5C;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC5C,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,WAAW,EAAE,MAAM,EAAE,CAAC;gBAE1B,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;CAOpD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACzC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;CAO7D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CA2C1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAgB/F"}
|
package/dist/agent-spec.js
CHANGED
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
* 3. <package>/agents/<name>.agent.yaml (builtin)
|
|
13
13
|
*/
|
|
14
14
|
import fs from "node:fs";
|
|
15
|
+
import os from "node:os";
|
|
15
16
|
import path from "node:path";
|
|
17
|
+
import { parse as parseYaml } from "yaml";
|
|
18
|
+
import { bundledDir } from "./bundled-dirs.js";
|
|
16
19
|
/**
|
|
17
20
|
* Check if a prompt.system value looks like a template file path vs inline text.
|
|
18
21
|
* Heuristic: treats strings ending in .md as template paths. A literal prompt
|
|
@@ -43,8 +46,6 @@ function resolvePromptField(value) {
|
|
|
43
46
|
}
|
|
44
47
|
return {};
|
|
45
48
|
}
|
|
46
|
-
import os from "node:os";
|
|
47
|
-
import { parse as parseYaml } from "yaml";
|
|
48
49
|
/**
|
|
49
50
|
* Thrown when an agent spec file is not found in any search path.
|
|
50
51
|
*/
|
|
@@ -122,7 +123,7 @@ export function parseAgentYaml(filePath) {
|
|
|
122
123
|
* Create an agent loader that finds .agent.yaml specs.
|
|
123
124
|
*/
|
|
124
125
|
export function createAgentLoader(cwd, builtinDir) {
|
|
125
|
-
const defaultBuiltinDir = builtinDir ??
|
|
126
|
+
const defaultBuiltinDir = builtinDir ?? bundledDir("agents");
|
|
126
127
|
return (name) => {
|
|
127
128
|
const searchPaths = [
|
|
128
129
|
path.join(cwd, ".pi", "agents", `${name}.agent.yaml`),
|
package/dist/agent-spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-spec.js","sourceRoot":"","sources":["../src/agent-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-spec.js","sourceRoot":"","sources":["../src/agent-spec.ts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YAAY,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM;QACjC,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;KACjF,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW,EAAE,UAAmB;IACjE,MAAM,iBAAiB,GAAG,UAAU,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE7D,OAAO,CAAC,IAAY,EAAa,EAAE;QAClC,MAAM,WAAW,GAAG;YACnB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,aAAa,CAAC;YACrD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,aAAa,CAAC;YACvE,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,IAAI,aAAa,CAAC;SAClD,CAAC;QAEF,KAAK,MAAM,CAAC,IAAI,WAAW,EAAE,CAAC;YAC7B,IAAI,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;gBAAE,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC;QAED,MAAM,IAAI,kBAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACjD,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pi-workflows-owned set of tool names that require human-authorization at
|
|
3
|
+
* the pi-agent-dispatch tool_call gate. Co-located with the package whose tools
|
|
4
|
+
* it gates so membership changes travel with the surface they describe; the
|
|
5
|
+
* pi-agent-dispatch gate imports this via the `./auth-required` subpath and
|
|
6
|
+
* folds it into the aggregated AUTH_REQUIRED_TOOLS. The gate remains the
|
|
7
|
+
* enforcement point — this is the source of pi-workflows' contribution to it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const gatedTools: readonly ["workflow-execute", "workflow-resume", "workflow-init"];
|
|
10
|
+
//# sourceMappingURL=auth-required.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-required.d.ts","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,mEAAoE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pi-workflows-owned set of tool names that require human-authorization at
|
|
3
|
+
* the pi-agent-dispatch tool_call gate. Co-located with the package whose tools
|
|
4
|
+
* it gates so membership changes travel with the surface they describe; the
|
|
5
|
+
* pi-agent-dispatch gate imports this via the `./auth-required` subpath and
|
|
6
|
+
* folds it into the aggregated AUTH_REQUIRED_TOOLS. The gate remains the
|
|
7
|
+
* enforcement point — this is the source of pi-workflows' contribution to it.
|
|
8
|
+
*/
|
|
9
|
+
export const gatedTools = ["workflow-execute", "workflow-resume", "workflow-init"];
|
|
10
|
+
//# sourceMappingURL=auth-required.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-required.js","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundled-dirs.d.ts","sourceRoot":"","sources":["../src/bundled-dirs.ts"],"names":[],"mappings":"AAwBA,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAE7E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolved paths into this package's bundled defaults directories.
|
|
3
|
+
*
|
|
4
|
+
* Pi loads pi-workflows from `dist/`; the bundled `agents/`, `workflows/`, and
|
|
5
|
+
* `schemas/` directories sit one level above the runtime JS (i.e. at the
|
|
6
|
+
* package root). Every consumer that previously hand-built
|
|
7
|
+
* `path.resolve(import.meta.dirname, "..", "<subdir>")` now routes through
|
|
8
|
+
* `bundledDir(name)` so the relative-path arithmetic exists once. Module-scoped
|
|
9
|
+
* — never re-export from the package barrel, since the value is meaningful
|
|
10
|
+
* only when computed against this file's own location.
|
|
11
|
+
*
|
|
12
|
+
* The "templates" branch was retired per DEC-0049 uniform-agent axiom: the
|
|
13
|
+
* agent-prompt template tree relocated to pi-jit-agents. Consumers needing
|
|
14
|
+
* the bundled template root import `bundledTemplateDir` from
|
|
15
|
+
* `@davidorex/pi-jit-agents/template` instead of asking this helper.
|
|
16
|
+
*/
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
19
|
+
// fileURLToPath idiom (FGAP-088): this is EAGER (module top-level), so an
|
|
20
|
+
// undefined import.meta.dirname under tsx's CJS-interop dist-load would throw at
|
|
21
|
+
// import time; import.meta.url is defined in both load paths.
|
|
22
|
+
const PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
23
|
+
export function bundledDir(subdir) {
|
|
24
|
+
return path.join(PACKAGE_ROOT, subdir);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=bundled-dirs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundled-dirs.js","sourceRoot":"","sources":["../src/bundled-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,0EAA0E;AAC1E,iFAAiF;AACjF,8DAA8D;AAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AAEtF,MAAM,UAAU,UAAU,CAAC,MAA0C;IACpE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Extension entry point — registers workflow tools and the `/workflow` command
|
|
3
3
|
* for discovering, executing, and managing multi-step workflow runs.
|
|
4
4
|
*/
|
|
5
|
-
import type { ExtensionAPI } from "@
|
|
5
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
6
6
|
declare const extension: (pi: ExtensionAPI) => void;
|
|
7
7
|
export default extension;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAGX,YAAY,EAGZ,MAAM,iCAAiC,CAAC;AAydzC,QAAA,MAAM,SAAS,GAAI,IAAI,YAAY,SAilBlC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|