@tacuchi/agent-workflow-cli 20.22.0 → 20.24.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 (168) hide show
  1. package/dist/adapters/git-cli.js +42 -0
  2. package/dist/adapters/git-cli.js.map +1 -1
  3. package/dist/application/artifacts-service.js +5 -5
  4. package/dist/application/artifacts-service.js.map +1 -1
  5. package/dist/application/checkpoint-service.js +60 -55
  6. package/dist/application/checkpoint-service.js.map +1 -1
  7. package/dist/application/checkpoint-write-service.js +61 -66
  8. package/dist/application/checkpoint-write-service.js.map +1 -1
  9. package/dist/application/context/budget-service.js +128 -0
  10. package/dist/application/context/budget-service.js.map +1 -0
  11. package/dist/application/context/bundle-root.js +41 -0
  12. package/dist/application/context/bundle-root.js.map +1 -0
  13. package/dist/application/context/manifest.js +150 -0
  14. package/dist/application/context/manifest.js.map +1 -0
  15. package/dist/application/context/measure.js +227 -0
  16. package/dist/application/context/measure.js.map +1 -0
  17. package/dist/application/context/plan-service.js +177 -0
  18. package/dist/application/context/plan-service.js.map +1 -0
  19. package/dist/application/decisiones-service.js +5 -5
  20. package/dist/application/decisiones-service.js.map +1 -1
  21. package/dist/application/export-service.js +250 -0
  22. package/dist/application/export-service.js.map +1 -0
  23. package/dist/application/fix-git-service.js +244 -0
  24. package/dist/application/fix-git-service.js.map +1 -0
  25. package/dist/application/history-update-service.js +35 -24
  26. package/dist/application/history-update-service.js.map +1 -1
  27. package/dist/application/lifecycle-target.js +39 -0
  28. package/dist/application/lifecycle-target.js.map +1 -0
  29. package/dist/application/parsers/spec-relation.js +80 -0
  30. package/dist/application/parsers/spec-relation.js.map +1 -0
  31. package/dist/application/paths-service.js +8 -0
  32. package/dist/application/paths-service.js.map +1 -1
  33. package/dist/application/persist-service.js +285 -0
  34. package/dist/application/persist-service.js.map +1 -0
  35. package/dist/application/release-data/artifacts.js +17 -21
  36. package/dist/application/release-data/artifacts.js.map +1 -1
  37. package/dist/application/resume-service.js +184 -0
  38. package/dist/application/resume-service.js.map +1 -0
  39. package/dist/application/semantic-operation/protocol.js +247 -0
  40. package/dist/application/semantic-operation/protocol.js.map +1 -0
  41. package/dist/application/semantic-operation/publish.js +80 -0
  42. package/dist/application/semantic-operation/publish.js.map +1 -0
  43. package/dist/application/session-binding-service.js +125 -0
  44. package/dist/application/session-binding-service.js.map +1 -0
  45. package/dist/application/session-close-service.js +60 -39
  46. package/dist/application/session-close-service.js.map +1 -1
  47. package/dist/application/session-create-service.js +45 -19
  48. package/dist/application/session-create-service.js.map +1 -1
  49. package/dist/application/session-resolver.js +180 -44
  50. package/dist/application/session-resolver.js.map +1 -1
  51. package/dist/application/session-resume-service.js +39 -9
  52. package/dist/application/session-resume-service.js.map +1 -1
  53. package/dist/application/sessions-service.js +0 -2
  54. package/dist/application/sessions-service.js.map +1 -1
  55. package/dist/application/status-service.js +24 -388
  56. package/dist/application/status-service.js.map +1 -1
  57. package/dist/application/tasks-service.js +5 -5
  58. package/dist/application/tasks-service.js.map +1 -1
  59. package/dist/application/workline-index-service.js +510 -0
  60. package/dist/application/workline-index-service.js.map +1 -0
  61. package/dist/cli/commands/checkpoint-read.js +10 -6
  62. package/dist/cli/commands/checkpoint-read.js.map +1 -1
  63. package/dist/cli/commands/checkpoint-write.js +38 -11
  64. package/dist/cli/commands/checkpoint-write.js.map +1 -1
  65. package/dist/cli/commands/context-budget.js +79 -0
  66. package/dist/cli/commands/context-budget.js.map +1 -0
  67. package/dist/cli/commands/context-plan.js +75 -0
  68. package/dist/cli/commands/context-plan.js.map +1 -0
  69. package/dist/cli/commands/export.js +117 -0
  70. package/dist/cli/commands/export.js.map +1 -0
  71. package/dist/cli/commands/fix-git.js +109 -0
  72. package/dist/cli/commands/fix-git.js.map +1 -0
  73. package/dist/cli/commands/generate-launch.js +35 -3
  74. package/dist/cli/commands/generate-launch.js.map +1 -1
  75. package/dist/cli/commands/history-update.js +1 -1
  76. package/dist/cli/commands/history-update.js.map +1 -1
  77. package/dist/cli/commands/index.js +15 -0
  78. package/dist/cli/commands/index.js.map +1 -1
  79. package/dist/cli/commands/persist.js +67 -0
  80. package/dist/cli/commands/persist.js.map +1 -0
  81. package/dist/cli/commands/resume-summary.js +14 -3
  82. package/dist/cli/commands/resume-summary.js.map +1 -1
  83. package/dist/cli/commands/resume.js +73 -0
  84. package/dist/cli/commands/resume.js.map +1 -0
  85. package/dist/cli/commands/session-artifacts.js +12 -11
  86. package/dist/cli/commands/session-artifacts.js.map +1 -1
  87. package/dist/cli/commands/session-close.js +8 -7
  88. package/dist/cli/commands/session-close.js.map +1 -1
  89. package/dist/cli/commands/session-create.js +5 -1
  90. package/dist/cli/commands/session-create.js.map +1 -1
  91. package/dist/cli/commands/session-resume.js +16 -10
  92. package/dist/cli/commands/session-resume.js.map +1 -1
  93. package/dist/cli/commands/status.js +66 -2
  94. package/dist/cli/commands/status.js.map +1 -1
  95. package/dist/cli/commands/workspace-init.js +21 -2
  96. package/dist/cli/commands/workspace-init.js.map +1 -1
  97. package/dist/cli/context-id.js +133 -0
  98. package/dist/cli/context-id.js.map +1 -0
  99. package/dist/cli/help-groups.js +20 -1
  100. package/dist/cli/help-groups.js.map +1 -1
  101. package/dist/cli/main.js +44 -16
  102. package/dist/cli/main.js.map +1 -1
  103. package/dist/cli/output-mode.js +41 -0
  104. package/dist/cli/output-mode.js.map +1 -0
  105. package/dist/cli/parser.js +10 -0
  106. package/dist/cli/parser.js.map +1 -1
  107. package/dist/cli/registry.js.map +1 -1
  108. package/dist/cli/render.js +53 -0
  109. package/dist/cli/render.js.map +1 -1
  110. package/package.json +1 -1
  111. package/skills/w/SKILL.md +2 -2
  112. package/skills/w/commands/export-diagrams.md +13 -21
  113. package/skills/w/commands/export-manuals.md +15 -21
  114. package/skills/w/commands/export-reports.md +14 -21
  115. package/skills/w/commands/export-scripts.md +14 -21
  116. package/skills/w/commands/fix-git.md +24 -16
  117. package/skills/w/commands/generate-launch.md +13 -32
  118. package/skills/w/commands/persist.md +21 -77
  119. package/skills/w/commands/plan-exec.md +14 -30
  120. package/skills/w/commands/plan-new.md +11 -38
  121. package/skills/w/commands/plan-refine.md +13 -41
  122. package/skills/w/commands/quick.md +13 -20
  123. package/skills/w/commands/resume.md +19 -56
  124. package/skills/w/commands/spec-new.md +28 -69
  125. package/skills/w/commands/spec-refine.md +12 -37
  126. package/skills/w/commands/status.md +12 -55
  127. package/skills/w/commands/workspace-init.md +14 -21
  128. package/skills/w/context/MANIFEST.json +486 -0
  129. package/skills/w/harness/HARNESS.md +1 -1
  130. package/skills/w/hooks/README.md +21 -2
  131. package/skills/w/hooks/hooks.template.json +2 -2
  132. package/skills/w/loops/CHASSIS.md +53 -104
  133. package/skills/w/loops/CODE-POLICIES.md +4 -9
  134. package/skills/w/loops/plan-exec-loop/LOOP.md +5 -12
  135. package/skills/w/loops/plan-new-loop/LOOP.md +8 -32
  136. package/skills/w/loops/plan-refine-loop/LOOP.md +8 -36
  137. package/skills/w/loops/quick-loop/LOOP.md +4 -10
  138. package/skills/w/loops/spec-refine-loop/LOOP.md +7 -49
  139. package/skills/w/modules/ADOPTED-CONTEXT.md +10 -0
  140. package/skills/w/modules/COMPACTION.md +13 -0
  141. package/skills/w/modules/DB-RESEARCH-RULE.md +11 -0
  142. package/skills/w/modules/DB-SCRIPTS-ONLY.md +12 -0
  143. package/skills/w/modules/EXEC-DB-POLICY.md +7 -0
  144. package/skills/w/modules/EXEC-PROBE-TASKS.md +11 -0
  145. package/skills/w/modules/IDEATION-GATE.md +16 -0
  146. package/skills/w/modules/INCREMENTAL-STRATEGY.md +7 -0
  147. package/skills/w/modules/LAUNCH-DETECTION.md +26 -0
  148. package/skills/w/modules/PERSIST-ROUTING.md +16 -0
  149. package/skills/w/modules/PLAN-DESIGN-SPECS.md +12 -0
  150. package/skills/w/modules/PLAN-INPUT.md +26 -0
  151. package/skills/w/modules/PLAN-MODE.md +26 -0
  152. package/skills/w/modules/PLAN-PROBE-TASKS.md +10 -0
  153. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +7 -0
  154. package/skills/w/modules/PLAN-REFINE-KEYS.md +9 -0
  155. package/skills/w/modules/PLAN-REFINE-SPLIT.md +12 -0
  156. package/skills/w/modules/PLAN-SPLIT-GATE.md +14 -0
  157. package/skills/w/modules/PROBE.md +12 -0
  158. package/skills/w/modules/PROMPT-CONTINUITY.md +13 -0
  159. package/skills/w/modules/RECONNAISSANCE.md +48 -0
  160. package/skills/w/modules/REPLANNING.md +12 -0
  161. package/skills/w/modules/SESSION-NUMBERING.md +19 -0
  162. package/skills/w/modules/SIMULATION-LIFECYCLE.md +11 -0
  163. package/skills/w/modules/SPEC-CHANGE-SHAPE.md +37 -0
  164. package/skills/w/modules/SPEC-REFINE-KEYS.md +14 -0
  165. package/skills/w/modules/SPLIT-GATE.md +42 -0
  166. package/skills/w/modules/WORKSPACE-SCAFFOLD.md +28 -0
  167. package/skills/w/roles/git/ROLE.md +7 -8
  168. package/skills/w/roles/ui-spec/ROLE.md +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Use when the user asks to resume or pick up pending work — a half-done session, a spec to refine, a plan mid-execution, or work with no Workline flow at all. Composes /w:status and proposes how to continue via structured-choice routed to the right command; an artifact argument (spec, plan or session) skips the survey and gets its exact re-entry route. Transversal (not a flow), read-only; never touches docs/ or .workflow/. Backed by aw status + aw resume-summary.
