@tacuchi/agent-workflow-cli 20.10.0 → 20.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacuchi/agent-workflow-cli",
3
- "version": "20.10.0",
3
+ "version": "20.11.0",
4
4
  "description": "Runtime CLI for Workline — the stages + loops + artifacts system for agent work. Bundles the universal `w` skill set under `skills/w/` (slash commands `/w:*`: spec-new/spec-refine, plan-new/plan-exec, quick, persist, workspace-init, export-*); `self install --target <host>` copies SKILL + commands + hooks into the host. Pluggable capability skills via `.workflow/skills.toml`. Multi-empresa parametrization via `profile.json` cascade. Namespace auto-detected from any `.<ns>/sessions/` dir in CWD; default `workflow`.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -50,6 +50,14 @@ The persistent objective needs a **checkable done-condition** — otherwise the
50
50
 
51
51
  Facing a real blocker it **stops and reports it** (→ `Open questions`/`BACKLOG`) instead of gaming the metric. The verdict counts **only the check's output, never the implementer's self-declaration**: when the deliverable warrants it, the final verification is an **independent** pass (subagent or clean re-read) that does not assume the implementation is correct — *only command output counts*.
52
52
 
53
+ **Minimality (anti-over-engineering).** Passing the criteria is **necessary, not sufficient**: the gate also rejects a deliverable **heavier than its `Success criteria` require** — YAGNI at the deliverable's altitude. A spec can be coherent yet over-specified; a plan sound yet over-engineered; a diff green yet padded with reinvented stdlib, speculative abstractions or dead flexibility. At its own altitude the gate asks the laziest-that-works questions:
54
+
55
+ - **does each part need to exist at all?** — speculative → cut it (the strongest lever, cheapest at spec/plan altitude);
56
+ - **is it already there?** — in the codebase, the stdlib or the platform → reuse it, never reinvent;
57
+ - **could it be smaller?** — same behavior, fewer moving parts → shrink it.
58
+
59
+ This is a **built-in floor** owed by every gate with **no external skill**; the code-editing loops *raise* it with the installed ambient conventions (`CODE-POLICIES.md` § *Closing review gate*) but never fall below it. Bounded by *Gate integrity*: never trim validation at trust boundaries, error handling, security, accessibility or anything the spec explicitly requires — minimality cuts over-building, never correctness. Each heir instantiates the lens: **spec** = over-specified/gold-plated scope · **plan** = over-engineered solution / needless phase-task · **code** = the `delete`/`stdlib`/`native`/`yagni`/`shrink` diff lens.
60
+
53
61
  ## Artifacts as a live log — the artifact-first cycle
54
62
 
55
63
  The loop works **artifact-first**: the artifact is **seeded before** executing and **updated after**, not only on close. Every gap/phase/task runs the **3-beat** cycle:
@@ -24,6 +24,7 @@ After validation (of the phase in plan-exec; of the task in quick, proportional)
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
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
+ - **Minimality lens** (floor — holds with **no external skill**; chassis § *Minimality*): re-read the diff for over-building. Flag `delete` (dead/speculative code), `stdlib` (reinvented standard library), `native` (a dep or code doing what the platform already does), `yagni` (one-implementation abstraction, config nobody sets, one-caller layer), `shrink` (same behavior, fewer lines). An installed ambient review skill *raises* this; it never lowers it.
27
28
  - **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
29
  - **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
30
 
@@ -86,11 +86,14 @@ Replaces the spec gap taxonomy with a planning-oriented one:
86
86
  | AS-IS wiring unknown | current state unknown | **research** |
87
87
  | Phase too large | complexity > S | human (re-split) |
88
88
  | Task not atomic | complexity > XS | the AI re-splits |
89
+ | Over-engineered solution | approach heavier than the criteria need — needless abstraction/layer/dependency, or a phase/task not required to meet the spec (chassis § *Minimality*) | AI proposes the lighter path + **human** confirms (**probe** if "lighter works" is a runnable doubt) |
89
90
  | Missing deps | order unclear | research / human |
90
91
  | Spec criteria uncovered | tasks don't trace to acceptance criteria | the AI derives + human confirms |
91
92
  | Unaddressed risks | technical risks unmitigated/undeclared | human / **probe** (Delta 5) |
92
93
  | 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** |
93
94
 
95
+ > **Author the Solution the laziest-that-works way** (chassis § *Minimality*, generative side): reuse what the codebase/stdlib/platform already provides before proposing new abstractions, layers or dependencies — the coherence gate then only *confirms* minimality, never repairs over-engineering after the fact.
96
+
94
97
  ## Delta 3 — What research investigates here
95
98
 
