@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.
- 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/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/index.js +4 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/help-groups.js +4 -0
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/parser.js +4 -0
- package/dist/cli/parser.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +2 -2
- package/skills/w/commands/export-diagrams.md +10 -27
- package/skills/w/commands/export-manuals.md +13 -29
- package/skills/w/commands/export-reports.md +11 -27
- package/skills/w/commands/export-scripts.md +12 -29
- package/skills/w/commands/fix-git.md +21 -32
- package/skills/w/commands/generate-launch.md +13 -32
- package/skills/w/commands/persist.md +8 -29
- 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 +17 -33
- 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 -19
- package/skills/w/commands/workspace-init.md +13 -20
- package/skills/w/context/MANIFEST.json +486 -0
- package/skills/w/harness/HARNESS.md +1 -1
- 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/ui-spec/ROLE.md +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use
|
|
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
|
-
|
|
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
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
31
|
+
## Two things this command never does
|
|
32
32
|
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
+
`aw context-plan --command quick --signal <s>` returns the extra documents a case needs; read exactly what it lists:
|
|
43
39
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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 —
|
|
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 —
|
|
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 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.
|
|
27
|
-
|
|
28
|
-
|
|
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 pending → say 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
|
|
38
|
-
- **Ties**:
|
|
39
|
-
- **
|
|
40
|
-
- **The route**: `/w:spec-refine`, `/w:plan-new`, `/w:plan-exec
|
|
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
|
-
|
|
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
|
-
##
|
|
35
|
+
## More context
|
|
49
36
|
|
|
50
|
-
|
|
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
|
|
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,29 +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. **Relay
|
|
19
|
-
3. **Host context
|
|
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`.
|
|
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.**
|
|
23
|
+
> **Automation reads JSON.** Piped or with `--json` / `--format json`, `aw status` emits its machine-readable envelope; `--detail` is human-only.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
`initialized: false`, everything empty → say the folder is not an agent-workflow workspace and suggest `/w:workspace-init`.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## More context
|
|
28
28
|
|
|
29
|
-
|
|
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
|
|
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
|
-
|
|
13
|
+
Turns the current folder into a Workline workspace: **1+ sources** (repos), one source = standalone. No project/hub modes.
|
|
14
14
|
|
|
15
|
-
|
|
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
|
|
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. **
|
|
24
|
-
2. **
|
|
25
|
-
3. **
|
|
26
|
-
4. **External 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
|
-
**
|
|
26
|
+
**Idempotent** — a re-run reconciles: it keeps manual configuration and prunes the legacy scaffold.
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
Done → the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick`.
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
## More context
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
`aw context-plan --command workspace-init --signal <s>` returns the extra documents a case needs; read exactly what it lists:
|
|
35
33
|
|
|
36
|
-
|
|
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)
|