@gtrabanco/pi-agentic-workflow 0.15.2 → 0.16.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/README.md +49 -0
- package/dist/conductor/loop.js +23 -1
- package/dist/conductor/types.d.ts +6 -0
- package/dist/config/defaults.js +11 -0
- package/dist/config/merge.js +93 -1
- package/dist/config/profiles.d.ts +36 -0
- package/dist/config/profiles.js +102 -0
- package/dist/config/recommended.d.ts +14 -0
- package/dist/config/recommended.js +28 -0
- package/dist/config/schema.js +159 -3
- package/dist/config/types.d.ts +52 -0
- package/dist/config/types.js +10 -0
- package/dist/extension/conductor-command.d.ts +2 -5
- package/dist/extension/conductor-command.js +18 -6
- package/dist/extension/factory.d.ts +2 -0
- package/dist/extension/factory.js +10 -3
- package/dist/routing/dispatch.d.ts +9 -2
- package/dist/routing/dispatch.js +115 -46
- package/dist/routing/state.d.ts +26 -0
- package/dist/routing/state.js +67 -1
- package/dist/routing/types.d.ts +7 -0
- package/dist/settings/console.d.ts +7 -0
- package/dist/settings/console.js +214 -35
- package/dist/settings/view.d.ts +3 -1
- package/dist/settings/view.js +8 -1
- package/package.json +1 -1
- package/skills/audit-docs/SKILL.md +3 -3
- package/skills/audit-pr/SKILL.md +8 -8
- package/skills/audit-pr/references/01_MERGE_GATES.md +3 -3
- package/skills/audit-pr/references/02_CLOSURE_AND_SCOPE_GATES.md +4 -5
- package/skills/audit-pr/references/03_AUDIT_PROCESS.md +1 -1
- package/skills/audit-pr/references/04_VERDICT.md +3 -3
- package/skills/audit-pr/references/05_ROUTING_AND_GUARDRAILS.md +2 -2
- package/skills/discover-repository-state/SKILL.md +3 -4
- package/skills/execute-phase/SKILL.md +1 -1
- package/skills/execute-phase/references/DESCOPE.md +1 -1
- package/skills/fold-findings/SKILL.md +8 -8
- package/skills/fold-findings/references/FOLD_PROCESS.md +6 -5
- package/skills/orchestration-envelope/SKILL.md +4 -3
- package/skills/phase-contract/SKILL.md +3 -4
- package/skills/pre-execution-review/SKILL.md +10 -7
- package/skills/pre-execution-review/references/POLICY.md +17 -8
- package/skills/product-audit/SKILL.md +12 -13
- package/skills/product-audit/references/AUDIT_PROCESS.md +1 -1
- package/skills/resolve-repository-state/SKILL.md +2 -3
- package/skills/review-change/SKILL.md +3 -3
- package/skills/review-change/references/ADVERSARIAL_RECOMMENDATION.md +1 -1
- package/skills/review-change/references/ADVERSARIAL_SETUP.md +1 -1
- package/skills/review-change/references/OUTPUT_AND_GUARDRAILS.md +5 -5
- package/skills/review-change/references/PERSIST_AND_DECIDE.md +7 -6
- package/skills/review-implementation/SKILL.md +1 -1
- package/skills/review-implementation/references/CLASSIFY.md +13 -11
- package/skills/triage-issue/SKILL.md +11 -10
- package/skills/triage-issue/references/ISSUE_PROCESS.md +11 -10
- package/skills/triage-issue/references/LABELS.md +3 -3
- package/skills/triage-issue/references/REVIEW_FINDING_PROCESS.md +6 -6
- package/skills/unit-lane/SKILL.md +24 -9
- package/skills/workflow-status/SKILL.md +12 -13
- package/skills/workflow-status/references/CRASH_RECOVERY.md +6 -6
- package/skills/workflow-status/references/ENVELOPE_CORE.md +1 -4
- package/skills/workflow-status/references/ENVELOPE_FIELDS.md +7 -7
- package/skills/workflow-status/references/PRE_EXECUTION.md +5 -0
- package/skills/workflow-status/references/SENSOR_SIGNALS.md +1 -1
|
@@ -15,11 +15,11 @@ after `/fold-findings` leaves rows unresolved.
|
|
|
15
15
|
remains on the current unit. Route it to `/fold-findings` or an explicit
|
|
16
16
|
`/execute-phase <unit> P<n>`.
|
|
17
17
|
- A correction too large for the current fold is `replan-in-unit`. Run
|
|
18
|
-
`node scripts/unit-route.mjs <unit>`; its `route: replan` line
|
|
19
|
-
planner
|
|
20
|
-
for a fix
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
`node scripts/unit-route.mjs <unit>`; its `route: replan` line prints the
|
|
19
|
+
planner command — `/unit-lane <unit>` for a feature, `/unit-lane --fix <n>`
|
|
20
|
+
for a fix — which re-runs the lane's `plan` step and appends concrete
|
|
21
|
+
`P<n>` phases to the unit's SPEC, preserving the finding's acceptance
|
|
22
|
+
evidence. The lane's `review` step gates execution.
|
|
23
23
|
- A product, architecture, or acceptance decision that blocks safe work is
|
|
24
24
|
`decision-required`. Ask the user; do not guess or weaken the finish line.
|
|
25
25
|
- A finding disproved by current evidence is `disputed`. Preserve the row
|
|
@@ -35,7 +35,7 @@ Return exactly one block per finding:
|
|
|
35
35
|
REVIEW FINDING <F-k> — <short title>
|
|
36
36
|
Checked: <commands and evidence>
|
|
37
37
|
VERDICT: fix-now | replan-in-unit | decision-required | disputed
|
|
38
|
-
Action taken: <current-unit fold/phase |
|
|
38
|
+
Action taken: <current-unit fold/phase | unit-lane | user decision>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Close with every finding ID mapped to its own command, joined with ` + `, and
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: unit-lane
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version: 1.
|
|
5
|
-
argument-hint: <NN-slug | "<idea>"> [--retriage]
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
argument-hint: <NN-slug | "<idea>"> [--retriage] | --fix <issue-number> | --from-issue <issue-number>
|
|
6
6
|
description: >
|
|
7
7
|
One-shot lane conductor for a delivery unit: triage, implement, evidence, and
|
|
8
8
|
close in a single document. Triggers: "unit-lane", "run the lane",
|
|
@@ -36,8 +36,14 @@ done:
|
|
|
36
36
|
|
|
37
37
|
- A known unit slug: `unit-lane <NN-slug>`
|
|
38
38
|
- A raw idea (no slug yet): `unit-lane "<idea description>"`
|
|
39
|
+
- A tracked fix issue (no fix folder yet): `unit-lane --fix <issue-number>`
|
|
40
|
+
- A tracked roadmap feature issue (no feature folder yet): `unit-lane --from-issue <issue-number>`
|
|
39
41
|
- Force re-triage: `unit-lane <NN-slug> --retriage`
|
|
40
42
|
|
|
43
|
+
Both `--fix <n>` and `--from-issue <n>` are the exact forms
|
|
44
|
+
`scripts/unit-route.mjs` prints for a tracked issue with no unit folder
|
|
45
|
+
(`route: plan-from-issue`) — never invent a different spelling.
|
|
46
|
+
|
|
41
47
|
## Step 0 — Discover the project
|
|
42
48
|
|
|
43
49
|
Per the agent guide's **Workflow conventions** + **documentation map**, then read
|
|
@@ -48,11 +54,20 @@ exists, read its current `SPEC.md` to avoid overwriting.
|
|
|
48
54
|
|
|
49
55
|
### 1. Resolve or create the unit doc
|
|
50
56
|
|
|
51
|
-
If the
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
If the unit folder already exists, read its `SPEC.md` and continue. Otherwise
|
|
58
|
+
create it from the tree the unit belongs to:
|
|
59
|
+
|
|
60
|
+
| Invocation | Folder | Template | Index to register |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| `<NN-slug>` / `"<idea>"` | `docs/features/<NN>-<slug>/` | `docs/features/_TEMPLATE/SPEC.md` | `docs/features/ROADMAP.md` |
|
|
63
|
+
| `--fix <issue-number>` | `docs/fix/<issue-number>-<topic>/` | `docs/fix/_TEMPLATE/SPEC.md` | `docs/fix/README.md` |
|
|
64
|
+
| `--from-issue <issue-number>` | `docs/features/<NN>-<slug>/` | `docs/features/_TEMPLATE/SPEC.md` | `docs/features/ROADMAP.md` (row links `#<issue-number>`) |
|
|
65
|
+
|
|
66
|
+
For `--fix`/`--from-issue`, read the tracked issue in the forge first and keep
|
|
67
|
+
its number; the folder name carries it (`fix/<issue-number>-<topic>`). Fill
|
|
68
|
+
objective, why, user outcome, and non-goals from the invocation (or the issue).
|
|
69
|
+
Acceptance criteria are induced from user scenarios — **ask-don't-infer**; if the
|
|
70
|
+
request is too vague, STOP and ask the user with concrete options. See
|
|
56
71
|
[the unit doc template](references/STEPS.md) for section order.
|
|
57
72
|
|
|
58
73
|
### 2. Triage — read the catalog, never re-derive
|
|
@@ -119,8 +134,8 @@ unit doc's status, and print the closing block.
|
|
|
119
134
|
|
|
120
135
|
## Relationship to other skills
|
|
121
136
|
|
|
122
|
-
`unit-lane`
|
|
123
|
-
review-spec, review-plan) into catalog steps. The review pack axes
|
|
137
|
+
`unit-lane` absorbed the retired fixed-pipeline skills (design-feature,
|
|
138
|
+
plan-feature, review-spec, review-plan) into catalog steps. The review pack axes
|
|
124
139
|
(`review-implementation`, `review-code`, `review-security`, `review-perf`,
|
|
125
140
|
`review-a11y`, `review-debt`) compose the review step; `triage-issue` feeds
|
|
126
141
|
issues into the lane; `workflow-status` computes the next lane invocation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workflow-status
|
|
3
3
|
user-invocable: true
|
|
4
|
-
version: 3.9.
|
|
4
|
+
version: 3.9.1
|
|
5
5
|
author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
|
|
6
6
|
license: MIT
|
|
7
7
|
argument-hint: "[--json-only] [--last-envelope <json|path>] [--compact]"
|
|
@@ -30,15 +30,14 @@ report — it never assembles the envelope by hand.
|
|
|
30
30
|
stdout, never assembled by the model
|
|
31
31
|
✓ Nothing was edited, committed, pushed, or created — read-only, always
|
|
32
32
|
✓ `next.recommended` is non-bare (carries the unit's slug/NN, never a bare
|
|
33
|
-
`/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
current `PLAN-REVIEW-PASS`, else `/review-plan <NN>` (step 6a)
|
|
33
|
+
`/unit-lane`) AND the script computed it from the unit's resolved status:
|
|
34
|
+
`idea`/`defined` → `/unit-lane <slug>` (or `/unit-lane --fix <n>` for a fix);
|
|
35
|
+
`planned`/`in-progress` → `/execute-phase <NN>` (its triage block is the
|
|
36
|
+
authority; no separate plan-receipt currency check, step 6a)
|
|
38
37
|
✓ `detail.crash_recovery` carries a verdict from the decision table and the
|
|
39
38
|
envelope `state` matches it (CLEAN→OK, RESUMABLE→CONTINUE,
|
|
40
39
|
AMBIGUOUS→NEEDS_INPUT)
|
|
41
|
-
✓ Every `detail.design_candidates[].next` begins with `/
|
|
40
|
+
✓ Every `detail.design_candidates[].next` begins with `/unit-lane `
|
|
42
41
|
✓ Every degraded dimension is named in `detail.degradations` as
|
|
43
42
|
`unavailable-<source>-<cause>` — and, when `--last-envelope` was supplied, the
|
|
44
43
|
no-progress guard's `workflow_observations` note is present (never a silently
|
|
@@ -99,11 +98,11 @@ the JSON contract.
|
|
|
99
98
|
|
|
100
99
|
## Relationship to other skills
|
|
101
100
|
|
|
102
|
-
- The **sensor** counterpart to `
|
|
103
|
-
orchestrator calls `workflow-status` → routes on the
|
|
104
|
-
`
|
|
105
|
-
`triage-issue` directly, choosing the model per step — the same
|
|
106
|
-
the in-agent autopilot.
|
|
101
|
+
- The **sensor** counterpart to `advance`'s conductor: an external
|
|
102
|
+
orchestrator (or `advance` itself) calls `workflow-status` → routes on the
|
|
103
|
+
envelope → invokes `unit-lane` / `execute-phase` / `review-change` /
|
|
104
|
+
`audit-pr` / `triage-issue` directly, choosing the model per step — the same
|
|
105
|
+
loop without the in-agent autopilot.
|
|
107
106
|
- Read-only sibling of `audit-docs` (which judges coherence and can fix) and
|
|
108
107
|
`product-audit` (which judges health): this one only reports state.
|
|
109
108
|
- Schema owner: `orchestration-envelope` (internal).
|
|
@@ -118,7 +117,7 @@ the JSON contract.
|
|
|
118
117
|
`detail.crash_recovery` were read from the envelope, and the envelope `state`
|
|
119
118
|
matches the crash-recovery verdict.
|
|
120
119
|
- With `--last-envelope` supplied: the no-progress guard ran — a stalled
|
|
121
|
-
`/
|
|
120
|
+
`/unit-lane` hint surfaces as a `workflow_observations`
|
|
122
121
|
note, never a silent bland repeat, with no new write path introduced.
|
|
123
122
|
- The human summary (unless `--json-only`) and the envelope are printed, envelope
|
|
124
123
|
last.
|
|
@@ -23,12 +23,12 @@ section *classifies*; the resume command it recommends does the acting.
|
|
|
23
23
|
caller's persisted envelope against the recomputed state and report the
|
|
24
24
|
divergence in one line. The hint never overrides recomputed state.
|
|
25
25
|
- ✓ **No-progress guard (optional, requires `--last-envelope`).** When the
|
|
26
|
-
hint's `next.recommended` was `/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
hint's `next.recommended` was `/unit-lane <slug>` for a given unit, and this
|
|
27
|
+
run's own recomputed status for that **same unit** is still at the **same
|
|
28
|
+
pre-advance status** the hint expected to move it off of (`idea`/`defined` —
|
|
29
|
+
the lane's triage write lands when the unit doc is created) — either the
|
|
30
|
+
recommended command ran but its status write was dropped, or it never ran at
|
|
31
|
+
all; this guard cannot distinguish the
|
|
32
32
|
two from the envelope alone, so the note names it as a **suspected** stall,
|
|
33
33
|
not a confirmed dropped write. Emit a `workflow_observations` note (see
|
|
34
34
|
`## Machine envelope` for the exact note shape). This is strictly additive:
|
|
@@ -108,15 +108,12 @@ the key's presence.
|
|
|
108
108
|
|---|---|
|
|
109
109
|
| `/discover-repository-state` | `strong` |
|
|
110
110
|
| `/resolve-repository-state` | `strong` |
|
|
111
|
-
| `/
|
|
112
|
-
| `/design-feature` | `strong` |
|
|
111
|
+
| `/unit-lane` | `strong` |
|
|
113
112
|
| `/review-change` | `strong` |
|
|
114
113
|
| `/audit-pr` | `strong` |
|
|
115
114
|
| `/triage-issue` | `strong` |
|
|
116
115
|
| `/product-audit` | `strong` |
|
|
117
116
|
| `/execute-phase` | `cheap` |
|
|
118
|
-
| `/review-spec` | `strong` |
|
|
119
|
-
| `/review-plan` | `strong` |
|
|
120
117
|
|
|
121
118
|
`next.tier` is read off this map by matching the resolved `next.recommended`
|
|
122
119
|
command's name (ignoring its arguments) — never guessed and never copied from
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
**No-progress guard note (`workflow_observations`, requires `--last-envelope`,
|
|
4
4
|
see the crash-recovery checklist above)** — when the hint's `next.recommended`
|
|
5
|
-
targeted `/
|
|
5
|
+
targeted `/unit-lane <slug>` and this run still
|
|
6
6
|
classifies that same unit at the same pre-advance status, append a note of the
|
|
7
7
|
exact shape:
|
|
8
|
-
`"<slug> still 'defined' after the hint's /
|
|
9
|
-
(
|
|
10
|
-
|
|
8
|
+
`"<slug> still 'defined' after the hint's /unit-lane <slug> recommendation — triage not yet applied"`
|
|
9
|
+
(the note fires for a `defined` unit; the lane's triage write is what moves it
|
|
10
|
+
off `idea`/`defined`). The recommendation itself is unaffected — this only adds visibility.
|
|
11
11
|
|
|
12
12
|
**Shape vs. current output — read this before trusting the example below.** The
|
|
13
13
|
example is the envelope's **intended shape**, not everything the deterministic
|
|
@@ -33,10 +33,10 @@ absent-legacy` or `issues_born.n: 0`; the owning note is
|
|
|
33
33
|
"dependencies": {"unmet": [], "build_order": []},
|
|
34
34
|
"recommendations": {"product_audit": false, "reason": null},
|
|
35
35
|
"needs_input": null,
|
|
36
|
-
"next": {"recommended": "/review-change", "alternatives": ["/
|
|
36
|
+
"next": {"recommended": "/review-change", "alternatives": ["/unit-lane 05"], "tier": "strong",
|
|
37
37
|
"suggested": [{"command": "/review-change", "trigger": "accumulation: 420 changed lines since last-reviewed sha", "source_skill": "execute-phase"}]},
|
|
38
38
|
"detail": {
|
|
39
|
-
"design_candidates": [{"id": "08-billing-webhooks", "status": "idea", "next": "/
|
|
39
|
+
"design_candidates": [{"id": "08-billing-webhooks", "status": "idea", "next": "/unit-lane 08-billing-webhooks"}],
|
|
40
40
|
"pre_execution": [{"unit": "12-export-api", "unitDir": "docs/features/12-export-api", "stage": "lane", "label": "current", "verdict": "READY", "boundDigest": null, "observedDigest": null, "recommended": "/unit-lane 12-export-api", "reason": "unit-doc currency is checked per step by unit-lane/execute-phase"}],
|
|
41
41
|
"features": [
|
|
42
42
|
{"id": "07-csv-export", "status": "in-progress", "deps": ["01"], "deps_unmet": [],
|
|
@@ -87,7 +87,7 @@ fully in `features`/`fixes` — an `idea` unit appears ONLY in
|
|
|
87
87
|
`design_candidates` (and `detail.features`), never in `startable_now`, since
|
|
88
88
|
it has no deps-met check to pass (design precedes dependency startability).
|
|
89
89
|
`05-auth` above illustrates `defined` (not yet `planned`): startable, next
|
|
90
|
-
`/
|
|
90
|
+
`/unit-lane`, phase fields null (no planning artifacts yet).
|
|
91
91
|
|
|
92
92
|
## The `--compact` projection
|
|
93
93
|
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## Pre-execution receipt sensing (step 6a)
|
|
2
2
|
|
|
3
|
+
> **Legacy (feature 61 P8b):** the spec/plan pre-execution receipt stages are
|
|
4
|
+
> retired — the sensor now senses the unit doc's single triage block
|
|
5
|
+
> (`stage: lane`, see `ENVELOPE_FIELDS.md`). This reference is retained for
|
|
6
|
+
> units that still carry those receipts; the live sensing is the `lane` stage.
|
|
7
|
+
|
|
3
8
|
Roadmap status says what exists; only a receipt bound to the current bytes says
|
|
4
9
|
whether the unit may be executed. Sense it like every other signal — read the file,
|
|
5
10
|
recompute the digest, never trust the prose sitting around the block.
|
|
@@ -145,5 +145,5 @@ mechanized.*
|
|
|
145
145
|
`CRASH RECOVERY` sub-block to the report.
|
|
146
146
|
18. **Report.** Print a short human summary (table: unit | status | deps unmet |
|
|
147
147
|
PR | next gate) plus a **design candidates** line (`idea` units and their
|
|
148
|
-
`/
|
|
148
|
+
`/unit-lane` next command) plus the `CRASH RECOVERY` sub-block, then
|
|
149
149
|
the envelope. With `--json-only`, envelope only.
|