@tacuchi/agent-workflow-cli 20.25.0 → 21.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.
Files changed (124) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/node-file-system.js +3 -0
  3. package/dist/adapters/node-file-system.js.map +1 -1
  4. package/dist/application/design/design-gate-service.js +246 -0
  5. package/dist/application/design/design-gate-service.js.map +1 -0
  6. package/dist/application/design/design-graph-service.js +85 -0
  7. package/dist/application/design/design-graph-service.js.map +1 -0
  8. package/dist/application/design/design-index-service.js +132 -0
  9. package/dist/application/design/design-index-service.js.map +1 -0
  10. package/dist/application/design/design-publish-service.js +488 -0
  11. package/dist/application/design/design-publish-service.js.map +1 -0
  12. package/dist/application/design/design-resolver-service.js +165 -0
  13. package/dist/application/design/design-resolver-service.js.map +1 -0
  14. package/dist/application/resume-service.js +23 -4
  15. package/dist/application/resume-service.js.map +1 -1
  16. package/dist/application/self/install-skill.js +25 -8
  17. package/dist/application/self/install-skill.js.map +1 -1
  18. package/dist/application/semantic-operation/protocol.js +18 -12
  19. package/dist/application/semantic-operation/protocol.js.map +1 -1
  20. package/dist/application/semantic-operation/publish.js +56 -9
  21. package/dist/application/semantic-operation/publish.js.map +1 -1
  22. package/dist/application/skills-resolver-service.js +19 -4
  23. package/dist/application/skills-resolver-service.js.map +1 -1
  24. package/dist/application/status-service.js +1 -0
  25. package/dist/application/status-service.js.map +1 -1
  26. package/dist/application/workline-index-service.js +6 -0
  27. package/dist/application/workline-index-service.js.map +1 -1
  28. package/dist/application/workspace-init-service.js +9 -1
  29. package/dist/application/workspace-init-service.js.map +1 -1
  30. package/dist/cli/commands/designs.js +110 -0
  31. package/dist/cli/commands/designs.js.map +1 -0
  32. package/dist/cli/commands/index.js +2 -0
  33. package/dist/cli/commands/index.js.map +1 -1
  34. package/dist/cli/commands/resume.js +8 -0
  35. package/dist/cli/commands/resume.js.map +1 -1
  36. package/dist/cli/commands/status.js +45 -0
  37. package/dist/cli/commands/status.js.map +1 -1
  38. package/dist/cli/help-groups.js +3 -0
  39. package/dist/cli/help-groups.js.map +1 -1
  40. package/dist/cli/parser.js +1 -0
  41. package/dist/cli/parser.js.map +1 -1
  42. package/dist/domain/design/artifact-body.js +223 -0
  43. package/dist/domain/design/artifact-body.js.map +1 -0
  44. package/dist/domain/design/artifact.js +606 -0
  45. package/dist/domain/design/artifact.js.map +1 -0
  46. package/dist/domain/design/baseline.js +359 -0
  47. package/dist/domain/design/baseline.js.map +1 -0
  48. package/dist/domain/design/capability.js +51 -0
  49. package/dist/domain/design/capability.js.map +1 -0
  50. package/dist/domain/design/closure.js +161 -0
  51. package/dist/domain/design/closure.js.map +1 -0
  52. package/dist/domain/design/governance.js +298 -0
  53. package/dist/domain/design/governance.js.map +1 -0
  54. package/dist/domain/design/identity.js +145 -0
  55. package/dist/domain/design/identity.js.map +1 -0
  56. package/dist/domain/design/manifest.js +552 -0
  57. package/dist/domain/design/manifest.js.map +1 -0
  58. package/dist/domain/design/maturity.js +234 -0
  59. package/dist/domain/design/maturity.js.map +1 -0
  60. package/dist/domain/design/naming.js +117 -0
  61. package/dist/domain/design/naming.js.map +1 -0
  62. package/dist/domain/design/projections.js +165 -0
  63. package/dist/domain/design/projections.js.map +1 -0
  64. package/dist/domain/design/reference.js +234 -0
  65. package/dist/domain/design/reference.js.map +1 -0
  66. package/dist/domain/design/retired.js +61 -0
  67. package/dist/domain/design/retired.js.map +1 -0
  68. package/dist/domain/design/revision.js +219 -0
  69. package/dist/domain/design/revision.js.map +1 -0
  70. package/dist/domain/design/secrets.js +86 -0
  71. package/dist/domain/design/secrets.js.map +1 -0
  72. package/dist/domain/design/validation.js +75 -0
  73. package/dist/domain/design/validation.js.map +1 -0
  74. package/dist/domain/design/yaml-subset.js +390 -0
  75. package/dist/domain/design/yaml-subset.js.map +1 -0
  76. package/dist/domain/safe-path.js +23 -0
  77. package/dist/domain/safe-path.js.map +1 -0
  78. package/dist/domain/skills.js +27 -3
  79. package/dist/domain/skills.js.map +1 -1
  80. package/package.json +1 -1
  81. package/skills/w/SKILL.md +13 -11
  82. package/skills/w/artifacts/README.md +3 -4
  83. package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +2 -2
  84. package/skills/w/commands/README.md +2 -0
  85. package/skills/w/commands/export-diagrams.md +1 -1
  86. package/skills/w/commands/export-manuals.md +1 -1
  87. package/skills/w/commands/export-reports.md +1 -1
  88. package/skills/w/commands/export-scripts.md +1 -1
  89. package/skills/w/commands/fix-git.md +1 -1
  90. package/skills/w/commands/generate-launch.md +2 -2
  91. package/skills/w/commands/persist.md +2 -2
  92. package/skills/w/commands/plan-exec.md +13 -7
  93. package/skills/w/commands/plan-new.md +8 -4
  94. package/skills/w/commands/plan-refine.md +8 -5
  95. package/skills/w/commands/quick.md +4 -4
  96. package/skills/w/commands/resume.md +2 -2
  97. package/skills/w/commands/spec-new.md +4 -4
  98. package/skills/w/commands/spec-refine.md +3 -2
  99. package/skills/w/commands/status.md +1 -1
  100. package/skills/w/commands/workspace-init.md +1 -1
  101. package/skills/w/context/MANIFEST.json +19 -8
  102. package/skills/w/harness/HARNESS.md +14 -10
  103. package/skills/w/loops/CHASSIS.md +9 -8
  104. package/skills/w/loops/CODE-POLICIES.md +22 -7
  105. package/skills/w/loops/README.md +1 -1
  106. package/skills/w/loops/plan-exec-loop/LOOP.md +127 -61
  107. package/skills/w/loops/plan-new-loop/LOOP.md +66 -70
  108. package/skills/w/loops/plan-refine-loop/LOOP.md +15 -7
  109. package/skills/w/loops/spec-refine-loop/LOOP.md +14 -12
  110. package/skills/w/modules/DESIGN-REFERENCES.md +109 -0
  111. package/skills/w/modules/PERSIST-ROUTING.md +1 -0
  112. package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +84 -0
  113. package/skills/w/roles/README.md +7 -5
  114. package/skills/w/roles/design/ROLE.md +217 -0
  115. package/skills/w/schemas/design/design-baseline.v1.schema.json +71 -0
  116. package/skills/w/schemas/design/design-manifest.v1.schema.json +322 -0
  117. package/skills/w/schemas/design/design-review.v1.schema.json +72 -0
  118. package/skills/w/schemas/design/design-revocation.v1.schema.json +54 -0
  119. package/skills/w/schemas/design/ui-flow.v1.schema.json +211 -0
  120. package/skills/w/schemas/design/ui-screen.v1.schema.json +214 -0
  121. package/skills/w/artifacts/artifacts-design/SPEC.md +0 -42
  122. package/skills/w/modules/PLAN-DESIGN-SPECS.md +0 -12
  123. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +0 -7
  124. package/skills/w/roles/ui-spec/ROLE.md +0 -147
