@tacuchi/agent-workflow-cli 15.2.0 → 16.1.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/dist/application/templates/session.js +1 -1
- package/package.json +1 -1
- package/skills/w/README.md +14 -14
- package/skills/w/SKILL.md +94 -82
- package/skills/w/artifacts/README.md +1 -1
- package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +15 -13
- package/skills/w/artifacts/artifacts-core/SESSION.md +1 -1
- package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
- 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 +103 -98
- 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 -77
- package/skills/w/loops/plan-new-loop/SKILL.md +80 -80
- package/skills/w/loops/plan-refine-loop/SKILL.md +62 -62
- package/skills/w/loops/quick-loop/SKILL.md +79 -79
- package/skills/w/loops/spec-refine-loop/SKILL.md +93 -94
- 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,134 +1,134 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-exec-loop
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Deltas:
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
/w:plan-exec.
|
|
4
|
+
Executes an implementation plan (docs/plans/PPP-plan-<slug>.md) as a living
|
|
5
|
+
doc: reads and updates it phase by phase while editing the real code and
|
|
6
|
+
managing DB and git. Heir of the chassis (loops/CHASSIS.md +
|
|
7
|
+
CODE-POLICIES.md). Deltas: single resumable session, safe git (verified
|
|
8
|
+
branch, per-source proposed commits, never push/--amend/--no-verify), DB
|
|
9
|
+
scripts-only (never executes DML/DDL), per-phase and final validation,
|
|
10
|
+
pre-commit closing review gate, no auto-export. Composes git and sql.
|
|
11
|
+
Started by /w:plan-exec. Invoke to implement an already generated plan.
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# plan-exec-loop
|
|
15
15
|
|
|
16
|
-
> **Heir**
|
|
16
|
+
> **Heir** of the common chassis — the **execution deltas** live here: the real work (code, DB, git). The engine lives in the chassis and the *code-editing loop policies* in `CODE-POLICIES.md` — never repeated.
|
|
17
17
|
|
|
18
18
|
## Flow
|
|
19
19
|
PLAN
|
|
20
20
|
|
|
21
21
|
## Layer
|
|
22
|
-
2 —
|
|
22
|
+
2 — the AI runs it end to end.
|
|
23
23
|
|
|
24
24
|
## Started by
|
|
25
|
-
`/w:plan-exec` — **
|
|
25
|
+
`/w:plan-exec` — **resumable** (same chassis mechanism; here resume keys off the plan-doc checkboxes + CHECKPOINT, see Delta 1).
|
|
26
26
|
|
|
27
27
|
## Reads
|
|
28
|
-
`docs/plans/PPP-plan-<slug>.md` (
|
|
28
|
+
`docs/plans/PPP-plan-<slug>.md` (locate via the `docs/plans/PPP-plan-*.md` glob or the exact path from the command argument). It runs **any** plan, whether or not it passed through [`plan-refine-loop`](../plan-refine-loop/SKILL.md) — plan-refine is auxiliary, not mandatory; no gate requires it. If the plan includes UI, it also reads the **design SPECs** (`NNN-SPEC-<SLUG>.md`) its Tasks reference — artifacts of the plan-new/plan-refine session, read **read-only** as the design reference while implementing (see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
|
|
29
29
|
|
|
30
30
|
## Writes
|
|
31
|
-
- `docs/plans/PPP-plan-<slug>.md` (**read/update**, living doc:
|
|
32
|
-
-
|
|
33
|
-
- **
|
|
31
|
+
- `docs/plans/PPP-plan-<slug>.md` (**read/update**, living doc: phase/task state, `Open questions`).
|
|
32
|
+
- Artifacts of the plan-exec session under `.workflow/sessions/` (`SCRIPTS.sql`, `DECISION`, `ANALYSIS-FILE`/`CONCLUSIONS`, …).
|
|
33
|
+
- It does **NOT** write other `docs/` folders nor **graduate/export** artifacts automatically (see *Boundary*).
|
|
34
34
|
|
|
35
|
-
## Boundary —
|
|
35
|
+
## Boundary — no auto-export (hard rule)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Full rule in the chassis (§ *docs/ boundary — no auto-export*). Here: the only `docs/` folder this loop writes is **`docs/plans`** (the plan, living); everything else stays in the session until an explicit, later `export-*`.
|
|
38
38
|
|
|
39
39
|
## Inherits
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **and** **[`../CODE-POLICIES.md`](../CODE-POLICIES.md)** — the *code-editing loop policies* — **always before** these deltas. *(If `../` does not resolve: same names next to this file — global layout rule, chassis § Reference resolution.)*
|
|
42
42
|
|
|
43
43
|
## Composes
|
|
44
44
|
|
|
45
|
-
`git` (
|
|
45
|
+
`git` (safe branch + proposed commits) · `sql` (DB rule). Both resolved via `.workflow/skills.toml`; `off` → the loop continues without the capability and, if it was needed, says so or asks.
|
|
46
46
|
|
|
47
|
-
> **
|
|
47
|
+
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — the workflow neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
48
48
|
|
|
49
49
|
## Internal sessions (managed)
|
|
50
50
|
|
|
51
|
-
- **plan-exec session** descriptor `<slug>-plan-exec` → `NNN-<slug>-plan-exec` (
|
|
51
|
+
- **plan-exec session** descriptor `<slug>-plan-exec` → `NNN-<slug>-plan-exec` (the `<slug>` comes from the input plan-doc `docs/plans/PPP-plan-<slug>.md`): **a single session per run** (Type = `exec`). Owns the run; holds `SESSION` + `CHECKPOINT` + `DECISION` + `SCRIPTS.sql` (+ `BACKLOG` only if something is deferred). Research is **inline** inside this session: it produces `ANALYSIS-FILE`/`CONCLUSIONS` (+ read-only `SCRIPTS.sql` if it queries DB) in its own folder.
|
|
52
52
|
|
|
53
|
-
> **
|
|
53
|
+
> **Numbering**: the caller passes only the descriptor; the CLI prepends the global sequential `NNN` over `.workflow/sessions/` (see chassis). It never restarts per type.
|
|
54
54
|
|
|
55
|
-
> **Compat (legacy):** workspaces
|
|
55
|
+
> **Compat (legacy):** old workspaces may hold `plan-exec-phase-*` sessions (one per phase) and `*-research-*` ones — historical, left as-is; new runs use a single session.
|
|
56
56
|
|
|
57
57
|
## Delta 1 — One session per run; per-phase progress in the plan-doc
|
|
58
58
|
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
59
|
+
- Walks the plan's `Phases` in order (respecting deps) **inside the run's single session** (no session-per-phase).
|
|
60
|
+
- **Per-phase progress lives in the plan-doc** (`- [x]`) and in the single `CHECKPOINT` (Completed/Pending/Next): **artifact-first** — `CHECKPOINT.Next` is set to the imminent phase **before** starting it; the plan-doc's `- [x]` checkbox is flipped **after** completing the task.
|
|
61
|
+
- Executes the phase's `Tasks`; **skips** the ones already `- [x]` in the plan (the plan-doc is the per-task source of truth). Marks `- [x]` + state **in the plan** (living doc; never in a separate `TASKS`).
|
|
62
|
+
- At **every phase boundary**: validate, run the **closing review gate** (Delta 5), update the `CHECKPOINT` (Completed += Phase N, Next = Phase N+1) and propose commits.
|
|
63
|
+
- Records in `DECISION` only the **non-obvious**, **as it is decided** (per-phase decisions accumulate in the SINGLE `DECISION`, tagged by phase/task — e.g. `Origin: T2 (F1)`).
|
|
64
|
+
- The chassis **gap-driven** engine applies here **inside a task**: facing a non-obvious decision/doubt → inline research OR structured-choice.
|
|
65
65
|
|
|
66
|
-
## Delta 2 — Git policy: **
|
|
66
|
+
## Delta 2 — Git policy: **safe branch + proposed commits**
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Full policy in [`../CODE-POLICIES.md`](../CODE-POLICIES.md) (§ *Safe git*: branch-check before editing, rejected commit — changes stay + get recorded —, working-tree precondition between phases). **Inline:** before editing, verify each source's expected branch (`aw check-branch --source <alias>`; on mismatch → pause and resolve with the human); at each phase close and **after the review gate** (Delta 5), **proposed commits per source** (approve first) — never `push`/`--amend`/`--no-verify`.
|
|
69
69
|
|
|
70
|
-
## Delta 3 — DB policy: **
|
|
70
|
+
## Delta 3 — DB policy: **the AI never executes DML**
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Full policy in [`../CODE-POLICIES.md`](../CODE-POLICIES.md) (§ *DB scripts-only*). **Inline:** read-only queries → the session's `SCRIPTS.sql`, executed via MCP (`sql-mutation-guard`); DDL/DML migrations → the AI **drafts them in `SCRIPTS.sql` but NEVER executes them** — their promotion to `docs/scripts/` is done by a separate `export-*`, never this loop.
|
|
73
73
|
|
|
74
74
|
## Delta 4 — Validation
|
|
75
75
|
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- **
|
|
76
|
+
- After executing (per phase and at the end): run tests/checks against `Validations` + `Final behavior` + the spec's acceptance/success criteria.
|
|
77
|
+
- A validation that **runs and fails** → back to the task (gap); no advancing.
|
|
78
|
+
- **Validation depending on an unapplied migration**: since the AI never executes the DML, it **cannot run it read-only** → it is **deferred** (handoff to a DBA), it does **not block progress**. Recorded in the plan's `Open questions` + `BACKLOG`, marked "verification pending until the SQL is applied". (Reuses the chassis degrade/defer pattern + `MAX` cap → avoids the "back to the task" loop.)
|
|
79
79
|
|
|
80
|
-
>
|
|
80
|
+
> The **final validation** is PLAN-exec's **convergence gate** = **`Success criteria` green** (*verification-first*; analogous to SPEC's *analyze gate* and plan-new's *coherence gate*): the plan is not marked *done* until it passes or is explicitly deferred (SQL handoff). For code these are **runnable tests** (TDD); for non-executable DB migrations, a **rubric** (SCRIPTS.sql valid + reviewed).
|
|
81
81
|
|
|
82
|
-
## Delta 5 —
|
|
82
|
+
## Delta 5 — Closing review gate (conventions, pre-commit)
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
Full gate in [`../CODE-POLICIES.md`](../CODE-POLICIES.md) (§ *Closing review gate*): **independent** diff re-read + installed ambient conventions; findings → fix (re-validating the phase) or defer justified. Here only the exec wiring: it runs **between the phase validation (Delta 4) and its commits (Delta 2)**; only with the gate green are the phase's commits proposed.
|
|
85
85
|
|
|
86
|
-
## Delta 6 —
|
|
86
|
+
## Delta 6 — Completion / close
|
|
87
87
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
- **
|
|
88
|
+
- A phase closes **done** when its tasks are `- [x]` and its validation passed **or** was deferred (SQL handoff). Possible state: **"done — SQL pending application"**.
|
|
89
|
+
- All phases done → final *structured-choice* (content: `Marcar plan done` / `Preguntar algo más`; flow: `Compactar`/`Cerrar`).
|
|
90
|
+
- **No automatic export**: the artifacts (`SCRIPTS.sql`, `DECISION`, …) stay in the session. Promoting them to `docs/` (scripts, manuals, …) is a separate step via `export-*`.
|
|
91
91
|
|
|
92
92
|
## Sequence
|
|
93
93
|
|
|
94
94
|
```
|
|
95
95
|
plan-exec-loop(PPP-plan-<slug>.md):
|
|
96
|
-
session = create_or_resume("<slug>-plan-exec") # <slug>
|
|
96
|
+
session = create_or_resume("<slug>-plan-exec") # <slug> from the plan-doc; ONE session per run; CLI prepends global NNN; CHECKPOINT, resume
|
|
97
97
|
plan = read(PPP-plan-<slug>.md)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
seed CHECKPOINT.Next = Phase N (Pending =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
re-
|
|
118
|
-
|
|
119
|
-
update CHECKPOINT (Completed += Phase N, Next = Phase N+1) #
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
structured_choice(
|
|
125
|
-
|
|
126
|
-
# NO export:
|
|
127
|
-
finalize: CHECKPOINT (+ BACKLOG
|
|
98
|
+
for each Phase in plan (in order, respecting deps):
|
|
99
|
+
if Phase done (all its Tasks - [x] in the plan): skip # resume via plan-doc checkboxes
|
|
100
|
+
seed CHECKPOINT.Next = Phase N (Pending = its Tasks) # BEFORE starting the phase: seed the intent (artifact-first)
|
|
101
|
+
for each Task of the Phase:
|
|
102
|
+
if Task - [x] in the plan: skip # intra-phase resume by checkbox
|
|
103
|
+
verify each source's expected branch (branch-check)
|
|
104
|
+
on mismatch → pause + resolve with the human
|
|
105
|
+
execute Task:
|
|
106
|
+
edit code in the sources (minimal change)
|
|
107
|
+
if it creates a tool/utility → the ambient creating-tools skill documents it in docs/tools
|
|
108
|
+
if read-only DB query → SCRIPTS.sql + execute read-only
|
|
109
|
+
if DB change (DDL/DML) → draft in SCRIPTS.sql (session artifact, DO NOT execute)
|
|
110
|
+
if non-obvious decision → DECISION (tagged by phase/task, in the SINGLE DECISION)
|
|
111
|
+
if doubt/gap → inline research OR structured-choice # chassis
|
|
112
|
+
mark Task - [x] + state IN THE PLAN # AFTER completing the Task (the plan-doc is the per-task source of truth)
|
|
113
|
+
phase validation:
|
|
114
|
+
what runs and fails → back to the task
|
|
115
|
+
what depends on an unapplied migration → defer (Open questions + BACKLOG)
|
|
116
|
+
closing review gate (pre-commit): # Delta 5: CHECKPOINT.Next = "review phase N"
|
|
117
|
+
INDEPENDENT re-read of the phase diff + installed ambient conventions
|
|
118
|
+
findings → fix (and re-validate the phase) OR defer justified (Open questions + BACKLOG)
|
|
119
|
+
update CHECKPOINT (Completed += Phase N, Next = Phase N+1) # AFTER: Pending→Completed + Next = next phase (see artifact-first cycle)
|
|
120
|
+
propose commit(s) per source (approve first) # never push/amend/--no-verify; only after the gate is green
|
|
121
|
+
if rejected → changes stay; record "phase uncommitted"
|
|
122
|
+
next-phase precondition: working tree clean or acknowledged
|
|
123
|
+
final validation (whatever can run; the SQL-dependent part stays as a handoff)
|
|
124
|
+
structured_choice(content: [Marcar plan done, Preguntar algo más], flow: [Compactar, Cerrar])
|
|
125
|
+
mark plan done (or "done — SQL pending application")
|
|
126
|
+
# NO export: artifacts stay in the session; a separate export-* promotes them
|
|
127
|
+
finalize: CHECKPOINT (+ BACKLOG if something is deferred) + close session + report
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
## Convergence / exit
|
|
131
131
|
|
|
132
|
-
- Plan
|
|
133
|
-
- `Cerrar` (
|
|
134
|
-
-
|
|
132
|
+
- Plan complete + validation OK (or deferred with a handoff) + **every phase passed its closing review gate** before committing → `Marcar plan done`.
|
|
133
|
+
- `Cerrar` (`flow` control, at any time) → `finalize` persists `CHECKPOINT` (and `BACKLOG` only if something remained unexecuted / uncommitted / unapplied), closes the session, reports.
|
|
134
|
+
- Promoting artifacts to `docs/` (via `export-*`) is **always** a later, explicit step outside this loop.
|
|
@@ -1,138 +1,138 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-new-loop
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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.
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# plan-new-loop
|
|
14
14
|
|
|
15
|
-
> **Heir**
|
|
15
|
+
> **Heir** of the common chassis — **only** the PLAN-new deltas live here. The engine is never repeated.
|
|
16
16
|
|
|
17
17
|
## Flow
|
|
18
18
|
PLAN
|
|
19
19
|
|
|
20
20
|
## Layer
|
|
21
|
-
2 —
|
|
21
|
+
2 — the AI runs it end to end.
|
|
22
22
|
|
|
23
23
|
## Started by
|
|
24
|
-
`/w:plan-new` — **
|
|
24
|
+
`/w:plan-new` — **resumable** (same chassis mechanism, keyed off CHECKPOINT).
|
|
25
25
|
|
|
26
26
|
## Reads
|
|
27
|
-
`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.
|
|
28
28
|
|
|
29
29
|
## Writes
|
|
30
|
-
`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).
|
|
31
31
|
|
|
32
|
-
> **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`.
|
|
33
33
|
|
|
34
34
|
## Inherits
|
|
35
35
|
|
|
36
|
-
|
|
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.)*
|
|
37
37
|
|
|
38
|
-
## Internal sessions —
|
|
38
|
+
## Internal sessions — PLAN-new instance
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's instance:
|
|
41
41
|
|
|
42
42
|
| Session | When | Artifacts | Role |
|
|
43
43
|
|---|---|---|---|
|
|
44
|
-
| **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). |
|
|
45
45
|
|
|
46
|
-
## Delta 1 — Deliverable: PLAN
|
|
46
|
+
## Delta 1 — Deliverable: the RICH PLAN (`PPP-plan-<slug>.md`)
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
The plan absorbs the `TECHNICAL-NOTE` level **inline** (user decision) + the roadmap:
|
|
49
49
|
|
|
50
50
|
```markdown
|
|
51
51
|
# Plan PPP — <slug>
|
|
52
52
|
|
|
53
|
-
>
|
|
54
|
-
|
|
55
|
-
## Origin spec
|
|
56
|
-
## Summary
|
|
57
|
-
## Solution
|
|
58
|
-
## Impacted FE · BE ·
|
|
59
|
-
## Dependencies docs /
|
|
60
|
-
## Current state (AS-IS) wiring
|
|
61
|
-
## Target state (TO-BE) wiring
|
|
62
|
-
## Final behavior
|
|
63
|
-
## Phases
|
|
64
|
-
## Tasks
|
|
65
|
-
## Validations
|
|
66
|
-
## Risks / impact
|
|
67
|
-
## Assumptions
|
|
68
|
-
## Estimated time
|
|
69
|
-
## 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)
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
> **
|
|
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.
|
|
73
73
|
|
|
74
|
-
> **
|
|
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).
|
|
75
75
|
|
|
76
|
-
## Delta 2 — Gap taxonomy (
|
|
76
|
+
## Delta 2 — Gap taxonomy (of "plan")
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
Replaces the spec gap taxonomy with a planning-oriented one:
|
|
79
79
|
|
|
80
80
|
| Gap | Signal | Resolved by |
|
|
81
81
|
|---|---|---|
|
|
82
|
-
| Approach/Solution
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
| 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** |
|
|
91
91
|
|
|
92
92
|
## Delta 3 — What research investigates here
|
|
93
93
|
|
|
94
|
-
|
|
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).
|
|
95
95
|
|
|
96
|
-
## Delta 4 — Design SPECs (
|
|
96
|
+
## Delta 4 — Design SPECs (when the plan includes UI)
|
|
97
97
|
|
|
98
|
-
|
|
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
99
|
|
|
100
|
-
-
|
|
101
|
-
- **
|
|
102
|
-
-
|
|
103
|
-
-
|
|
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
104
|
|
|
105
105
|
## Sequence
|
|
106
106
|
|
|
107
107
|
```
|
|
108
108
|
plan-new-loop(spec):
|
|
109
|
-
input = glob(docs/specs/NNN-spec-*.md) |
|
|
110
|
-
|
|
111
|
-
soft-suggest /w:spec-refine (
|
|
112
|
-
session = create_or_resume("<slug>-plan-new") # CLI
|
|
113
|
-
seed SESSION.Success criteria =
|
|
114
|
-
work =
|
|
115
|
-
repeat: #
|
|
116
|
-
gaps = detect_gaps(work) (
|
|
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
117
|
if gaps == ∅: break
|
|
118
|
-
batch ≤3 →
|
|
119
|
-
research (
|
|
120
|
-
|
|
121
|
-
coherence gate (read-only) = Success criteria
|
|
122
|
-
-
|
|
123
|
-
- Final behavior
|
|
124
|
-
-
|
|
125
|
-
- (UI)
|
|
126
|
-
|
|
127
|
-
structured_choice(
|
|
128
|
-
Guardar → write docs/plans/PPP-plan-<slug>.md (
|
|
129
|
-
finalize: CHECKPOINT
|
|
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
130
|
```
|
|
131
131
|
|
|
132
132
|
## Convergence / exit
|
|
133
133
|
|
|
134
|
-
- **
|
|
135
|
-
-
|
|
136
|
-
- `Cerrar`
|
|
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).
|
|
137
137
|
|
|
138
|
-
> **
|
|
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.
|