3
- argument-hint: "[docs/specs/… | docs/plans/… | session NNN]"
2
+ description: Use when the user asks to resume or pick up pending work — an open session, a spec to refine, a plan mid-execution. `aw resume` derives the priority and the re-entry command. Read-only, transversal.
3
+ argument-hint: "[docs/specs/… | docs/plans/… | NNN | --code <session>]"
4
4
  allowed-tools:
5
5
  [
6
6
  "Bash",
@@ -8,67 +8,30 @@ allowed-tools:
8
8
  ]
9
9
  ---
10
10
 
11
- # resume — pick up pending work (transversal)
11
+ # resume — pending work
12
12
 
13
- Summarizes what is pending in the workspace and proposes how to continue. Single-pass, **read-only**: no loop, no session, writes nothing in `docs/` or `.workflow/`. **Transversal** command (belongs to no SPEC/PLAN/QUICK flow). The **actionable sibling of `/w:status`**: it composes the `/w:status` summary and adds a proposal layer. With an **argument** (a spec, plan or session) it skips the survey and proposes the exact re-entry route for that artifact (§ *Directed resume*). User-facing output in the user's language.
13
+ Read-only **with or without an argument**: no loop, no session, and it writes nothing in `docs/` or `.workflow/`. Sibling of `aw status`; not `aw session-resume` / `aw resume-summary` (internals).
14
14
 
