@tacuchi/agent-workflow-cli 20.6.0 → 20.8.1
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/README.md +6 -5
- package/dist/application/paths-service.js +1 -1
- package/dist/application/self/skills-manager.js +1 -1
- package/dist/application/self/skills-manager.js.map +1 -1
- package/dist/application/workspace-init-service.js +1 -1
- package/dist/cli/main.js +1 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/tui/components/focus-row.js +1 -1
- package/dist/cli/tui/components/home-header.js +1 -1
- package/dist/cli/tui/components/home-header.js.map +1 -1
- package/dist/cli/tui/components/host-admin-section.js +1 -1
- package/dist/cli/tui/components/host-admin-section.js.map +1 -1
- package/dist/cli/tui/components/tabs-config.js +1 -1
- package/dist/cli/tui/components/tabs-config.js.map +1 -1
- package/dist/cli/tui/data/workflow-content.js +3 -2
- package/dist/cli/tui/data/workflow-content.js.map +1 -1
- package/dist/cli/tui/tabs/skills-tab.js +1 -1
- package/dist/cli/tui/tabs/skills-tab.js.map +1 -1
- package/dist/cli/tui/tabs/status-tab.js +1 -1
- package/dist/cli/tui/tabs/status-tab.js.map +1 -1
- package/dist/cli/tui/tabs/workflow-tab.js +3 -3
- package/dist/cli/tui/tabs/workflow-tab.js.map +1 -1
- package/package.json +2 -2
- package/skills/w/README.md +2 -2
- package/skills/w/SKILL.md +15 -10
- package/skills/w/artifacts/README.md +3 -3
- package/skills/w/commands/README.md +3 -2
- package/skills/w/commands/fix-git.md +1 -1
- package/skills/w/commands/persist.md +101 -0
- package/skills/w/commands/plan-exec.md +3 -2
- package/skills/w/commands/plan-new.md +10 -3
- package/skills/w/commands/plan-refine.md +4 -2
- package/skills/w/commands/quick.md +2 -1
- package/skills/w/commands/spec-new.md +17 -3
- package/skills/w/commands/spec-refine.md +1 -1
- package/skills/w/commands/status.md +1 -1
- package/skills/w/commands/workspace-init.md +2 -2
- package/skills/w/exports/README.md +1 -1
- package/skills/w/harness/HARNESS.md +6 -6
- package/skills/w/loops/CHASSIS.md +25 -5
- package/skills/w/loops/CODE-POLICIES.md +1 -1
- package/skills/w/loops/plan-exec-loop/LOOP.md +14 -4
- package/skills/w/loops/plan-new-loop/LOOP.md +13 -4
- package/skills/w/loops/plan-refine-loop/LOOP.md +5 -2
- package/skills/w/loops/quick-loop/LOOP.md +7 -5
- package/skills/w/loops/spec-refine-loop/LOOP.md +8 -6
- package/skills/w/roles/README.md +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CHASSIS — the loop engine
|
|
2
2
|
|
|
3
|
-
This document is the **common engine** of the
|
|
3
|
+
This document is the **common engine** of the Workline loops: the doctrine every loop runs underneath its deltas. **It is not a skill** — it is a referenced document: every loop orders it read from its `## Inherits`, **always, before its deltas**. If you edit the engine, edit it **here** — heirs never repeat it, they only reference it.
|
|
4
4
|
|
|
5
5
|
## Heirs (canonical list)
|
|
6
6
|
|
|
@@ -69,7 +69,7 @@ The common cycle — each heir instantiates it in its `## Sequence` with its own
|
|
|
69
69
|
1. `detect_gaps(work)`, minus the *exhausted* gaps (see *Research*).
|
|
70
70
|
2. If `∅` → **convergence gate** (see *Convergence / exit*).
|
|
71
71
|
3. If there are gaps: take a batch (≤3) and **seed** `CHECKPOINT.Pending/Next` (*artifact-first*).
|
|
72
|
-
4. Resolve each gap with its **resolver** per the *ask-vs-research rule*: human (structured-choice) · inline research · a composed capability (e.g. `ui-design`).
|
|
72
|
+
4. Resolve each gap with its **resolver** per the *ask-vs-research rule*: human (structured-choice) · inline research · a probe (PoC) · a composed capability (e.g. `ui-design`).
|
|
73
73
|
5. **Integrate**, update `CHECKPOINT` → repeat.
|
|
74
74
|
|
|
75
75
|
## Internal sessions (managed) — one session per run
|
|
@@ -99,15 +99,26 @@ The **CLI owns the number**: `aw session-create` prepends a **global, sequential
|
|
|
99
99
|
|
|
100
100
|
For every gap, a single question picks the resolver:
|
|
101
101
|
|
|
102
|
+
> *"Was this already established in the current conversation?"* → **adopt it** (see *Adopted context*) — never re-ask or re-research settled conclusions.
|
|
102
103
|
> *"Can I answer this by reading the repo/data?"* → **research** (autonomous).
|
|
104
|
+
> *"Can I only answer it by RUNNING a small experiment?"* → **probe** (see *Proof of concept*).
|
|
103
105
|
> *"Does it depend on what the user wants?"* → **ask the human** (structured-choice).
|
|
104
106
|
|
|
107
|
+
## Adopted context (host as producer)
|
|
108
|
+
|
|
109
|
+
The host is not only the loop's executor — it is a legitimate **producer** of input. Conclusions **already established in the current conversation** (a host-native analysis, answers the user already gave, a plan built with the host's planner) count as **completed research**: on entry, **adopt** them — seed `SESSION.Objective`/`Success criteria`, reference them in `CONCLUSIONS`, record provenance (`## Origin` = adopted from the host conversation) — never re-derive or re-ask them.
|
|
110
|
+
|
|
111
|
+
- Adoption is **transcription, not trust**: the convergence gate still verifies adopted conclusions (*gate integrity*); anti-duplicate still applies.
|
|
112
|
+
- Materialization pattern = the quick escalation's (single-pass, **NO RESEARCH**), inverted: **host → flow**.
|
|
113
|
+
- Gap signals already resolved by adopted context do **not** fire (e.g. "ambiguous requirements" after a host pre-analysis).
|
|
114
|
+
- To persist finished work without a loop: [`/w:persist`](../commands/persist.md) (transversal).
|
|
115
|
+
|
|
105
116
|
## Research: autonomy, scope & failure
|
|
106
117
|
|
|
107
118
|
Investigation is **inline**: an activity **inside the run's current session**, never a separate session. It writes its artifacts (`ANALYSIS-FILE` → `CONCLUSIONS`, + read-only `SCRIPTS.sql` if it queries DB) into the **session's own folder**.
|
|
108
119
|
|
|
109
120
|
- **Autonomous**: the AI investigates inline and reports **without asking permission**. The human learns of it at integration time (in the flow's decision record — e.g. `## Refinement decisions` in the refine loops, `DECISION` in the code-editing ones) and keeps control via the `flow` control.
|
|
110
|
-
- **Scope**: workspace + associated repos (sources) + DB MCPs.
|
|
121
|
+
- **Scope**: the current conversation (*adopted context* — settled conclusions are reused, never re-derived) + workspace + associated repos (sources) + DB MCPs.
|
|
111
122
|
- **DB rule** (the single exception to autonomy):
|
|
112
123
|
1. **MCP choice**: if the gap needs DB and there is **>1 candidate MCP with no configured default**, the AI asks which one to use. That question goes through the **same structured-choice** as a **content question** (counts inside the ≤3 + `flow` limit), **before** running queries. A single MCP or a default → no question.
|
|
113
124
|
2. Write the queries **first** into the session's `SCRIPTS.sql`.
|
|
@@ -117,6 +128,15 @@ Investigation is **inline**: an activity **inside the run's current session**, n
|
|
|
117
128
|
- The loop **degrades** the gap: to a **human question** (next batch → the flow's Q&A record: `Q&A traceability` in refine loops, `DECISION` in code-editing ones) or, failing that, **defers** it to the flow doc's `## Open questions` (spec/plan) — or the session's `BACKLOG` when the flow has no doc (quick).
|
|
118
129
|
- The gap is marked **"already tried via research"** (`attempts[gap]++`, `MAX` cap) so `detect_gaps` does **not** re-fire it in a loop → guarantees convergence.
|
|
119
130
|
|
|
131
|
+
## Proof of concept (probe)
|
|
132
|
+
|
|
133
|
+
A **probe** (PoC / spike) is the resolver for **executable doubt**: research *reads*, a probe *runs* — an **atomic, throwaway-by-default** experiment answering **one falsifiable question** (does this connection / SDK / UI behavior work as assumed?). De-risk atomic parts **early**, never everything at the end.
|
|
134
|
+
|
|
135
|
+
- **When**: risky assumption + not answerable by reading + failure would invalidate downstream work. Proposed via **structured-choice**.
|
|
136
|
+
- **Lifecycle** (verification-first applies to the probe): seed question + pass/fail check **BEFORE** → run minimal → verdict in `CONCLUSIONS` (consequences → `DECISION`) → **discard** or promote to a real task/test.
|
|
137
|
+
- **Isolation**: probe code lives in the **session folder** (gitignored) — never the source tree, **never committed**; DB probes are read-only (never DDL/DML).
|
|
138
|
+
- A **failed probe is a finding, not a failure** — report it; the human decides if the plan reshapes.
|
|
139
|
+
|
|
120
140
|
## Structured-choice (design & batching)
|
|
121
141
|
|
|
122
142
|
**Canonical rule (single source — the rest of the corpus only references it):** *structured-choice* = **≤3 content questions + 1 `flow` control**, always. Per-harness binding in [`../harness/HARNESS.md`](../harness/HARNESS.md) (Claude Code: `AskUserQuestion`, max 4 questions/call; without structured choice it degrades to **numbered markdown**).
|
|
@@ -137,7 +157,7 @@ Investigation is **inline**: an activity **inside the run's current session**, n
|
|
|
137
157
|
Resume **keys off the `CHECKPOINT`** of the run's session, not the existence of a separate file. Three cases when the flow's command runs over an input:
|
|
138
158
|
|
|
139
159
|
1. **In progress** (a `CHECKPOINT.md` exists in the session) → resume from the recorded progress (resolved gaps, Q&A, `attempts`, in-flight inline research).
|
|
140
|
-
2. **No progress** (no CHECKPOINT and the input doc does **not** have the flow's prior-work mark) → start from zero reading the input doc.
|
|
160
|
+
2. **No progress** (no CHECKPOINT and the input doc does **not** have the flow's prior-work mark) → start from zero reading the input doc (plus any *adopted context* — settled in-conversation conclusions are input, not something to re-derive).
|
|
141
161
|
3. **Already converged / re-run on demand** (no open CHECKPOINT but the doc **already has** the mark) → **first-class operation**: while the flow stays in its stage, re-running the command over the same input **as many times as needed** is supported. `create_or_resume` finds the existing session — typically **closed** after convergence — by descriptor + `## Origin` and **reopens** it (see *Internal sessions*: detection via `aw sessions --state all` / `aw resume-summary --include-recent-closed`, reopening via `aw session-resume --code <NNN> --reopen`); incremental work reading the **doc itself**.
|
|
142
162
|
|
|
143
163
|
> Each heir defines its **prior-work mark**: in the refine loops, the presence of `## Refinement decisions` + `## Q&A traceability` in the doc; in plan-exec, the plan-doc's `- [x]` checkboxes; quick has no doc (resume by CHECKPOINT only).
|
|
@@ -151,7 +171,7 @@ Resume **keys off the `CHECKPOINT`** of the run's session, not the existence of
|
|
|
151
171
|
|
|
152
172
|
## docs/ boundary — no auto-export (hard rule)
|
|
153
173
|
|
|
154
|
-
A loop writes into `docs/` **only** its own flow's doc (spec-refine: `docs/specs` · plan-new/plan-refine/plan-exec: `docs/plans` · quick: **none** — it never touches `docs/`). No loop **graduates/promotes artifacts** into `docs/`: everything else (migrations → `docs/scripts`, manuals → `docs/manuals`, diagrams → `docs/diagrams`, …) is done by the separate **`export-*`** skills, as an explicit later step. Artifacts stay in their sessions until then. If a task creates a tool/utility, the ambient skill `creating-tools` documents it in `docs/tools` (auto-discovered by its `description`;
|
|
174
|
+
A loop writes into `docs/` **only** its own flow's doc (spec-refine: `docs/specs` · plan-new/plan-refine/plan-exec: `docs/plans` · quick: **none** — it never touches `docs/`). No loop **graduates/promotes artifacts** into `docs/`: everything else (migrations → `docs/scripts`, manuals → `docs/manuals`, diagrams → `docs/diagrams`, …) is done by the separate **`export-*`** skills, as an explicit later step. Artifacts stay in their sessions until then. If a task creates a tool/utility, the ambient skill `creating-tools` documents it in `docs/tools` (auto-discovered by its `description`; Workline is **indifferent** — it does not bind it).
|
|
155
175
|
|
|
156
176
|
## Code-editing loop policies → CODE-POLICIES.md
|
|
157
177
|
|
|
@@ -23,7 +23,7 @@ Distinguished by **execution**, not by file (see the [`SCRIPTS.sql`](../artifact
|
|
|
23
23
|
After validation (of the phase in plan-exec; of the task in quick, proportional) and **before proposing its commits** (also on an early `Cerrar`, before proposing the pending commits), the diff passes a **closing review gate**:
|
|
24
24
|
|
|
25
25
|
- **Independent re-read** of the diff (subagent or clean re-read — the engine's *independent verification*: it does not assume the implementation is correct; *only command output counts*).
|
|
26
|
-
- **Apply the installed ambient conventions** relevant to the touched stack (code/stack standards, security, diff review, the workspace's own families) — the host **auto-discovers them by `description`**.
|
|
26
|
+
- **Apply the installed ambient conventions** relevant to the touched stack (code/stack standards, security, diff review, the workspace's own families) — the host **auto-discovers them by `description`**. Workline **names and binds no** concrete skill: **it creates the moment; the installed skills fill it** (that is why review is **not a role** — see [`../roles/README.md`](../roles/README.md)). With no convention skills installed → minimal generic checklist: SOLID/early-return, clear names, DRY, no silenced errors, no secrets/PII, parametrized SQL, no dead code, + the plan's `Validations` (if any).
|
|
27
27
|
- **Findings**: **fix** them in the working tree and **re-run validation** (the gate does not replace the tests: it re-verifies after fixing), or **defer them justified** (→ the plan's `Open questions` + `BACKLOG`; in quick, `BACKLOG`); the non-obvious → `DECISION`. Gate integrity (see [`CHASSIS.md`](CHASSIS.md) § *Verification-first*): never weaken a check or lower a convention to pass.
|
|
28
28
|
- **Artifact-first + verification-first**: `CHECKPOINT.Next = "review <phase/task>"` before the pass; `SESSION.Success criteria` includes from the start "the diff passed the review gate before its commits".
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
44
44
|
|
|
45
45
|
`git` (safe branch + proposed commits) · `sql` (DB rule). Both resolved via `.workflow/skills.toml`; `off` → the loop continues without the capability and, if it was needed, says so or asks.
|
|
46
46
|
|
|
47
|
-
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` —
|
|
47
|
+
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
48
48
|
|
|
49
49
|
## Internal sessions (managed)
|
|
50
50
|
|
|
@@ -61,7 +61,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
61
61
|
- Executes the phase's `Tasks`; **skips** the ones already `- [x]` in the plan (the plan-doc is the per-task source of truth). Marks `- [x]` + state **in the plan** (living doc; never in a separate `TASKS`).
|
|
62
62
|
- At **every phase boundary**: validate, run the **closing review gate** (Delta 5), update the `CHECKPOINT` (Completed += Phase N, Next = Phase N+1) and propose commits.
|
|
63
63
|
- Records in `DECISION` only the **non-obvious**, **as it is decided** (per-phase decisions accumulate in the SINGLE `DECISION`, tagged by phase/task — e.g. `Origin: T2 (F1)`).
|
|
64
|
-
- The chassis **gap-driven** engine applies here **inside a task**: facing a non-obvious decision/doubt → inline research OR structured-choice.
|
|
64
|
+
- The chassis **gap-driven** engine applies here **inside a task**: facing a non-obvious decision/doubt → inline research, a probe (Delta 7) OR structured-choice.
|
|
65
65
|
|
|
66
66
|
## Delta 2 — Git policy: **safe branch + proposed commits**
|
|
67
67
|
|
|
@@ -73,7 +73,7 @@ Full policy in [`../CODE-POLICIES.md`](../CODE-POLICIES.md) (§ *DB scripts-only
|
|
|
73
73
|
|
|
74
74
|
## Delta 4 — Validation
|
|
75
75
|
|
|
76
|
-
- After executing (per phase and at the end): run tests/checks against `Validations` + `Final behavior` + the spec's acceptance/success criteria.
|
|
76
|
+
- After executing (per phase and at the end): run tests/checks against `Validations` + `Final behavior` + the spec's acceptance/success criteria (its `## Scenarios`, if present, are ready-made test cases: GIVEN=arrange · WHEN=act · THEN=assert).
|
|
77
77
|
- A validation that **runs and fails** → back to the task (gap); no advancing.
|
|
78
78
|
- **Validation depending on an unapplied migration**: since the AI never executes the DML, it **cannot run it read-only** → it is **deferred** (handoff to a DBA), it does **not block progress**. Recorded in the plan's `Open questions` + `BACKLOG`, marked "verification pending until the SQL is applied". (Reuses the chassis degrade/defer pattern + `MAX` cap → avoids the "back to the task" loop.)
|
|
79
79
|
|
|
@@ -89,6 +89,14 @@ Full gate in [`../CODE-POLICIES.md`](../CODE-POLICIES.md) (§ *Closing review ga
|
|
|
89
89
|
- All phases done → final *structured-choice* (content: `Marcar plan done` / `Preguntar algo más`; flow: `Compactar`/`Cerrar`).
|
|
90
90
|
- **No automatic export**: the artifacts (`SCRIPTS.sql`, `DECISION`, …) stay in the session. Promoting them to `docs/` (scripts, manuals, …) is a separate step via `export-*`.
|
|
91
91
|
|
|
92
|
+
## Delta 7 — Probe (PoC) tasks
|
|
93
|
+
|
|
94
|
+
Chassis § *Proof of concept (probe)*, instantiated for execution — for a plan's explicit probe task or a runnable doubt inside a task:
|
|
95
|
+
|
|
96
|
+
- Seed the question + pass/fail check → run **throwaway code in the session folder** (never the source tree, never committed; DB probe = read-only) → verdict in `CONCLUSIONS`, consequences in `DECISION` (tagged by task) → mark the task with its verdict.
|
|
97
|
+
- A **failed probe does not fail the phase** — it de-risked it: surface it (structured-choice); reshaping the plan goes to `Open questions` + `BACKLOG` (or `/w:plan-refine`).
|
|
98
|
+
- **Promotion**: probe code reaches the sources only as a normal task edit (branch-check + review gate) — never by committing the probe.
|
|
99
|
+
|
|
92
100
|
## Sequence
|
|
93
101
|
|
|
94
102
|
```
|
|
@@ -108,7 +116,9 @@ plan-exec-loop(PPP-plan-<slug>.md):
|
|
|
108
116
|
if read-only DB query → SCRIPTS.sql + execute read-only
|
|
109
117
|
if DB change (DDL/DML) → draft in SCRIPTS.sql (session artifact, DO NOT execute)
|
|
110
118
|
if non-obvious decision → DECISION (tagged by phase/task, in the SINGLE DECISION)
|
|
111
|
-
if
|
|
119
|
+
if probe (PoC) task / runnable doubt → seed check → run throwaway code in the
|
|
120
|
+
session folder → verdict → CONCLUSIONS/DECISION; failed → structured-choice (Delta 7)
|
|
121
|
+
if doubt/gap → inline research, probe OR structured-choice # chassis
|
|
112
122
|
mark Task - [x] + state IN THE PLAN # AFTER completing the Task (the plan-doc is the per-task source of truth)
|
|
113
123
|
phase validation:
|
|
114
124
|
what runs and fails → back to the task
|
|
@@ -31,6 +31,8 @@ PLAN
|
|
|
31
31
|
|
|
32
32
|
> **slug**: short kebab-case derived from the spec's Requirement — only `[a-z0-9-]`, ≤ ~5 words / ≤ 40 chars. `aw next-number docs/plans` returns JSON (field `next` = `PPP`); the loop builds the full name. To locate plans, glob `docs/plans/PPP-plan-*.md`.
|
|
33
33
|
|
|
34
|
+
> **Adoption (command mode 4):** an **externally-built plan** (host plan mode, hand-written, another agent) is materialized by the **command** in a single pass — this loop does not run: transcribe + normalize into the Delta 1 schema, `## Origin` = "adopted from <source>" + attribution; then `plan-refine` closes schema gaps (its coherence gate degrades for spec-less plans). See `../../commands/plan-new.md` § *Input resolution*.
|
|
35
|
+
|
|
34
36
|
## Inherits
|
|
35
37
|
|
|
36
38
|
Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **always before** these deltas. *(If `../` does not resolve: `CHASSIS.md` next to this file — global layout rule, chassis § Reference resolution.)*
|
|
@@ -52,7 +54,7 @@ The plan absorbs the `TECHNICAL-NOTE` level **inline** (user decision) + the roa
|
|
|
52
54
|
|
|
53
55
|
> Derived from docs/specs/NNN-spec-<slug>.md · generated by plan-new-loop
|
|
54
56
|
|
|
55
|
-
## Origin source spec
|
|
57
|
+
## Origin source spec · prompt (bootstrapped via spec-new) · "adopted from <source>" + attribution (external plan — /w:plan-new mode 4 / /w:persist)
|
|
56
58
|
## Summary the how, in 1–2 sentences (core)
|
|
57
59
|
## Solution technical/functional explanation of the implementation (core)
|
|
58
60
|
## Impacted FE · BE · DB (schemas/tables/functions) · APIs · integr. (core)
|
|
@@ -86,7 +88,7 @@ Replaces the spec gap taxonomy with a planning-oriented one:
|
|
|
86
88
|
| Task not atomic | complexity > XS | the AI re-splits |
|
|
87
89
|
| Missing deps | order unclear | research / human |
|
|
88
90
|
| Spec criteria uncovered | tasks don't trace to acceptance criteria | the AI derives + human confirms |
|
|
89
|
-
| Unaddressed risks | technical risks unmitigated/undeclared | human |
|
|
91
|
+
| Unaddressed risks | technical risks unmitigated/undeclared | human / **probe** (Delta 5) |
|
|
90
92
|
| UI without design SPEC *(if it applies)* | the plan includes UI (FE/screens in `Impacted`, `## UI spec` in the spec, or UI tasks) without `NNN-SPEC-*.md` in the session | **`ui-design` capability** |
|
|
91
93
|
|
|
92
94
|
## Delta 3 — What research investigates here
|
|
@@ -100,7 +102,14 @@ The **UI without design SPEC** gap is resolved by **composing** the **`ui-design
|
|
|
100
102
|
- It authors **one design SPEC per screen** as a session artifact: `NNN-SPEC-<SLUG>.md` (numbering local to the session — see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
|
|
101
103
|
- It **derives** from the spec's `## UI spec` section when present (splits it per screen and raises it to executable detail); otherwise it authors from the `Requirement` (design system/theme/ambiguities via *structured-choice*, counts in the batch).
|
|
102
104
|
- The plan's **UI Tasks reference** their SPEC's path — that reference is the **source of truth** — and `plan-exec-loop` reads them as the design reference.
|
|
103
|
-
- It is the
|
|
105
|
+
- It is the chassis' composed-capability resolution mode (next to *research*, *probe* and *human*).
|
|
106
|
+
|
|
107
|
+
## Delta 5 — Probe (PoC) tasks — de-risk early
|
|
108
|
+
|
|
109
|
+
Chassis § *Proof of concept (probe)*, instantiated for planning. Two placements:
|
|
110
|
+
|
|
111
|
+
- **Plan-shaping unknown** (the `Solution` itself depends on the answer) → run the probe **inline now**; the verdict (`CONCLUSIONS`) feeds `Solution` / `Risks / impact`.
|
|
112
|
+
- **Execution-time risk** (a task will build on a risky, runnable assumption) → encode an explicit **probe task**, placed **early** — before the tasks that depend on its verdict; the matching `Risks / impact` entry references it.
|
|
104
113
|
|
|
105
114
|
## Sequence
|
|
106
115
|
|
|
@@ -116,7 +125,7 @@ plan-new-loop(spec):
|
|
|
116
125
|
gaps = detect_gaps(work) (Delta 2 taxonomy) minus the exhausted ones
|
|
117
126
|
if gaps == ∅: break
|
|
118
127
|
batch ≤3 → seed CHECKPOINT.Pending/Next → resolve each gap:
|
|
119
|
-
research (maps code/impact — Delta 3) · human (structured-choice) · ui-design (Delta 4)
|
|
128
|
+
research (maps code/impact — Delta 3) · human (structured-choice) · probe (Delta 5) · ui-design (Delta 4)
|
|
120
129
|
integrate + update CHECKPOINT # artifact-first cycle
|
|
121
130
|
coherence gate (read-only) = Success criteria green:
|
|
122
131
|
- every spec acceptance criterion traces to a phase/task
|
|
@@ -29,7 +29,7 @@ PLAN
|
|
|
29
29
|
`/w:plan-refine` — **resumable** (same chassis mechanism, keyed off CHECKPOINT) and **re-runnable on demand** (see *Compact / resume*).
|
|
30
30
|
|
|
31
31
|
## Reads
|
|
32
|
-
`docs/plans/PPP-plan-*.md` (glob — locates the plan by number; or the exact path from the command argument). **Always the plan itself**: this loop edits it in place; there is no separate "refined" file.
|
|
32
|
+
`docs/plans/PPP-plan-*.md` (glob — locates the plan by number; or the exact path from the command argument). **Always the plan itself**: this loop edits it in place; there is no separate "refined" file. Provenance is irrelevant — generated by `plan-new`, **hand-written, or adopted** from a host planner (`plan-new` mode 4 / `persist`); existence is the only requirement.
|
|
33
33
|
|
|
34
34
|
## Writes
|
|
35
35
|
Updates `docs/plans/PPP-plan-<slug>.md` **in place** (when the user picks `Guardar plan refinado`): completes/adjusts sections and **adds** `## Refinement decisions` + `## Q&A traceability`. Since it overwrites an existing doc, it asks the user's **confirmation**. It writes only `docs/plans` — never other `docs/` folders, no auto-export. If the refine **touches UI**, it also produces/updates **design SPECs** (`NNN-SPEC-<SLUG>.md`) as artifacts **of its own session** (see *Delta 4* — they are not `docs/`, no auto-export).
|
|
@@ -72,6 +72,8 @@ Reuses plan-new-loop's gap taxonomy **in full** ([`plan-new-loop`](../plan-new-l
|
|
|
72
72
|
|---|---|---|
|
|
73
73
|
| Plan↔spec drift | the spec was re-refined and the plan fell out of line | **research** (re-reads the spec) / **human** |
|
|
74
74
|
|
|
75
|
+
> **Spec-less degradation (hand-written / adopted plans).** When the plan has **no source spec** (`## Origin` = adopted / hand-written), the spec-anchored checks **degrade gracefully**: "spec criteria uncovered" and "plan↔spec drift" do **not** apply — criterion→task traceability anchors to the plan's **own** `## Final behavior` / `## Validations` instead. The rest of the taxonomy (atomicity, deps, Impacted↔Solution, UI→SPEC) applies unchanged. Normalizing an adopted plan to the full Delta 1 schema **is** this loop's job (missing `(core)` sections are gaps).
|
|
76
|
+
|
|
75
77
|
## Delta 3 — What research investigates here
|
|
76
78
|
|
|
77
79
|
Same as plan-new (maps code/impact: FE/BE/DB components, AS-IS wiring, deps), but **scoped to the delta**: it re-verifies only what the change touches (never re-maps the whole plan). Chassis DB rule unchanged (read-only into `SCRIPTS.sql`, MCP via a question when >1 without default).
|
|
@@ -98,11 +100,12 @@ plan-refine-loop(plan):
|
|
|
98
100
|
gaps = detect_gaps(work) (plan-new taxonomy + plan↔spec drift) minus the exhausted ones
|
|
99
101
|
if gaps == ∅: break
|
|
100
102
|
batch ≤3 → seed CHECKPOINT.Pending/Next → resolve each gap:
|
|
101
|
-
research (scoped to the delta — Delta 3) · human (structured-choice) ·
|
|
103
|
+
research (scoped to the delta — Delta 3) · human (structured-choice) · probe (chassis) ·
|
|
102
104
|
ui-design (Delta 4, only new/changed screens)
|
|
103
105
|
integrate + update CHECKPOINT # artifact-first cycle
|
|
104
106
|
coherence gate (read-only) = Success criteria green:
|
|
105
107
|
- plan-new checklist (criterion→task · Final behavior · XS–S/XS · deps · Impacted↔Solution · UI→current SPEC)
|
|
108
|
+
# spec-less plan (adopted/hand-written): criteria anchor to the plan's own Final behavior/Validations (see Delta 2)
|
|
106
109
|
- re-refine's own check: the plan is REALIGNED with what changed
|
|
107
110
|
whatever fails → comes back as a gap
|
|
108
111
|
structured_choice(content: [Guardar plan refinado, Preguntar algo más], flow: [Compactar, Cerrar])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quick-loop
|
|
3
3
|
description: >-
|
|
4
|
-
The
|
|
4
|
+
The Workline lightweight shortcut: solves a scoped task (fix, small
|
|
5
5
|
tweak) straight from the prompt, with minimal ceremony and a single commit.
|
|
6
6
|
Heir of the chassis (loops/CHASSIS.md + CODE-POLICIES.md). Deltas: no
|
|
7
7
|
plan-doc (the prompt IS the task), single light session <slug>-quick, an
|
|
@@ -25,7 +25,7 @@ QUICK
|
|
|
25
25
|
`/w:quick` — **resumable** (same chassis resume mechanism).
|
|
26
26
|
|
|
27
27
|
## Reads
|
|
28
|
-
— (the user's prompt
|
|
28
|
+
— (the user's prompt **plus any analysis already established in this conversation** — *adopted context*, chassis § *Adopted context*: adopted, never re-derived. There is no input document).
|
|
29
29
|
|
|
30
30
|
## Writes
|
|
31
31
|
- **Deliverable per task:** edits code in the sources (minimal change) **or** produces a scoped **analysis/design** (non-code deliverable, lives in the session artifacts — never in `docs/`).
|
|
@@ -44,7 +44,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
44
44
|
|
|
45
45
|
`git` · `sql` (DB rule) · `research` (inline). Resolved via `.workflow/skills.toml`.
|
|
46
46
|
|
|
47
|
-
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` —
|
|
47
|
+
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
48
48
|
|
|
49
49
|
## QUICK delta — minimal ceremony
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
52
52
|
- **Proportional verification-first** (minimal ceremony): even here the check is **seeded before**, sized to the task. Code: one test (bug repro → fix) or "existing build/lint/tests stay green" (chore). **Analysis/design**: a **short falsifiable rubric**, *ratified by the user* before pursuing it. It is the run's `SESSION.Success criteria` (see [chassis § *Verification-first*](../CHASSIS.md)).
|
|
53
53
|
- **Git and DB inline** (full policies in [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): before editing, verify each source's expected branch (`aw check-branch`); **proposed** commit (approve first) — never `push`/`--amend`/`--no-verify`. The AI **never executes DML/DDL**: migrations are drafted into the session's `SCRIPTS.sql` (read-only queries do run, via MCP).
|
|
54
54
|
- **One session. One commit** proposed at the end (only if there were code changes), **after the proportional closing review gate** ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Closing review gate*): diff re-read + ambient conventions; fix or defer; nothing reaches the commit unreviewed.
|
|
55
|
-
- **Entry SIZE GATE** (before creating the session): on receiving the objective, evaluate whether it **exceeds a quick**. It fires **only on clear signals** (≥2 of: needs architecture · ≥2 sources · multiple deliverables · large feature/refactor · ambiguous requirements needing elicitation); borderline → **continue in quick without asking** (if it later grows, mid-loop escalation covers it). A **resume** of an existing quick does **not** re-fire the gate. If it fires → **structured-choice** (1 content question, recommendation first + `flow` control; `Cerrar` here = abort, nothing created yet):
|
|
55
|
+
- **Entry SIZE GATE** (before creating the session): on receiving the objective, evaluate whether it **exceeds a quick**. It fires **only on clear signals** (≥2 of: needs architecture · ≥2 sources · multiple deliverables · large feature/refactor · ambiguous requirements needing elicitation); signals already resolved by *adopted context* do **not** fire (e.g. a host pre-analysis in this conversation that removed the ambiguity — chassis § *Adopted context*); borderline → **continue in quick without asking** (if it later grows, mid-loop escalation covers it). A **resume** of an existing quick does **not** re-fire the gate. If it fires → **structured-choice** (1 content question, recommendation first + `flow` control; `Cerrar` here = abort, nothing created yet):
|
|
56
56
|
- **`Cambiar a SPEC`** (recommended) → **no quick session is created**: run the *Live transition to SPEC* (next bullet).
|
|
57
57
|
- **`Seguir en quick`** → continue normally (`create_or_resume` + loop).
|
|
58
58
|
- **`Recortar alcance`** → the AI proposes the **sub-task that DOES fit** a quick; the loop continues with it (`SESSION.Objective` = the sub-task; the original prompt goes into the session's `## Origin`) and the rest is deferred to `BACKLOG` ("trimmed at the gate — may warrant its own spec, `/w:spec-new`").
|
|
@@ -92,6 +92,8 @@ quick-loop(prompt):
|
|
|
92
92
|
Seguir en quick → continue
|
|
93
93
|
s = create_or_resume("<slug>-quick") # CLI prepends global NNN; always a light session
|
|
94
94
|
seed SESSION.Objective = the prompt
|
|
95
|
+
if the conversation already established analysis/conclusions → # adopted context (chassis)
|
|
96
|
+
adopt them (SESSION.Origin = "adopted from host conversation"; reference in CONCLUSIONS) — never re-derive/re-ask
|
|
95
97
|
seed SESSION.Success criteria = the deliverable's check # verification-first, BEFORE: test(s) if code · short RATIFIED rubric if analysis/design
|
|
96
98
|
seed CHECKPOINT.Pending/Next = the task (s) # BEFORE: seed the intent (artifact-first)
|
|
97
99
|
work the task (minimal loop):
|
|
@@ -100,7 +102,7 @@ quick-loop(prompt):
|
|
|
100
102
|
if read-only DB query → SCRIPTS.sql + execute read-only
|
|
101
103
|
if DB change (DDL/DML) → SCRIPTS.sql (session artifact, DO NOT execute)
|
|
102
104
|
if non-obvious decision → DECISION
|
|
103
|
-
if doubt/gap → inline research OR structured-choice
|
|
105
|
+
if doubt/gap → inline research, a probe OR structured-choice # chassis § Proof of concept
|
|
104
106
|
if the task GROWS → propose escalating to SPEC/PLAN # structured-choice, recommendation first
|
|
105
107
|
accepts PLAN → handoff (progress stays; BACKLOG→seeded plan — resume there, deferred) → goto finalize
|
|
106
108
|
accepts SPEC → handoff (progress stays; BACKLOG→"continued live") → finalize →
|
|
@@ -51,13 +51,13 @@ Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's
|
|
|
51
51
|
|
|
52
52
|
## Composes
|
|
53
53
|
|
|
54
|
-
The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*) is resolved by **composing** the **`ui-design`** capability (built-in default `ui-spec`; rebindable via `.workflow/skills.toml`): it authors the UI spec natively (structure, vocabulary, Markdown format). It is
|
|
54
|
+
The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*) is resolved by **composing** the **`ui-design`** capability (built-in default `ui-spec`; rebindable via `.workflow/skills.toml`): it authors the UI spec natively (structure, vocabulary, Markdown format). It is the chassis' composed-capability resolution mode (next to *research*, *probe* and *human*): the loop contributes iteration/Q&A (design system, theme, variants, disambiguation) **via the same structured-choice**, and integrates the result as the spec's `## UI spec` section.
|
|
55
55
|
|
|
56
56
|
> **Two levels of the same capability:** here (SPEC) it produces `## UI spec` — the UI's *what*, coarse grain; in PLAN the plan loops produce **per-screen design SPECs** derived from that section (see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
|
|
57
57
|
|
|
58
58
|
Other transversal capabilities the engine always uses: `research` (**inline** — chassis § *Research*), `sql` (DB rule inside research — chassis). All resolved by config; `off` → the loop continues without the capability and, if it was needed, says so or asks. The spec's **prose** follows the **ambient** writing conventions (the host auto-applies an installed writing skill if present), not a composed role.
|
|
59
59
|
|
|
60
|
-
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` —
|
|
60
|
+
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
61
61
|
|
|
62
62
|
## Deliverable schema (the spec, edited in place)
|
|
63
63
|
|
|
@@ -72,7 +72,8 @@ The spec is completed **in place**: the draft's sections get **completed** + two
|
|
|
72
72
|
## Requirement (sharpened, unambiguous)
|
|
73
73
|
## Context (complete)
|
|
74
74
|
## Scope (clear In / Out)
|
|
75
|
-
## Acceptance criteria (testable, - [ ]; EARS
|
|
75
|
+
## Acceptance criteria (testable, - [ ]; EARS style; behavioral ones expand in ## Scenarios)
|
|
76
|
+
## Scenarios (opt. — GIVEN/WHEN/THEN/AND blocks; each traces to ≥1 criterion)
|
|
76
77
|
## Assumptions (declared)
|
|
77
78
|
|
|
78
79
|
## UI spec (opt. — if UI is involved; via the ui-design capability / ui-spec skill)
|
|
@@ -101,7 +102,8 @@ Every doubt asked to the human + the chosen answer.
|
|
|
101
102
|
| Vague requirement | the what/why is ambiguous | **human** |
|
|
102
103
|
| Incomplete context | systems/components unidentified | **research** |
|
|
103
104
|
| Blurry scope | `Out` missing, or In/Out overlap | **human** |
|
|
104
|
-
| Untestable criteria | acceptance not verifiable | **human** (derive + confirm) |
|
|
105
|
+
| Untestable criteria | acceptance not verifiable | **human** (derive + confirm — often as a `### Scenario`) |
|
|
106
|
+
| Scenario missing | behavioral criterion without a `### Scenario` | the AI drafts GIVEN/WHEN/THEN + **human** confirms |
|
|
105
107
|
| Open questions pending | explicit doubts | by nature |
|
|
106
108
|
| Hidden assumptions | the spec assumes unstated things | **research** validates / **human** confirms |
|
|
107
109
|
| Internal contradiction | sections contradict each other | **human** |
|
|
@@ -140,7 +142,7 @@ spec-refine-loop(spec):
|
|
|
140
142
|
Cerrar → goto finalize
|
|
141
143
|
work = integrate(work, ans) # → Q&A traceability / Open questions
|
|
142
144
|
# no material gaps → analyze gate = Success criteria green (read-only) before offering Guardar:
|
|
143
|
-
issues = analyze(work) # criteria trace to the Requirement · no contradictions · coherent Scope · Open questions closed/deferred
|
|
145
|
+
issues = analyze(work) # criteria trace to the Requirement · no contradictions · coherent Scope · Open questions closed/deferred · scenarios↔criteria
|
|
144
146
|
if issues: gaps += issues ; continue # findings come back into the loop as gaps
|
|
145
147
|
ans = structured_choice(content: [Guardar refinada, Preguntar algo más],
|
|
146
148
|
flow: [Compactar, Cerrar])
|
|
@@ -162,7 +164,7 @@ Full mechanism (3 cases, `Compactar`, re-run on demand with `--reopen`) in the c
|
|
|
162
164
|
|
|
163
165
|
## Convergence / exit
|
|
164
166
|
|
|
165
|
-
- **No material gaps** → **analyze gate** (read-only) = **`Success criteria` green** (*verification-first*; the SPEC instance of the chassis convergence gate): every acceptance criterion traces to the `Requirement`, no internal contradictions, coherent `Scope` In/Out, `Open questions` closed or explicitly deferred. Whatever fails **comes back as a gap**; if it passes → offer `Guardar especificación refinada`.
|
|
167
|
+
- **No material gaps** → **analyze gate** (read-only) = **`Success criteria` green** (*verification-first*; the SPEC instance of the chassis convergence gate): every acceptance criterion traces to the `Requirement`, no internal contradictions, coherent `Scope` In/Out, `Open questions` closed or explicitly deferred. Scenarios must trace to ≥1 criterion — and behavioral criteria to ≥1 scenario — without contradicting `Scope`. Whatever fails **comes back as a gap**; if it passes → offer `Guardar especificación refinada`.
|
|
166
168
|
- `Guardar` → `edit_in_place_with_confirm(spec)` and `finalize`.
|
|
167
169
|
- `Cerrar` → the chassis `finalize` (always persists `CHECKPOINT`; `BACKLOG` **only if** something is deferred — here: close reason + deferred `Open questions`).
|
|
168
170
|
|
package/skills/w/roles/README.md
CHANGED
|
@@ -17,13 +17,13 @@ All 6 roles, their built-in defaults, their tier, and which loops/exports compos
|
|
|
17
17
|
| `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
|
|
18
18
|
| `research` | [`research`](research/ROLE.md) | should | all loops (on-demand investigation) |
|
|
19
19
|
| `diagrams` | [`diagrams`](diagrams/ROLE.md) | should | `export-diagrams` |
|
|
20
|
-
| `overview` | `w` | should | any loop (orientation about
|
|
20
|
+
| `overview` | `w` | should | any loop (orientation about Workline itself) |
|
|
21
21
|
|
|
22
22
|
**Tiers:**
|
|
23
23
|
- `must` — core to almost every session; built-in always active unless explicitly `off`.
|
|
24
24
|
- `should` — loaded on-demand; active by default but lower priority to override.
|
|
25
25
|
|
|
26
|
-
> **Ambient conventions (not roles).** Code, testing and writing standards **and tool authoring** (`creating-tools`, which writes `docs/tools`) are **not
|
|
26
|
+
> **Ambient conventions (not roles).** Code, testing and writing standards **and tool authoring** (`creating-tools`, which writes `docs/tools`) are **not Workline roles** and are never bound: they are **standalone skills the host auto-discovers by `description`** and applies when relevant. Workline is **indifferent** (it neither reads nor looks for them). Useful families live in marketplace plugins (`dev-conventions`, `tool-builder`), but Workline does **not depend** on them.
|
|
27
27
|
>
|
|
28
28
|
> **The closing review is not a role either** (deliberate decision — a `conventions`/`rules`/`review` role was evaluated and discarded): the pre-commit **closing review gate** of `plan-exec-loop`/`quick-loop` is a **loop step**; the loop creates the **moment** and the installed ambient conventions fill it. A role that "points at the marketplace skills" would re-couple what this extraction decoupled.
|
|
29
29
|
|