@tacuchi/agent-workflow-cli 20.23.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 (76) hide show
  1. package/dist/application/context/budget-service.js +128 -0
  2. package/dist/application/context/budget-service.js.map +1 -0
  3. package/dist/application/context/bundle-root.js +41 -0
  4. package/dist/application/context/bundle-root.js.map +1 -0
  5. package/dist/application/context/manifest.js +150 -0
  6. package/dist/application/context/manifest.js.map +1 -0
  7. package/dist/application/context/measure.js +227 -0
  8. package/dist/application/context/measure.js.map +1 -0
  9. package/dist/application/context/plan-service.js +177 -0
  10. package/dist/application/context/plan-service.js.map +1 -0
  11. package/dist/cli/commands/context-budget.js +79 -0
  12. package/dist/cli/commands/context-budget.js.map +1 -0
  13. package/dist/cli/commands/context-plan.js +75 -0
  14. package/dist/cli/commands/context-plan.js.map +1 -0
  15. package/dist/cli/commands/index.js +4 -0
  16. package/dist/cli/commands/index.js.map +1 -1
  17. package/dist/cli/help-groups.js +4 -0
  18. package/dist/cli/help-groups.js.map +1 -1
  19. package/dist/cli/parser.js +4 -0
  20. package/dist/cli/parser.js.map +1 -1
  21. package/package.json +1 -1
  22. package/skills/w/SKILL.md +2 -2
  23. package/skills/w/commands/export-diagrams.md +10 -27
  24. package/skills/w/commands/export-manuals.md +13 -29
  25. package/skills/w/commands/export-reports.md +11 -27
  26. package/skills/w/commands/export-scripts.md +12 -29
  27. package/skills/w/commands/fix-git.md +21 -32
  28. package/skills/w/commands/generate-launch.md +13 -32
  29. package/skills/w/commands/persist.md +8 -29
  30. package/skills/w/commands/plan-exec.md +14 -30
  31. package/skills/w/commands/plan-new.md +11 -38
  32. package/skills/w/commands/plan-refine.md +13 -41
  33. package/skills/w/commands/quick.md +13 -20
  34. package/skills/w/commands/resume.md +17 -33
  35. package/skills/w/commands/spec-new.md +28 -69
  36. package/skills/w/commands/spec-refine.md +12 -37
  37. package/skills/w/commands/status.md +12 -19
  38. package/skills/w/commands/workspace-init.md +13 -20
  39. package/skills/w/context/MANIFEST.json +486 -0
  40. package/skills/w/harness/HARNESS.md +1 -1
  41. package/skills/w/loops/CHASSIS.md +53 -104
  42. package/skills/w/loops/CODE-POLICIES.md +4 -9
  43. package/skills/w/loops/plan-exec-loop/LOOP.md +5 -12
  44. package/skills/w/loops/plan-new-loop/LOOP.md +8 -32
  45. package/skills/w/loops/plan-refine-loop/LOOP.md +8 -36
  46. package/skills/w/loops/quick-loop/LOOP.md +4 -10
  47. package/skills/w/loops/spec-refine-loop/LOOP.md +7 -49
  48. package/skills/w/modules/ADOPTED-CONTEXT.md +10 -0
  49. package/skills/w/modules/COMPACTION.md +13 -0
  50. package/skills/w/modules/DB-RESEARCH-RULE.md +11 -0
  51. package/skills/w/modules/DB-SCRIPTS-ONLY.md +12 -0
  52. package/skills/w/modules/EXEC-DB-POLICY.md +7 -0
  53. package/skills/w/modules/EXEC-PROBE-TASKS.md +11 -0
  54. package/skills/w/modules/IDEATION-GATE.md +16 -0
  55. package/skills/w/modules/INCREMENTAL-STRATEGY.md +7 -0
  56. package/skills/w/modules/LAUNCH-DETECTION.md +26 -0
  57. package/skills/w/modules/PERSIST-ROUTING.md +16 -0
  58. package/skills/w/modules/PLAN-DESIGN-SPECS.md +12 -0
  59. package/skills/w/modules/PLAN-INPUT.md +26 -0
  60. package/skills/w/modules/PLAN-MODE.md +26 -0
  61. package/skills/w/modules/PLAN-PROBE-TASKS.md +10 -0
  62. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +7 -0
  63. package/skills/w/modules/PLAN-REFINE-KEYS.md +9 -0
  64. package/skills/w/modules/PLAN-REFINE-SPLIT.md +12 -0
  65. package/skills/w/modules/PLAN-SPLIT-GATE.md +14 -0
  66. package/skills/w/modules/PROBE.md +12 -0
  67. package/skills/w/modules/PROMPT-CONTINUITY.md +13 -0
  68. package/skills/w/modules/RECONNAISSANCE.md +48 -0
  69. package/skills/w/modules/REPLANNING.md +12 -0
  70. package/skills/w/modules/SESSION-NUMBERING.md +19 -0
  71. package/skills/w/modules/SIMULATION-LIFECYCLE.md +11 -0
  72. package/skills/w/modules/SPEC-CHANGE-SHAPE.md +37 -0
  73. package/skills/w/modules/SPEC-REFINE-KEYS.md +14 -0
  74. package/skills/w/modules/SPLIT-GATE.md +42 -0
  75. package/skills/w/modules/WORKSPACE-SCAFFOLD.md +28 -0
  76. package/skills/w/roles/ui-spec/ROLE.md +1 -1
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Use when the user asks for a scoped, direct task a fix, tweak, chore or small change that warrants no spec or plan (e.g. "fix this bug", "rename X", "tidy up Y"). Starts quick-loop with minimal ceremony; never touches docs/. If the objective exceeds a quick or the task grows, it escalates — to SPEC live (with consent), to PLAN deferred.
2
+ description: Use for a scoped, direct task that warrants no spec or plan a fix, a tweak, a chore ("fix this bug", "rename X"). Starts quick-loop with minimal ceremony; never touches docs/. Escalates when the objective exceeds a quick: to SPEC live with consent, to PLAN deferred.
3
3
  argument-hint: <prompt with the scoped task>
