@tacuchi/agent-workflow-cli 21.3.0 → 21.4.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.
Files changed (49) hide show
  1. package/dist/application/capability/wrapper.js +8 -7
  2. package/dist/application/capability/wrapper.js.map +1 -1
  3. package/dist/application/dev-only-services.js +63 -15
  4. package/dist/application/dev-only-services.js.map +1 -1
  5. package/dist/application/self/host-states.js +11 -0
  6. package/dist/application/self/host-states.js.map +1 -1
  7. package/dist/application/self/install-skill.js +15 -3
  8. package/dist/application/self/install-skill.js.map +1 -1
  9. package/dist/cli/commands/capability.js +8 -4
  10. package/dist/cli/commands/capability.js.map +1 -1
  11. package/dist/cli/commands/dev-only.js +7 -3
  12. package/dist/cli/commands/dev-only.js.map +1 -1
  13. package/dist/cli/commands/flow.js +5 -0
  14. package/dist/cli/commands/flow.js.map +1 -1
  15. package/dist/cli/commands/skills.js +14 -3
  16. package/dist/cli/commands/skills.js.map +1 -1
  17. package/dist/cli/tui/components/host-admin-section.js +31 -3
  18. package/dist/cli/tui/components/host-admin-section.js.map +1 -1
  19. package/dist/cli/tui/components/logs-section.js +26 -5
  20. package/dist/cli/tui/components/logs-section.js.map +1 -1
  21. package/dist/cli/tui/components/notification-banner.js +10 -0
  22. package/dist/cli/tui/components/notification-banner.js.map +1 -1
  23. package/dist/cli/tui/components/notification-stack.js +17 -1
  24. package/dist/cli/tui/components/notification-stack.js.map +1 -1
  25. package/dist/cli/tui/notification-center.js +9 -0
  26. package/dist/cli/tui/notification-center.js.map +1 -1
  27. package/dist/cli/tui/tabs/mcp-tab.js +26 -2
  28. package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
  29. package/dist/cli/tui/tabs/project-tab.js +101 -46
  30. package/dist/cli/tui/tabs/project-tab.js.map +1 -1
  31. package/dist/cli/tui/tabs/skills-tab.js +80 -16
  32. package/dist/cli/tui/tabs/skills-tab.js.map +1 -1
  33. package/dist/cli/tui/use-list-window.js +53 -0
  34. package/dist/cli/tui/use-list-window.js.map +1 -0
  35. package/dist/domain/design/maturity.js +8 -6
  36. package/dist/domain/design/maturity.js.map +1 -1
  37. package/dist/domain/design/visual-evidence.js +11 -27
  38. package/dist/domain/design/visual-evidence.js.map +1 -1
  39. package/dist/domain/harnesses.js +9 -1
  40. package/dist/domain/harnesses.js.map +1 -1
  41. package/dist/domain/resource-policy.js +111 -0
  42. package/dist/domain/resource-policy.js.map +1 -0
  43. package/package.json +1 -1
  44. package/skills/w/harness/HARNESS.md +25 -2
  45. package/skills/w/loops/CHASSIS.md +2 -2
  46. package/skills/w/loops/plan-new-loop/LOOP.md +4 -3
  47. package/skills/w/loops/spec-refine-loop/LOOP.md +2 -2
  48. package/skills/w/modules/DESIGN-REFERENCES.md +14 -12
  49. package/skills/w/roles/design/ROLE.md +9 -5
