@tacuchi/agent-workflow-cli 15.1.0 → 16.0.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/package.json +1 -1
- package/skills/w/README.md +14 -14
- package/skills/w/SKILL.md +96 -75
- package/skills/w/artifacts/README.md +6 -6
- package/skills/w/artifacts/artifacts-core/SESSION.md +1 -7
- package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
- package/skills/w/artifacts/artifacts-exec/TECHNICAL-NOTE.md +9 -54
- package/skills/w/artifacts/artifacts-research/CONCLUSIONS.md +1 -1
- package/skills/w/commands/README.md +22 -22
- package/skills/w/commands/export-diagrams.md +9 -9
- package/skills/w/commands/export-manuals.md +9 -9
- package/skills/w/commands/export-reports.md +9 -9
- package/skills/w/commands/export-scripts.md +9 -9
- package/skills/w/commands/fix-git.md +12 -12
- package/skills/w/commands/plan-exec.md +19 -19
- package/skills/w/commands/plan-new.md +18 -18
- package/skills/w/commands/plan-refine.md +22 -22
- package/skills/w/commands/quick.md +16 -16
- package/skills/w/commands/spec-new.md +35 -34
- package/skills/w/commands/spec-refine.md +16 -16
- package/skills/w/commands/status.md +18 -16
- package/skills/w/commands/workspace-init.md +14 -14
- package/skills/w/exports/README.md +5 -5
- package/skills/w/exports/export-diagrams/SKILL.md +58 -58
- package/skills/w/exports/export-manuals/SKILL.md +61 -61
- package/skills/w/exports/export-reports/SKILL.md +51 -51
- package/skills/w/exports/export-scripts/SKILL.md +60 -60
- package/skills/w/harness/SKILL.md +48 -47
- package/skills/w/loops/CHASSIS.md +104 -97
- package/skills/w/loops/CODE-POLICIES.md +21 -21
- package/skills/w/loops/README.md +30 -29
- package/skills/w/loops/plan-exec-loop/SKILL.md +77 -80
- package/skills/w/loops/plan-new-loop/SKILL.md +88 -58
- package/skills/w/loops/plan-refine-loop/SKILL.md +69 -45
- package/skills/w/loops/quick-loop/SKILL.md +79 -79
- package/skills/w/loops/spec-refine-loop/SKILL.md +93 -97
- package/skills/w/roles/README.md +2 -2
- package/skills/w/roles/diagrams/SKILL.md +50 -47
- package/skills/w/roles/git/SKILL.md +58 -58
- package/skills/w/roles/research/SKILL.md +65 -62
- package/skills/w/roles/sql/SKILL.md +59 -55
- package/skills/w/roles/ui-spec/SKILL.md +60 -74
|
@@ -1,108 +1,138 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-new-loop
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
plan incluye UI compone ui-design para autorar design SPECs por pantalla
|
|
12
|
-
(NNN-SPEC-<SLUG>.md). Si el spec no está refinado sugiere spec-refine antes.
|
|
13
|
-
Lo arranca /w:plan-new y es reanudable. Invocar cuando un spec deba
|
|
14
|
-
convertirse en un plan ejecutable antes de implementar.
|
|
4
|
+
Generates a rich implementation plan (docs/plans/PPP-plan-<slug>.md) from a
|
|
5
|
+
spec. Heir of the chassis (loops/CHASSIS.md). Deltas: the plan absorbs the
|
|
6
|
+
TECHNICAL-NOTE level + Phases/Tasks with live state, code/impact-mapping
|
|
7
|
+
research, planning gap taxonomy, and per-screen design SPECs via ui-design
|
|
8
|
+
when the plan includes UI. If the spec is not refined it suggests
|
|
9
|
+
spec-refine first. Started by /w:plan-new; resumable. Invoke when a spec
|
|
10
|
+
must become an executable plan.
|
|
15
11
|
---
|
|
16
12
|
|
|
17
13
|
# plan-new-loop
|
|
18
14
|
|
|
19
|
-
> **Heir**
|
|
15
|
+
> **Heir** of the common chassis — **only** the PLAN-new deltas live here. The engine is never repeated.
|
|
20
16
|
|
|
21
17
|
## Flow
|
|
22
18
|
PLAN
|
|
23
19
|
|
|
24
20
|
## Layer
|
|
25
|
-
2 —
|
|
21
|
+
2 — the AI runs it end to end.
|
|
26
22
|
|
|
27
23
|
## Started by
|
|
28
|
-
`/w:plan-new` — **
|
|
24
|
+
`/w:plan-new` — **resumable** (same chassis mechanism, keyed off CHECKPOINT).
|
|
29
25
|
|
|
30
26
|
## Reads
|
|
31
|
-
`docs/specs/NNN-spec-*.md` (glob —
|
|
27
|
+
`docs/specs/NNN-spec-*.md` (glob — locates the spec by number; or the exact path from the command argument). **Refined vs draft** is distinguished by the **presence** of `## Refinement decisions` / `## Q&A traceability` in the spec: if missing → **soft-suggest** running `/w:spec-refine` first (planning over a solid spec produces better plans), but the user may proceed.
|
|
32
28
|
|
|
33
29
|
## Writes
|
|
34
|
-
`docs/plans/PPP-plan-<slug>.md` (`generate`; **
|
|
30
|
+
`docs/plans/PPP-plan-<slug>.md` (`generate`; **overwrites with confirmation** if it exists). It writes only `docs/plans` — never other `docs/` folders, no auto-export. If the plan **includes UI**, it also produces **design SPECs** (`NNN-SPEC-<SLUG>.md`) as artifacts **of its session** (see *Delta 4* — they are not `docs/`, no auto-export).
|
|
35
31
|
|
|
36
|
-
> **slug**: kebab-case
|
|
32
|
+
> **slug**: short kebab-case derived from the spec's Requirement — only `[a-z0-9-]`, ≤ ~5 words / ≤ 40 chars. `aw next-number docs/plans` returns JSON (field `next` = `PPP`); the loop builds the full name. To locate plans, glob `docs/plans/PPP-plan-*.md`.
|
|
37
33
|
|
|
38
34
|
## Inherits
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **always before** these deltas. *(If `../` does not resolve: `CHASSIS.md` next to this file — global layout rule, chassis § Reference resolution.)*
|
|
41
37
|
|
|
42
|
-
## Internal sessions —
|
|
38
|
+
## Internal sessions — PLAN-new instance
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's instance:
|
|
45
41
|
|
|
46
42
|
| Session | When | Artifacts | Role |
|
|
47
43
|
|---|---|---|---|
|
|
48
|
-
| **plan session** `NNN-<slug>-plan-new/` |
|
|
44
|
+
| **plan session** `NNN-<slug>-plan-new/` | when the loop starts (or resumes) | `SESSION.md` · `CHECKPOINT.md` (· `BACKLOG.md` only if something is deferred) | Owns the run. Type = `refine`; descriptor `<slug>-plan-new` (the `<slug>` comes from the input spec). |
|
|
49
45
|
|
|
50
|
-
## Delta 1 — Deliverable: PLAN
|
|
46
|
+
## Delta 1 — Deliverable: the RICH PLAN (`PPP-plan-<slug>.md`)
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
The plan absorbs the `TECHNICAL-NOTE` level **inline** (user decision) + the roadmap:
|
|
53
49
|
|
|
54
50
|
```markdown
|
|
55
51
|
# Plan PPP — <slug>
|
|
56
52
|
|
|
57
|
-
>
|
|
58
|
-
|
|
59
|
-
## Origin spec
|
|
60
|
-
## Summary
|
|
61
|
-
## Solution
|
|
62
|
-
## Impacted FE · BE ·
|
|
63
|
-
## Dependencies docs /
|
|
64
|
-
## Current state (AS-IS) wiring
|
|
65
|
-
## Target state (TO-BE) wiring
|
|
66
|
-
## Final behavior
|
|
67
|
-
## Phases
|
|
68
|
-
## Tasks
|
|
69
|
-
## Validations
|
|
70
|
-
## Risks / impact
|
|
71
|
-
## Assumptions
|
|
72
|
-
## Estimated time
|
|
73
|
-
## Open questions
|
|
53
|
+
> Derived from docs/specs/NNN-spec-<slug>.md · generated by plan-new-loop
|
|
54
|
+
|
|
55
|
+
## Origin source spec (or prompt, if bootstrapped via spec-new)
|
|
56
|
+
## Summary the how, in 1–2 sentences (core)
|
|
57
|
+
## Solution technical/functional explanation of the implementation (core)
|
|
58
|
+
## Impacted FE · BE · DB (schemas/tables/functions) · APIs · integr. (core)
|
|
59
|
+
## Dependencies docs / sources / databases / sessions (opt.)
|
|
60
|
+
## Current state (AS-IS) current wiring (interfaces and methods), brief (opt.)
|
|
61
|
+
## Target state (TO-BE) target wiring (opt.)
|
|
62
|
+
## Final behavior how the flow behaves at the end (aligned with the spec criteria) (core)
|
|
63
|
+
## Phases grouping phases (complexity XS–S) (core)
|
|
64
|
+
## Tasks tasks per phase (≤XS), with deps and live state (- [ ]) (core)
|
|
65
|
+
## Validations validations / constraints / business logic (core)
|
|
66
|
+
## Risks / impact technical risks and impacts (opt.)
|
|
67
|
+
## Assumptions assumptions (opt.)
|
|
68
|
+
## Estimated time XS–XL sizing (development + internal testing) (opt.)
|
|
69
|
+
## Open questions pending (core)
|
|
74
70
|
```
|
|
75
71
|
|
|
76
|
-
> **
|
|
72
|
+
> **Scales with complexity:** the `(core)` sections go **always**; the `(opt.)` ones only when the plan warrants them — a small plan may omit `Dependencies`, AS-IS/TO-BE, `Risks`, `Assumptions`, `Estimated time`. Concise > exhaustive.
|
|
77
73
|
|
|
78
|
-
> **
|
|
74
|
+
> **Catalog implication:** `TECHNICAL-NOTE` stops being a session artifact and becomes **sections of the plan-doc**. Reconciled in [`plan-exec-loop`](../plan-exec-loop/SKILL.md): the single plan-exec session carries **no** `TECHNICAL-NOTE` nor its own `TASKS`; the technical detail and the progress live inline in the plan-doc (living).
|
|
79
75
|
|
|
80
|
-
## Delta 2 — Gap taxonomy (
|
|
76
|
+
## Delta 2 — Gap taxonomy (of "plan")
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
Replaces the spec gap taxonomy with a planning-oriented one:
|
|
83
79
|
|
|
84
80
|
| Gap | Signal | Resolved by |
|
|
85
81
|
|---|---|---|
|
|
86
|
-
| Approach/Solution
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
| UI
|
|
82
|
+
| Approach/Solution undefined | the how is vague | research / human |
|
|
83
|
+
| Components unidentified | FE/BE/DB impact unknown | **research** (maps the code) |
|
|
84
|
+
| AS-IS wiring unknown | current state unknown | **research** |
|
|
85
|
+
| Phase too large | complexity > S | human (re-split) |
|
|
86
|
+
| Task not atomic | complexity > XS | the AI re-splits |
|
|
87
|
+
| Missing deps | order unclear | research / human |
|
|
88
|
+
| Spec criteria uncovered | tasks don't trace to acceptance criteria | the AI derives + human confirms |
|
|
89
|
+
| Unaddressed risks | technical risks unmitigated/undeclared | human |
|
|
90
|
+
| UI without design SPEC *(if it applies)* | the plan includes UI (FE/screens in `Impacted`, `## UI spec` in the spec, or UI tasks) without `NNN-SPEC-*.md` in the session | **`ui-design` capability** |
|
|
95
91
|
|
|
96
92
|
## Delta 3 — What research investigates here
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
The chassis' **inline** research specializes: mapping **code/impact** — affected FE/BE/DB components, AS-IS wiring, dependencies. It feeds the `Solution`, `Impacted`, `Current state (AS-IS)` sections. The chassis DB rule applies unchanged (read-only queries into `SCRIPTS.sql`, MCP chosen via a content question when >1 without default).
|
|
99
95
|
|
|
100
|
-
## Delta 4 — Design SPECs (
|
|
96
|
+
## Delta 4 — Design SPECs (when the plan includes UI)
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
The **UI without design SPEC** gap is resolved by **composing** the **`ui-design`** capability (built-in default [`ui-spec`](../../roles/ui-spec/SKILL.md); rebindable via `.workflow/skills.toml`; `off` → degrades to human / `Open questions`):
|
|
99
|
+
|
|
100
|
+
- It authors **one design SPEC per screen** as a session artifact: `NNN-SPEC-<SLUG>.md` (numbering local to the session — see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
|
|
101
|
+
- It **derives** from the spec's `## UI spec` section when present (splits it per screen and raises it to executable detail); otherwise it authors from the `Requirement` (design system/theme/ambiguities via *structured-choice*, counts in the batch).
|
|
102
|
+
- The plan's **UI Tasks reference** their SPEC's path — that reference is the **source of truth** — and `plan-exec-loop` reads them as the design reference.
|
|
103
|
+
- It is the same third gap-resolution mode of the chassis (next to *research* and *human*).
|
|
104
|
+
|
|
105
|
+
## Sequence
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
plan-new-loop(spec):
|
|
109
|
+
input = glob(docs/specs/NNN-spec-*.md) | argument path
|
|
110
|
+
if the spec does NOT have ## Refinement decisions + ## Q&A traceability:
|
|
111
|
+
soft-suggest /w:spec-refine (the user may proceed anyway)
|
|
112
|
+
session = create_or_resume("<slug>-plan-new") # CLI prepends global NNN
|
|
113
|
+
seed SESSION.Success criteria = coherence-gate checklist # verification-first, BEFORE
|
|
114
|
+
work = plan skeleton (Delta 1) derived from the spec (+ checkpoint progress if resuming)
|
|
115
|
+
repeat: # chassis engine
|
|
116
|
+
gaps = detect_gaps(work) (Delta 2 taxonomy) minus the exhausted ones
|
|
117
|
+
if gaps == ∅: break
|
|
118
|
+
batch ≤3 → seed CHECKPOINT.Pending/Next → resolve each gap:
|
|
119
|
+
research (maps code/impact — Delta 3) · human (structured-choice) · ui-design (Delta 4)
|
|
120
|
+
integrate + update CHECKPOINT # artifact-first cycle
|
|
121
|
+
coherence gate (read-only) = Success criteria green:
|
|
122
|
+
- every spec acceptance criterion traces to a phase/task
|
|
123
|
+
- Final behavior covers the criteria
|
|
124
|
+
- phases XS–S · tasks XS · deps without cycles · Impacted consistent with Solution
|
|
125
|
+
- (UI) every screen/UI task traces to its design SPEC and does not contradict ## UI spec
|
|
126
|
+
whatever fails → comes back as a gap
|
|
127
|
+
structured_choice(content: [Guardar plan, Preguntar algo más], flow: [Compactar, Cerrar])
|
|
128
|
+
Guardar → write docs/plans/PPP-plan-<slug>.md (confirmation if it exists)
|
|
129
|
+
finalize: CHECKPOINT persisted (+ BACKLOG only if something is deferred) + close session + report
|
|
130
|
+
```
|
|
103
131
|
|
|
104
132
|
## Convergence / exit
|
|
105
133
|
|
|
106
|
-
|
|
134
|
+
- **No material gaps** → **coherence gate** (the *Sequence* checklist; the PLAN-new instance of the chassis convergence gate). Criterion→task traceability is a **checked invariant**, never a separate section.
|
|
135
|
+
- Passes → `Guardar plan` (writes with confirmation if it exists) → `finalize`.
|
|
136
|
+
- `Cerrar` at any time → `finalize` (persists `CHECKPOINT`; `BACKLOG` only if something is deferred; closes the session, reports).
|
|
107
137
|
|
|
108
|
-
> **
|
|
138
|
+
> **After generating:** the plan can go straight to `plan-exec`, or — if changes arise before executing (new requirements, scope adjustments) — pass through [`plan-refine-loop`](../plan-refine-loop/SKILL.md) (`/w:plan-refine`, auxiliary and **not mandatory**), which refines it in place.
|
|
@@ -1,99 +1,123 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-refine-loop
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
PLACE
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(traza, sin gating), y si el refine toca UI compone ui-design y
|
|
12
|
-
produce/actualiza design SPECs por pantalla. Lo arranca /w:plan-refine;
|
|
13
|
-
reanudable y re-corrible a demanda. Invocar cuando un plan ya generado deba
|
|
14
|
-
ajustarse antes de ejecutarlo.
|
|
4
|
+
Refines an existing plan (docs/plans/PPP-plan-<slug>.md) by editing it IN
|
|
5
|
+
PLACE — an auxiliary, NOT mandatory step before plan-exec. Heir of the
|
|
6
|
+
chassis (loops/CHASSIS.md). Deltas: reuses plan-new-loop's gap taxonomy and
|
|
7
|
+
coherence gate, adds Refinement decisions / Q&A traceability (trace, no
|
|
8
|
+
gating), and produces/updates design SPECs via ui-design when the refine
|
|
9
|
+
touches UI. Started by /w:plan-refine; resumable and re-runnable on demand.
|
|
10
|
+
Invoke when an already generated plan must be adjusted before executing it.
|
|
15
11
|
---
|
|
16
12
|
|
|
17
13
|
# plan-refine-loop
|
|
18
14
|
|
|
19
|
-
> **Heir**
|
|
15
|
+
> **Heir** of the common chassis — **only** the PLAN-refine deltas live here. The engine is never repeated.
|
|
20
16
|
|
|
21
|
-
> **
|
|
17
|
+
> **Relation to the other PLAN loops:** `plan-new-loop` **generates** the plan from the spec; `plan-refine-loop` **refines it in place** (optional); `plan-exec-loop` **executes it**. plan-refine is to plan-new what spec-refine is to spec-new.
|
|
22
18
|
|
|
23
19
|
## Flow
|
|
24
20
|
PLAN
|
|
25
21
|
|
|
26
22
|
## Layer
|
|
27
|
-
2 —
|
|
23
|
+
2 — the AI runs it end to end.
|
|
28
24
|
|
|
29
|
-
##
|
|
30
|
-
`plan-exec`
|
|
25
|
+
## Auxiliary / NOT mandatory
|
|
26
|
+
`plan-exec` runs **any** plan, refined or not — there is **no** gate requiring plan-refine. This loop exists to incorporate changes (new requirements, scope adjustments, deps/risks spotted on re-read) **before** executing, without regenerating the plan from scratch.
|
|
31
27
|
|
|
32
28
|
## Started by
|
|
33
|
-
`/w:plan-refine` — **
|
|
29
|
+
`/w:plan-refine` — **resumable** (same chassis mechanism, keyed off CHECKPOINT) and **re-runnable on demand** (see *Compact / resume*).
|
|
34
30
|
|
|
35
31
|
## Reads
|
|
36
|
-
`docs/plans/PPP-plan-*.md` (glob —
|
|
32
|
+
`docs/plans/PPP-plan-*.md` (glob — locates the plan by number; or the exact path from the command argument). **Always the plan itself**: this loop edits it in place; there is no separate "refined" file.
|
|
37
33
|
|
|
38
34
|
## Writes
|
|
39
|
-
|
|
35
|
+
Updates `docs/plans/PPP-plan-<slug>.md` **in place** (when the user picks `Guardar plan refinado`): completes/adjusts sections and **adds** `## Refinement decisions` + `## Q&A traceability`. Since it overwrites an existing doc, it asks the user's **confirmation**. It writes only `docs/plans` — never other `docs/` folders, no auto-export. If the refine **touches UI**, it also produces/updates **design SPECs** (`NNN-SPEC-<SLUG>.md`) as artifacts **of its own session** (see *Delta 4* — they are not `docs/`, no auto-export).
|
|
40
36
|
|
|
41
37
|
## Inherits
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **always before** these deltas. *(If `../` does not resolve: `CHASSIS.md` next to this file — global layout rule, chassis § Reference resolution.)*
|
|
44
40
|
|
|
45
|
-
## Internal sessions —
|
|
41
|
+
## Internal sessions — PLAN-refine instance
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's instance:
|
|
48
44
|
|
|
49
45
|
| Session | When | Artifacts | Role |
|
|
50
46
|
|---|---|---|---|
|
|
51
|
-
| **refine session** `NNN-<slug>-plan-refine/` |
|
|
47
|
+
| **refine session** `NNN-<slug>-plan-refine/` | when the loop starts (or resumes/reopens) | `SESSION.md` · `CHECKPOINT.md` (· `BACKLOG.md` only if something is deferred) | Owns the run. Type = `refine`; descriptor `<slug>-plan-refine` (the `<slug>` comes from the input plan). |
|
|
52
48
|
|
|
53
|
-
## Delta 1 — Deliverable:
|
|
49
|
+
## Delta 1 — Deliverable: the PLAN, edited in place
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
The plan uses the **same skeleton** [`plan-new-loop`](../plan-new-loop/SKILL.md) produces (§ *Delta 1 — RICH PLAN*: `Summary`/`Solution`/`Impacted`/`Phases`/`Tasks`/`Validations`/`Final behavior`/… with `(core)` sections always and `(opt.)` by complexity). plan-refine does **not** change the schema: it **completes/adjusts** the existing sections **in place** and **adds** two trace sections:
|
|
56
52
|
|
|
57
53
|
```markdown
|
|
58
|
-
## Refinement decisions ← NEW (
|
|
59
|
-
|
|
60
|
-
deps/
|
|
61
|
-
|
|
54
|
+
## Refinement decisions ← NEW (ADDED)
|
|
55
|
+
What was adjusted while refining and why (new requirements, scope changes,
|
|
56
|
+
deps/risks). Includes what inline research resolved (ref to the session's
|
|
57
|
+
CONCLUSIONS).
|
|
62
58
|
|
|
63
|
-
## Q&A traceability ← NEW (
|
|
64
|
-
|
|
59
|
+
## Q&A traceability ← NEW (ADDED)
|
|
60
|
+
Every doubt asked to the human + the chosen answer.
|
|
65
61
|
```
|
|
66
62
|
|
|
67
|
-
> **
|
|
63
|
+
> **No gating contract** (unlike spec↔plan): the presence of `## Refinement decisions`/`## Q&A traceability` in the plan is **audit trace only** — `plan-exec` neither requires nor checks it (it runs any plan). It serves to (a) distinguish a re-refined plan from a freshly generated one on resume, and (b) record what changed and why.
|
|
68
64
|
|
|
69
|
-
>
|
|
65
|
+
> The plan **never mutates by execution** (plan-exec tracks that in the plan-doc's Tasks) — only by a (re-)refine.
|
|
70
66
|
|
|
71
|
-
## Delta 2 — Gap taxonomy (
|
|
67
|
+
## Delta 2 — Gap taxonomy (of "plan")
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
Reuses plan-new-loop's gap taxonomy **in full** ([`plan-new-loop`](../plan-new-loop/SKILL.md) § *Delta 2*): vague Approach/Solution, components unidentified, AS-IS wiring unknown, phase too large, task not atomic, missing deps, spec criteria uncovered, unaddressed risks, UI without design SPEC. **Focus difference:** plan-new **builds** the plan from scratch; plan-refine **detects what changed** against the written plan (or against the spec, if the spec was re-refined) and closes **those** gaps — typically fewer and more localized. One extra re-refine gap:
|
|
74
70
|
|
|
75
71
|
| Gap | Signal | Resolved by |
|
|
76
72
|
|---|---|---|
|
|
77
|
-
|
|
|
73
|
+
| Plan↔spec drift | the spec was re-refined and the plan fell out of line | **research** (re-reads the spec) / **human** |
|
|
78
74
|
|
|
79
75
|
## Delta 3 — What research investigates here
|
|
80
76
|
|
|
81
|
-
|
|
77
|
+
Same as plan-new (maps code/impact: FE/BE/DB components, AS-IS wiring, deps), but **scoped to the delta**: it re-verifies only what the change touches (never re-maps the whole plan). Chassis DB rule unchanged (read-only into `SCRIPTS.sql`, MCP via a question when >1 without default).
|
|
82
78
|
|
|
83
|
-
## Delta 4 — Design SPECs (
|
|
79
|
+
## Delta 4 — Design SPECs (when the refine touches UI)
|
|
84
80
|
|
|
85
|
-
|
|
81
|
+
Same mechanism as [`plan-new-loop`](../plan-new-loop/SKILL.md) (§ *Delta 4*: the **`ui-design`** capability → per-screen `NNN-SPEC-<SLUG>.md`, see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)), **scoped to the delta**: only the screens **new or changed** by the refine get a design SPEC. The updated SPEC is written in **plan-refine's own session** (each loop manages ITS session's artifacts — it never edits plan-new's) and the plan **re-points** the UI Task reference to the current SPEC. Untouched screens keep their original SPEC.
|
|
86
82
|
|
|
87
83
|
## Compact / resume
|
|
88
84
|
|
|
89
|
-
|
|
85
|
+
Resume **keys off the `CHECKPOINT`** of the refine session, never a "refined" file. Three cases when `/w:plan-refine` runs over a plan:
|
|
90
86
|
|
|
91
|
-
1. **
|
|
92
|
-
2. **
|
|
93
|
-
3. **
|
|
87
|
+
1. **In progress** (a `CHECKPOINT.md` exists in the refine session) → resume from the recorded progress (resolved gaps, Q&A, `attempts`, in-flight inline research).
|
|
88
|
+
2. **No progress** (no CHECKPOINT and the plan does **not** have `Refinement decisions`/`Q&A traceability`) → start from zero reading the plan (`PPP-plan-*.md`).
|
|
89
|
+
3. **Already refined / re-refine on demand** (no open CHECKPOINT, but the plan **already has** the 2 sections) → **first-class operation**, as many times as needed while the flow stays in PLAN:
|
|
90
|
+
- `create_or_resume` finds the existing refine session (typically **closed** after convergence) by descriptor + `## Origin` and **reopens** it: `aw session-resume --code <NNN> --reopen` (detection: `aw sessions --state all`).
|
|
91
|
+
- Incremental re-refinement reading the **plan itself**; on `Guardar`, edits in place with confirmation.
|
|
94
92
|
|
|
95
|
-
> **
|
|
93
|
+
> **Inter-turn continuity** (chassis, row 2): a flow command opens a "new work line" (new session) — **except re-running the same flow over the same input** (same plan), which does `create_or_resume` (resumes/reopens instead of duplicating).
|
|
94
|
+
|
|
95
|
+
## Sequence
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
plan-refine-loop(plan):
|
|
99
|
+
input = glob(docs/plans/PPP-plan-*.md) | argument path # always the plan itself (in place)
|
|
100
|
+
session = create_or_resume("<slug>-plan-refine") # reopens if it exists (see Compact / resume)
|
|
101
|
+
seed SESSION.Success criteria = coherence-gate checklist # verification-first, BEFORE
|
|
102
|
+
work = read(plan) (+ the spec if realignment is needed; + checkpoint progress if resuming)
|
|
103
|
+
repeat: # chassis engine
|
|
104
|
+
gaps = detect_gaps(work) (plan-new taxonomy + plan↔spec drift) minus the exhausted ones
|
|
105
|
+
if gaps == ∅: break
|
|
106
|
+
batch ≤3 → seed CHECKPOINT.Pending/Next → resolve each gap:
|
|
107
|
+
research (scoped to the delta — Delta 3) · human (structured-choice) ·
|
|
108
|
+
ui-design (Delta 4, only new/changed screens)
|
|
109
|
+
integrate + update CHECKPOINT # artifact-first cycle
|
|
110
|
+
coherence gate (read-only) = Success criteria green:
|
|
111
|
+
- plan-new checklist (criterion→task · Final behavior · XS–S/XS · deps · Impacted↔Solution · UI→current SPEC)
|
|
112
|
+
- re-refine's own check: the plan is REALIGNED with what changed
|
|
113
|
+
whatever fails → comes back as a gap
|
|
114
|
+
structured_choice(content: [Guardar plan refinado, Preguntar algo más], flow: [Compactar, Cerrar])
|
|
115
|
+
Guardar → edit in place (with confirmation) + insert/update Refinement decisions + Q&A traceability
|
|
116
|
+
finalize: CHECKPOINT persisted (+ BACKLOG only if something is deferred) + close session + report
|
|
117
|
+
```
|
|
96
118
|
|
|
97
119
|
## Convergence / exit
|
|
98
120
|
|
|
99
|
-
|
|
121
|
+
- **No material gaps** → **coherence gate** (the *Sequence* checklist; plan-new's gate + the re-refine's own realignment check).
|
|
122
|
+
- Passes → `Guardar plan refinado` (edits in place with confirmation) → `finalize`.
|
|
123
|
+
- `Cerrar` at any time → `finalize` (persists `CHECKPOINT`; `BACKLOG` only if something is deferred; closes the session, reports).
|