4
4
  allowed-tools:
5
5
  [
@@ -12,7 +12,7 @@ allowed-tools:
12
12
 
13
13
  # quick — trampoline to the lightweight loop
14
14
 
15
- For scoped, direct tasks that do not justify going through SPEC or PLAN. Creates a light session (traceability + resume) — unless the **entry size gate** escalates to SPEC before starting. Delegates to `quick-loop` (Layer 2).
15
+ Delegates to `quick-loop` (Layer 2). Creates a light session (traceability + resume) — unless the **entry size gate** escalates first.
16
16
 
17
17
  > **Hard floor — applies even if you read nothing beyond this file:**
18
18
  >
@@ -23,27 +23,20 @@ For scoped, direct tasks that do not justify going through SPEC or PLAN. Creates
23
23
 
24
24
  ## Run the loop
25
25
 
26
- `quick-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**:
26
+ 1. `aw context-plan --command quick` read exactly the documents it lists, in order.
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.
27
28
 
28
- 1. **Read** `../loops/quick-loop/LOOP.md` (inside the installed `w` skill — e.g. `~/.claude/skills/w/loops/…`).
29
- 2. **Follow** its instructions taking `$ARGUMENTS` as the task: it evaluates the size gate, creates the light session, works with minimal ceremony (git-safe), escalates if the task exceeds or grows (SPEC live / PLAN deferred), and reports.
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
- > Do not try `Skill: quick-loop` — it is not registered as a skill. The command **is** the entry; the loop is its body.
31
+ ## Two things this command never does
32
32
 
33
- ## What the loop does
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.
34
35
 
35
- - Edits code in the workspace sources.
36
- - **Adopts prior context**: analysis/conclusions already established in this conversation (e.g. via a host-native feature) are **input** — seeded into the session with `## Origin` = adopted, never re-derived or re-asked (chassis § *Adopted context*).
37
- - Minimal session artifacts (lazy DECISION, proposed commit).
38
- - **Proportional closing review gate** before proposing the single commit: re-reads the diff applying the installed ambient conventions and fixes or defers (see `../loops/quick-loop/LOOP.md` § *Sequence*).
39
- - **Never touches `docs/`** and exports nothing.
40
- - **Escalates** when complexity emerges — **entry size gate** (before creating the session) and mid-loop (many files, ≥2 sources, needs architecture, or the change is a feature/refactor). Accepting **SPEC** = **live** transition into the SPEC flow (draft via the spec-new procedure + spec-refine-loop); **PLAN** stays seeded for later. See `../loops/quick-loop/LOOP.md` § *QUICK delta*.
36
+ ## More context
41
37
 
42
- ## Plan mode
38
+ `aw context-plan --command quick --signal <s>` returns the extra documents a case needs; read exactly what it lists:
43
39
 
44
- The skill describes the changes it would apply and the files it would touch, without executing them. Escalation included: if the gate (entry or mid-loop) would fire, it describes it (options + the spec it would materialize) without writing `docs/` or starting loops.
45
-
46
- ## Resources
47
-
48
- - Loop manual: `../loops/quick-loop/LOOP.md`
49
- - Design reference: `docs/referencias/workflow-commands/quick.md`
40
+ - `db` the task reads or writes a database [`../modules/DB-SCRIPTS-ONLY.md`](../modules/DB-SCRIPTS-ONLY.md)
41
+ - `probe` — a runnable doubt has to be settled by running something → [`../modules/PROBE.md`](../modules/PROBE.md)
42
+ - `adopted` — the conversation already established the analysis → [`../modules/ADOPTED-CONTEXT.md`](../modules/ADOPTED-CONTEXT.md)
@@ -1,5 +1,5 @@
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. Backed by `aw resume`, which derives the priority, the progress and the exact re-entry command from the Workline index. An artifact argument (spec, plan or session) skips the survey. Transversal (not a flow), read-only; never touches docs/ or .workflow/.
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
3
  argument-hint: "[docs/specs/… | docs/plans/… | NNN | --code <session>]"
4
4
  allowed-tools:
5
5
  [
@@ -8,46 +8,30 @@ allowed-tools:
8
8
  ]
9
9
  ---
10
10
 
11
- # resume — pick up pending work (transversal)
11
+ # resume — pending work
12
12
 
13
- 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`: same index, but it answers *what to pick up* instead of *what exists*.
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`.** Those are internal session mechanics (reopen a session; the PostCompact payload). `aw resume` is the user-facing command.
16
-
17
- > **Hard floor applies even if you read nothing beyond this file:**
18
- >
19
- > 1. **Read-only** — never execute the proposed route, with or without an argument. The CLI hands back a command string; the user drives it.
20
- > 2. **Never re-decide** — priority, ties, the spec→plan relation and the exact command come from the CLI. Do not re-sort by date, do not associate a session to a plan by slug, do not pick a winner the CLI left tied.
21
- > 3. **Ask via structured-choice** when the CLI returns candidates, never otherwise.
22
- > 4. **Language** — user-facing output in the **user's language**.
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**.
23
19
 
24
20
  ## Run
25
21
 
26
- 1. Run `aw resume --format human`, forwarding the argument when there is one:
27
- - a doc path or number → pass it as the positional (`aw resume docs/plans/009-plan-x.md`);
28
- - a session`aw resume --code <NNN | folder>`;
29
- - nothing → no argument, and the CLI walks the pipeline.
30
- 2. **Relay the output verbatim.** It already carries the objective, the progress or checkpoint, the next pending step or blocker, and the exact command.
31
- 3. **When the CLI returns candidates**, present them as a structured-choice, one option per candidate, in the order given — the CLI declares a tie precisely because there is no correct automatic winner. Add the `flow` control. Never break the tie yourself.
32
- 4. **When it returns nothing pending**, say so and stop. Do not ask.
33
- 5. **Host context (optional).** If nothing is pending at the Workline level and the host exposes cheap host-memory ([`../harness/HARNESS.md`](../harness/HARNESS.md) § *host-memory*), you may add a short note about recent focus. Never expensive, never blocking.
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 pendingsay so and stop; cheap host-memory may add a recent-focus note, never expensive or blocking.
34
25
 
35
26
  ## What the CLI decides (do not re-derive)
36
27
 
37
- - **Priority**: spec sin refinar spec `ready-for-plan` sin plan → plan incompleto → checkpoint no asociado. Within plans, one already started outranks an untouched one.
38
- - **Ties**: same priority and same progress → candidates. Date and age never break a tie.
39
- - **The spec→plan relation**: proven by the plan's `Derived from` header, an explicit spec path in its `## Origin`, or an unambiguous `Spec NNN` there — never by slug. A plan whose provenance is unproven leaves its spec visible as still unplanned.
40
- - **The route**: `/w:spec-refine`, `/w:plan-new`, `/w:plan-exec`, or `aw session-resume --reopen`, with the path already filled in.
41
-
42
- > A plan is not finished because its boxes are ticked. `aw resume` re-enters at the first phase that is not `validada`, reports a `bloqueada` phase with its declared reason, and, when everything is green but the plan never closed, says the final validation is what remains. A plan that declares `done` over open work comes back as inconsistent — repair before implementing.
43
-
44
- ## 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`.
45
32
 
46
- Read-only already: run `aw resume --format human` and describe the proposal (and the choice it would offer), 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.
47
34
 
48
- ## Resources
35
+ ## More context
49
36
 
50
- - CLI: `aw resume` (service `resume-service` over `workline-index-service`) · sibling `aw status`
51
- - Session mechanics: `aw session-resume --code <NNN> [--reopen]` · `aw resume-summary`
52
- - Continuity rule: [`../SKILL.md`](../SKILL.md) § *Operating context*
53
- - 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 — the pending pipeline by default, the full history under detail — 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 — pass `detalle` for the full inventory)
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,29 +8,22 @@ allowed-tools:
8
8
  ]