96
99
  The chassis' **inline** research specializes: mapping **code/impact** — affected FE/BE/DB components, AS-IS wiring, dependencies. It feeds the `Solution`, `Impacted`, `Current state (AS-IS)` sections. The chassis DB rule applies unchanged (read-only queries into `SCRIPTS.sql`, MCP chosen via a content question when >1 without default).
@@ -131,6 +134,7 @@ plan-new-loop(spec):
131
134
  - every spec acceptance criterion traces to a phase/task
132
135
  - Final behavior covers the criteria
133
136
  - phases XS–S · tasks XS · deps without cycles · Impacted consistent with Solution
137
+ - minimality (chassis § *Minimality*): the Solution is the lightest that meets Final behavior; no phase/task/abstraction the criteria don't require
134
138
  - (UI) every screen/UI task traces to its design SPEC and does not contradict ## UI spec
135
139
  whatever fails → comes back as a gap
136
140
  structured_choice(content: [Guardar plan, Preguntar algo más], flow: [Compactar, Cerrar])
@@ -74,6 +74,8 @@ Reuses plan-new-loop's gap taxonomy **in full** ([`plan-new-loop`](../plan-new-l
74
74
 
75
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
76
 
77
+ > **Adjust the Solution the laziest-that-works way** (chassis § *Minimality*, generative side): reuse what already exists before adding abstractions, layers or dependencies — the coherence gate only *confirms* minimality, and a re-refine is a chance to *remove* over-building, not add it.
78
+
77
79
  ## Delta 3 — What research investigates here
78
80
 
79
81
  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).
@@ -104,7 +106,7 @@ plan-refine-loop(plan):
104
106
  ui-design (Delta 4, only new/changed screens)
105
107
  integrate + update CHECKPOINT # artifact-first cycle
106
108
  coherence gate (read-only) = Success criteria green:
107
- - plan-new checklist (criterion→task · Final behavior · XS–S/XS · deps · Impacted↔Solution · UI→current SPEC)
109
+ - plan-new checklist (criterion→task · Final behavior · XS–S/XS · deps · Impacted↔Solution · UI→current SPEC · minimality)
108
110
  # spec-less plan (adopted/hand-written): criteria anchor to the plan's own Final behavior/Validations (see Delta 2)
109
111
  - re-refine's own check: the plan is REALIGNED with what changed
110
112
  whatever fails → comes back as a gap
@@ -107,6 +107,7 @@ Every doubt asked to the human + the chosen answer.
107
107
  | Open questions pending | explicit doubts | by nature |
108
108
  | Hidden assumptions | the spec assumes unstated things | **research** validates / **human** confirms |
109
109
  | Internal contradiction | sections contradict each other | **human** |
110
+ | Over-specified requirement | scope/criteria gold-plated — beyond the actual need (chassis § *Minimality*) | **human** (AI proposes the cut, human ratifies) |
110
111
  | UI unspecified *(if it applies)* | the requirement involves UI but `## UI spec` is missing | **`ui-design` capability** |
111
112
 
112
113
  ## Sequence
@@ -142,7 +143,7 @@ spec-refine-loop(spec):
142
143
  Cerrar → goto finalize
143
144
  work = integrate(work, ans) # → Q&A traceability / Open questions
144
145
  # no material gaps → analyze gate = Success criteria green (read-only) before offering Guardar:
145
- issues = analyze(work) # criteria trace to the Requirement · no contradictions · coherent Scope · Open questions closed/deferred · scenarios↔criteria
146
+ issues = analyze(work) # criteria trace to the Requirement · no contradictions · coherent Scope · Open questions closed/deferred · scenarios↔criteria · no gold-plating (minimality)
146
147
  if issues: gaps += issues ; continue # findings come back into the loop as gaps
147
148
  ans = structured_choice(content: [Guardar refinada, Preguntar algo más],
148
149
  flow: [Compactar, Cerrar])
@@ -164,7 +165,7 @@ Full mechanism (3 cases, `Compactar`, re-run on demand with `--reopen`) in the c
164
165
 
165
166
  ## Convergence / exit
166
167
 
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`.
168
+ - **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. **Minimality** — no gold-plating: every criterion and scope item earns its place (chassis § *Minimality*); speculative scope is cut or 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`.
168
169
  - `Guardar` → `edit_in_place_with_confirm(spec)` and `finalize`.
169
170
  - `Cerrar` → the chassis `finalize` (always persists `CHECKPOINT`; `BACKLOG` **only if** something is deferred — here: close reason + deferred `Open questions`).
170
171
 
@@ -25,7 +25,7 @@ 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
- > **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.
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. 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
29
 
30
30
  ---
31
31