@tacuchi/agent-workflow-cli 20.26.0 → 21.1.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/README.md +2 -1
- package/dist/adapters/node-file-system.js +3 -0
- package/dist/adapters/node-file-system.js.map +1 -1
- package/dist/application/capability/compose.js +161 -0
- package/dist/application/capability/compose.js.map +1 -0
- package/dist/application/capability/descriptor-loader.js +109 -0
- package/dist/application/capability/descriptor-loader.js.map +1 -0
- package/dist/application/capability/design-handler.js +299 -0
- package/dist/application/capability/design-handler.js.map +1 -0
- package/dist/application/capability/dispatcher.js +312 -0
- package/dist/application/capability/dispatcher.js.map +1 -0
- package/dist/application/capability/durable-effect.js +220 -0
- package/dist/application/capability/durable-effect.js.map +1 -0
- package/dist/application/capability/installed-inventory.js +168 -0
- package/dist/application/capability/installed-inventory.js.map +1 -0
- package/dist/application/capability/readiness.js +204 -0
- package/dist/application/capability/readiness.js.map +1 -0
- package/dist/application/capability/resolution.js +264 -0
- package/dist/application/capability/resolution.js.map +1 -0
- package/dist/application/capability/wrapper.js +187 -0
- package/dist/application/capability/wrapper.js.map +1 -0
- package/dist/application/context/manifest.js +11 -5
- package/dist/application/context/manifest.js.map +1 -1
- package/dist/application/context/measure.js +5 -2
- package/dist/application/context/measure.js.map +1 -1
- package/dist/application/context/plan-service.js +6 -6
- package/dist/application/context/plan-service.js.map +1 -1
- package/dist/application/design/design-bundle-service.js +148 -0
- package/dist/application/design/design-bundle-service.js.map +1 -0
- package/dist/application/design/design-gate-service.js +246 -0
- package/dist/application/design/design-gate-service.js.map +1 -0
- package/dist/application/design/design-graph-service.js +85 -0
- package/dist/application/design/design-graph-service.js.map +1 -0
- package/dist/application/design/design-index-service.js +132 -0
- package/dist/application/design/design-index-service.js.map +1 -0
- package/dist/application/design/design-proposal-service.js +69 -0
- package/dist/application/design/design-proposal-service.js.map +1 -0
- package/dist/application/design/design-publish-service.js +756 -0
- package/dist/application/design/design-publish-service.js.map +1 -0
- package/dist/application/design/design-record-service.js +100 -0
- package/dist/application/design/design-record-service.js.map +1 -0
- package/dist/application/design/design-resolver-service.js +165 -0
- package/dist/application/design/design-resolver-service.js.map +1 -0
- package/dist/application/flow/advance.js +533 -0
- package/dist/application/flow/advance.js.map +1 -0
- package/dist/application/flow/flow-service.js +65 -0
- package/dist/application/flow/flow-service.js.map +1 -0
- package/dist/application/flow/run-projection.js +80 -0
- package/dist/application/flow/run-projection.js.map +1 -0
- package/dist/application/flow/run-state-service.js +107 -0
- package/dist/application/flow/run-state-service.js.map +1 -0
- package/dist/application/flow/submit.js +423 -0
- package/dist/application/flow/submit.js.map +1 -0
- package/dist/application/resume-service.js +46 -14
- package/dist/application/resume-service.js.map +1 -1
- package/dist/application/self/install-skill.js +11 -0
- package/dist/application/self/install-skill.js.map +1 -1
- package/dist/application/self/uninstall.js +21 -0
- package/dist/application/self/uninstall.js.map +1 -1
- package/dist/application/semantic-operation/protocol.js +18 -12
- package/dist/application/semantic-operation/protocol.js.map +1 -1
- package/dist/application/semantic-operation/publish.js +56 -9
- package/dist/application/semantic-operation/publish.js.map +1 -1
- package/dist/application/skills-resolver-service.js +27 -6
- package/dist/application/skills-resolver-service.js.map +1 -1
- package/dist/application/status-service.js +5 -1
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/workline-index-service.js +6 -0
- package/dist/application/workline-index-service.js.map +1 -1
- package/dist/application/workspace-init-service.js +22 -2
- package/dist/application/workspace-init-service.js.map +1 -1
- package/dist/cli/commands/capability.js +182 -0
- package/dist/cli/commands/capability.js.map +1 -0
- package/dist/cli/commands/designs.js +110 -0
- package/dist/cli/commands/designs.js.map +1 -0
- package/dist/cli/commands/flow.js +71 -0
- package/dist/cli/commands/flow.js.map +1 -0
- package/dist/cli/commands/index.js +6 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/resume.js +8 -0
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/skills.js +55 -2
- package/dist/cli/commands/skills.js.map +1 -1
- package/dist/cli/commands/status.js +50 -0
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/help-groups.js +9 -0
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/parser.js +7 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/tui/data/workflow-content.js +5 -0
- package/dist/cli/tui/data/workflow-content.js.map +1 -1
- package/dist/cli/tui/tabs/workflow-tab.js +5 -1
- package/dist/cli/tui/tabs/workflow-tab.js.map +1 -1
- package/dist/domain/capability/descriptor.js +553 -0
- package/dist/domain/capability/descriptor.js.map +1 -0
- package/dist/domain/capability/effects.js +90 -0
- package/dist/domain/capability/effects.js.map +1 -0
- package/dist/domain/capability/protocol.js +494 -0
- package/dist/domain/capability/protocol.js.map +1 -0
- package/dist/domain/contract-reader.js +84 -0
- package/dist/domain/contract-reader.js.map +1 -0
- package/dist/domain/design/adapter.js +161 -0
- package/dist/domain/design/adapter.js.map +1 -0
- package/dist/domain/design/artifact-body.js +223 -0
- package/dist/domain/design/artifact-body.js.map +1 -0
- package/dist/domain/design/artifact.js +750 -0
- package/dist/domain/design/artifact.js.map +1 -0
- package/dist/domain/design/baseline.js +359 -0
- package/dist/domain/design/baseline.js.map +1 -0
- package/dist/domain/design/capability.js +310 -0
- package/dist/domain/design/capability.js.map +1 -0
- package/dist/domain/design/closure.js +161 -0
- package/dist/domain/design/closure.js.map +1 -0
- package/dist/domain/design/direct.js +108 -0
- package/dist/domain/design/direct.js.map +1 -0
- package/dist/domain/design/external-send.js +65 -0
- package/dist/domain/design/external-send.js.map +1 -0
- package/dist/domain/design/governance.js +298 -0
- package/dist/domain/design/governance.js.map +1 -0
- package/dist/domain/design/identity.js +145 -0
- package/dist/domain/design/identity.js.map +1 -0
- package/dist/domain/design/manifest.js +552 -0
- package/dist/domain/design/manifest.js.map +1 -0
- package/dist/domain/design/maturity.js +305 -0
- package/dist/domain/design/maturity.js.map +1 -0
- package/dist/domain/design/naming.js +117 -0
- package/dist/domain/design/naming.js.map +1 -0
- package/dist/domain/design/offline.js +92 -0
- package/dist/domain/design/offline.js.map +1 -0
- package/dist/domain/design/profiles.js +212 -0
- package/dist/domain/design/profiles.js.map +1 -0
- package/dist/domain/design/projections.js +165 -0
- package/dist/domain/design/projections.js.map +1 -0
- package/dist/domain/design/proposal.js +234 -0
- package/dist/domain/design/proposal.js.map +1 -0
- package/dist/domain/design/reference.js +234 -0
- package/dist/domain/design/reference.js.map +1 -0
- package/dist/domain/design/render-bundle.js +0 -0
- package/dist/domain/design/render-bundle.js.map +1 -0
- package/dist/domain/design/rendition.js +472 -0
- package/dist/domain/design/rendition.js.map +1 -0
- package/dist/domain/design/retired.js +61 -0
- package/dist/domain/design/retired.js.map +1 -0
- package/dist/domain/design/revision.js +219 -0
- package/dist/domain/design/revision.js.map +1 -0
- package/dist/domain/design/secrets.js +86 -0
- package/dist/domain/design/secrets.js.map +1 -0
- package/dist/domain/design/sources.js +180 -0
- package/dist/domain/design/sources.js.map +1 -0
- package/dist/domain/design/validation.js +19 -0
- package/dist/domain/design/validation.js.map +1 -0
- package/dist/domain/design/visual-evidence.js +155 -0
- package/dist/domain/design/visual-evidence.js.map +1 -0
- package/dist/domain/design/yaml-subset.js +390 -0
- package/dist/domain/design/yaml-subset.js.map +1 -0
- package/dist/domain/flow/answer.js +459 -0
- package/dist/domain/flow/answer.js.map +1 -0
- package/dist/domain/flow/authority.js +2276 -0
- package/dist/domain/flow/authority.js.map +1 -0
- package/dist/domain/flow/authorization.js +62 -0
- package/dist/domain/flow/authorization.js.map +1 -0
- package/dist/domain/flow/directive.js +421 -0
- package/dist/domain/flow/directive.js.map +1 -0
- package/dist/domain/flow/rules.js +140 -0
- package/dist/domain/flow/rules.js.map +1 -0
- package/dist/domain/flow/run-state.js +317 -0
- package/dist/domain/flow/run-state.js.map +1 -0
- package/dist/domain/harnesses.js +21 -0
- package/dist/domain/harnesses.js.map +1 -1
- package/dist/domain/safe-path.js +23 -0
- package/dist/domain/safe-path.js.map +1 -0
- package/dist/domain/skills.js +26 -3
- package/dist/domain/skills.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +15 -13
- package/skills/w/artifacts/README.md +3 -4
- package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +2 -2
- package/skills/w/commands/plan-exec.md +11 -5
- package/skills/w/commands/plan-new.md +6 -2
- package/skills/w/commands/plan-refine.md +6 -3
- package/skills/w/commands/quick.md +2 -2
- package/skills/w/commands/spec-new.md +2 -2
- package/skills/w/commands/spec-refine.md +1 -0
- package/skills/w/context/MANIFEST.json +57 -9
- package/skills/w/harness/HARNESS.md +20 -0
- package/skills/w/loops/CHASSIS.md +11 -20
- package/skills/w/loops/CODE-POLICIES.md +18 -9
- package/skills/w/loops/README.md +1 -1
- package/skills/w/loops/plan-exec-loop/LOOP.md +126 -62
- package/skills/w/loops/plan-new-loop/LOOP.md +71 -73
- package/skills/w/loops/plan-refine-loop/LOOP.md +20 -10
- package/skills/w/loops/quick-loop/LOOP.md +18 -26
- package/skills/w/loops/spec-refine-loop/LOOP.md +28 -30
- package/skills/w/modules/COMPACTION.md +2 -6
- package/skills/w/modules/DB-SCRIPTS-ONLY.md +2 -0
- package/skills/w/modules/DESIGN-REFERENCES.md +113 -0
- package/skills/w/modules/IDEATION-GATE.md +3 -3
- package/skills/w/modules/PERSIST-ROUTING.md +1 -0
- package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +65 -0
- package/skills/w/modules/PLAN-INPUT.md +5 -3
- package/skills/w/modules/PLAN-REFINE-SPLIT.md +3 -1
- package/skills/w/modules/PLAN-SPLIT-GATE.md +7 -5
- package/skills/w/modules/PROMPT-CONTINUITY.md +3 -1
- package/skills/w/modules/SPEC-CHANGE-SHAPE.md +4 -4
- package/skills/w/roles/README.md +9 -5
- package/skills/w/roles/design/CONTRACT.md +80 -0
- package/skills/w/roles/design/ROLE.md +224 -0
- package/skills/w/schemas/capability-descriptor.schema.json +260 -0
- package/skills/w/schemas/design/design-baseline.v1.schema.json +71 -0
- package/skills/w/schemas/design/design-manifest.v1.schema.json +322 -0
- package/skills/w/schemas/design/design-render-bundle.v1.schema.json +191 -0
- package/skills/w/schemas/design/design-rendition.v1.schema.json +232 -0
- package/skills/w/schemas/design/design-review.v1.schema.json +72 -0
- package/skills/w/schemas/design/design-revocation.v1.schema.json +54 -0
- package/skills/w/schemas/design/ui-flow.v1.schema.json +211 -0
- package/skills/w/schemas/design/ui-screen.v1.schema.json +242 -0
- package/skills/w/artifacts/artifacts-design/SPEC.md +0 -42
- package/skills/w/modules/PLAN-DESIGN-SPECS.md +0 -12
- package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +0 -7
- package/skills/w/roles/ui-spec/ROLE.md +0 -147
|
@@ -5,8 +5,8 @@ description: >-
|
|
|
5
5
|
until PLAN can design without inventing behavior, scope or product
|
|
6
6
|
decisions. Heir of the chassis (loops/CHASSIS.md). Deltas: current-behavior
|
|
7
7
|
baseline, change-shape gate, gap taxonomy classified by destination,
|
|
8
|
-
conditional ideation gate, ##
|
|
9
|
-
ready-for-plan gate that stamps the status frontmatter plan-new reads.
|
|
8
|
+
conditional ideation gate, ## Design references via the design capability, and
|
|
9
|
+
the ready-for-plan gate that stamps the status frontmatter plan-new reads.
|
|
10
10
|
Started by /w:spec-refine (or the live escalation from quick-loop);
|
|
11
11
|
resumable via CHECKPOINT and re-runnable on demand.
|
|
12
12
|
---
|
|
@@ -50,7 +50,7 @@ Updates `docs/specs/NNN-spec-<slug>.md` **in place** (when the user picks `Guard
|
|
|
50
50
|
|
|
51
51
|
> **Not every shape decision creates a file** (§ *Change-shape gate*). An accepted **split** writes the reduced original **and** the extracted sibling specs; a replacement by **`Crear una nueva spec`** writes one new file and leaves this one untouched; **`Reformular esta spec`** creates nothing — it edits this same file, same number, same path. Every write, new or overwriting, is confirmed first.
|
|
52
52
|
|
|
53
|
-
> **Boundary invariant:** this loop writes **only** into `docs/specs
|
|
53
|
+
> **Boundary invariant:** this loop writes **only** into `docs/specs` and, when the requirement involves UI, the **design package** it composes under `docs/designs` (chassis § *docs/ boundary* — the package is the capability's own deliverable, not a graduated artifact). It never graduates/exports anything else to `docs/` — that is separate `export-*` work.
|
|
54
54
|
|
|
55
55
|
## Internal sessions — SPEC instance
|
|
56
56
|
|
|
@@ -66,9 +66,9 @@ Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's
|
|
|
66
66
|
|
|
67
67
|
## Composes
|
|
68
68
|
|
|
69
|
-
The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*) is resolved by
|
|
69
|
+
The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*) is resolved by the composed **`design`** capability ([`../../roles/design/ROLE.md`](../../roles/design/ROLE.md)) over the **UI Design Package v1**: reuse a compatible baseline or open an `outline` revision, publish it through the CLI, and leave in the spec **only** its `## Design references` — package, baseline hint and digest. The loop contributes iteration/Q&A (design system, theme, variants, disambiguation) **via the same structured-choice**; the capability contributes what a correct package looks like. Full rule: [`DESIGN-REFERENCES.md`](../../modules/DESIGN-REFERENCES.md).
|
|
70
70
|
|
|
71
|
-
> **Two levels of the same capability:** here (SPEC)
|
|
71
|
+
> **Two levels of the same capability:** here (SPEC) the design closes at `outline` and the spec keeps its exact reference; in PLAN the plan loops promote to `handoff` exactly the closure they implement and pin the exact roots (see [`DESIGN-REFERENCES.md`](../../modules/DESIGN-REFERENCES.md)). One package, two questions — never two formats.
|
|
72
72
|
|
|
73
73
|
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.
|
|
74
74
|
|
|
@@ -106,8 +106,8 @@ status: ready-for-plan ← stamped on Guardar (vocabulary: draft | refining |
|
|
|
106
106
|
does not capture — NEVER a 1:1 restatement of a criterion)
|
|
107
107
|
## Assumptions (declared)
|
|
108
108
|
|
|
109
|
-
##
|
|
110
|
-
|
|
109
|
+
## Design references (opt. — if UI is involved; via the composed design capability)
|
|
110
|
+
The exact package, baseline hint and digest — never the design itself. See [`design`](../../roles/design/ROLE.md).
|
|
111
111
|
|
|
112
112
|
## Decisions ← ADDED — the material decisions, NOT the run's history
|
|
113
113
|
The choices a reader needs in order to interpret the contract, each with its why.
|
|
@@ -123,6 +123,10 @@ The choices a reader needs in order to interpret the contract, each with its why
|
|
|
123
123
|
|
|
124
124
|
> **Acceptance criteria = static testable criteria** (the "what"): plan-exec validates them, but progress is tracked in the PLAN (its Tasks), never by ticking these `- [ ]` in the spec; the spec never mutates by execution, only by a re-refine.
|
|
125
125
|
|
|
126
|
+
## Who decides what
|
|
127
|
+
|
|
128
|
+
> **Directed tranche:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document — it opens the session, resolves the shape gate, decides when the ideation offer and the ambiguity question appear, evaluates the ready-for-plan gate and holds the save until its result comes back. What stays here is the *why*: the taxonomy, the checklist and what each branch means. The split gate keeps its rule in [`../../modules/SPLIT-GATE.md`](../../modules/SPLIT-GATE.md), which the PLAN flows still read.
|
|
129
|
+
|
|
126
130
|
## Gap taxonomy — signal, resolver, destination
|
|
127
131
|
|
|
128
132
|
`detect_gaps(work)` looks for these signals. Each is **classified by destination before its resolver is chosen**: closing a `PLAN`-owned question here is the failure mode this taxonomy exists to prevent.
|
|
@@ -140,7 +144,7 @@ The choices a reader needs in order to interpret the contract, each with its why
|
|
|
140
144
|
| Hidden assumptions | the spec assumes unstated things | **research** validates / **human** confirms | SPEC |
|
|
141
145
|
| Over-specified requirement | scope/criteria gold-plated — beyond the actual need (chassis § *Minimality*) | **human** (AI proposes the cut, human ratifies) | SPEC |
|
|
142
146
|
| Unexplored solution space *(conditional)* | the spec settles on the first conceivable approach **and** a trigger fires (see *Ideation gate*) | **human consents** → **ideation** | SPEC — only on a trigger |
|
|
143
|
-
| UI unspecified *(if it applies)* | the requirement involves UI but `##
|
|
147
|
+
| UI unspecified *(if it applies)* | the requirement involves UI but `## Design references` is missing | composed **`design`** capability | SPEC |
|
|
144
148
|
| Architecture | how to distribute technical responsibilities | — | **`PLAN`** — declare, never close here |
|
|
145
149
|
| Implementation | library, class, method, pattern, folder layout | — | **`PLAN`** / `EXEC` — outside the spec |
|
|
146
150
|
| Executable technical risk | whether an integration really works | — | **`PLAN`** (probe), unless the answer changes the contract |
|
|
@@ -155,22 +159,17 @@ The choices a reader needs in order to interpret the contract, each with its why
|
|
|
155
159
|
```
|
|
156
160
|
spec-refine-loop(spec):
|
|
157
161
|
input = glob(NNN-spec*.md) | argument (path) # always the spec itself (in place)
|
|
158
|
-
refine_session =
|
|
159
|
-
|
|
162
|
+
refine_session = the run's session # the CLI opens or resumes it and verifies its seed
|
|
163
|
+
SESSION.Success criteria = acceptance criteria + ready-for-plan checklist # what its gate evaluates later
|
|
160
164
|
work = read(input) (+ apply checkpoint progress if resuming)
|
|
161
165
|
adopt(spec-new facts + assumptions + open questions + conversation) # never re-derive (§ Reads)
|
|
162
166
|
baseline = resolve_current_behavior(work) # inline research, ONLY what the change rests on
|
|
163
|
-
shape
|
|
164
|
-
|
|
165
|
-
ans = structured_choice(content: [the offer of THIS branch], # split and replace never share labels
|
|
166
|
-
flow: [Compactar, Cerrar])
|
|
167
|
-
write CHECKPOINT (the decision + its consequence) # BEFORE acting: a resume re-enters already decided
|
|
168
|
-
flow Cerrar → goto finalize # closed without applying the change; the spec stays untouched
|
|
169
|
-
`Una sola spec` → shape resolved as same; keep refining this spec
|
|
167
|
+
on the shape branch (see ../../modules/SPEC-CHANGE-SHAPE.md for what each one means):
|
|
168
|
+
`Una sola spec` → keep refining this spec
|
|
170
169
|
`Dividir en varias specs` → the accepted cut is fixed now; its writes wait for `Guardar specs`
|
|
171
170
|
`Crear una nueva spec` → mint draft with confirmation (## Origin) ; THIS spec untouched ;
|
|
172
171
|
CHECKPOINT.Next = refine it ; goto finalize
|
|
173
|
-
`Reformular esta spec` → same number/path ; re-run baseline
|
|
172
|
+
`Reformular esta spec` → same number/path ; re-run baseline before any stamp
|
|
174
173
|
attempts = {} # anti re-fire per gap
|
|
175
174
|
repeat:
|
|
176
175
|
gaps = classify_by_destination(detect_gaps(work)) minus the "exhausted" gaps
|
|
@@ -180,11 +179,12 @@ spec-refine-loop(spec):
|
|
|
180
179
|
batch = top ≤3 blocking ; pending_human = [] # gap questions ONLY — the shape was resolved above
|
|
181
180
|
seed CHECKPOINT.Pending/Next = batch (refine_session) # BEFORE: seed the intent (artifact-first)
|
|
182
181
|
for each gap in batch:
|
|
183
|
-
if gap = UI (requirement involves UI, ##
|
|
184
|
-
compose
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
if gap = UI (requirement involves UI, ## Design references missing):
|
|
183
|
+
compose design → reuse a compatible baseline OR publish an `outline` revision
|
|
184
|
+
# design-system/theme via structured-choice (counts in the batch)
|
|
185
|
+
work = integrate(work, design) # → ## Design references (package + hint + digest)
|
|
186
|
+
else if gap = Unexplored solution space:
|
|
187
|
+
declare the trigger signal # the CLI decides whether the offer appears
|
|
188
188
|
else if factual(gap) and attempts[gap] < MAX:
|
|
189
189
|
if it needs DB and >1 MCP without default → queue "MCP choice" in pending_human
|
|
190
190
|
res = research_inline(gap) # current session: ANALYSIS-FILE → CONCLUSIONS (+read-only SCRIPTS.sql)
|
|
@@ -201,11 +201,8 @@ spec-refine-loop(spec):
|
|
|
201
201
|
work = integrate(work, ans) # → Decisions / Open questions
|
|
202
202
|
ideation offer accepted → run the round NOW, then its verdicts as a NEW ≤3+flow batch (§ Ideation gate)
|
|
203
203
|
ideation offer declined → mark that gap exhausted # anti re-fire; on-demand entry stays open
|
|
204
|
-
# no BLOCKING gaps → ready-for-plan gate
|
|
205
|
-
|
|
206
|
-
if issues: blocking += issues ; continue # findings come back into the loop as gaps
|
|
207
|
-
ans = structured_choice(content: [Guardar refinada | Guardar specs, Preguntar algo más],
|
|
208
|
-
flow: [Compactar, Cerrar])
|
|
204
|
+
# no BLOCKING gaps → the CLI evaluates the ready-for-plan gate over the run's
|
|
205
|
+
# Success criteria and asks for their real state; whatever fails comes back as a gap.
|
|
209
206
|
Guardar → edit_in_place_with_confirm(spec) + stamp status: ready-for-plan ; goto finalize
|
|
210
207
|
# split branch → also mint + write the extracted siblings as status: draft
|
|
211
208
|
Preguntar algo más → continue
|
|
@@ -226,7 +223,7 @@ finalize:
|
|
|
226
223
|
- **Minimality** — no gold-plating: every criterion and scope item earns its place (chassis § *Minimality*); speculative scope is cut or deferred, and no technical solution was imposed that the requirement did not ask for;
|
|
227
224
|
- `PLAN` can continue without inventing behavior, scope or product decisions.
|
|
228
225
|
- Whatever fails **comes back as a gap**. A question owned by `PLAN` **never** fails the gate: it is recorded with its destination, not closed.
|
|
229
|
-
- Passes →
|
|
226
|
+
- Passes → `edit_in_place_with_confirm(spec)` + `status: ready-for-plan` → `finalize`. The stamp only counts once the document really carries it.
|
|
230
227
|
- `Cerrar` → the chassis `finalize` (always persists `CHECKPOINT`; `BACKLOG` **only if** something is deferred — here: close reason + deferred `Open questions`).
|
|
231
228
|
|
|
232
229
|
## Integration (where each resolution lands)
|
|
@@ -234,12 +231,13 @@ finalize:
|
|
|
234
231
|
- **Inline research** → the fact lands in `## Context` / `## Behavioral changes`; if it settles a choice, the choice goes to `## Decisions` (+ ref to the session's `CONCLUSIONS`).
|
|
235
232
|
- **Ideation** → per verdict (§ *Ideation gate*): `Adoptar` → the spec's sections + `## Decisions` · `Descartar` → `CONCLUSIONS` · `Aparcar` → `## Open questions`.
|
|
236
233
|
- **Human** → `## Decisions`, as the decision plus its why. **Not** a `Q:` transcript: the question-by-question trace stays in the session.
|
|
237
|
-
-
|
|
234
|
+
- **Composed `design`** (UI gap) → the package under `docs/designs/` (published through the CLI) + the spec's `## Design references` section, and nothing else in the spec.
|
|
238
235
|
- **Owned by `PLAN` or deferred** → `## Open questions` with its destination, and nothing else in the spec.
|
|
239
236
|
- **Inconclusive or unresolved research** → `## Open questions` (deferred) + the refine session's `BACKLOG.md` (only if something is deferred).
|
|
240
237
|
|
|
241
238
|
## Conditional modules
|
|
242
239
|
|
|
243
240
|
- `shape` — the change-shape gate and its split / replace branches → `../../modules/SPEC-CHANGE-SHAPE.md`
|
|
241
|
+
- `ui` — what the spec keeps when the requirement involves UI → `../../modules/DESIGN-REFERENCES.md`
|
|
244
242
|
- `web` — the conditional ideation gate, its triggers and verdicts → `../../modules/IDEATION-GATE.md`
|
|
245
243
|
- `resume` — the SPEC keys of compact / resume → `../../modules/SPEC-REFINE-KEYS.md`
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Loaded when the run is long enough that context pressure governs its pacing (signal `compaction`).
|
|
4
4
|
|
|
5
|
-
`Compactar` is not only reactive: the loop **watches its own context pressure** and raises compaction itself.
|
|
5
|
+
`Compactar` is not only reactive: the loop **watches its own context pressure** and raises compaction itself. Recognizing that pressure is judgment — the host's signal where it exists (*compaction* capability in [`../harness/HARNESS.md`](../harness/HARNESS.md)), otherwise the **qualitative** question *"would a fresh reader need the CHECKPOINT to continue?"* at a boundary of an already-long run. Doctrine fixes **no numeric thresholds**: a number that means anything is a number about one host.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Modes** — config `[compaction]` table in `.workflow/skills.toml`, key `mode` (values `confirm` | `auto`):
|
|
9
|
-
- **`confirm`** (default, also with no config): raise a **proactive structured-choice** whose `flow` control carries `Compactar` as the recommended action — the human ratifies; consent is never skipped.
|
|
10
|
-
- **`auto`** (opt-in): write `CHECKPOINT.md`, then trigger the host's compaction binding **without asking**. Viable only where the host has a **non-interactive** mechanism (see the *Harness binding matrix*); otherwise it **degrades to `confirm`**.
|
|
11
|
-
- **Invariant — CHECKPOINT before compacting**: in every mode, `CHECKPOINT.md` is written (or verified fresh) **before** any compaction fires; resume keys off it.
|
|
7
|
+
> **Which mode runs, and whether the host can honour it, is not this document's call:** `aw checkpoint-write --can-pause` decides it from the `[compaction]` config (`mode` = `confirm` | `auto`), the host's binding and the session's state. `auto` needs a **non-interactive** mechanism and **degrades to `confirm`** without one; **CHECKPOINT before compacting** holds in every mode. What this document keeps is why: consent is never skipped where a person can be asked, and a compaction that fires before the checkpoint loses the thread it was meant to protect.
|
|
12
8
|
|
|
13
9
|
> **`Compactar`** (the `flow` control) → write `CHECKPOINT.md` in the session (in-flight progress, remaining gaps, Q&A, `attempts`) → trigger the harness **compaction** (Claude Code: `/compact`; see [`../harness/HARNESS.md`](../harness/HARNESS.md)) → resume by reading the checkpoint.
|
|
@@ -10,3 +10,5 @@ Distinguished by **execution**, not by file (see the [`SCRIPTS.sql`](../artifact
|
|
|
10
10
|
- **DDL/DML migrations** (schema/data changes) → the AI **drafts them in `SCRIPTS.sql`** (session artifact) but **NEVER executes them**.
|
|
11
11
|
|
|
12
12
|
> Mutating SQL **stays in the session**; it is never moved to `docs/`. Its promotion to `docs/scripts/` (forward + rollback) is done by a separate `export-*`, never by the loop.
|
|
13
|
+
|
|
14
|
+
> **Showing beats asserting here:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document — it asks the session's script back, because no narration tells drafting from running.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# DESIGN-REFERENCES — how a spec and a plan cite design instead of carrying it
|
|
2
|
+
|
|
3
|
+
Loaded when the run involves UI (signal `ui`).
|
|
4
|
+
|
|
5
|
+
The **UI unspecified** gap is resolved by the [`design`](../roles/design/ROLE.md)
|
|
6
|
+
capability over the **UI Design Package v1**. A spec and a plan **reference** a
|
|
7
|
+
design; neither contains one. The block below is all they carry.
|
|
8
|
+
|
|
9
|
+
## The reference block
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
## Design references
|
|
13
|
+
|
|
14
|
+
- package: `DES-001@r4`
|
|
15
|
+
baseline_hint: `docs/designs/007-design-alta-familia/baselines/DES-001-r004.json`
|
|
16
|
+
digest: `sha256:<64 hex>`
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- `package` pins **identity and revision**. `latest`, a folder slug, a bare
|
|
20
|
+
`DES-001` or a title are rejected: each answers a different question next year
|
|
21
|
+
than it does today.
|
|
22
|
+
- `baseline_hint` is a **location hint**, never the identity. A renamed dossier
|
|
23
|
+
keeps the reference valid and reports the hint as stale.
|
|
24
|
+
- `digest` seals the exact bytes; one that no longer matches never resolves
|
|
25
|
+
quietly.
|
|
26
|
+
- Several packages are several blocks. A package named in prose **without being
|
|
27
|
+
pinned** is reported, not ignored.
|
|
28
|
+
|
|
29
|
+
**Never in the document**: Screen Specifications, flow graphs, state inventories,
|
|
30
|
+
region or component tables, mockups, embedded images. Those live in the package,
|
|
31
|
+
at their own revision — a document carrying them is a document whose design
|
|
32
|
+
cannot be superseded without editing it.
|
|
33
|
+
|
|
34
|
+
Publishing the package is the loop writing a composed deliverable through the
|
|
35
|
+
CLI, not graduating a session artifact (chassis § *docs/ boundary*).
|
|
36
|
+
|
|
37
|
+
## `handoff` asks to SEE it
|
|
38
|
+
|
|
39
|
+
A `handoff` screen owes evidence, not only prose: a local static preview of its
|
|
40
|
+
`default_state`, and a `trace` classifying every criterion `visual`,
|
|
41
|
+
`interaction` or `not_visual`. A package published under the earlier gate can stop
|
|
42
|
+
qualifying; it reports `DESIGN_VISUAL_EVIDENCE_REQUIRED` with the screen, the
|
|
43
|
+
criterion and the fix.
|
|
44
|
+
|
|
45
|
+
## SPEC — close the requirement at `outline`
|
|
46
|
+
|
|
47
|
+
1. **Reuse before minting.** `aw designs` lists what the workspace already has; a
|
|
48
|
+
compatible baseline is reused rather than given a second identity.
|
|
49
|
+
2. **Otherwise open an `outline` revision.** Not a shortcut: the spec closes *what*
|
|
50
|
+
the interface must accomplish and legitimately still holds unknowns. `handoff`
|
|
51
|
+
is PLAN's call — PLAN knows what will actually be implemented.
|
|
52
|
+
3. **Publish, then reference.** Citing a baseline that was never published is the
|
|
53
|
+
dangling reference this contract removes.
|
|
54
|
+
|
|
55
|
+
`spec-new` only **records the need**; it mints nothing. The section sits right
|
|
56
|
+
before `## Decisions`.
|
|
57
|
+
|
|
58
|
+
## PLAN — promote the closure, pin the roots
|
|
59
|
+
|
|
60
|
+
1. **Read the spec's `## Design references`.** No section and a plan with screens
|
|
61
|
+
means the spec never closed its design — a gap back to `spec-refine`, not
|
|
62
|
+
something PLAN invents.
|
|
63
|
+
2. **Express what this plan implements as exact roots** — the flows, screens and
|
|
64
|
+
screen states its phases will build.
|
|
65
|
+
3. **Compute the closure**: a flow reaches its nodes, a screen its flows, and both
|
|
66
|
+
reach the rules, tokens and assets they depend on. It stops there. `flow_refs`
|
|
67
|
+
is *not* followed — it is the inverse relation, and following it drags in
|
|
68
|
+
designs the plan never consumes.
|
|
69
|
+
4. **Promote exactly that closure to `handoff`**, nothing else. Ten screens in
|
|
70
|
+
`outline` and three promoted is a package's normal shape; promoting it wholesale
|
|
71
|
+
because one task needed one screen makes maturity meaningless.
|
|
72
|
+
5. **Publish the revision**, then write the roots.
|
|
73
|
+
|
|
74
|
+
The plan declares its own `## Design references` — same block — after
|
|
75
|
+
`## Dependencies`, before `## Tasks`. **Its own, not a copy of the spec's**: that
|
|
76
|
+
is what lets a refine move this plan to `@r5` while a sibling stays on `@r4`. A
|
|
77
|
+
plan whose task pins a baseline it never declared resolves against nothing, and
|
|
78
|
+
says so.
|
|
79
|
+
|
|
80
|
+
Then each phase or task pins the exact roots it consumes:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
- [ ] T3.2 — Alta de familia desde el formulario · DES-001@r4 / SCR-002@r2#empty
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`<package>@rN / <artifact>@rN[#state]`. Both revisions are mandatory; the anchor
|
|
87
|
+
is optional and only a screen has one. A phase whose tasks share one root may pin
|
|
88
|
+
it once at phase level. Never acceptable: naming `DES-001` without a revision —
|
|
89
|
+
`plan-exec` reports it instead of guessing. And a rendition never answers for a
|
|
90
|
+
root: an approved image is not the current semantics, nor a conformance claim.
|
|
91
|
+
|
|
92
|
+
## quick — read it, never rewrite it
|
|
93
|
+
|
|
94
|
+
`quick` **reads and validates** (`aw designs`, `aw designs --plan`); it changes
|
|
95
|
+
nothing a baseline seals — normative content, a maturity, an approval. A visual
|
|
96
|
+
tweak that turns out to need a new state or a redrawn journey **escalates with the
|
|
97
|
+
evidence it gathered**: `plan-refine` for the package, `spec-refine` when behavior
|
|
98
|
+
or acceptance moves. Editing it silently moves the revision while every consumer
|
|
99
|
+
stays pinned to the old digest.
|
|
100
|
+
|
|
101
|
+
## plan-refine — the delta, and only the delta
|
|
102
|
+
|
|
103
|
+
- **New revisions only for the artifacts the refine actually affects.** An
|
|
104
|
+
untouched screen keeps its revision, maturity and digest.
|
|
105
|
+
- **Never re-point another consumer.** Two plans may pin the same baseline;
|
|
106
|
+
publishing `@rN+1` for one leaves the other's reference exactly as it was.
|
|
107
|
+
- **Re-point only this plan** — its `## Design references` and the tasks whose
|
|
108
|
+
artifacts moved. The spec's section is not touched: it records the baseline the
|
|
109
|
+
*requirement* closed on.
|
|
110
|
+
- **Behavior or acceptance changed → `spec-refine` first.** Redrawing a journey,
|
|
111
|
+
adding a state the requirement never described or moving an acceptance criterion
|
|
112
|
+
is a functional change. Closing it here leaves the spec and the package
|
|
113
|
+
disagreeing with no way to tell which is right.
|
|
@@ -4,13 +4,13 @@ Loaded when a trigger says the solution space is unexplored (signal `web`).
|
|
|
4
4
|
|
|
5
5
|
## Ideation gate (creativity)
|
|
6
6
|
|
|
7
|
-
The loop's one **divergent** gate: every other resolver closes a gap; this one widens the option space before the spec hardens around its first idea. **Unexplored solution space is not a universal gap** —
|
|
7
|
+
The loop's one **divergent** gate: every other resolver closes a gap; this one widens the option space before the spec hardens around its first idea. **Unexplored solution space is not a universal gap** — exploring what is already decided burns context and invites gold-plating, so the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document: you declare whether a trigger fires, and the offer appears only then.
|
|
8
8
|
|
|
9
|
-
**Triggers
|
|
9
|
+
**Triggers.** The user knows the problem but not the desired outcome · several functional directions carry materially different consequences · the spec adopted the first alternative prematurely · a choice can materially change scope · the alternatives change experience, rules or acceptance · the user asks to explore.
|
|
10
10
|
|
|
11
11
|
**Not triggers.** More than one technical solution exists · no library is chosen yet · the system uses several technologies · every implementation admits alternatives · the request is already functionally clear. Purely technical alternatives belong to `PLAN`.
|
|
12
12
|
|
|
13
|
-
1. **Offer & consent.**
|
|
13
|
+
1. **Offer & consent.** Declining marks the gap **exhausted** (never re-offered this run); an explicit user request for ideas at any point counts as an accepted offer (on-demand entry). Alternatives already weighed in the conversation are *adopted context* — the trigger does not fire.
|
|
14
14
|
2. **Ideation round** (one per consent). Propose fresh ideas and **combinations** (the user's + found ones). If the host exposes **web-research** ([`../harness/HARNESS.md`](../harness/HARNESS.md)), the accepted offer also authorizes that round's web searches — no per-search consent; findings + sources land in the session's `CONCLUSIONS`, like inline research. Without the capability, ideate offline (own knowledge + workspace + repos) and **declare it** — never silently.
|
|
15
15
|
|
|
16
16
|
**Verdicts (back to convergence).** Present the top ≤3 ideas via the same structured-choice, each with a recommended verdict: `Adoptar` → integrate into `Requirement`/`Scope`/criteria + record it in `## Decisions` (the choice and its why, with the source/URL when web-found) · `Descartar` → the reason goes to `CONCLUSIONS`, not to the spec · `Aparcar` → `## Open questions` with its destination. Ideas beyond the top 3 stay summarized in `CONCLUSIONS`. Divergence is bounded by *Minimality* (chassis): nothing enters the spec without an explicit `Adoptar`. This gate exists **only** in this loop — `spec-new` stays single-pass (bounded reconnaissance at most, no web) and the plan/quick loops inherit none of it.
|
|
@@ -7,6 +7,7 @@ Loaded when classifying what to persist (signal `classification`).
|
|
|
7
7
|
| **Analysis / conclusions / design notes** | findings, comparisons, diagnoses, adjudications, recommendations | `research` → `docs/research/NNN-research-<slug>.md` |
|
|
8
8
|
| **Requirement** | describes a *wish*: what should exist/change, acceptance criteria derivable | `spec` → `docs/specs/NNN-spec-<slug>.md`, born `status: draft`, `## Origin` = "adopted from host conversation" → offer `/w:spec-refine` |
|
|
9
9
|
| **Plan** | already answers the *how*: phases/tasks/solution — e.g. the host plan-mode output | `plan` → `docs/plans/NNN-plan-<slug>.md` (adoption) → offer `/w:plan-refine` / `/w:plan-exec` |
|
|
10
|
+
| **Durable UI idea** | screens, flows, states meant to last | `spec` **first**, then the design in the package it identifies ([`DESIGN-REFERENCES.md`](DESIGN-REFERENCES.md)); never a Screen Specification *instead of* the Requirement, and `persist` writes no package |
|
|
10
11
|
| Mixed / ambiguous | e.g. analysis that ends in a requirement | one `persist` per document, each confirmed; a research doc plus a spec draft that cites it is a valid split |
|
|
11
12
|
|
|
12
13
|
## `docs/research/` — the analysis home (owned by this command)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# PLAN execution batches
|
|
2
|
+
|
|
3
|
+
This module is the single contract for grouping PLAN phases into execution units. `plan-new`
|
|
4
|
+
and `plan-refine` declare the intended units; `plan-exec` infers them again from live state.
|
|
5
|
+
|
|
6
|
+
## Plan interface
|
|
7
|
+
|
|
8
|
+
Every new or refined plan carries this core section after `## Tasks`:
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
## Execution batches
|
|
12
|
+
|
|
13
|
+
- B1 · continuous · F1-F3
|
|
14
|
+
- B2 · isolated · F4
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Rows use sequential `B1..Bn` ids and form a complete, disjoint phase partition in order. A batch
|
|
18
|
+
contains consecutive phases and uses one of two exact modes:
|
|
19
|
+
|
|
20
|
+
- `continuous` — implement every phase first; validate and review the combined diff at batch
|
|
21
|
+
close; then create one commit per changed Git source.
|
|
22
|
+
- `isolated` — the traditional cycle for one phase. It is still a batch, so the same state,
|
|
23
|
+
validation, review and Git rules apply at its close.
|
|
24
|
+
|
|
25
|
+
The phase contracts, dependencies, risks and open questions are the reproducible evidence.
|
|
26
|
+
|
|
27
|
+
## Inference
|
|
28
|
+
|
|
29
|
+
Choose the maximal consecutive `continuous` ranges: a range stays eligible while nothing observable
|
|
30
|
+
breaks it. Anything else is `isolated`; if every phase is eligible, the whole plan is one batch.
|
|
31
|
+
|
|
32
|
+
> **Which facts break eligibility, and what one of them costs, is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. It emits the closed vocabulary of those facts at the boundary that asks for them.
|
|
33
|
+
|
|
34
|
+
This is an inference from observable facts, not a preference question. The PLAN gate fails when a
|
|
35
|
+
phase is missing, duplicated, reordered or grouped across an ineligible boundary.
|
|
36
|
+
|
|
37
|
+
## Runtime authority
|
|
38
|
+
|
|
39
|
+
Before editing, `plan-exec` repeats the inference over pending phases using the plan plus live
|
|
40
|
+
dependencies, branches, working trees, blockers and risks: current evidence wins over the declared
|
|
41
|
+
partition. The declared section remains planning structure;
|
|
42
|
+
the effective batches and any difference are recorded in `CHECKPOINT`.
|
|
43
|
+
|
|
44
|
+
A legacy plan without `## Execution batches` is valid. Execution infers effective batches and
|
|
45
|
+
records them in `CHECKPOINT`; it does not normalize the plan merely to add the section.
|
|
46
|
+
|
|
47
|
+
## Continuous cycle
|
|
48
|
+
|
|
49
|
+
The batch — not the phase — is the execution boundary: implementation runs straight through, and
|
|
50
|
+
every proof, check, review and state flip happens once at its close. This is the narrow exception to
|
|
51
|
+
the chassis' per-phase artifact beat and clean-tree rule, and task checkboxes plus phase states are
|
|
52
|
+
what keep it resumable. The order of those closing steps is the CLI's, per the note above.
|
|
53
|
+
|
|
54
|
+
A real blocker or structural/functional deviation stops immediately. No unproven phase becomes
|
|
55
|
+
`validada`; the combined changes remain uncommitted and the actual states plus the unblocking
|
|
56
|
+
action go to `CHECKPOINT`.
|
|
57
|
+
|
|
58
|
+
## Git authorization
|
|
59
|
+
|
|
60
|
+
A green batch produces exactly one proposed commit per affected source. Approving is not committing,
|
|
61
|
+
and a check that never ran is not a green batch. For the last pending batch the same approval also
|
|
62
|
+
covers marking the fully validated plan `done`, so that final write rides in the source's single
|
|
63
|
+
commit instead of asking a second time.
|
|
64
|
+
|
|
65
|
+
> **What proves the batch was green is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document — positionally, behind the delegated validation and the review, neither of which a narration can pass.
|
|
@@ -5,12 +5,14 @@ Loaded when the input is not plainly a `ready-for-plan` spec (signal `input`).
|
|
|
5
5
|
## plan-new — four modes
|
|
6
6
|
|
|
7
7
|
1. **Ready spec** (`docs/specs/NNN-spec-<slug>.md` whose frontmatter declares `status: ready-for-plan`) → ideal. Proceed straight to the loop.
|
|
8
|
-
2. **Spec not ready** (`status: draft` / `refining`, or no mark at all) → **soft-suggest** running `/w:spec-refine` first
|
|
8
|
+
2. **Spec not ready** (`status: draft` / `refining`, or no mark at all) → **soft-suggest** running `/w:spec-refine` first, **never a block**. Questions the spec left with destination `PLAN` are this flow's **input**, not a reason to send it back.
|
|
9
9
|
3. **Prompt** (no spec referenced) → propose the SPEC flow; **by default launch `/w:spec-new`** with that prompt and continue the natural flow from there.
|
|
10
|
-
4. **External plan content** — the argument carries an **already-built plan** (host plan mode, hand-written, another agent's) → **adopt it**. Single pass, **NO RESEARCH**: materialize as `docs/plans/PPP-plan-<slug>.md
|
|
10
|
+
4. **External plan content** — the argument carries an **already-built plan** (host plan mode, hand-written, another agent's) → **adopt it**. Single pass, **NO RESEARCH**: materialize as `docs/plans/PPP-plan-<slug>.md`, normalized to the rich-plan schema with only what the source provides. `## Origin` = "adopted from <source>" + attribution (host · model · date). Then offer `/w:plan-refine` or `/w:plan-exec`. Anti-duplicate: a plan whose `## Origin` matches this objective is resumed, never duplicated. Adoption **never regenerates over** an existing plan-doc.
|
|
11
11
|
|
|
12
12
|
> **Mode 3 vs 4:** a prompt that *describes a wish* → SPEC (mode 3); content that *already is a plan* → adopt (mode 4).
|
|
13
13
|
|
|
14
|
+
> **What adoption may do once the mode is settled is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document.
|
|
15
|
+
|
|
14
16
|
> **Ready vs not** is read from the spec's frontmatter `status`, never from the filename. **Legacy compat:** a spec with no frontmatter that carries `## Refinement decisions` — or the older `## Q&A traceability` — counts as ready the same way.
|
|
15
17
|
|
|
16
18
|
## plan-refine — three modes
|
|
@@ -23,4 +25,4 @@ Loaded when the input is not plainly a `ready-for-plan` spec (signal `input`).
|
|
|
23
25
|
|
|
24
26
|
## Numbering
|
|
25
27
|
|
|
26
|
-
The plan is named `docs/plans/PPP-plan-<slug>.md
|
|
28
|
+
The plan is named `docs/plans/PPP-plan-<slug>.md`; `aw next-number docs/plans` mints `PPP` and the slug comes from the Requirement. It does **not inherit the spec's `NNN`** — the link is established by reference in `## Origin`, never by number.
|
|
@@ -9,4 +9,6 @@ The gate itself — signals, offer, anti-duplicate, sibling contract, partition
|
|
|
9
9
|
- The original plan **keeps its number/path**: it is rewritten **reduced** to its remaining tranche (in place, with confirmation). The extracted tranches become newly minted sibling plans (`aw next-number docs/plans` immediately before each write); their `## Origin` records "split from `docs/plans/PPP-plan-<slug>.md`" + the source spec + the siblings by path.
|
|
10
10
|
- The gate also fires on **partially executed** plans. **Completed tasks (`- [x]`) never move to a sibling** — execution history stays anchored to the original path (plan-exec sessions' `## Origin` keep resolving); only pending work is extracted.
|
|
11
11
|
- The split is recorded in `## Refinement decisions` (what moved where + why); original + siblings together keep the **complete, disjoint partition** of the spec criteria (spec-less: the Delta 2 degradation applies).
|
|
12
|
-
- **Closing action** on the split branch
|
|
12
|
+
- **Closing action** on the split branch edits the original reduced and writes the extracted siblings — after the confirmation, never before it.
|
|
13
|
+
|
|
14
|
+
> **When the cut fires, and that the write follows the confirmation, is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. The offer's alternatives are its too.
|
|
@@ -4,11 +4,13 @@ Loaded when the plan may have to become more than one document (signal `split`).
|
|
|
4
4
|
|
|
5
5
|
## Split gate (multi-plan)
|
|
6
6
|
|
|
7
|
-
Resolves the **Plan splittable** gap (Delta 2) — the canonical definition for **both** plan loops (`plan-refine-loop` references it, never redefines it). It fires **only on clear signals**
|
|
7
|
+
Resolves the **Plan splittable** gap (Delta 2) — the canonical definition for **both** plan loops (`plan-refine-loop` references it, never redefines it). It fires **only on clear signals** of independently deliverable tranches, and never on a borderline plan.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **
|
|
9
|
+
> **Which signals count, how many it takes, and therefore whether the offer appears at all, is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. Recognizing a signal is judgment; counting them is a rule.
|
|
10
|
+
|
|
11
|
+
- **The offer** enters the batch as a **content question** (counts in the ≤3): the body shows the proposed cut in the **user's language** — per sibling, a name + slug, a 1-line scope, the phase mapping and the order. Declining marks the gap **exhausted** (no re-offer this run); a free-form answer adjusts the cut. The accepted cut is seeded into `CHECKPOINT` — a resume does **not** re-ask.
|
|
12
|
+
- **Anti-duplicate** (the `create_or_resume` spirit): sibling plans whose `## Origin` references this same spec/split are resumed, never minted a second time.
|
|
13
|
+
- **On acceptance** — same run, same session (one session per run, one HISTORY row): **all N siblings are elaborated complete** in this run — each gets the full Delta 1 schema and is immediately executable (`plan-exec` runs any plan; a seed without `## Tasks` would break that contract). Context pressure is absorbed by self-regulation (chassis § *Compact / resume*). Numbering follows [`PLAN-INPUT`](PLAN-INPUT.md) § *Numbering*, minted immediately before each write.
|
|
12
14
|
- **Sibling contract**: each `## Origin` records the shared source spec + `split (part i/N)` + the **siblings by path** + the order; `## Dependencies` (the existing optional section) carries the inter-plan order — **acyclic and advisory** (`plan-exec` does not enforce it; it only orients what to attack first).
|
|
13
15
|
- **Coherence gate, re-framed**: every spec acceptance criterion traces to **exactly one** sibling — a **complete, disjoint partition**; each sibling's Final behavior block (in `## Solution`) covers its subset; the union covers the spec. Spec-less plans anchor the partition to their own Final behavior block / `Validations`.
|
|
14
|
-
- **Closing action** on the split branch
|
|
16
|
+
- **Closing action** on the split branch writes every sibling in the same run; the single-plan branch writes one document. Both are the same confirmation step, and its alternatives are the CLI's.
|
|
@@ -10,4 +10,6 @@ Loaded when a bare prompt continues an existing work line (signal `resume`).
|
|
|
10
10
|
2. `"second prompt"` (**no command**, related work) → does **not** create another session: **continues/reopens the most recent one** (from step 1) and appends the new scripts to **that same** `SCRIPTS.sql`.
|
|
11
11
|
3. `/w:quick "third prompt"` (**command** again) → **new** session, new loop.
|
|
12
12
|
|
|
13
|
-
>
|
|
13
|
+
> **Which line a prompt joins is not this document's call:** a command opens a new one through `aw session-create`, a bare prompt continues the most recent through `aw resume`. Both fire **before** a run exists, so no journey has a step for them. The reason stays: the **command** is the signal for "new work line", so nobody loses a thread by not typing one, or forks one by typing it twice.
|
|
14
|
+
|
|
15
|
+
Whether a prompt really belongs to the open line is judgment. Clearly unrelated → offer choosing (`continuar NNN` | `trabajo nuevo`) or fall to the **no-flow** branch (`docs/` by convention + numbering). No workspace → **vanilla** behavior.
|
|
@@ -8,14 +8,14 @@ Loaded when the investigation may have changed the spec shape (signal `shape`).
|
|
|
8
8
|
|
|
9
9
|
| Finding | What it asks | What it writes |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| **`split`** — independent functional outcomes discovered |
|
|
11
|
+
| **`split`** — independent functional outcomes discovered | cardinality: one spec, or several siblings | the original, rewritten reduced, **plus** one new file per extracted outcome |
|
|
12
12
|
| **`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 |
|
|
13
13
|
|
|
14
14
|
## Change-shape gate
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
The investigation can reveal the draft's shape was wrong. Does the spec still carry **one** functional outcome, did its purpose survive, can the delivery be accepted as a unit? The verdict is **one of three shapes** — `same` | `split` | `replace` — each with its own branch; only the last two ask anything.
|
|
17
17
|
|
|
18
|
-
> **
|
|
18
|
+
> **When it runs, and that it never travels inside the gap loop, is not this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. Why it matters: a shape decision parked among the gap questions is erased by the next batch — or never asked at all, because a spec with no blocking gap leaves the loop before a batch is built.
|
|
19
19
|
|
|
20
20
|
- same outcome — more clarity, or more technical components → **`same`**: no shape question, keep refining this spec;
|
|
21
21
|
- independent functional outcomes discovered → **`split`** (below);
|
|
@@ -25,7 +25,7 @@ Runs once the baseline exists and **before** closing details: the investigation
|
|
|
25
25
|
|
|
26
26
|
**Split criterion** — the one `spec-new` already uses ([`SPLIT-GATE.md`](SPLIT-GATE.md), `spec-new`'s `split` module), never a different one: divide **only** when each part can be refined, accepted and planned on its own. Repos, technologies, layers or teams are **secondary evidence**, never the reason.
|
|
27
27
|
|
|
28
|
-
**Split semantics (in place).** The offer enters the batch as a content question
|
|
28
|
+
**Split semantics (in place).** The offer enters the batch as a content question. On acceptance: the original **keeps its number/path**, rewritten reduced to its remaining outcome; each extracted outcome is minted with `aw next-number docs/specs` right before its write and is born **`status: draft`**. Siblings are **not** elaborated here — unlike the multi-plan gate, where `plan-exec` would break on a plan with no `## Tasks`; a draft spec is legitimate input to this very loop — so the run keeps refining the **reduced original** and reports `/w:spec-refine` as each sibling's next step. Every `## Origin` records "split from `docs/specs/NNN-spec-<slug>.md`" + the siblings **by path**. Closing action on this branch: `Guardar specs`.
|
|
29
29
|
|
|
30
30
|
**Replace semantics.** Its offer is its own — `Crear una nueva spec` | `Reformular esta spec`, **never** the split labels: what gets decided is which identity carries the new purpose. Recommend **a new spec** when the main functional outcome or the actor/consumer changed; **reformulating** when the user confirms this file is still the same unit of work and wants to keep its identity.
|
|
31
31
|
|
package/skills/w/roles/README.md
CHANGED
|
@@ -12,7 +12,7 @@ All 6 roles, their built-in defaults, their tier, and which loops/exports compos
|
|
|
12
12
|
|
|
13
13
|
| Role | Default built-in | Tier | Composed by |
|
|
14
14
|
|---|---|---|---|
|
|
15
|
-
| `
|
|
15
|
+
| `design` | [`design`](design/ROLE.md) | must | `spec-refine-loop` (when requirement involves UI) · `plan-new-loop` / `plan-refine-loop` · `plan-exec-loop` (reads, never redesigns) |
|
|
16
16
|
| `sql` | `sql` | must | inline research · `plan-exec-loop` · `quick-loop` · `export-scripts` |
|
|
17
17
|
| `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
|
|
18
18
|
| `research` | [`research`](research/ROLE.md) | should | all loops (on-demand investigation) |
|
|
@@ -25,6 +25,8 @@ All 6 roles, their built-in defaults, their tier, and which loops/exports compos
|
|
|
25
25
|
|
|
26
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
|
+
> **`ui-design` and `ui-spec` are retired names.** The design slot is [`design`](design/ROLE.md), whose only output is the UI Design Package v1. Neither retired name is a role, a binding, an alias or an implementation: they are **rejected**, because two names for one capability are two contracts in disguise. There is no alias, no dual-read, no importer and no migration — a binding that names one is reported as `retired/unsupported`, and a design that is still needed is recreated over the package.
|
|
29
|
+
>
|
|
28
30
|
> **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. The **minimality / anti-over-engineering** lens is **not a role either**: it is a built-in property of the convergence gate (chassis § *Minimality*), owed with no external skill and merely *raised* by whatever ambient review skills are installed — internal essence without the coupling a role would reintroduce.
|
|
29
31
|
|
|
30
32
|
---
|
|
@@ -49,6 +51,8 @@ built-in default
|
|
|
49
51
|
2. **Role with no binding at any level** → use the built-in default (table above). No config needed for the common case.
|
|
50
52
|
3. **`off`** → capability disabled. The loop continues without it; if the task required it, the loop reports why it cannot proceed or asks the human.
|
|
51
53
|
|
|
54
|
+
**A role whose skill declares a capability descriptor is stricter**, because there the binding decides what RUNS and not just which name is written: unset or the canonical name enables the built-in floor plus whatever compatible improvements the host selected; `off` applies the descriptor's per-operation policy and no host, wrapper or legacy name reverts it; anything else is `misconfigured` — a replacement binding does not select an improvement, and the file is never rewritten for you. Existing workspaces are not migrated: `aw skills --detail` explains the reclassification and the owner adopts unset, the canonical name or `off`.
|
|
55
|
+
|
|
52
56
|
---
|
|
53
57
|
|
|
54
58
|
## skills.toml format
|
|
@@ -56,7 +60,7 @@ built-in default
|
|
|
56
60
|
```toml
|
|
57
61
|
[skills]
|
|
58
62
|
# Built-in defaults (no entry needed — listed here for reference only)
|
|
59
|
-
#
|
|
63
|
+
# design = "design"
|
|
60
64
|
# sql = "sql"
|
|
61
65
|
# git = "git"
|
|
62
66
|
# research = "research"
|
|
@@ -64,7 +68,7 @@ built-in default
|
|
|
64
68
|
# overview = "w"
|
|
65
69
|
|
|
66
70
|
# Override examples:
|
|
67
|
-
|
|
71
|
+
design = "acme/figma-spec" # third-party skill installed via skills.sh
|
|
68
72
|
diagrams = "mermaid-only" # custom built installed locally
|
|
69
73
|
sql = "off" # disable the sql capability
|
|
70
74
|
```
|
|
@@ -73,7 +77,7 @@ sql = "off" # disable the sql capability
|
|
|
73
77
|
|
|
74
78
|
```toml
|
|
75
79
|
[skills]
|
|
76
|
-
|
|
80
|
+
design = "acme/figma-spec"
|
|
77
81
|
```
|
|
78
82
|
|
|
79
83
|
`acme/figma-spec` must be installed on the host (e.g. via `skills.sh install acme/figma-spec`). The binding is **advisory**: the resolver emits the name as-is — it does **not** verify the skill is installed and does **not** auto-fall-back to the built-in default. A typo'd name silently leaves the role bound to a skill that does not exist. Verify the resolution with `aw skills`, which warns when a bound skill is not found in the standard skill roots.
|
|
@@ -111,7 +115,7 @@ Example output:
|
|
|
111
115
|
```
|
|
112
116
|
Role Resolved skill Source
|
|
113
117
|
----------------- ----------------------- -----------
|
|
114
|
-
|
|
118
|
+
design design built-in
|
|
115
119
|
sql sql built-in
|
|
116
120
|
git git built-in
|
|
117
121
|
research research built-in
|