@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.
- package/dist/adapters/git-cli.js +42 -0
- package/dist/adapters/git-cli.js.map +1 -1
- package/dist/application/artifacts-service.js +5 -5
- package/dist/application/artifacts-service.js.map +1 -1
- package/dist/application/checkpoint-service.js +60 -55
- package/dist/application/checkpoint-service.js.map +1 -1
- package/dist/application/checkpoint-write-service.js +61 -66
- package/dist/application/checkpoint-write-service.js.map +1 -1
- package/dist/application/context/budget-service.js +128 -0
- package/dist/application/context/budget-service.js.map +1 -0
- package/dist/application/context/bundle-root.js +41 -0
- package/dist/application/context/bundle-root.js.map +1 -0
- package/dist/application/context/manifest.js +150 -0
- package/dist/application/context/manifest.js.map +1 -0
- package/dist/application/context/measure.js +227 -0
- package/dist/application/context/measure.js.map +1 -0
- package/dist/application/context/plan-service.js +177 -0
- package/dist/application/context/plan-service.js.map +1 -0
- package/dist/application/decisiones-service.js +5 -5
- package/dist/application/decisiones-service.js.map +1 -1
- package/dist/application/export-service.js +250 -0
- package/dist/application/export-service.js.map +1 -0
- package/dist/application/fix-git-service.js +244 -0
- package/dist/application/fix-git-service.js.map +1 -0
- package/dist/application/history-update-service.js +35 -24
- package/dist/application/history-update-service.js.map +1 -1
- package/dist/application/lifecycle-target.js +39 -0
- package/dist/application/lifecycle-target.js.map +1 -0
- package/dist/application/parsers/spec-relation.js +80 -0
- package/dist/application/parsers/spec-relation.js.map +1 -0
- package/dist/application/paths-service.js +8 -0
- package/dist/application/paths-service.js.map +1 -1
- package/dist/application/persist-service.js +285 -0
- package/dist/application/persist-service.js.map +1 -0
- package/dist/application/release-data/artifacts.js +17 -21
- package/dist/application/release-data/artifacts.js.map +1 -1
- package/dist/application/resume-service.js +184 -0
- package/dist/application/resume-service.js.map +1 -0
- package/dist/application/semantic-operation/protocol.js +247 -0
- package/dist/application/semantic-operation/protocol.js.map +1 -0
- package/dist/application/semantic-operation/publish.js +80 -0
- package/dist/application/semantic-operation/publish.js.map +1 -0
- package/dist/application/session-binding-service.js +125 -0
- package/dist/application/session-binding-service.js.map +1 -0
- package/dist/application/session-close-service.js +60 -39
- package/dist/application/session-close-service.js.map +1 -1
- package/dist/application/session-create-service.js +45 -19
- package/dist/application/session-create-service.js.map +1 -1
- package/dist/application/session-resolver.js +180 -44
- package/dist/application/session-resolver.js.map +1 -1
- package/dist/application/session-resume-service.js +39 -9
- package/dist/application/session-resume-service.js.map +1 -1
- package/dist/application/sessions-service.js +0 -2
- package/dist/application/sessions-service.js.map +1 -1
- package/dist/application/status-service.js +24 -388
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/tasks-service.js +5 -5
- package/dist/application/tasks-service.js.map +1 -1
- package/dist/application/workline-index-service.js +510 -0
- package/dist/application/workline-index-service.js.map +1 -0
- package/dist/cli/commands/checkpoint-read.js +10 -6
- package/dist/cli/commands/checkpoint-read.js.map +1 -1
- package/dist/cli/commands/checkpoint-write.js +38 -11
- package/dist/cli/commands/checkpoint-write.js.map +1 -1
- package/dist/cli/commands/context-budget.js +79 -0
- package/dist/cli/commands/context-budget.js.map +1 -0
- package/dist/cli/commands/context-plan.js +75 -0
- package/dist/cli/commands/context-plan.js.map +1 -0
- package/dist/cli/commands/export.js +117 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/fix-git.js +109 -0
- package/dist/cli/commands/fix-git.js.map +1 -0
- package/dist/cli/commands/generate-launch.js +35 -3
- package/dist/cli/commands/generate-launch.js.map +1 -1
- package/dist/cli/commands/history-update.js +1 -1
- package/dist/cli/commands/history-update.js.map +1 -1
- package/dist/cli/commands/index.js +15 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/persist.js +67 -0
- package/dist/cli/commands/persist.js.map +1 -0
- package/dist/cli/commands/resume-summary.js +14 -3
- package/dist/cli/commands/resume-summary.js.map +1 -1
- package/dist/cli/commands/resume.js +73 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/session-artifacts.js +12 -11
- package/dist/cli/commands/session-artifacts.js.map +1 -1
- package/dist/cli/commands/session-close.js +8 -7
- package/dist/cli/commands/session-close.js.map +1 -1
- package/dist/cli/commands/session-create.js +5 -1
- package/dist/cli/commands/session-create.js.map +1 -1
- package/dist/cli/commands/session-resume.js +16 -10
- package/dist/cli/commands/session-resume.js.map +1 -1
- package/dist/cli/commands/status.js +66 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/workspace-init.js +21 -2
- package/dist/cli/commands/workspace-init.js.map +1 -1
- package/dist/cli/context-id.js +133 -0
- package/dist/cli/context-id.js.map +1 -0
- package/dist/cli/help-groups.js +20 -1
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/main.js +44 -16
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output-mode.js +41 -0
- package/dist/cli/output-mode.js.map +1 -0
- package/dist/cli/parser.js +10 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/render.js +53 -0
- package/dist/cli/render.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +2 -2
- package/skills/w/commands/export-diagrams.md +13 -21
- package/skills/w/commands/export-manuals.md +15 -21
- package/skills/w/commands/export-reports.md +14 -21
- package/skills/w/commands/export-scripts.md +14 -21
- package/skills/w/commands/fix-git.md +24 -16
- package/skills/w/commands/generate-launch.md +13 -32
- package/skills/w/commands/persist.md +21 -77
- package/skills/w/commands/plan-exec.md +14 -30
- package/skills/w/commands/plan-new.md +11 -38
- package/skills/w/commands/plan-refine.md +13 -41
- package/skills/w/commands/quick.md +13 -20
- package/skills/w/commands/resume.md +19 -56
- package/skills/w/commands/spec-new.md +28 -69
- package/skills/w/commands/spec-refine.md +12 -37
- package/skills/w/commands/status.md +12 -55
- package/skills/w/commands/workspace-init.md +14 -21
- package/skills/w/context/MANIFEST.json +486 -0
- package/skills/w/harness/HARNESS.md +1 -1
- package/skills/w/hooks/README.md +21 -2
- package/skills/w/hooks/hooks.template.json +2 -2
- package/skills/w/loops/CHASSIS.md +53 -104
- package/skills/w/loops/CODE-POLICIES.md +4 -9
- package/skills/w/loops/plan-exec-loop/LOOP.md +5 -12
- package/skills/w/loops/plan-new-loop/LOOP.md +8 -32
- package/skills/w/loops/plan-refine-loop/LOOP.md +8 -36
- package/skills/w/loops/quick-loop/LOOP.md +4 -10
- package/skills/w/loops/spec-refine-loop/LOOP.md +7 -49
- package/skills/w/modules/ADOPTED-CONTEXT.md +10 -0
- package/skills/w/modules/COMPACTION.md +13 -0
- package/skills/w/modules/DB-RESEARCH-RULE.md +11 -0
- package/skills/w/modules/DB-SCRIPTS-ONLY.md +12 -0
- package/skills/w/modules/EXEC-DB-POLICY.md +7 -0
- package/skills/w/modules/EXEC-PROBE-TASKS.md +11 -0
- package/skills/w/modules/IDEATION-GATE.md +16 -0
- package/skills/w/modules/INCREMENTAL-STRATEGY.md +7 -0
- package/skills/w/modules/LAUNCH-DETECTION.md +26 -0
- package/skills/w/modules/PERSIST-ROUTING.md +16 -0
- package/skills/w/modules/PLAN-DESIGN-SPECS.md +12 -0
- package/skills/w/modules/PLAN-INPUT.md +26 -0
- package/skills/w/modules/PLAN-MODE.md +26 -0
- package/skills/w/modules/PLAN-PROBE-TASKS.md +10 -0
- package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +7 -0
- package/skills/w/modules/PLAN-REFINE-KEYS.md +9 -0
- package/skills/w/modules/PLAN-REFINE-SPLIT.md +12 -0
- package/skills/w/modules/PLAN-SPLIT-GATE.md +14 -0
- package/skills/w/modules/PROBE.md +12 -0
- package/skills/w/modules/PROMPT-CONTINUITY.md +13 -0
- package/skills/w/modules/RECONNAISSANCE.md +48 -0
- package/skills/w/modules/REPLANNING.md +12 -0
- package/skills/w/modules/SESSION-NUMBERING.md +19 -0
- package/skills/w/modules/SIMULATION-LIFECYCLE.md +11 -0
- package/skills/w/modules/SPEC-CHANGE-SHAPE.md +37 -0
- package/skills/w/modules/SPEC-REFINE-KEYS.md +14 -0
- package/skills/w/modules/SPLIT-GATE.md +42 -0
- package/skills/w/modules/WORKSPACE-SCAFFOLD.md +28 -0
- package/skills/w/roles/git/ROLE.md +7 -8
- 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 —
|
|
3
|
-
argument-hint: "[docs/specs/… | docs/plans/… | session
|
|
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 —
|
|
11
|
+
# resume — pending work
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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.
|
|
38
|
-
2. **
|
|
39
|
-
3.
|
|
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
|
-
|
|
26
|
+
## What the CLI decides (do not re-derive)
|
|
64
27
|
|
|
65
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
35
|
+
## More context
|
|
70
36
|
|
|
71
|
-
-
|
|
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
|
|
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
|
-
>
|
|
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**
|
|
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
|
-
>
|
|
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
|
-
|
|
24
|
+
## Run
|
|
40
25
|
|
|
41
|
-
- **
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
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
|
|
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).
|
|
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** (
|
|
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`**
|
|
125
|
-
- `Scope` always carries `Out
|
|
126
|
-
- **Where the reconnaissance lands** — `Context`: the facts that place the request (sources apparently involved, a module's observed responsibility, the relevant technology),
|
|
127
|
-
- **The code found never widens `Scope`** and never becomes a requirement: **acceptance criteria derive from the user's intent**. The reconnaissance may lend
|
|
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 `- [ ]
|
|
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
|
|
130
|
-
- If **UI** is involved, mention it in `Requirement`/`Context`;
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
99
|
+
## More context
|
|
141
100
|
|
|
142
|
-
|
|
101
|
+
`aw context-plan --command spec-new --signal <s>` returns the extra documents a case needs; read exactly what it lists:
|
|
143
102
|
|
|
144
|
-
-
|
|
145
|
-
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
33
|
+
## More context
|
|
60
34
|
|
|
61
|
-
|
|
35
|
+
`aw context-plan --command spec-refine --signal <s>` returns the extra documents a case needs; read exactly what it lists:
|
|
62
36
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
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
|
|
3
|
-
argument-hint: (
|
|
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
|
|
11
|
+
# status — workspace state
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Read-only single pass: no loop, no session, no writes. Transversal.
|
|
14
14
|
|
|
15
15
|
## Run
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
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-memory → append a `▸ CONTEXTO DEL HOST` section with a few recent-focus signals. Otherwise omit silently. Never scan transcripts, never ask.
|
|
27
20
|
|
|
28
|
-
> **
|
|
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.
|
|
29
22
|
|
|
30
|
-
>
|
|
23
|
+
> **Automation reads JSON.** Piped or with `--json` / `--format json`, `aw status` emits its machine-readable envelope; `--detail` is human-only.
|
|
31
24
|
|
|
32
|
-
|
|
25
|
+
`initialized: false`, everything empty → say the folder is not an agent-workflow workspace and suggest `/w:workspace-init`.
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
## More context
|
|
35
28
|
|
|
36
|
-
|
|
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
|
|
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
|
-
|
|
13
|
+
Turns the current folder into a Workline workspace: **1+ sources** (repos), one source = standalone. No project/hub modes.
|
|
16
14
|
|
|
17
|
-
|
|
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
|
-
|
|
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
|
-
|
|
19
|
+
## Interactive steps
|
|
29
20
|
|
|
30
|
-
|
|
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
|
|
26
|
+
**Idempotent** — a re-run reconciles: it keeps manual configuration and prunes the legacy scaffold.
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
Done → the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick`.
|
|
35
29
|
|
|
36
|
-
|
|
30
|
+
## More context
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
`aw context-plan --command workspace-init --signal <s>` returns the extra documents a case needs; read exactly what it lists:
|
|
39
33
|
|
|
40
|
-
-
|
|
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)
|