9
9
  ---
10
10
 
11
- # status — workspace state (read-only)
11
+ # status — workspace state
12
12
 
13
- Single-pass, read-only: no loop, no sessions, writes nothing in `docs/` or `.workflow/`. **Transversal** command (belongs to no flow).
13
+ Read-only single pass: no loop, no session, no writes. Transversal.
14
14
 
15
15
  ## Run
16
16
 
17
- 1. Run `aw status --format human` — add `--detail` when the user asked for the full inventory ("detalle", "todo", "historial").
18
- 2. **Relay its output verbatim.** The CLI already selects, filters, groups and humanizes the dates; re-rendering it here is what made the two drift apart. Do not paraphrase it, do not re-sort it, do not add or drop a line.
19
- 3. **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. No cheap host memory → **omit the section silently**. Never run an expensive transcript scan and **never ask**.
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-memory append a `▸ CONTEXTO DEL HOST` section with a few recent-focus signals. Otherwise omit silently. Never scan transcripts, never ask.
20
20
 
21
- > **The default view is what is LEFT TO DO** — unrefined specs, refined specs with no plan, plans not `done`. Finished history, sessions and discarded items are still in the model; `--detail` brings them back. If the user asks about something the default hides, re-run with `--detail` instead of explaining its absence.
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 items re-run rather than explain an absence.
22
22
 