15
- > **Not `aw session-resume` / `aw resume-summary` / `create_or_resume`.** Those are internal session mechanics (reopen a session, the PostCompact payload, loop resume). `/w:resume` is the **user-facing** command that *summarizes + proposes*; it never runs the pending work — it routes to the command that does.
16
-
17
- > **Hard floor applies even if you read nothing beyond this file:**
18
- >
19
- > 1. **Read-only** — never execute the pending work and never write `docs/` or `.workflow/`, **with or without an argument**. Routing means handing off to the target command; the user drives it.
20
- > 2. **Summary always, question only when pending** — without an argument, show the prioritized summary every time and ask **only** when there is at least one pending item; with an argument, the directed route (§ *Directed resume*) replaces the survey.
21
- > 3. **Ask via structured-choice** — the proposal is a structured-choice with the top ≤3 concrete options, recommendation first. Never route silently.
22
- > 4. **Language** — headings in English (parse contract); user-facing output in the **user's language**.
23
-
24
- ## Directed resume (optional argument)
25
-
26
- `$ARGUMENTS` may name an artifact: a spec (`docs/specs/NNN-spec-<slug>.md`), a plan (`docs/plans/PPP-plan-<slug>.md`) or a session (`NNN` code or `NNN-<slug>-<flow>` folder). Empty → the survey flow below (`## Run`). With an argument:
27
-
28
- 1. **Derive the slug** from the artifact name (session code `NNN` → resolve the folder via `aw sessions --state all`).
29
- 2. **Locate the candidate sessions**: `aw sessions --state all` (and `aw resume-summary --include-recent-closed` for checkpoint detail) filtered by that slug.
30
- 3. **Confirm by `## Origin`**: read the candidates' `SESSION.md` — the `## Origin` names the spec/plan the session came from; it, not the slug match, decides the association.
31
- 4. **Propose the exact route** via structured-choice, per the `## Routing` table with the artifact's path filled in (`Retomar` recommended, `Descartar`/`Cerrar` secondary). No candidate session and no clear stage → say so and fall back to the survey flow.
32
-
33
- Same hard floor: this mode **proposes** the route — it never starts the target command itself.
15
+ 1. **Read-only** never run the route; the user does.
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`.
18
+ 4. Output in the **user's language**.
34
19
 
35
20
  ## Run
36
21
 
37
- 1. **Workline level compose `/w:status`.** Read-and-follow [`status.md`](status.md) to produce the prioritized summary (it already renders `aw status` and, when available, the host-context section). Do **not** re-implement the summary. For deeper session detail, `aw resume-summary [--include-recent-closed]` gives the primary session's CHECKPOINT state, and `aw session-resume --code <NNN>` the full checkpoint of any other active or closed session.
38
- 2. **Interpret the stage marks.** Map each signal to its stage: the spec's `status` (`draft`/`refining` = SPEC work still open · `ready-for-plan` = it can go to PLAN) + `open_questions`; plan progress on **all three axes** — checkboxes (`tasks_done` / `tasks_total`), validated phases (`phases_validated` / `phases_total`) and closure (`plan_state`, with `final_validation_pending` and `blocked_phases[]`); session `checkpoint_present`. A `status` that is absent, empty or unknown reads `draft`: that work stays in SPEC and never routes to PLAN on an unreadable mark. Associate a session to its plan or spec by **slug** — there is no linkage field in the `aw status` output, so infer it from `folder` / `slug`; when precision matters, confirm by the session's `## Origin` (§ *Directed resume*).
39
- 3. **Build the prioritized pending list** fixed order: **session with CHECKPOINT > plan half-done > spec not ready > host context**.
40
- 4. **Host level (second source).** If the workline level does not explain the pending work (or no Workline flow was used), rely on the host-context already surfaced by `/w:status`; escalate it to a proposal and, only if needed, use the host-memory *deep* tier or ask the user (universal fallback: git / `docs/` signals + a question). See [`../harness/HARNESS.md`](../harness/HARNESS.md) § *host-memory*.
41
- 5. **Propose (only when ≥1 pending).** One structured-choice with the top ≤3 options by the priority order; each option **routes** to its command (table below). Every proposal carries `Retomar` (recommended) and `Descartar` / `Cerrar` (secondary).
42
- 6. **Nothing pending.** Show the `/w:status` summary and state clearly that there is nothing pending — **do not ask**.
43
-
44
- ## Routing (stage → command)
45
-
46
- Priority: **session+CHECKPOINT > plan half-done > spec not ready > host context**.
47
-
48
- > **Every box ticked is not a finished plan.** A plan with `phases_validated` below `phases_total` still has functional state to reach — work implemented, not validated — so it counts as half-done and routes to `/w:plan-exec`, which re-enters at the first phase that is not `validada`. A phase left `bloqueada` routes the same way: `/w:plan-exec` re-enters **through it** to run the validation still pending, and the plan stays open until that phase reads `validada`. A plan with `phases_total: 0` is a legacy plan (no phase marks) and is judged by its checkboxes alone.
49
-
50
- > **`plan_state` decides whether a plan is resumable at all.** Only `done` is finished; everything else routes back to `/w:plan-exec` with a different re-entry point. `final_validation_pending: true` means the phases are green but the final validation never ran — the plan re-enters **at that validation**, not at a phase. `inconsistent` means the document contradicts itself (`done` declared over open work, or an unreadable value): the re-entry is **repairing the state first**, and the proposal says so instead of pretending there is work to implement.
51
-
52
- | Pending detected | `Retomar` (recommended) | Secondary |
53
- |---|---|---|
54
- | spec not ready (`draft` / `refining`, or a `status` absent or unreadable) | `/w:spec-refine` | `Descartar` |
55
- | spec `ready-for-plan`, no plan | `/w:plan-new` | `Descartar` |
56
- | plan `open` — open checkboxes **or** phases not `validada` | `/w:plan-exec` | `Cerrar` |
57
- | plan `open` with `final_validation_pending` — everything validated, no closure | `/w:plan-exec`, from the final validation | `Cerrar` |
58
- | plan `inconsistent` — `done` over open work, or an unreadable value | `/w:plan-exec`, repairing the state first | `Cerrar` |
59
- | plan `done` | — not resumed automatically | — |
60
- | active session with CHECKPOINT | continue / reopen (`aw session-resume --reopen`) | `Cerrar` |
61
- | host context only (no workline) | best next step for what was found | `Descartar` |
22
+ 1. `aw resume --format human`. For one artifact, **pass it as the positional** (`aw resume docs/plans/009-plan-x.md` or its `NNN`); for a session, `aw resume --code <NNN | folder>`; none walks the pipeline.
23
+ 2. **Relay it verbatim.**
24
+ 3. Nothing pending say so and stop; cheap host-memory may add a recent-focus note, never expensive or blocking.
62
25
 
63
- Reuses the continuity rule of [`../SKILL.md`](../SKILL.md) § *Operating context* — it synthesizes the route from the `/w:status` summary + that rule; it does not re-implement it.
26
+ ## What the CLI decides (do not re-derive)
64
27
 
65
- ## Plan mode
28
+ - **Priority**: unrefined spec → refined spec with no plan → incomplete plan → loose checkpoint; started plans first.
29
+ - **Ties**: equal priority and progress → candidates; date never splits.
30
+ - **Spec→plan link**: the plan's `Derived from` or `## Origin`, never the slug; unproven stays unplanned.
31
+ - **The route**: `/w:spec-refine`, `/w:plan-new`, `/w:plan-exec` or `aw session-resume --reopen`.
66
32
 
67
- Read-only already: compose `/w:status`, describe the prioritized summary and the proposal it would offer (top ≤3 routed options; with an argument, the exact route it would propose), without asking or writing.
33
+ > A plan is not finished because its boxes are ticked. `aw resume` re-enters at the first phase not `validada`, names a `bloqueada` phase with its declared reason, and when the phases are green but the plan never closed, the final validation remains. A plan declaring `done` over open work comes back as inconsistent — repair first.
68
34
 
69
- ## Resources
35
+ ## More context
70
36
 