package/skills/w/SKILL.md CHANGED
@@ -48,7 +48,7 @@ USER invokes
48
48
  │ the export-* read the artifacts
49
49
 
50
50
  docs/ ZONE — permanent, user-facing documents
51
- specs · plans (flows) · research (persist / no-flow) · scripts · manuals · diagrams · reports (export-*) · tools (ambient)
51
+ specs · plans (flows) · designs (UI Design Packages) · research (persist / no-flow) · scripts · manuals · diagrams · reports (export-*) · tools (ambient)
52
52
  ```
53
53
 
54
54
  - **Layer 1** — high level. Single-pass or starts a loop. No iteration logic.
@@ -108,7 +108,7 @@ The flows are **composable with host-native work, never exclusive**. The host is
108
108
  - `/w:spec-refine` — starts `spec-refine-loop` to refine the spec until it is `ready-for-plan`: the blocking functional decisions closed, the architecture/implementation ones declared for PLAN.
109
109
  - `/w:plan-new` — starts `plan-new-loop` to derive an executable plan from the ready spec.
110
110
  - `/w:plan-refine` — starts `plan-refine-loop` to turn the plan, in place, into an executable sequence of functional states (auxiliary, **not mandatory**); it is also the return path when execution hits a structural deviation.
111
- - `/w:plan-exec` — starts `plan-exec-loop` to execute the planned states and maintain the plan: it validates each phase before closing it, and never silently redesigns what it was given.
111
+ - `/w:plan-exec` — executes planned states in live-inferred isolated/continuous batches; continuous units validate, review and commit only at batch close.
112
112
  - `/w:quick` — starts `quick-loop` (shortcut, no `docs/`; escalates live to SPEC when the objective exceeds a quick).
113
113
  - `/w:export-scripts` · `/w:export-manuals` · `/w:export-diagrams` · `/w:export-reports` — promote artifacts to `docs/`.
114
114
 
@@ -143,16 +143,16 @@ Common: Layer 1, explicit (user-invoked, never by a loop) · single-pass, read-o
143
143
 
144
144
  ### Capability skills + `.workflow/skills.toml`
145
145
 
146
- A loop does **not** compose a concrete skill; it composes a **capability by its role** (e.g. `ui-design`). Which skill fulfills the role is decided by config, never by the loop. Swapping implementations = one config line.
146
+ A loop does **not** compose a concrete skill; it composes a **capability by its role** (e.g. `design`). Which skill fulfills the role is decided by config, never by the loop. Swapping implementations = one config line.
147
147
 
148
148
  ```toml
149
149
  [skills]
150
- ui-design = "ui-spec" # built-in default
150
+ design = "design" # built-in default
151
151
  sql = "sql"
152
152
  git = "git"
153
153
  research = "research"
154
154
  # diagrams = "off" # ← capability disabled
155
- # ui-design = "acme/figma-spec" # ← third-party skill (via skills.sh)
155
+ # design = "acme/figma-spec" # ← third-party skill (via skills.sh)
156
156
  ```
157
157
 
158
158
  **Resolution cascade**: built-in default → `~/.workflow/skills.toml` (global, machine) → `.workflow/skills.toml` (workspace). Workspace overrides global; global overrides default. Unbound role → built-in default. `off` → disabled (the loop continues without it; if it was needed, it says so or asks).
@@ -161,24 +161,26 @@ Role catalog and defaults:
161
161
 
162
162
  | Role | Default | Tier | Composed by |
163
163
  |---|---|---|---|
164
- | `ui-design` | `ui-spec` | must | `spec-refine-loop` (UI) · `plan-new-loop` / `plan-refine-loop` (design SPECs) |
164
+ | `design` | `design` | must | `spec-refine-loop` (UI) · `plan-new-loop` / `plan-refine-loop` · `plan-exec-loop` (reads, never redesigns) |
165
165
  | `sql` | `sql` | must | research · `plan-exec-loop` · `quick-loop` · `export-scripts` |
166
166
  | `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
167
167
  | `research` | `research` | should | every loop (inline capability) |
168
168
  | `diagrams` | `diagrams` | should | `export-diagrams` |
169
169
  | `overview` | `w` | should | anyone (orientation) |
170
170
 
171
+ > † **The composing loops land references, not design.** `spec-refine` keeps `## Design references` and the plan loops promote the closure they implement and pin exact roots. The retired names `ui-design` and `ui-spec` resolve to nothing — no alias, no dual-read, no migration. See [roles/README.md](roles/README.md).
172
+ >
171
173
  > **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [roles/README.md](roles/README.md).
172
174
 
173
175
  The **loop chassis** is NOT bound: it is the common engine of the 5 loops ([`loops/CHASSIS.md`](loops/CHASSIS.md), a referenced doc), not a pluggable capability.
174
176
 
175
177
  ### Harness (harness-agnostic)
176
178
 
177
- The doctrine names abstract **capabilities**, never a concrete harness tool. A single doc —`harness/HARNESS.md`— binds each capability to each harness's mechanism (Claude Code, Codex, Gemini/Antigravity, OpenCode, Crush, Warp, generic). Two principles: **capability-not-tool** (loops/commands reference the capability by name) and **progressive-enhancement** (use the harness's richest mechanism; degrade to a universal fallback when it does not exist).
179
+ The doctrine names abstract **capabilities**, never a concrete harness tool. A single doc —`harness/HARNESS.md`— binds each capability to each harness's mechanism (Claude Code, Codex, Kimi Code, Gemini/Antigravity, OpenCode, Crush, Warp/Oz, generic). Two principles: **capability-not-tool** (loops/commands reference the capability by name) and **progressive-enhancement** (use the harness's richest mechanism; degrade to a universal fallback when it does not exist).
178
180
 
179
181
  Key capabilities:
180
182
 
181
- - **structured-choice** — ask the human ≤3 content questions + 1 `flow` control. Claude Code: `AskUserQuestion`. Fallback: numbered markdown.
183
+ - **structured-choice** — ask the human ≤3 content questions + 1 `flow` control; each option has a short label and a one-sentence functional explanation/example. Use the native binding in `HARNESS.md` when the current client exposes it; otherwise use labeled markdown with `Aceptar recomendaciones`, never positional codes.
182
184
  - **compaction** — shrink the context without losing the thread; its context-pressure signal feeds the loops' self-regulation (chassis § *Compact / resume*). Claude Code: `/compact`. Fallback: `CHECKPOINT` + resume.