23
- > **Automation reads JSON.** Through a pipe, and with `--json` or `--format json`, `aw status` emits the same machine-readable envelope it always has. `--detail` belongs to the human projection only.
23
+ > **Automation reads JSON.** Piped or with `--json` / `--format json`, `aw status` emits its machine-readable envelope; `--detail` is human-only.
24
24
 
25
- Uninitialized workspace (`initialized: false`, everything empty) → say the folder is not an agent-workflow workspace and suggest `/w:workspace-init`.
25
+ `initialized: false`, everything empty → say the folder is not an agent-workflow workspace and suggest `/w:workspace-init`.
26
26
 
27
- ## Plan mode
27
+ ## More context
28
28
 
29
- Same as execution: `aw status --format human` is read-only. There are no changes to apply.
30
-
31
- ## Resources
32
-
33
- - CLI: `aw status` (index `workline-index-service`, projection `status-service`; dates via `humanize-es`)
34
- - Sibling: `aw resume` — what to pick up next, from the same index
35
- - Capability: `host-memory` ([`../harness/HARNESS.md`](../harness/HARNESS.md)) — cheap tier only, opportunistic, silent-omit, never asks
36
- - Design reference: `docs/referencias/workflow-skills/status.md`
29
+ `aw context-plan --command status --signal <s>` returns the extra documents a case needs; read exactly what it lists.
@@ -1,5 +1,5 @@
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
  [
@@ -10,32 +10,25 @@ allowed-tools:
10
10
 
11
11
  # workspace-init — workspace bootstrap
12
12
 
13
- 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.
14
14
 
15
- ```bash
16
- aw workspace-init --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run] --format human
17
- ```
15
+ `aw workspace-init --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run] --format human`
18
16
 
19
- > **The CLI writes; this wrapper does not.** Every file below is created by `aw workspace-init` — `Write` and `Edit` are deliberately absent from `allowed-tools`. Use `--dry-run` to show the user what would land, then re-run without it. Relay the CLI's output instead of re-rendering it.
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.
20
18
 
21
19
  ## Interactive steps
22
20
 
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.
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.
27
25
 
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.
26
+ **Idempotent** — a re-run reconciles: it keeps manual configuration and prunes the legacy scaffold.
29
27
 
30
- When done, the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick` directly.
28
+ Done the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick`.
31
29
 
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).
30
+ ## More context
33
31
 
34
- ## Plan mode
32
+ `aw context-plan --command workspace-init --signal <s>` returns the extra documents a case needs; read exactly what it lists:
35
33
 
36
- Resolves the sources and describes the minimal scaffolding it would create (and what a re-run would prune), without writing files.
37
-
38
- ## Resources
39
-
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)