71
- - Composes: [`status.md`](status.md) (the summary) · Capability: `host-memory` ([`../harness/HARNESS.md`](../harness/HARNESS.md))
72
- - CLI: `aw status` · `aw resume-summary [--include-recent-closed]` · `aw session-resume --code <NNN> [--reopen]`
73
- - Continuity rule: [`../SKILL.md`](../SKILL.md) § *Operating context*
74
- - Design reference: `docs/referencias/workflow-skills/resume.md`
37
+ `aw context-plan --command resume --signal <s>` returns the extra documents a case needs; read exactly what it lists.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when the user wants to capture a NEW requirement, idea or wish as a spec not to refine an existing draft (that's spec-refine). Generates a specification draft (docs/specs/NNN-spec-<slug>.md) from a prompt, in a single pass: a bounded reconnaissance of the workspace sources first, then the scope decision — one spec, or several sibling specs (split gate). Step 1 of the SPEC flow; starts no loop.
2
+ description: "Use when a NEW requirement, idea or wish must be captured as a spec draft (docs/specs/NNN-spec-<slug>.md) in one pass not to refine an existing draft (that is spec-refine). Step 1 of the SPEC flow; starts no loop."
3
3
  argument-hint: <prompt with the requirement or idea>
4
4
  allowed-tools:
5
5
  [
@@ -15,60 +15,21 @@ 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
- > This command frames the user's input into the draft schema after a **single, bounded look** at the context. It is **one sequential pass**: read `$ARGUMENTS` → adopt what the conversation already settled → **reconnaissance** (see § *Bounded reconnaissance*) → scope hypothesis → (split gate: at most ONE structured-choice — see § *Split gate (multi-spec)*) → 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) → fill the sections → write the file(s). Nothing else. It must take **seconds, not minutes**.
19
19
  >
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** (e.g. ultracode/max-effort in Claude Code).
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
  >
22
- > This **overrides** any mode or session instruction saying "run a workflow for every substantial task". Those modes do **not** apply to `spec-new`: this command overrides them. If a section stays uncertain after the reconnaissance, **do not dig further** declare it under `## Open questions` or `## Assumptions` and move on.
23
- >
24
- > Deep investigation (closing gaps, mapping code, querying DB, autonomous research) is **`spec-refine`** work, not this command's.
25
-
26
- With a raw user prompt, first run the **§ Bounded reconnaissance** pass, then the **§ Split gate (multi-spec)** assessment (both below): the split offer, if any, happens **before writing anything**. Then:
27
-
28
- 1. Run `aw next-number docs/specs` (the only shell tool needed beyond the reconnaissance): it returns JSON — use the `next` field as `NNN`. This command builds the slug.
29
- 2. Derive the `<slug>`: short kebab-case from the Requirement — only `[a-z0-9-]`, ≤ ~5 words / ≤ 40 chars.
30
- 3. Create `docs/specs/NNN-spec-<slug>.md` framing `$ARGUMENTS` into the draft schema (below); the reconnaissance findings land **only** where the filling notes allow. On an accepted split: repeat steps 1-3 per part, minting immediately before each write.
31
- 4. Show the generated file(s) and the suggested next step (`/w:spec-refine docs/specs/NNN-spec-<slug>.md`).
32
-
33
- ## Bounded reconnaissance
34
-
35
- A scope decision taken from the prompt alone mistakes **technical** boundaries for **functional** ones. So, before deciding, take **one** shallow look at the terrain — enough to form a reasonable hypothesis of the functional unit, never enough to answer how it will be built.
36
-
37
- **Scope:** it runs **only on a raw user prompt** (direct invocation, or the `plan-new` mode-3 handoff). The reuse entries at the end of this file skip it: the quick escalation and the `persist` adoption arrive with their context **already established**, and adopting it is transcription, not reconnaissance (**NO RESEARCH** — chassis § *Adopted context*).
22
+ > A section still uncertain after the reconnaissance **do not dig further**: declare it under `## Open questions` or `## Assumptions` and move on. Deep investigation (closing gaps, mapping code, querying DB, autonomous research) is **`spec-refine`** work.
38
23
 
39
- One pass, in this order: **adopt** what the conversation already settled (never re-derive it), **identify** the candidate sources, **look** at their surface, **stop**.
24
+ ## Run
40
25
 
41
- - **Sources allowed** (a permission, not an obligation to read them all):
42
- - the workspace's registered sources `aw sources --no-git`, or the `WORKSPACE` block;
43
- - each candidate source's main instructions file, plus the head of its `README`;
44
- - build manifests: `package.json`, `pom.xml`, `build.gradle`, `requirements.txt`, equivalents;
45
- - a top-level directory listing per candidate source;
46
- - one or two entry points the prompt itself names, plus a handful of search hits.
47
- - **Budget: ≤5 reads + ≤3 searches.** Read a whole file only when a head or a search will not do. The ceiling is a **cap, never a target**.
48
- - **Stop at the first of these:**
49
- - the evidence already decides one spec vs sibling specs;
50
- - the next question needs a deep technical chain;
51
- - it would need running code, tests or services;
52
- - it would need an external source that is not available;
53
- - the remaining uncertainty does not block a first draft;
54
- - the digging starts answering *how it will be built* instead of *what functional unit was asked for*.
55
- - **Never:** follow a full import/call chain, run anything, query a database, search the web, or open a source the prompt gives no reason to open.
26
+ 1. **Reconnaissance** — one shallow look at the terrain before any scope decision: adopt what the conversation settled, identify the candidate sources (`aw sources --no-git`, or the `WORKSPACE` block), look at their surface, stop. **Budget: ≤5 reads + ≤3 searches** a cap, never a target. Never run code, query a database or search the web. Full rules: module `RECONNAISSANCE`.
27
+ 2. **Split gate** — before writing anything, judge whether the prompt bundles several **independent functional outcomes**. Borderline or thin evidence → **one spec, no question** (hypothesis to `## Assumptions`, doubt to `## Open questions`). Only clear signals earn the command's single structured-choice offer. Full rules: module `SPLIT-GATE`.
28
+ 3. **Number and slug** — `aw next-number docs/specs` returns JSON; use `next` as `NNN`. Derive `<slug>` from the Requirement: short kebab-case, only `[a-z0-9-]`, ≤ ~5 words / ≤ 40 chars.
29
+ 4. **Write** `docs/specs/NNN-spec-<slug>.md`, framing `$ARGUMENTS` into the draft schema below; reconnaissance findings land **only** where the filling notes allow. On an accepted split: repeat 3-4 per part, minting immediately before each write.
30
+ 5. **Report** the generated file(s) and the next step (`/w:spec-refine docs/specs/NNN-spec-<slug>.md`).
56
31
 
57
- **Scope hypothesis (internal).** The pass ends in a short judgement: functional outcome · likely sources · apparent responsibility of each · coupling · independent acceptance · recommended shape · confidence. It is **reasoning, not an artifact** never persisted, never printed verbatim. It exists so the cut is never intuitive but opaque; its only visible residue is what the filling notes admit.
58
-
59
- **Degrade safely.** A missing workspace, unreachable sources or contradictory evidence **never** block the command and **never** justify a speculative cut. Keep **one spec**, declare the assumption used, and record the uncertainty for `spec-refine`. Prefer the functional outcome the user declared over any inference drawn from the code.
60
-
61
- ## Split gate (multi-spec)
62
-
63
- Right after the reconnaissance and **before writing anything**, assess whether the prompt bundles **several independent outcomes**. The unit is the **functional outcome**, not the technical boundary: distinct repos, a frontend/backend pair, several microservices, a migration plus the code it enables — all **secondary evidence**, never on their own a reason to divide.
64
-
65
- **Divide only when each part is a result that can be refined, accepted and planned on its own** — its own purpose, its own acceptance criteria, worth delivering even if the other part is dropped. The gate fires **only on clear signals** (≥2 of: independent deliverables/goals · explicit enumeration of distinct features · different requested moments or order · users or value that do not depend on each other). Borderline, or evidence too thin to tell → **one spec, no question**: the hypothesis goes to `## Assumptions` and the doubt to `## Open questions`. It applies only to a **raw user prompt** (direct invocation, or the `plan-new` mode-3 handoff); it **never fires** on the reuse entries below — the quick escalation and the `persist` adoption arrive already scoped to one objective.
66
-
67
- - **The offer** — the command's **only** interaction: **one** structured-choice (≤2 content questions + the `flow` control; `Cerrar` = abort, nothing is written yet). The question body shows the proposed cut in the **user's language**: per part, a name + slug, a 1-line scope and the suggested order. Labels: `Dividir en varias specs` (recommended when the signals hold) | `Una sola spec`. A free-form answer adjusts the cut (merge/rename/drop parts); if one part remains, proceed as a single spec.
68
- - **The second content question** is allowed **only** for a functional ambiguity with two incompatible readings that would change the number of specs (or leave the requested outcome unidentifiable). Anything smaller — confirming an observable technology, closing an implementation detail, raising confidence from medium to high — is **not** asked: it goes to `## Assumptions` or `## Open questions`.
69
- - **On acceptance** — still single-pass: the cut comes from the prompt plus the reconnaissance already done, never from a second look. Per part, mint with `aw next-number docs/specs` **immediately before each write**, then write that draft. Numbers come out consecutive, so every sibling path is known after the first mint.
70
- - **Sibling contract**: each `## Origin` records the shared prompt + `split (part i/N)` + the **siblings by path** + the suggested order; each `## Scope` Out points to the sibling that owns the excluded part. Cross-reference by path, never by bare number.
71
- - **Report**: list the N files and suggest the next step per spec (`/w:spec-refine` on the first — each sibling refines and plans at its own moment).
32
+ Steps 1-2 run **only on a raw user prompt** (direct invocation, or the `plan-new` mode-3 handoff). The reuse entries at the end skip them: their context arrives already established, and adopting it is transcription, not investigation.
72
33
 
73
34
  ## Draft schema (`NNN-spec-<slug>.md`)
74
35
 
@@ -82,7 +43,7 @@ status: draft
82
43
  ## Origin (opt.)
83
44
  Original prompt / prior doc / reference that originated the spec
84
45
  (e.g. "adopted from host conversation" when it captures an analysis already established there;
85
- or "split (part i/N)" + sibling spec paths + suggested order — § Split gate (multi-spec)).
46
+ or "split (part i/N)" + sibling spec paths + suggested order).
86
47
 
87
48
  ## Requirement
88
49
  The what + why (brief). In the user's language.
@@ -115,31 +76,29 @@ Assumed facts.
115
76
  Pending doubts. ← the spec-refine-loop closes them.
116
77
  ```
117
78
 
118
- > **`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). Same skeleton: the draft and the refined spec share the order.
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.
119
80
 