183
185
  - **command-invocation** · **procedure-loading** · **subagent-dispatch** (opt.) · **persistent-context** · **external-data** (MCP) · **dry-run/preview**.
184
186
 
@@ -193,14 +195,14 @@ One language per plane — never mix them:
193
195
  | Doctrine (this bundle: chassis, loops, commands, roles, exports, harness) | **English** |
194
196
  | **Section headings** of artifacts and docs (`## Requirement`, `## Completed`, …) | **English** (parse contract) |
195
197
  | Everything **user-facing**: structured-choice questions, reports, dashboards, the **content** the AI writes into artifacts and `docs/` deliverables, commit messages | **the user's language** (this product: Spanish) |
196
- | Literal option labels (`Compactar`, `Cerrar`, `Guardar plan`, …) | canonical product strings — use them **verbatim** |
198
+ | Literal option labels (`Continuar`, `Compactar`, `Cerrar`, `Aceptar recomendaciones`, `Guardar plan`, …) | canonical product strings — use them **verbatim** |
197
199
  | Domain terms (class/route/table names, e.g. the QTC fleet) | the domain's ubiquitous language (Spanish) — never translated |
198
200
 
199
201
  ### The 6 hard invariants
200
202
 
201
203
  1. **No auto-export** — loops never graduate/export to `docs/`. Only `export-*` does, explicitly.
202
- 2. **Each flow touches only its `docs/` folders** — SPEC→`specs` · PLAN→`plans` · QUICK→none · rest→`export-*`. (`docs/tools` and `docs/research` belong to no flow: `docs/tools` is written by the ambient skill `creating-tools`; `docs/research` by `/w:persist` or direct no-flow authoring.)
203
- 3. **The spec and the plan are documents** (`docs/`), not session artifacts. *(Not to be confused with the **design SPECs** `NNN-SPEC-<SLUG>.md`: **per-screen** UI design artifacts that PLAN sessions produce via the `ui-design` capability when the plan includes UI — see `artifacts/artifacts-design/`they are not the requirement-spec.)*
204
+ 2. **Each flow touches only its `docs/` folders** — SPEC→`specs` · PLAN→`plans` · QUICK→none · rest→`export-*`, **plus `docs/designs` for whichever loop composes the `design` capability** (spec-refine and the plan loops publish the package; `plan-exec` only reads it). (`docs/tools` and `docs/research` belong to no flow: `docs/tools` is written by the ambient skill `creating-tools`; `docs/research` by `/w:persist` or direct no-flow authoring.)
205
+ 3. **The spec and the plan are documents** (`docs/`), not session artifacts. *(Not to be confused with the **UI Design Package** the `design` capability produces under `docs/designs/NNN-design-<slug>/`: a durable dossier a spec **references** by baseline and digest — see [`roles/design/ROLE.md`](roles/design/ROLE.md)it is not the requirement-spec.)*
204
206
  4. **DB scripts-only** — the AI never executes DML/DDL; migrations stay in `SCRIPTS.sql` and the user applies them. Only read-only reads via MCP.
205
207
  5. **Safe git** — expected branch verified before editing; proposed commits per source; never `push`/`--amend`/`--no-verify`.
206
208
  6. **Loop chassis** — the 5 loops run the same **common engine**; each loop is an heir adding only its deltas, nothing of the engine is re-declared. Detail: `loops/CHASSIS.md`.
@@ -35,7 +35,7 @@ Sessions are created by the loops as needed — **one session per run**. The ses
35
35
 
36
36
  > **Inline research (any session):** research is **not** a session type. When any session (`refine`/`exec`/`quick`) needs to investigate, it produces research artifacts **inline**: `ANALYSIS-FILE` (optional scratchpad), `CONCLUSIONS`, and read-only `SCRIPTS.sql` (if DB). These are written into the active session — there is no separate research session.
37
37
 
38
- > **Inline design (PLAN sessions):** when the plan **includes UI**, `plan-new-loop`/`plan-refine-loop` compose the **`ui-design`** capability and produce **design SPECs** `NNN-SPEC-<SLUG>.md`, one **per screen** (`001-SPEC-MODAL-EXPORT.md`, `002-SPEC-ADMIN-DASHBOARD.md`), numbering local to the session inside their own session. The plan-doc **references** them (UI Tasks) and `plan-exec-loop` reads them as the design reference. They are **not** the requirement-spec (invariant 3): they are process artifacts. See [`artifacts-design/`](artifacts-design/).
38
+ > **Design is NOT a session artifact.** When a spec or a plan involves UI, the composed [`design`](../roles/design/ROLE.md) capability publishes a **UI Design Package** under `docs/designs/NNN-design-<slug>/` a durable dossier the spec references by baseline and digest and the plan pins by exact root. Nothing about it lives in a session. The per-screen design SPEC (`NNN-SPEC-<SLUG>.md`) that PLAN sessions used to carry is **retired and unsupported**: no loop produces or reads one, there is no importer or conversion, and presenting one as input or as a gate's evidence is rejected — the result has to be recreated from current sources. Documents already written stay exactly where they are, byte for byte.
39
39
 
40
40
  > **PLAN note (rich plan):** the plan-doc (`docs/plans/PPP-plan.md`) absorbs inline the `TECHNICAL-NOTE` level (`Solution` — summary + AS-IS → TO-BE delta + Final behavior block —, `Impacted`, `Validations`…) **and** the phased `Tasks` (`### Fn` blocks). Therefore exec sessions do **not** carry a `TECHNICAL-NOTE` or own `TASKS` artifact: the technical detail and progress live in the plan-doc (living). `TASKS` remains as an optional artifact for sessions that need their own internal breakdown.
41
41
 
@@ -53,7 +53,6 @@ Sessions are created by the loops as needed — **one session per run**. The ses
53
53
  |---|---|---|
54
54
  | [`artifacts-core/`](artifacts-core/) | common to any session | `SESSION` · `TASKS` · `CHECKPOINT` · `BACKLOG` · `SCRIPTS.sql` |
55
55
  | [`artifacts-research/`](artifacts-research/) | inline research (any session) | `ANALYSIS-FILE` · `CONCLUSIONS` |
56
- | [`artifacts-design/`](artifacts-design/) | inline design (PLAN sessions with UI) | `NNN-SPEC-<SLUG>.md` (design SPEC, one per screen) |
57
56
  | [`artifacts-exec/`](artifacts-exec/) | `exec` / `quick` session | `DECISION` · `TECHNICAL-NOTE` (schema reference; absorbed by the plan-doc) |
58
57
 
59
58
  ---
@@ -61,6 +60,6 @@ Sessions are created by the loops as needed — **one session per run**. The ses
61
60
  ## Invariants (hard rules — canonical list: [`../SKILL.md`](../SKILL.md) § *The 6 hard invariants*)
62
61
 
63
62
  1. **No auto-export**: only `export-*` promotes to `docs/`, explicitly.