@@ -45,6 +45,29 @@ The capabilities the harness layer depends on, with their universal fallback (wh
45
45
 
46
46
  > **Only two capabilities are `must` for a loop's cycle**: `structured-choice` and `compaction`. Both degrade to a purely textual fallback → **any** harness with chat + a filesystem runs the full model. The rest (subagents, MCP, slash commands, native skills) is *enhancement*.
47
47
 
48
+ ## Resource authority — the CLI spends, the host supplies
49
+
50
+ The host advertises primitives; the CLI owns whether their cost is justified.
51
+ `aw harness` reports **`agent_host`** and **`terminal_host`** separately, so Codex
52
+ inside Warp is not mistaken for Warp. A host-specific installed wrapper binds its
53
+ own target explicitly; environment detection is the fallback, while a shared
54
+ `.agents/skills` wrapper stays unbound because several hosts can read it.
55
+
56
+ - A deterministic tranche dispatches **zero** model workers, subagents and
57
+ external processes. `aw flow advance` exhausts it locally until the first
58
+ semantic, human, authorization, execution, blocked or final frontier.
59
+ - A semantic tranche is inline by default. It may use subagents only for three
60
+ or more independent partitions with no dependency and no overlapping writes;
61
+ then the CLI caps them at **3** (at most **4** model workers including the
62
+ coordinator). Human and authorization frontiers never fan out.
63
+ - An execution frontier has one external invocation at a time and returns its
64
+ actual evidence; it is not a request to run more agents.
65
+ - Token usage is recorded only when the host supplies a real count. Bytes,
66
+ context size and estimates are never relabeled as tokens.
67
+
68
+ This lets a capable host contribute parallel analysis when it is cheaper than
69
+ coordination, without turning a deterministic CLI rule into model work.
70
+
48
71
  ## Harness binding matrix
49
72
 
50
73
  Concrete mechanism per harness (matrix base verified **Jul-2026**; the `structured-choice` row re-verified **2026-08-04** and the Codex `hooks` row **2026-08-05**, both against the INSTALLED runtimes plus real runs — not docs; `~` partial). Antigravity CLI reuses Gemini's surfaces (`~/.gemini/`); Oz reuses Warp's (they share the **Warp / Oz** column, with MCP via flag — see the note under the matrix).
@@ -55,7 +78,7 @@ Concrete mechanism per harness (matrix base verified **Jul-2026**; the `structur
55
78
  | procedure-loading (skills) | `SKILL.md` `.claude/skills` | `SKILL.md` `.agents/skills` | `SKILL.md` `.kimi-code/skills`+`.agents/skills` (user and project tiers) | `SKILL.md` (agentskills) | `SKILL.md` `.opencode`+`.claude`+`.agents` | `SKILL.md` `~/.config/crush`+`.agents`+`.claude` (`.crush/skills` is project-only) | `SKILL.md` `.agents`+`.warp`+`.claude` | read-and-follow `.md` |
56
79
  | structured-choice | `AskUserQuestion` (**main-agent only**; 1–4 questions, 2–4 options; label + description; free-text always offered) | `request_user_input` **not reachable** (~): its router refuses it in Default mode and exec mode never offers it; opt-in `default_mode_request_user_input` still *under development* → labeled markdown | `AskUserQuestion` (1–4 questions, 2–4 options; label + description; free-text offered) — **not called in `auto`/non-interactive mode** by the host's own rule → labeled markdown | `AskQuestion` (Antigravity/`agy`, the live binary: option `text` only, **no description field** → `Label — sentence`; write-in; no ceiling declared). `ask_user` is the retired Gemini CLI's and is **absent** from `agy` | `question` (label + description as separate fields; `custom` free-text on by default; no ceiling declared) — **denied in a non-interactive run** → labeled markdown | `question` (≤5 questions, ≤5 choices; description required per question <300 chars and **per choice <100 chars**; automatic fill-in) | no structured-choice surface → labeled markdown | labeled markdown (label + sentence) |
57
80
  | compaction | `/compact` | Pre/PostCompact hooks | `/compact` + Pre/PostCompact hooks | ~ | `session.compacted` | ~ | ~ | CHECKPOINT + resume |
58
- | subagent-dispatch | `Task` (parallel) | `SubagentStart` / agents | sub-agents (`SubagentStart`/`SubagentStop`) | agents (`.gemini/agents`) | `.opencode/agent/*.md` | ~ | ~ (cloud agents) | inline |
81
+ | subagent-dispatch | `Task` (parallel) | `agents` | `SubagentStart` | agents (`.gemini/agents`) | `.opencode/agent/*.md` | inline | inline (Oz cloud orchestration is not a direct worker binding) | inline |
59
82
  | persistent-context | `CLAUDE.md` (does **not** read AGENTS.md → symlink) | `AGENTS.md` | `AGENTS.md` (hierarchical) | `GEMINI.md` + `AGENTS.md` | `AGENTS.md` | `CRUSH.md` + `AGENTS.md` | `AGENTS.md` (auto) | `AGENTS.md` |
60
83
  | **host-memory** | `MEMORY.md` (cheap) + transcripts/`--resume` (deep) | `AGENTS.md` (static → fallback) | sessions with resume/fork (`kimi -S`) + `AGENTS.md` | `GEMINI.md`+`AGENTS.md` (static → fallback) | `AGENTS.md` (static → fallback) | `CRUSH.md`+`AGENTS.md` (static → fallback) | rules / history (~) | git/`docs/` + ask |
61
84
  | **web-research** | `WebSearch` / `WebFetch` | `web_search` (opt-in config) | moonshot search + fetch services | `google_web_search` + `web_fetch` | `webfetch` (~) | ~ | ~ (agent web access) | — (offline + declare) |
@@ -124,7 +147,7 @@ Proven pattern (Spec Kit, 30+ agents): **one canonical source** + generate/symli
124
147
 
125
148
  ## Command packaging (harness-specific)
126
149
 
127
- Each command's **contract** (Flow, Trigger, Input, Mode, …) is agnostic. The **file** the harness executes wraps that contract in its native format — the installer (`aw self install-skill`) emits the right wrapper per host, retargets bundle-relative links to that host's installed `skills/w` directory and materializes the authored `${CLAUDE_PLUGIN_ROOT}/skills/w` token to the same absolute bundle for `aw context-plan --root`. Claude's plugin surface expands that token natively; installed wrappers never rely on the CLI's potentially different packaged copy:
150
+ Each command's **contract** (Flow, Trigger, Input, Mode, …) is agnostic. The **file** the harness executes wraps that contract in its native format — the installer (`aw self install-skill`) emits the right wrapper per host, retargets bundle-relative links to that host's installed `skills/w` directory, binds its flow/capability calls with `--host <target>`, and materializes the authored `${CLAUDE_PLUGIN_ROOT}/skills/w` token to the same absolute bundle for `aw context-plan --root`. Claude's plugin surface expands that token natively; installed wrappers never rely on the CLI's potentially different packaged copy:
128
151
 
129
152
  | Host | Wrapper installed | Invoked as |
130
153
  |---|---|---|
@@ -2,7 +2,7 @@
2
2
 
3
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
- > **When each step below happens is no longer this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. What stays is what each rule is FOR — the half no engine carries.
5
+ > **When each step below happens is no longer this document's call:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document. They consume no model worker, subagent or external process: the CLI advances them locally to the first real frontier. What stays is what each rule is FOR — the half no engine carries.
6
6
 
7
7
  ## Heirs (canonical list)
8
8
 
@@ -45,7 +45,7 @@ The persistent objective needs a **checkable done-condition** — otherwise the
45
45
 
46
46
  **Gate integrity (anti-gaming + independent verification).** The gate only counts if it is not gamed to pass. The loop does **not**: modify the check or loosen a `Success criterion` to force green; weaken, delete or skip tests/validations; use trivial or tautological asserts that always pass (the expected value comes from an independent source, never from the output itself); patch the test instead of fixing the cause (prefer fixing production code).
47
47
 
48
- 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*.
48
+ 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 only when the CLI's independent-partition rule admits it, or a clean re-read) that does not assume the implementation is correct — *only command output counts*.
49
49
 
50
50
  **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:
51
51
 
@@ -6,7 +6,8 @@ description: >-
6
6
  TECHNICAL-NOTE level + Tasks phased by verifiable functional state
7
7
  (### Fn blocks with live state),
8
8
  code/impact-mapping research, planning gap taxonomy, and promotion of the
9
- design closure to handoff via `design`
9
+ design closure to handoff via `design`: reuse a valid one, promote the rest,
10
+ then pin the roots
10
11
  when the plan includes UI. If the spec is not refined it suggests
11
12
  spec-refine first. Started by /w:plan-new; resumable. Invoke when a spec
12
13
  must become an executable plan.
@@ -137,7 +138,7 @@ Replaces the spec gap taxonomy with a planning-oriented one:
137
138
  | Missing deps | order unclear | research / human |
138
139
  | Spec criteria uncovered | tasks don't trace to acceptance criteria | the AI derives + human confirms |
139
140
  | Unaddressed risks | technical risks unmitigated/undeclared | human / **probe** (Delta 5) |
140
- | UI without design *(if it applies)* | the plan includes UI (FE/screens in `Impacted`, `## Design references` in the spec, or UI tasks) and pins no exact root, or its roots are not `handoff` | **`design`** (promote the closure, pin the roots) |
141
+ | UI without design *(if it applies)* | the plan includes UI (FE/screens in `Impacted`, `## Design references` in the spec, or UI tasks) and pins no exact root, or its roots are not `handoff` | **`design`** (promote the closure, pin the roots — reusing an already valid compact handoff instead of re-promoting it) |
141
142
 
142
143
  > **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.
143
144
 
@@ -161,7 +162,7 @@ plan-new-loop(spec):
161
162
  gaps = detect_gaps(work) (Delta 2 taxonomy) minus the exhausted ones
162
163
  if gaps == ∅: break
163
164
  batch ≤3 → seed CHECKPOINT.Pending/Next → resolve each gap:
164
- research · human (structured-choice) · probe · design (promote closure + pin roots)
165
+ research · human (structured-choice) · probe · design (reuse valid handoff or promote missing closure + pin roots)
165
166
  integrate + update CHECKPOINT
166
167
  coherence gate (read-only) = Success criteria green:
167
168
  - every spec criterion traces to a phase/task (split: exactly one sibling)
@@ -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 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).
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 when expanded; a compact delta publishes its `handoff` in one pass. 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) 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.
71
+ > **Two levels of the same capability:** a compact SPEC may already close its exact roots at `handoff`; otherwise SPEC keeps an `outline` reference and PLAN promotes exactly the closure it implements. A valid handoff is reused, never re-authored. 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
 
@@ -34,21 +34,24 @@ cannot be superseded without editing it.
34
34
  Publishing the package is the loop writing a composed deliverable through the
35
35
  CLI, not graduating a session artifact (chassis § *docs/ boundary*).
36
36
 
37
- ## `handoff` asks to SEE it
37
+ ## Evidence and lifecycle
38
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.
39
+ `trace` marks each criterion `visual`, `interaction` or `not_visual`. Preview
40
+ only visual acceptance; interaction relies on states, semantics and implementation
41
+ proof, never a storyboard merely to satisfy format.
42
+
43
+ The CLI marks a delta **compact** only with an existing surface, ≤2 screens, and
44
+ no journey, rule, token, asset, external dependency, blocker or adaptation.
45
+ Compact publishes one `handoff` for PLAN to reuse. Otherwise it is **expanded**:
46
+ SPEC keeps `outline`; PLAN promotes only its consumed closure. The model authors
47
+ content, not this routing.
44
48
 
45
49
  ## SPEC — close the requirement at `outline`
46
50
 
47
51
  1. **Reuse before minting.** `aw designs` lists what the workspace already has; a
48
52
  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.
53
+ 2. **Classify the lifecycle.** Compact publishes `handoff` now; otherwise open
54
+ `outline`, which may hold unknowns until PLAN promotes its implemented roots.
52
55
  3. **Publish, then reference.** Citing a baseline that was never published is the
53
56
  dangling reference this contract removes.
54
57
 
@@ -66,9 +69,8 @@ before `## Decisions`.
66
69
  reach the rules, tokens and assets they depend on. It stops there. `flow_refs`
67
70
  is *not* followed — it is the inverse relation, and following it drags in
68
71
  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
+ 4. **Reuse a valid `handoff`, or promote exactly the missing closure.** A compact
73
+ handoff from SPEC is already the plan's baseline, not work to repeat.
72
74
  5. **Publish the revision**, then write the roots.
73
75
 
74
76
  The plan declares its own `## Design references` — same block — after
@@ -41,11 +41,12 @@ The package is the deliverable. A spec **references** it; it never contains it.
41
41
  ## Composed by
42
42
 
43
43
  - **`spec-refine-loop`** — the requirement involves UI: reuse a compatible
44
- baseline or open an `outline` revision, and leave only `## Design references`
45
- in the spec document.
46
- - **`plan-new-loop` · `plan-refine-loop`** — the plan consumes UI: promote to
47
- `handoff` exactly the closure the plan consumes, and write the exact roots
48
- into each phase or task.
44
+ baseline or, for a compact delta, publish the exact `handoff` in one pass;
45
+ expanded work opens an `outline` revision. The spec leaves only `## Design
46
+ references`.
47
+ - **`plan-new-loop` · `plan-refine-loop`** the plan consumes UI: reuse that
48
+ valid handoff, or promote exactly the missing closure, and write the exact
49
+ roots into each phase or task.
49
50
  - **`plan-exec-loop`** — reads and validates; **never redesigns**. A design that
50
51
  turns out wrong stops execution and goes back to the refining loop.
51
52
 
@@ -111,6 +112,9 @@ what is not yet decided. A document may declare `handoff` only when:
111
112
  revision and digest;
112
113
  - no essential section answers with a **rendition and nothing else**: an
113
114
  approved image is not the current semantics and is not a WCAG conformance.
115
+ - a screen with a **visual** criterion preserves a local static preview of its
116
+ default state; a purely interaction/non-visual screen does not fabricate a
117
+ storyboard just to satisfy this gate.
114
118
 
115
119
  ### Governance: four independent dimensions
116
120