120
81
  **Filling notes:**
121
82
 
122
- - The draft's **content** is written in the **user's language** (the schema headings stay as-is).
83
+ - The draft's **content** is written in the **user's language** (schema headings stay as-is).
123
84
  - No `Type` field — `plan-new` infers the how.
124
- - **`status: draft`** in the frontmatter is the draft's maturity mark. This command writes no other value: only the `spec-refine` gate promotes a spec to `ready-for-plan`.
125
- - `Scope` always carries `Out` (what stays out).
126
- - **Where the reconnaissance lands** — `Context`: the facts that place the request (sources apparently involved, a module's observed responsibility, the relevant technology), with **at most one path per component** as an anchor; never a technical inventory. `Assumptions`: the inferences that let the draft advance. `Open questions`: what would need walking the implementation, a human decision, or a source that is not available.
127
- - **The code found never widens `Scope`** and never becomes a requirement: **acceptance criteria derive from the user's intent**. The reconnaissance may lend the right 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.
128
- - **Acceptance criteria = static testable criteria** (the "what"): `plan-exec` validates them, but progress is tracked in the PLAN (its Tasks), never by ticking these `- [ ]` in the spec; the spec never mutates by execution, only by a re-refine.
129
- - **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, not this command's. 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**.
130
- - If **UI** is involved, mention it in `Requirement`/`Context`; the `## UI spec` is authored in `spec-refine` (via the `ui-design` capability). "UI unspecified" is a first-class refinement gap.
85
+ - **`status: draft`** is the draft's maturity mark. This command writes no other value: only the `spec-refine` gate promotes a spec to `ready-for-plan`.
86
+ - `Scope` always carries `Out`.
87
+ - **Where the reconnaissance lands** — `Context`: the facts that place the request (sources apparently involved, a module's observed responsibility, the relevant technology), **at most one path per component** as an anchor, never a technical inventory. `Assumptions`: the inferences that let the draft advance. `Open questions`: what would need walking the implementation, a human decision, or an unavailable source.
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
+ - **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
+ - **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.
131
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.
132
- - Equivalent alternative: the user creates the draft by hand. Both paths produce the same `docs/specs/NNN-spec-<slug>.md`.
93
+ - Equivalent alternative: the user writes the draft by hand. Both paths produce the same file.
133
94
 
134
- > **Reuse by escalation:** the live escalation from `/w:quick` (see [`../loops/quick-loop/LOOP.md`](../loops/quick-loop/LOOP.md) § *QUICK delta*) materializes its draft following **this same procedure** (steps 1-3: same schema, same single-pass hard rule — with **NO RESEARCH** and no reconnaissance: the objective and its context arrive adopted), with `## Origin` = "escalated from `/w:quick`" + the original prompt. No need to type `/w:spec-new`: the consent in the structured-choice equals invoking it.
95
+ > **Reuse by escalation:** the live escalation from `/w:quick` (see [`../loops/quick-loop/LOOP.md`](../loops/quick-loop/LOOP.md) § *QUICK delta*) materializes its draft with **this same procedure** (same schema, same single-pass hard rule — **NO RESEARCH**, no reconnaissance: objective and context arrive adopted), with `## Origin` = "escalated from `/w:quick`" + the original prompt. The consent in the structured-choice equals invoking this command.
135
96
  >
136
- > **Reuse by adoption:** [`/w:persist`](persist.md) (requirement-shaped content) materializes its spec draft with this same procedure, with `## Origin` = "adopted from host conversation" + attribution. Paraphrasing conclusions **already established in this conversation** is still single-pass, and needs no reconnaissance — adoption is transcription, not investigation (chassis § *Adopted context*).
137
-
138
- ## Plan mode
97
+ > **Reuse by adoption:** [`/w:persist`](persist.md) (requirement-shaped content) materializes its spec draft the same way, with `## Origin` = "adopted from host conversation" + attribution. Paraphrasing conclusions **already established in this conversation** is still single-pass and needs no reconnaissance — adoption is transcription, not investigation.
139
98
 
140
- Resolves `NNN` by reading `docs/specs/`, runs the same bounded reconnaissance (read-only in either mode) and describes the draft(s) it would generate — split gate included: it reports the proposed cut — without writing any file.
99
+ ## More context
141
100
 
142
- ## Resources
101
+ `aw context-plan --command spec-new --signal <s>` returns the extra documents a case needs; read exactly what it lists:
143
102
 
144
- - Design reference: `docs/referencias/workflow-commands/spec-new.md`
145
- - Loop that refines this draft: `../loops/spec-refine-loop/LOOP.md`
103
+ - `reconnaissance` the terrain is unfamiliar and the scope decision needs a bounded look first → [`../modules/RECONNAISSANCE.md`](../modules/RECONNAISSANCE.md)
104
+ - `split` the prompt may carry more than one independent outcome → [`../modules/SPLIT-GATE.md`](../modules/SPLIT-GATE.md)
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when a spec draft exists and needs disambiguating or completing before planning (close the blocking functional gaps, sharpen criteria, hand the technical ones to PLAN) — not for the first draft (that's spec-new). Starts or resumes the specification refinement loop (spec-refine-loop). Input: docs/specs/NNN-spec-<slug>.md (from spec-new, hand-written, or the quick escalation). Updates it in place and marks it status: ready-for-plan.
2
+ description: Use when a spec draft needs disambiguating before planning closes the blocking functional gaps and marks it status ready-for-plan. Not the first draft (that is spec-new). Starts or resumes spec-refine-loop over docs/specs/NNN-spec-<slug>.md, in place.
3
3
  argument-hint: <docs/specs/NNN-spec-<slug>.md>
4
4
  allowed-tools:
5
5
  [
@@ -12,53 +12,28 @@ allowed-tools:
12
12
 
13
13
  # spec-refine — trampoline to the refinement loop
14
14
 
15
- This command does not refine the spec itself: it delegates to `spec-refine-loop` (Layer 2), which iterates, closes the blocking gaps and leaves the spec ready for planning.
15
+ Delegates to `spec-refine-loop` (Layer 2), which iterates, closes the blocking gaps and leaves the spec ready for planning.
16
16
 
17
17
  > **Hard floor — applies even if you read nothing beyond this file:**
18
18
  >
19
19
  > 1. **Session first** — create/resume the run's session before working: `aw session-create --type refine --name <slug>-spec-refine --objetivo "<one-line objective>"`; keep its `CHECKPOINT.md` updated (`## Completed` · `## Pending / Next`; `## Open questions` only while live doubts exist).
20
20
  > 2. **Ask, don't invent** — user-dependent decisions go through questions with a recommended option first (≤3 content questions + the `flow` control `Compactar`/`Cerrar`).
21
- > 3. **Write boundary** — this flow edits only `docs/specs/…` (in place, with confirmation), stamping the spec's frontmatter `status: ready-for-plan` on save; nothing else lands in `docs/`.
21
+ > 3. **Write boundary** — this flow edits only `docs/specs/…` (in place, with confirmation), stamping `status: ready-for-plan` on save; nothing else lands in `docs/`.
22
22
  > 4. **Language** — everything user-facing (questions, option labels, the doc's content) goes in the **user's language**.
23
23
  > 5. **Converge, do not close everything** — the target is `ready-for-plan`, not a spec without unknowns: close what can change **what** gets built; hand architecture and implementation questions to `PLAN`, recorded in `## Open questions` with their destination.
24
- > 6. **Shape before gaps** — if the investigation shows the spec must be **split** or **replaced**, ask and resolve that **before** the gap questions, in its own question, and record the answer in `CHECKPOINT`. Never mix it into the gap batch.
25
-
26
- ## The two shape branches are not the same question
27
-
28
- The loop's *change-shape gate* can find that one spec is the wrong container. `split` and `replace` are different findings, so they ask different things and do different things — reusing one for the other asks about cardinality when what changed was purpose:
29
-
30
- | Finding | What it asks | What it writes |
31
- |---|---|---|
32
- | **`split`** — independent functional outcomes discovered | `Dividir en varias specs` \| `Una sola spec` | the original, rewritten reduced, **plus** one new file per extracted outcome |
33
- | **`replace`** — the purpose itself changed | `Crear una nueva spec` \| `Reformular esta spec` | `Crear` → one **new** file, this spec untouched · `Reformular` → **no new file**: this same file, same number, same path |
34
-
35
- Both branches keep the `Cerrar` control, which closes the run **without applying the change**. No file — new or overwritten — is written without confirmation.
24
+ > 6. **Shape before gaps** — if the spec must be **split** or **replaced**, ask and resolve that **before** the gap questions, in its own question, and record the answer in `CHECKPOINT`. Never mix it into the gap batch.
36
25
 
37
26
  ## Run the loop
38
27
 
39
- `spec-refine-loop` is **not** a skill invocable by name — it is this command's operating manual (a sibling doc in the bundle). **Load it and execute it end to end**:
40
-
41
- 1. **Read** `../loops/spec-refine-loop/LOOP.md` (inside the installed `w` skill — e.g. `~/.claude/skills/w/loops/…`).
42
- 2. **Follow** its instructions taking `$ARGUMENTS` as input: it detects state/resume, runs the gap-driven engine, creates and manages sessions, converges and reports.
43
-
44
- > Do not try `Skill: spec-refine-loop` — it is not registered as a skill. The command **is** the entry; the loop is its body.
45
-
46
- ## State resolution (resumable)
47
-
48
- The skill detects prior state before starting, **keying off the `CHECKPOINT`** (never the existence of a "refined" file):
49
-
50
- 1. Find the spec's refinement session under `.workflow/sessions/` and its `CHECKPOINT.md`.
51
- 2. **In progress** (a CHECKPOINT exists) → continue from the recorded progress (resolved gaps, Q&A).
52
- 3. **No progress** (no CHECKPOINT and the spec is not `status: ready-for-plan`) → start from zero reading the spec (`NNN-spec*.md`).
53
- 4. **Already ready / re-refine on demand** (no open CHECKPOINT but the spec **already declares** `status: ready-for-plan`) → **first-class operation**: while the flow stays in SPEC you can re-run this command over the same spec **as many times as needed** (new requirements, scope changes, re-reads). The loop does `create_or_resume` — it locates the existing refine session (even closed) and **reopens** it instead of duplicating — and re-refines reading the **spec itself**; on `Guardar`, edits in place with confirmation.
54
-
55
- > **Compat (legacy):** a spec with no frontmatter that carries `## Refinement decisions` (or the older `## Q&A traceability`) counts as ready — case 4 — but the mark does **not** exempt it from the gate: the re-refine runs it in full and, on `Guardar`, renames that section to `## Decisions` in the same write that stamps `status`. The `NNN-spec*.md` glob also catches old `NNN-spec.md` / `NNN-spec-refined.md` specs; re-running spec-refine edits them in place from then on.
28
+ 1. `aw context-plan --command spec-refine` read exactly the documents it lists, in order.
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.
56
30
 
57
- ## Plan mode
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.
58
32
 
59
- The skill resolves the state and describes the actions the loop would run (gaps it would close, questions it would ask), without starting the iteration.
33
+ ## More context
60
34
 
61
- ## Resources
35
+ `aw context-plan --command spec-refine --signal <s>` returns the extra documents a case needs; read exactly what it lists:
62
36
 
63
- - Loop manual: `../loops/spec-refine-loop/LOOP.md`
64
- - Design reference: `docs/referencias/workflow-commands/spec-refine.md`
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
+ - `resume` a prior refinement of this spec may exist → [`../modules/SPEC-REFINE-KEYS.md`](../modules/SPEC-REFINE-KEYS.md)
39
+ - `web` — the solution space looks unexplored and the loop opens its ideation step → [`../modules/IDEATION-GATE.md`](../modules/IDEATION-GATE.md)
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Use when the user asks "what's the state", "what got done", or "where are we". Read-only workspace dashboard what got done / what is missing / what was discarded, with dates humanized in the user's language, optionally enriched with host context when the host exposes cheap memory. Backed by `aw status`. Transversal command (not a flow); writes nothing.
3
- argument-hint: (no arguments)
2
+ description: Use when the user asks what got done, what is pending, or where the work stands. Read-only workspace dashboard: pending pipeline by default, full history under `detalle`. Backed by `aw status`; writes nothing.
3
+ argument-hint: (none — pass `detalle` for the full inventory)
4
4
  allowed-tools:
5
5
  [
6
6
  "Bash",
@@ -8,65 +8,22 @@ allowed-tools:
8
8
  ]
9
9
  ---
10
10
 
11
- # status — workspace state (read-only)
11
+ # status — workspace state
12
12
 
13
- Shows, simple and direct, the workspace state grouped as **Done / Missing / Discarded**. Single-pass, read-only: no loop, no sessions, writes nothing in `docs/` or `.workflow/`. **Transversal** command (belongs to no flow). When the host exposes cheap memory it *opportunistically* adds a host-context section — additive, never blocking, never asked.
13
+ Read-only single pass: no loop, no session, no writes. Transversal.
14
14
 
15
15
  ## Run
16
16
 
17
- 1. Run `aw status` (returns JSON; backed by `status-service`).
18
- 2. Render a readable summary from the JSON do **not** show the raw JSON. Use the `relative` field verbatim (it comes pre-humanized in the user's language — Spanish). Head it with `workspace.name`.
19
- 3. Group into three blocks (the dashboard is user-facingrender it in the user's language; the canonical Spanish labels below):
20
- - `▸ HECHO` — specs whose `status` is `ready-for-plan` (the JSON keeps `refined: true` as its boolean mirror); plans whose `plan_state` is `done`, with their progress (`tasks_done`/`tasks_total`, `progress_pct`) **and** their validated phases (`phases_validated`/`phases_total`); `closed` sessions.
21
- - `▸ FALTA` — `active` sessions; plans whose `plan_state` is `open` (pending tasks `tasks_total − tasks_done`, phases still to validate `phases_total − phases_validated`, or a final validation that never ran); plans whose `plan_state` is `inconsistent`, **naming the contradiction**; specs whose `status` is `draft` or `refining`; specs with `open_questions > 0`.
22
- - `▸ DESCARTÓ` — every item in `discarded[]` (`kind: deferred` = deferred in BACKLOG; `kind: excluded` = excluded in CHECKPOINT), with its `text`.
23
- 4. Every line ends with its relative date after ` · ` (e.g. `· ayer en la mañana`). An empty section shows `— (nada)`. Never invent data not present in the JSON.
24
- 5. **Say what blocks a phase.** Every entry of `blocked_phases[]` is rendered with its `number`, its `name` and its `blocker` — `• F3 — Persistencia real — bloqueada: falta aplicar la migración`. A `blocker: null` is a legacy block that stated no reason: render it as `bloqueada` with `motivo no declarado`, never a guess.
25
- 6. If `workspace.initialized` is `false` and everything is empty → say the folder is not an agent-workflow workspace (no `.workflow/`) and suggest `/w:workspace-init`.
26
- 7. **Host context (opportunistic, read-only).** After the dashboard, if the host exposes *cheap* host-memory (see [`../harness/HARNESS.md`](../harness/HARNESS.md) § *host-memory* — e.g. the auto-memory `MEMORY.md` on Claude Code), append a `▸ CONTEXTO DEL HOST` section with a few signals of recent focus relevant to this workspace. If there is no cheap host memory, **omit the section silently**. Never run an expensive transcript scan here and **never ask** — this is a read-only dashboard; the enrichment is additive and must not slow the default output.
17
+ 1. `aw status --format human`; `--detail` for the full inventory ("detalle", "todo", "historial").
18
+ 2. **Relay it verbatim.** The CLI already selects, groups and humanizes. Never paraphrase, re-sort, add or drop a line.
19
+ 3. **Host context, opportunistic.** Host with *cheap* host-memoryappend a `▸ CONTEXTO DEL HOST` section with a few recent-focus signals. Otherwise omit silently. Never scan transcripts, never ask.
27
20
 
28
- > **Three axes, none of them a substitute for another.** A task completed answers *what work was done* (`tasks_done`/`tasks_total`); a phase validated answers *what functional state was demonstrated* (`phases_validated`/`phases_total`); a plan closed answers *whether the whole solution was validated* (`plan_state`). `progress_pct` stays checkbox-derived it never reads the phase marks. A plan at 100% with `phases_validated: 0` is **work implemented, not validated**: report it in both blocks and say so. `phases_total: 0` means a legacy plan with no phase marks show only its checkbox progress, never a `0/0`.
21
+ > **The default view is what is LEFT TO DO**unrefined specs, refined specs with no plan, plans not `done`. `--detail` brings back history, sessions and discarded itemsre-run rather than explain an absence.
29
22
 
30
- > **`plan_state` is derived, never declared alone.** `open` (or nothing declared) keeps the plan in `▸ FALTA`, **including** a plan whose every box is ticked and every phase validated: that one carries `final_validation_pending: true` and is reported as `validación final pendiente` — the work is complete, the final validation never ran. `done` reaches `▸ HECHO` only when the counters back the declaration. `inconsistent` means the document declares `done` while tasks or phases stay open, or declares a value nobody can read: it belongs in `▸ FALTA` **with the contradiction named** (`declara done con 2 tareas abiertas`), because only a human repairs it.
23
+ > **Automation reads JSON.** Piped or with `--json` / `--format json`, `aw status` emits its machine-readable envelope; `--detail` is human-only.
31
24
 
32
- > **A blocked phase says what it waits on.** A `bloqueada` phase is the implemented-not-validated gap made explicit — every box ticked, its verification still pending — and belongs in both blocks: the work under `▸ HECHO`, the phase under `▸ FALTA` with its `> Bloqueo:` reason, so the reader knows the next action instead of only the state.
25
+ `initialized: false`, everything empty say the folder is not an agent-workflow workspace and suggest `/w:workspace-init`.
33
26
 
34
- > **The frontmatter governs spec maturity.** The spec's `status` (`draft` | `refining` | `ready-for-plan`) is the primary source, and readiness is never inferred from a section the spec happens to carry. A `status` that is absent, empty or unknown reads `draft` and the spec is reported as pending; only a spec with **no frontmatter at all** falls back to the two legacy marks (`## Refinement decisions`, `## Q&A traceability`).
27
+ ## More context
35
28
 
36
- Suggested format (plain text; user-facing labels in Spanish):
37
-
38
- ```
39
- Workspace: <name>
40
-
41
- ▸ HECHO
42
- • plan <slug> — cerrado · <done>/<total> tareas (<pct>%) · <validadas>/<fases> fases validadas · <relative>
43
- • spec <slug> — lista para plan · <relative>
44
- • <folder> (<type>) — cerrada · <relative>
45
-
46
- ▸ FALTA
47
- • <folder> (<type>) — activa · <relative>
48
- • plan <slug> — <pendientes> tareas pendientes · <sin validar> fases sin validar
49
- • plan <slug> — validación final pendiente (todo validado, sin cierre)
50
- • plan <slug> — inconsistente: declara done con <n> tareas abiertas
51
- • F3 — Persistencia real — bloqueada: falta aplicar la migración
52
- • spec <slug> — borrador · <relative>
53
- • spec <slug> — <n> preguntas abiertas
54
-
55
- ▸ DESCARTÓ
56
- • <text> (<kind>) · <relative>
57
-
58
- ▸ CONTEXTO DEL HOST (solo si hay memoria barata; se omite si no)
59
- • <foco reciente / hilo relevante>
60
- ```
61
-
62
- ## Plan mode
63
-
64
- Same as execution: run `aw status` (read-only) and show the summary. There are no changes to apply.
65
-
66
- ## Resources
67
-
68
- - CLI: `aw status` (service `status-service`; dates via `humanize-es`)
69
- - Capability: `host-memory` ([`../harness/HARNESS.md`](../harness/HARNESS.md)) — cheap tier only, opportunistic, silent-omit, never asks
70
- - Design reference: `docs/referencias/workflow-skills/status.md`
71
-
72
- > **Note:** the host-context section is an opportunistic addendum — originally `/status` was a pure `aw status` dashboard. It composes the `host-memory` capability and is purely additive (the fast dashboard is unchanged).
29
+ `aw context-plan --command status --signal <s>` returns the extra documents a case needs; read exactly what it lists.
@@ -1,41 +1,34 @@
1
1
  ---
2
- description: Use when starting Workline in a folder that has no workspace yet. Turns the current folder into an agent-workflow workspace (minimal scaffold — .workflow/sessions + skills.toml + WORKSPACE block + CLI-owned .gitignore; docs/ folders are born on demand). Replaces hub-init + project-init — no project/hub distinction. Run once before any flow; idempotent, re-running reconciles (prunes legacy empty scaffold).
2
+ description: "Use when starting Workline in a folder with no workspace yet turns it into one (minimal scaffold: sessions marker, skills.toml, WORKSPACE block, .gitignore). Run once before any flow. Backed by `aw workspace-init`."
3
3
  argument-hint: --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run]
4
4
  allowed-tools:
5
5
  [
6
6
  "Bash",
7
7
  "Read",
8
- "Write",
9
- "Edit",
10
8
  ]
11
9
  ---
12
10
 
13
11
  # workspace-init — workspace bootstrap
14
12
 
15
- Runs `aw workspace-init` to turn the current folder into a Workline workspace. A workspace has **1+ sources** (repos); "standalone" = a single source. There are no project/hub modes — the model is unified.
13
+ Turns the current folder into a Workline workspace: **1+ sources** (repos), one source = standalone. No project/hub modes.
16
14
 
17
- ```bash
18
- aw workspace-init --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run]
19
- ```
15
+ `aw workspace-init --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run] --format human`
20
16
 
21
- ## Interactive steps
22
-
23
- 1. **Detect/confirm sources** — the CLI detects the repo path(s); the user confirms aliases, paths and branches. Multiple `--source` accepted.
24
- 2. **Pick default skills** — the catalog of available capabilities (roles) is presented. Per role: `built-in default`, override to a third-party skill (`skills.sh`), or `off`. The result is written to `.workflow/skills.toml`. Config cascade: `built-in → ~/.workflow/skills.toml (global) → .workflow/skills.toml (workspace)`. The template also ships a commented `[compaction]` section — the `mode` switch for the loops' context self-regulation (`auto` is the opt-in; `confirm` is the default — chassis § *Self-regulation (proactive compaction)*).
25
- 3. **Write the MINIMAL scaffolding** — only the activation set: `.workflow/sessions/` (the marker that activates the operating context), `.workflow/skills.toml`, the `WORKSPACE` block in CLAUDE.md/AGENTS.md (sources + metadata) and the `.gitignore` policy (below). **Nothing else upfront**: each `docs/<category>` folder (`specs/`, `plans/`, `scripts/`, `manuals/`, `diagrams/`, `reports/`) is born on demand at its first numbered write — `aw next-number docs/<cat>` creates it (skills stay unchanged); launch artifacts (`.workflow/launch/<alias>/`) and `docs/logs/` are generated by the launch flow at the first launch.
26
- 4. **External sources** — for every source living OUTSIDE the workspace folder (any count, including a single external source), configures multi-root visibility (settings.local.json + config, gitignored) and reconciles sources.
17
+ > **The CLI writes; this wrapper does not** — `Write` and `Edit` are deliberately absent from `allowed-tools`. Use `--dry-run` to preview, then re-run without it. Relay the CLI's output; do not re-render it.
27
18
 
28
- **Versioning policy (CLI-owned `.gitignore`)** — init writes and owns the full set: ignored = `.workflow/sessions/` (machine-local live log), `.workflow/.lock`, `.workflow/processes.json`, `.workflow/launch/`, `docs/logs/`, and — with external sources — `.claude/settings.local.json*` / `.codex/config.toml*` (patterns cover the `.bak.<epoch>` backups). Versioned = `.workflow/skills.toml`, `docs/**` (deliverables) and `.workflow/HISTORY.md` — the durable record: `aw session-close` upserts each closed session's row there.
19
+ ## Interactive steps
29
20
 
30
- When done, the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick` directly.
21
+ 1. **Sources** the CLI detects the repo path(s); the user confirms aliases, paths, branches. Multiple `--source` accepted.
22
+ 2. **Default skills** — present the catalog of capabilities (roles). Per role: `built-in default`, a third-party skill (`skills.sh`), or `off`; the result lands in `.workflow/skills.toml`. Cascade: `built-in → ~/.workflow/skills.toml (global) → .workflow/skills.toml (workspace)`. The template also ships a commented `[compaction]` section — the `mode` switch for the loops' context self-regulation (`confirm` default, `auto` opt-in).
23
+ 3. **Minimal scaffold** — only the activation set: `.workflow/sessions/` (the marker that activates the operating context), `.workflow/skills.toml`, the `WORKSPACE` block in CLAUDE.md/AGENTS.md and the CLI-owned `.gitignore`. **Nothing else upfront**: each `docs/<category>` folder is born on demand at its first numbered write (`aw next-number docs/<cat>`); `.workflow/launch/<alias>/` and `docs/logs/` at the first launch.
24
+ 4. **External sources** — a source outside the workspace folder gets multi-root visibility (gitignored) and a reconcile.
31
25
 
32
- **Idempotent + reconcile**: re-running reconciles (no duplicate entries, no overwriting manual configuration) and **prunes the legacy upfront scaffold**: `.gitkeep`-only taxonomy folders, stray `.gitkeep` files, an empty `docs/logs/` and a released `.workflow/.lock` leftover are removed; the `.gitignore` is completed to the current set (entries merge under the existing header, never duplicated).
26
+ **Idempotent** a re-run reconciles: it keeps manual configuration and prunes the legacy scaffold.
33
27
 
34
- ## Plan mode
28
+ Done the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick`.
35
29
 
36
- Resolves the sources and describes the minimal scaffolding it would create (and what a re-run would prune), without writing files.
30
+ ## More context
37
31
 
38
- ## Resources
32
+ `aw context-plan --command workspace-init --signal <s>` returns the extra documents a case needs; read exactly what it lists:
39
33
 
40
- - Design reference: `docs/referencias/workflow-commands/workspace-init.md`
41
- - Skills config: `docs/referencias/workflow-roles/` (available capabilities/roles and the binding cascade)
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)