64
- 2. **Each flow touches only its `docs/` folders**: SPEC→`specs` · PLAN→`plans` · QUICK→none.
65
- 3. **Spec and plan are documents**, never session artifacts. *(Design SPECs `NNN-SPEC-<SLUG>.md` are a different thing: per-screen UI artifacts of PLAN sessions — [`artifacts-design/`](artifacts-design/).)*
63
+ 2. **Each flow touches only its `docs/` folders**: SPEC→`specs` · PLAN→`plans` · QUICK→none — plus `docs/designs` for whichever loop composes `design`.
64
+ 3. **Spec and plan are documents**, never session artifacts. *(Neither is the **UI Design Package** under `docs/designs/`: a durable dossier the spec references, not the requirement-spec.)*
66
65
  4. **DB scripts-only**: never execute DML/DDL; migrations (type B) stay in `SCRIPTS.sql` and ship via `export-scripts`; only read-only queries (type A) run via MCP.
@@ -13,10 +13,10 @@
13
13
  ## Completed
14
14
  What already happened: finished phases/tasks/gaps with their outcome (ref: plan-doc `docs/plans/PPP-plan.md`, the spec's gaps, or `TASKS.md` if the session created its own split). Fold the key context a resume needs (settled decisions, discoveries) into these bullets.
15
15
 
16
- > **Implemented is not validated (exec sessions).** A phase lands here only once the plan-doc's `> Estado: validada` was flipped. Work that is written but not yet proven stays in `Pending / Next` with its validation pending — a full set of ticked tasks never promotes a phase into this section. Each closed phase records the **functional state reached** and, **only when the change carries one**, the **simulation boundary in force** — that, not the list of files touched, is what a resume actually needs.
16
+ > **Implemented is not validated (exec sessions).** A phase lands here only once the plan-doc's `> Estado: validada` was flipped. Work that is written but not yet proven stays in `Pending / Next` with its validation pending — a full set of ticked tasks never promotes a phase into this section. Continuous-batch phases move together only after their combined validation/review. Each closed phase records the **functional state reached** and, **only when the change carries one**, the **simulation boundary in force** — that, not the list of files touched, is what a resume actually needs.
17
17
 
18
18
  ## Pending / Next
19
- The intent: what remains and what comes immediately next (seeded BEFORE executing — artifact-first). A resume starts here. In exec: the next functional state being pursued, plus any blocker or deferral that keeps a phase out of `validada`. A phase left `bloqueada` states here **what is missing to validate it** — applying the migration, an environment, a third party — so the next run knows what to execute before flipping the state.
19
+ The intent: what remains and what comes immediately next (seeded BEFORE executing — artifact-first). A resume starts here. In exec, record the effective batch (`id` · `continuous|isolated` · phases), any declared-vs-live regrouping and explicit conditional commit authorization, then the next functional state. A phase left `bloqueada` states here **what is missing to validate it** — applying the migration, an environment, a third party — so the next run knows what to execute before flipping the state.
20
20
 
21
21
  ## Open questions
22
22
  Live doubts not yet resolved — the section exists only while there are any (rule 1). Deferred ones move to the session's `BACKLOG` or the flow doc's `## Open questions`.
@@ -45,3 +45,5 @@ Every `<command>.md` in this folder uses this frontmatter + body structure — t
45
45
  | `argument-hint:` | Argument signature for the user |
46
46
  | `allowed-tools:` | YAML list (typically `Bash`/`Read`/`Write`/`Edit`). Loops/exports are **read-and-followed**, not invoked with `Skill:` — so `Skill` is **not** in `allowed-tools`. |
47
47
  | Body | 1-3 orienting lines, then the invocation: **read-and-follow** the sibling loop/export doc (`LOOP.md` / `EXPORT.md`), or call the `aw` CLI; then `## Plan mode`, `## Resources` |
48
+
49
+ Every `aw context-plan` call pins `--root "${CLAUDE_PLUGIN_ROOT}/skills/w"`. Claude expands that official plugin placeholder in command content; `aw self install-skill` replaces it with the absolute installed bundle path in native and synthesized wrappers. A receipt therefore describes the same tree the host command reads, even when the globally installed CLI is a different version.
@@ -18,6 +18,6 @@ allowed-tools: ["Bash", "Read"]
18
18
 
19
19
  ## More context
20
20
 
21
- `aw context-plan --command export-diagrams --signal <s>` returns the extra documents a case needs; read exactly what it lists:
21
+ `aw context-plan --command export-diagrams --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
22
22
 
23
23
  - `authoring` — the notation or the `--engine` choice is not obvious from the material → [`../exports/export-diagrams/EXPORT.md`](../exports/export-diagrams/EXPORT.md), no longer loaded on the normal path
@@ -20,6 +20,6 @@ allowed-tools: ["Bash", "Read"]
20
20
 
21
21
  ## More context
22
22
 
23
- `aw context-plan --command export-manuals --signal <s>` returns the extra documents a case needs; read exactly what it lists:
23
+ `aw context-plan --command export-manuals --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
24
24
 
25
25
  - `authoring` — the manual's structure or audience is not obvious from the material → [`../exports/export-manuals/EXPORT.md`](../exports/export-manuals/EXPORT.md), no longer loaded on the normal path
@@ -19,6 +19,6 @@ allowed-tools: ["Bash", "Read"]
19
19
 
20
20
  ## More context
21
21
 
22
- `aw context-plan --command export-reports --signal <s>` returns the extra documents a case needs; read exactly what it lists:
22
+ `aw context-plan --command export-reports --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
23
23
 
24
24
  - `authoring` — the report's structure or audience is not obvious from the material → [`../exports/export-reports/EXPORT.md`](../exports/export-reports/EXPORT.md), no longer loaded on the normal path
@@ -19,6 +19,6 @@ allowed-tools: ["Bash", "Read"]
19
19
 
20
20
  ## More context
21
21
 
22
- `aw context-plan --command export-scripts --signal <s>` returns the extra documents a case needs; read exactly what it lists:
22
+ `aw context-plan --command export-scripts --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
23
23
 
24
24
  - `authoring` — the rollback derivation or the ordering is not obvious from the material → [`../exports/export-scripts/EXPORT.md`](../exports/export-scripts/EXPORT.md), no longer loaded on the normal path
@@ -38,4 +38,4 @@ No loop, no session, never writes `docs/`. Any git repo, workspace or not. Outpu
38
38
 
39
39
  ## More context
40
40
 
41
- `aw context-plan --command fix-git --signal <s>` returns the extra documents a case needs; read exactly what it lists.
41
+ `aw context-plan --command fix-git --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` lists the case-specific documents to read.
@@ -15,7 +15,7 @@ Single-pass, no loop, no session, **never writes `docs/`**. **Transversal** (no
15
15
  ## Run
16
16
 
17
17
  1. **Detect** — `aw generate-launch --dry-run [--source <alias>]`. Per source: `stack`, `launchable`, the detected `run` and `mode` (`interactive` | `server`).
18
- 2. **Confirm (structured-choice)** — per **launchable** source; recommended = the detected mode.
18
+ 2. **Confirm (structured-choice)** — per **launchable** source; recommended = the detected mode. Use the canonical [option shape](../loops/CHASSIS.md#structured-choice-design--batching) and [per-host binding](../harness/HARNESS.md#harness-binding-matrix).
19
19
  - **Interactive** — foreground, owns a real TTY. TUIs / REPLs / interactive CLIs.
20
20
  - **Server** — background + log window (close-to-stop). Dev servers, services.
21
21
  - **Custom command** — the user gives the exact run command (optional).
@@ -26,6 +26,6 @@ Single-pass, no loop, no session, **never writes `docs/`**. **Transversal** (no
26
26
 
27
27
  ## More context
28
28
 
29
- `aw context-plan --command generate-launch --signal <s>` returns the extra documents a case needs; read exactly what it lists:
29
+ `aw context-plan --command generate-launch --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
30
30
 
31
31
  - `detection` — the CLI's automatic detection of how to run the project was wrong or ambiguous → [`../modules/LAUNCH-DETECTION.md`](../modules/LAUNCH-DETECTION.md)
@@ -17,7 +17,7 @@ Captures **work already produced in this conversation** — with or without host
17
17
  > 1. **Adopt, don't re-derive** — single pass, **NO RESEARCH**: transcribe/organize what the conversation already established. New investigation is flow work (`spec-refine`, `quick`), never this command's.
18
18
  > 2. **You classify and write; the CLI decides everything else** — inventory, anti-duplicate, numbering, destination, authorization and the write itself belong to `aw persist`. Never write into `docs/` with a file tool here; `Write`/`Edit` are deliberately not in `allowed-tools`.
19
19
  > 3. **Never invent the number** — the `NNN` you put in the path is consultative; `apply` reassigns it inside the lock. Do not renumber it.
20
- > 4. **Confirm before writing** — classification and destination go through **structured-choice**; `apply` refuses without the digest `validate` returned. **Never creates sessions** (sessions are loop-created only).
20
+ > 4. **Confirm before writing** — classification and destination go through **structured-choice** (canonical [option shape](../loops/CHASSIS.md#structured-choice-design--batching) + [per-host binding](../harness/HARNESS.md#harness-binding-matrix)); `apply` refuses without the digest `validate` returned. **Never creates sessions** (sessions are loop-created only).
21
21
  > 5. **Language** — headings in English (parse contract); content in the **user's language**.
22
22
 
23
23
  ## Input
@@ -42,4 +42,4 @@ Requires a **workspace** (`docs/` is the managed surface). Without one → degra
42
42
 
43
43
  ## More context
44
44
 
45
- `aw context-plan --command persist --signal classification` returns the routing table — which shape goes to `docs/research/`, which becomes a spec draft, which is a plan adoption — plus the anti-duplicate rule: [`../modules/PERSIST-ROUTING.md`](../modules/PERSIST-ROUTING.md). Read exactly what it lists.
45
+ `aw context-plan --command persist --signal classification --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the routing table — which shape goes to `docs/research/`, which becomes a spec draft, which is a plan adoption — plus the anti-duplicate rule: [`../modules/PERSIST-ROUTING.md`](../modules/PERSIST-ROUTING.md). Read exactly what it lists.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when a plan is ready to implement — the real work: code edits, proposed SQL scripts, created tools. Starts or resumes plan-exec-loop over docs/plans/PPP-plan-<slug>.md, phase by phase, validating each before closing it. Git-safe (proposes commits, never push/--amend).
2
+ description: Use when a plan is ready to implement. Starts/resumes plan-exec-loop over docs/plans/PPP-plan-<slug>.md, re-inferring continuous batches and deferring their validation, review and single-per-source commits to batch close.
3
3
  argument-hint: <docs/plans/PPP-plan-<slug>.md>
4
4
  allowed-tools:
5
5
  [
@@ -12,19 +12,25 @@ allowed-tools:
12
12
 
13
13
  # plan-exec — trampoline to the execution loop
14
14
 
15
- Starts or resumes `plan-exec-loop` (Layer 2), which executes the real work phase by phase — each phase a **verifiable state of the system**, not a batch of technical chores. The plan is a living document the loop keeps updated: each `### Fn` carries its own `> Estado:` line (`pendiente` | `en ejecución` | `bloqueada` | `validada`) next to its task checkboxes.
15
+ Starts or resumes `plan-exec-loop` (Layer 2). Phases remain verifiable states; effective batches are
16
+ execution units. The loop re-infers them from live state using
17
+ [`PLAN-EXECUTION-BATCHES`](../modules/PLAN-EXECUTION-BATCHES.md), then updates each phase's
18
+ checkboxes and `> Estado:` line in the living plan.
16
19
 
17
20
  > **Hard floor — applies even if you read nothing beyond this file:**
18
21
  >
19
22
  > 1. **Session first** — create/resume the run's session before touching code: `aw session-create --type exec --name <slug>-plan-exec --objetivo "<one-line objective>"`; keep its `CHECKPOINT.md` updated (`## Completed` · `## Pending / Next`; `## Open questions` only while live doubts exist).
20
- > 2. **Git/DB** — verify each source's expected branch before editing (`aw check-branch`); commits are **proposed**, never executed without approval; **never** `push`/`--amend`/`--no-verify`; never execute DML/DDL (SQL goes to the session's `SCRIPTS.sql`).
23
+ > 2. **Git/DB** — branch-check before a batch; exactly one commit per affected source after its
24
+ > checks/review. Use one final approval unless the user explicitly pre-authorized green commits.
25
+ > Never `push`/`--amend`/`--no-verify`; DML/DDL stays in `SCRIPTS.sql`.
21
26
  > 3. **Ask, don't invent** — user-dependent decisions go through questions with a recommended option first (≤3 content questions + the `flow` control `Compactar`/`Cerrar`).
22
27
  > 4. **Language** — everything user-facing (questions, option labels, reports) goes in the **user's language**.
23
28
 
24
29
  ## Run the loop
25
30
 
26
- 1. `aw context-plan --command plan-exec` — read exactly the documents it lists, in order.
27
- 2. Follow the loop manual end to end, taking `$ARGUMENTS` as input: it checks executability on entry, executes phase by phase (git-safe, DB scripts-only), keeps the plan alive and reports.
31
+ 1. `aw context-plan --command plan-exec --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` — read exactly the documents it lists, in order.
32
+ 2. Follow it end to end: check executability, infer live batches, execute each without internal
33
+ validation pauses, then validate/review/commit at its close.
28
34
 
29
35
  > `plan-exec-loop` is **not** a skill invocable by name — it is this command's operating manual. The command **is** the entry; the loop is its body. It is **resumable**: an existing CHECKPOINT continues from there.
30
36
 
@@ -35,9 +41,9 @@ Starts or resumes `plan-exec-loop` (Layer 2), which executes the real work phase
35
41
 
36
42
  ## More context
37
43
 
38
- `aw context-plan --command plan-exec --signal <s>` returns the extra documents a case needs; read exactly what it lists:
44
+ `aw context-plan --command plan-exec --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
39
45
 
40
46
  - `db` — the plan touches a database → [`../modules/EXEC-DB-POLICY.md`](../modules/EXEC-DB-POLICY.md)
41
47
  - `probe` — a task is a PoC → [`../modules/EXEC-PROBE-TASKS.md`](../modules/EXEC-PROBE-TASKS.md)
42
48
  - `simulation` — **only when the change carries temporary behavior**, its boundary is declared and its retirement identified → [`../modules/SIMULATION-LIFECYCLE.md`](../modules/SIMULATION-LIFECYCLE.md)
43
- - `ui` — the plan references design SPECs → [`../modules/PLAN-DESIGN-SPECS.md`](../modules/PLAN-DESIGN-SPECS.md)
49
+ - `ui` — the plan pins design references → [`../modules/DESIGN-REFERENCES.md`](../modules/DESIGN-REFERENCES.md). Before implementing a task that pins one, `aw designs --plan <plan-doc>` decides: absent, altered, revoked or an applicable closure short of `handoff` **block** naming the artifact and the fix; superseded-but-intact only warns. `plan-exec` never redesigns.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when a spec is ready to become an executable plan — not to refine one (plan-refine) nor execute one (plan-exec). Starts plan-new-loop from docs/specs/NNN-spec-<slug>.md, turning the "what" into the "how". Also adopts an externally-built plan. May split into sibling plans.
2
+ description: Use when a spec is ready to become an executable plan. Starts plan-new-loop from docs/specs/NNN-spec-<slug>.md, turning the "what" into functional phases and inferred execution batches. Also adopts an external plan and may split siblings.
3
3
  argument-hint: <docs/specs/NNN-spec-<slug>.md | prompt>
4
4
  allowed-tools:
5
5
  [
@@ -23,7 +23,7 @@ SPEC → PLAN bridge. Turns the "what" (refined spec) into the "how" (plan). Del
23
23
 
24
24
  ## Run the loop
25
25
 
26
- 1. `aw context-plan --command plan-new` — read exactly the documents it lists, in order.
26
+ 1. `aw context-plan --command plan-new --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` — read exactly the documents it lists, in order.
27
27
  2. Follow the loop manual end to end, taking `$ARGUMENTS` as input (resolved per the module below): it detects state/resume, runs the gap-driven engine, manages sessions, converges and reports.
28
28
 
29
29
  > `plan-new-loop` is **not** a skill invocable by name — it is this command's operating manual. The command **is** the entry; the loop is its body.
@@ -32,11 +32,15 @@ SPEC → PLAN bridge. Turns the "what" (refined spec) into the "how" (plan). Del
32
32
 
33
33
  The plan is born with `### Fn` phases that each leave a **verifiable state of the system** — each with its `> Estado:` line, its primary evidence and its exit condition — never a list of files, classes or layers. The blocks beyond those are **conditional**: a phase with no temporary behavior gets no `Límite de simulación`, and one with nothing excluded gets no `Diferido` — a heading is never written empty to satisfy a template. The plan itself is born `> Estado: open`; only `plan-exec` closes it.
34
34
 
35
+ It also writes the complete `## Execution batches` partition from
36
+ [`PLAN-EXECUTION-BATCHES`](../modules/PLAN-EXECUTION-BATCHES.md): maximal eligible ranges are
37
+ `continuous`; the rest are one-phase `isolated` units. This is inferred, not asked.
38
+
35
39
  ## More context
36
40
 
37
- `aw context-plan --command plan-new --signal <s>` returns the extra documents a case needs; read exactly what it lists:
41
+ `aw context-plan --command plan-new --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
38
42
 
39
43
  - `input` — the argument is not plainly a `ready-for-plan` spec → [`../modules/PLAN-INPUT.md`](../modules/PLAN-INPUT.md)
40
44
  - `split` — the spec may need more than one plan → [`../modules/PLAN-SPLIT-GATE.md`](../modules/PLAN-SPLIT-GATE.md)
41
- - `ui` — the plan includes UI, so it composes `ui-design` → [`../modules/PLAN-DESIGN-SPECS.md`](../modules/PLAN-DESIGN-SPECS.md)
45
+ - `ui` — the plan includes UI: promote the closure, pin the roots → [`../modules/DESIGN-REFERENCES.md`](../modules/DESIGN-REFERENCES.md)
42
46
  - `probe` — the plan rests on a runnable unknown → [`../modules/PLAN-PROBE-TASKS.md`](../modules/PLAN-PROBE-TASKS.md)
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when a plan must become executable before running it — new requirements, scope tweaks, phases shaped as file lists, or a structural deviation returned by plan-exec. Starts plan-refine-loop, which re-shapes docs/plans/PPP-plan-<slug>.md in place into verifiable functional states.
2
+ description: Use when a plan must become executable before running it. Starts plan-refine-loop, which re-shapes docs/plans/PPP-plan-<slug>.md in place into verifiable functional states and re-infers its execution batches.
3
3
  argument-hint: <docs/plans/PPP-plan-<slug>.md>
4
4
  allowed-tools:
5
5
  [
@@ -23,19 +23,22 @@ allowed-tools:
23
23
 
24
24
  ## Run the loop
25
25
 
26
- 1. `aw context-plan --command plan-refine` — read exactly the documents it lists, in order.
26
+ 1. `aw context-plan --command plan-refine --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` — read exactly the documents it lists, in order.
27
27
  2. Follow the loop manual end to end, taking `$ARGUMENTS` as input: it detects state/resume, runs the gap-driven engine, manages sessions, converges and reports.
28
28
 
29
29
  > `plan-refine-loop` is **not** a skill invocable by name — it is this command's operating manual. The command **is** the entry; the loop is its body.
30
30
 
31
- **Expected output: an executable plan.** The loop converges on its **executability gate** — each phase a verifiable state with its evidence, its exit condition and, **only when the change carries temporary behavior**, its simulation boundary — so `plan-exec` implements it without inventing contracts, observable states, order or evidence.
31
+ **Expected output: an executable plan.** Each phase has evidence and an exit condition;
32
+ **only when the change carries temporary behavior**, it declares that boundary. The complete partition follows
33
+ [`PLAN-EXECUTION-BATCHES`](../modules/PLAN-EXECUTION-BATCHES.md), so execution need not invent or
34
+ ask about units.
32
35
 
33
36
  ## More context
34
37
 
35
- `aw context-plan --command plan-refine --signal <s>` returns the extra documents a case needs; read exactly what it lists:
38
+ `aw context-plan --command plan-refine --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
36
39
 
37
40
  - `input` — where this plan came from, and what a plan returned by `plan-exec` means → [`../modules/PLAN-INPUT.md`](../modules/PLAN-INPUT.md)
38
41
  - `resume` — a prior refinement of this plan may exist → [`../modules/PLAN-REFINE-KEYS.md`](../modules/PLAN-REFINE-KEYS.md)
39
42
  - `replan` — work already executed has to be re-planned around → [`../modules/REPLANNING.md`](../modules/REPLANNING.md)
40
43
  - `simulation` — the change carries temporary behavior, so **only when** it does, its boundary is declared → [`../modules/SIMULATION-LIFECYCLE.md`](../modules/SIMULATION-LIFECYCLE.md)
41
- - `ui` — the refine touches UI → [`../modules/PLAN-REFINE-DESIGN-SPECS.md`](../modules/PLAN-REFINE-DESIGN-SPECS.md)
44
+ - `ui` — the refine touches UI, so it revises only the artifacts it affects → [`../modules/DESIGN-REFERENCES.md`](../modules/DESIGN-REFERENCES.md)
@@ -23,19 +23,19 @@ Delegates to `quick-loop` (Layer 2). Creates a light session (traceability + res
23
23
 
24
24
  ## Run the loop
25
25
 
26
- 1. `aw context-plan --command quick` — read exactly the documents it lists, in order.
26
+ 1. `aw context-plan --command quick --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` — read exactly the documents it lists, in order.
27
27
  2. Follow the loop manual end to end, taking `$ARGUMENTS` as the task: it evaluates the size gate, creates the light session, works with minimal ceremony (git-safe), escalates if the task grows, and reports.
28
28
 
29
29
  > `quick-loop` is **not** a skill invocable by name — it is this command's operating manual. The command **is** the entry; the loop is its body.
30
30
 
31
31
  ## Two things this command never does
32
32
 
33
- - **It never touches `docs/`** and it exports nothing.
34
- - **It never re-derives what the conversation already settled.** Analysis already established here is *input*, seeded into the session with `## Origin` = adopted.
33
+ - **It never writes `docs/`** and it exports nothing. It may READ a design package; changing one escalates.
34
+ - **It never re-derives what the conversation already settled** that analysis is *input* (`## Origin` = adopted).
35
35
 
36
36
  ## More context
37
37
 
38
- `aw context-plan --command quick --signal <s>` returns the extra documents a case needs; read exactly what it lists:
38
+ `aw context-plan --command quick --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
39
39
 
40
40
  - `db` — the task reads or writes a database → [`../modules/DB-SCRIPTS-ONLY.md`](../modules/DB-SCRIPTS-ONLY.md)
41
41
  - `probe` — a runnable doubt has to be settled by running something → [`../modules/PROBE.md`](../modules/PROBE.md)
@@ -14,7 +14,7 @@ Read-only **with or without an argument**: no loop, no session, and it writes no
14
14
 
15
15
  1. **Read-only** — never run the route; the user does.
16
16
  2. **Never re-decide** — priority, ties, the spec→plan link and the command come from the CLI. No re-sort by date, no slug match, no tie broken.
17
- 3. **Ask via structured-choice** only for CLI candidates: one option each, in order, plus `flow`.
17
+ 3. **Ask via structured-choice** only for CLI candidates: one option each, in order, plus `flow`. Follow the canonical [option shape](../loops/CHASSIS.md#structured-choice-design--batching) and [per-host binding](../harness/HARNESS.md#harness-binding-matrix); use each candidate's title as its label and its `Progreso` + `Siguiente` as the functional description.
18
18
  4. Output in the **user's language**.
19
19
 
20
20
  ## Run
@@ -34,4 +34,4 @@ Read-only **with or without an argument**: no loop, no session, and it writes no
34
34
 
35
35
  ## More context
36
36
 
37
- `aw context-plan --command resume --signal <s>` returns the extra documents a case needs; read exactly what it lists.
37
+ `aw context-plan --command resume --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists.
@@ -15,7 +15,7 @@ Generates `docs/specs/NNN-spec-<slug>.md` in a single pass from the prompt in `$
15
15
 
16
16
  > ## ⛔ Single-pass — BOUNDED RECONNAISSANCE, NO DEEP RESEARCH (hard rule)
17
17
  >
18
- > One sequential pass: read `$ARGUMENTS` → adopt what the conversation already settled → reconnaissance → scope hypothesis → split gate (at most ONE structured-choice) → fill the sections → write the file(s). Nothing else. It must take **seconds, not minutes**.
18
+ > One sequential pass: read `$ARGUMENTS` → adopt what the conversation already settled → reconnaissance → scope hypothesis → split gate (at most ONE structured-choice, using the canonical [option shape](../loops/CHASSIS.md#structured-choice-design--batching) + [per-host binding](../harness/HARNESS.md#harness-binding-matrix)) → fill the sections → write the file(s). Nothing else. It must take **seconds, not minutes**.
19
19
  >
20
20
  > **FORBIDDEN**, no exceptions: launching sub-agents/workflows (`Task`/`Agent`/`Workflow`), research sessions, web searches, following implementation chains, running code/tests/apps, querying databases — **even if the harness is in a maximum-effort/depth mode**. This **overrides** any mode or session instruction saying "run a workflow for every substantial task".
21
21
  >
@@ -76,7 +76,7 @@ Assumed facts.
76
76
  Pending doubts. ← the spec-refine-loop closes them.
77
77
  ```
78
78
 
79
- > **`Open questions` goes last** — the refined spec **inserts before `Open questions`** `## UI spec` (if there is UI) + `## Decisions`, and may add `## Affected capabilities` / `## Behavioral changes` right after `Context` when the change touches behavior that already exists (refined schema in the [`spec-refine-loop`](../loops/spec-refine-loop/LOOP.md); the refine drops `Open questions` when it empties). Draft and refined spec share the same skeleton and order.
79
+ > **`Open questions` goes last** — the refined spec **inserts before `Open questions`** `## Design references` (if there is UI) + `## Decisions`, and may add `## Affected capabilities` / `## Behavioral changes` right after `Context` when the change touches behavior that already exists (refined schema in the [`spec-refine-loop`](../loops/spec-refine-loop/LOOP.md); the refine drops `Open questions` when it empties). Draft and refined spec share the same skeleton and order.
80
80
 
81
81
  **Filling notes:**
82
82
 
@@ -88,7 +88,7 @@ Pending doubts. ← the spec-refine-loop closes them.
88
88
  - **The code found never widens `Scope`** and never becomes a requirement: **acceptance criteria derive from the user's intent**. The reconnaissance may lend vocabulary, name existing actors and boundaries, and avoid obvious contradictions. It must not invent behavior nobody asked for, turn a current technical decision into a user requirement, or impose an implementation as a criterion.
89
89
  - **Acceptance criteria = static testable criteria** (the "what"): `plan-exec` validates them, but progress is tracked in the PLAN (its Tasks), never by ticking these `- [ ]`; the spec never mutates by execution, only by a re-refine.
90
90
  - **Scenarios = behavior made concrete** (uppercase GIVEN/WHEN/THEN/AND): draft them only when the prompt already describes behavior — deriving the rest is spec-refine work. A scenario earns its place only when it adds GIVEN setup or edge semantics the criterion does not capture — **never restate a criterion 1:1**.
91
- - If **UI** is involved, mention it in `Requirement`/`Context`; `## UI spec` is authored in `spec-refine` (via the `ui-design` capability). "UI unspecified" is a first-class refinement gap.
91
+ - If **UI** is involved, **record the need and stop there**: mention it in `Requirement`/`Context`. This command creates **no design package** and writes no `## Design references` — the design is composed in `spec-refine` (via the [`design`](../roles/design/ROLE.md) capability, which publishes the package the spec then references). Minting a package from a draft would pin an identity before the requirement is even closed. "UI unspecified" is a first-class refinement gap.
92
92
  - The **gaps** the loop detects = weak sections of the schema (vague Requirement, Scope without `Out`, untestable criteria, open questions, undeclared assumptions, contradictions) **+ UI unspecified** when the requirement involves UI.
93
93
  - Equivalent alternative: the user writes the draft by hand. Both paths produce the same file.
94
94
 
@@ -98,7 +98,7 @@ Pending doubts. ← the spec-refine-loop closes them.
98
98
 
99
99
  ## More context
100
100
 
101
- `aw context-plan --command spec-new --signal <s>` returns the extra documents a case needs; read exactly what it lists:
101
+ `aw context-plan --command spec-new --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
102
102
 
103
103
  - `reconnaissance` — the terrain is unfamiliar and the scope decision needs a bounded look first → [`../modules/RECONNAISSANCE.md`](../modules/RECONNAISSANCE.md)
104
104
  - `split` — the prompt may carry more than one independent outcome → [`../modules/SPLIT-GATE.md`](../modules/SPLIT-GATE.md)
@@ -25,15 +25,16 @@ Delegates to `spec-refine-loop` (Layer 2), which iterates, closes the blocking g
25
25
 
26
26
  ## Run the loop
27
27
 
28
- 1. `aw context-plan --command spec-refine` — read exactly the documents it lists, in order.
28
+ 1. `aw context-plan --command spec-refine --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` — read exactly the documents it lists, in order.
29
29
  2. Follow the loop manual end to end, taking `$ARGUMENTS` as input: it detects state/resume, runs the gap-driven engine, manages sessions, converges and reports.
30
30
 
31
31
  > `spec-refine-loop` is **not** a skill invocable by name — it is this command's operating manual. The command **is** the entry; the loop is its body.
32
32
 
33
33
  ## More context
34
34
 
35
- `aw context-plan --command spec-refine --signal <s>` returns the extra documents a case needs; read exactly what it lists:
35
+ `aw context-plan --command spec-refine --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
36
36
 
37
37
  - `shape` — the loop's change-shape gate fired and you must tell `split` from `replace` → [`../modules/SPEC-CHANGE-SHAPE.md`](../modules/SPEC-CHANGE-SHAPE.md)
38
+ - `ui` — the requirement involves UI, so the spec references a design package instead of containing one → [`../modules/DESIGN-REFERENCES.md`](../modules/DESIGN-REFERENCES.md)
38
39
  - `resume` — a prior refinement of this spec may exist → [`../modules/SPEC-REFINE-KEYS.md`](../modules/SPEC-REFINE-KEYS.md)
39
40
  - `web` — the solution space looks unexplored and the loop opens its ideation step → [`../modules/IDEATION-GATE.md`](../modules/IDEATION-GATE.md)
@@ -26,4 +26,4 @@ Read-only single pass: no loop, no session, no writes. Transversal.
26
26
 
27
27
  ## More context
28
28
 
29
- `aw context-plan --command status --signal <s>` returns the extra documents a case needs; read exactly what it lists.
29
+ `aw context-plan --command status --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists.
@@ -29,6 +29,6 @@ Done → the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick`.
29
29
 
30
30
  ## More context
31
31
 
32
- `aw context-plan --command workspace-init --signal <s>` returns the extra documents a case needs; read exactly what it lists:
32
+ `aw context-plan --command workspace-init --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` lists the case-specific documents to read:
33
33
 
34
34
  - `scaffold` — the folder already carries a workspace, or you need what init versions, ignores and prunes → [`../modules/WORKSPACE-SCAFFOLD.md`](../modules/WORKSPACE-SCAFFOLD.md)
@@ -53,6 +53,10 @@
53
53
  "signal": "db",
54
54
  "requires": "external-data"
55
55
  },
56
+ {
57
+ "path": "modules/DESIGN-REFERENCES.md",
58
+ "signal": "ui"
59
+ },
56
60
  {
57
61
  "path": "modules/COMPACTION.md",
58
62
  "signal": "compaction",
@@ -100,6 +104,10 @@
100
104
  "path": "modules/SPEC-REFINE-KEYS.md",
101
105
  "signal": "resume"
102
106
  },
107
+ {
108
+ "path": "modules/DESIGN-REFERENCES.md",
109
+ "signal": "ui"
110
+ },
103
111
  {
104
112
  "path": "modules/IDEATION-GATE.md",
105
113
  "signal": "web",
@@ -130,7 +138,12 @@
130
138
  ]
131
139
  },
132
140
  "plan-new": {
133
- "core": ["commands/plan-new.md", "loops/plan-new-loop/LOOP.md", "loops/CHASSIS.md"],
141
+ "core": [
142
+ "commands/plan-new.md",
143
+ "loops/plan-new-loop/LOOP.md",
144
+ "modules/PLAN-EXECUTION-BATCHES.md",
145
+ "loops/CHASSIS.md"
146
+ ],
134
147
  "modules": [
135
148
  {
136
149
  "path": "modules/PLAN-MODE.md",
@@ -149,7 +162,7 @@
149
162
  "signal": "split"
150
163
  },
151
164
  {
152
- "path": "modules/PLAN-DESIGN-SPECS.md",
165
+ "path": "modules/DESIGN-REFERENCES.md",
153
166
  "signal": "ui"
154
167
  },
155
168
  {
@@ -185,6 +198,7 @@
185
198
  "commands/plan-refine.md",
186
199
  "loops/plan-refine-loop/LOOP.md",
187
200
  "loops/plan-new-loop/LOOP.md",
201
+ "modules/PLAN-EXECUTION-BATCHES.md",
188
202
  "loops/CHASSIS.md"
189
203
  ],
190
204
  "modules": [
@@ -213,11 +227,7 @@
213
227
  "signal": "split"
214
228
  },
215
229
  {
216
- "path": "modules/PLAN-REFINE-DESIGN-SPECS.md",
217
- "signal": "ui"
218
- },
219
- {
220
- "path": "modules/PLAN-DESIGN-SPECS.md",
230
+ "path": "modules/DESIGN-REFERENCES.md",
221
231
  "signal": "ui"
222
232
  },
223
233
  {
@@ -260,6 +270,7 @@
260
270
  "core": [
261
271
  "commands/plan-exec.md",
262
272
  "loops/plan-exec-loop/LOOP.md",
273
+ "modules/PLAN-EXECUTION-BATCHES.md",
263
274
  "loops/CHASSIS.md",
264
275
  "loops/CODE-POLICIES.md"
265
276
  ],
@@ -296,7 +307,7 @@
296
307
  "signal": "simulation"
297
308
  },
298
309
  {
299
- "path": "modules/PLAN-DESIGN-SPECS.md",
310
+ "path": "modules/DESIGN-REFERENCES.md",
300
311
  "signal": "ui"
301
312
  },
302
313
  {