@tacuchi/agent-workflow-cli 20.22.0 → 20.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/adapters/git-cli.js +42 -0
  2. package/dist/adapters/git-cli.js.map +1 -1
  3. package/dist/application/artifacts-service.js +5 -5
  4. package/dist/application/artifacts-service.js.map +1 -1
  5. package/dist/application/checkpoint-service.js +60 -55
  6. package/dist/application/checkpoint-service.js.map +1 -1
  7. package/dist/application/checkpoint-write-service.js +61 -66
  8. package/dist/application/checkpoint-write-service.js.map +1 -1
  9. package/dist/application/context/budget-service.js +128 -0
  10. package/dist/application/context/budget-service.js.map +1 -0
  11. package/dist/application/context/bundle-root.js +41 -0
  12. package/dist/application/context/bundle-root.js.map +1 -0
  13. package/dist/application/context/manifest.js +150 -0
  14. package/dist/application/context/manifest.js.map +1 -0
  15. package/dist/application/context/measure.js +227 -0
  16. package/dist/application/context/measure.js.map +1 -0
  17. package/dist/application/context/plan-service.js +177 -0
  18. package/dist/application/context/plan-service.js.map +1 -0
  19. package/dist/application/decisiones-service.js +5 -5
  20. package/dist/application/decisiones-service.js.map +1 -1
  21. package/dist/application/export-service.js +250 -0
  22. package/dist/application/export-service.js.map +1 -0
  23. package/dist/application/fix-git-service.js +244 -0
  24. package/dist/application/fix-git-service.js.map +1 -0
  25. package/dist/application/history-update-service.js +35 -24
  26. package/dist/application/history-update-service.js.map +1 -1
  27. package/dist/application/lifecycle-target.js +39 -0
  28. package/dist/application/lifecycle-target.js.map +1 -0
  29. package/dist/application/parsers/spec-relation.js +80 -0
  30. package/dist/application/parsers/spec-relation.js.map +1 -0
  31. package/dist/application/paths-service.js +8 -0
  32. package/dist/application/paths-service.js.map +1 -1
  33. package/dist/application/persist-service.js +285 -0
  34. package/dist/application/persist-service.js.map +1 -0
  35. package/dist/application/release-data/artifacts.js +17 -21
  36. package/dist/application/release-data/artifacts.js.map +1 -1
  37. package/dist/application/resume-service.js +184 -0
  38. package/dist/application/resume-service.js.map +1 -0
  39. package/dist/application/semantic-operation/protocol.js +247 -0
  40. package/dist/application/semantic-operation/protocol.js.map +1 -0
  41. package/dist/application/semantic-operation/publish.js +80 -0
  42. package/dist/application/semantic-operation/publish.js.map +1 -0
  43. package/dist/application/session-binding-service.js +125 -0
  44. package/dist/application/session-binding-service.js.map +1 -0
  45. package/dist/application/session-close-service.js +60 -39
  46. package/dist/application/session-close-service.js.map +1 -1
  47. package/dist/application/session-create-service.js +45 -19
  48. package/dist/application/session-create-service.js.map +1 -1
  49. package/dist/application/session-resolver.js +180 -44
  50. package/dist/application/session-resolver.js.map +1 -1
  51. package/dist/application/session-resume-service.js +39 -9
  52. package/dist/application/session-resume-service.js.map +1 -1
  53. package/dist/application/sessions-service.js +0 -2
  54. package/dist/application/sessions-service.js.map +1 -1
  55. package/dist/application/status-service.js +24 -388
  56. package/dist/application/status-service.js.map +1 -1
  57. package/dist/application/tasks-service.js +5 -5
  58. package/dist/application/tasks-service.js.map +1 -1
  59. package/dist/application/workline-index-service.js +510 -0
  60. package/dist/application/workline-index-service.js.map +1 -0
  61. package/dist/cli/commands/checkpoint-read.js +10 -6
  62. package/dist/cli/commands/checkpoint-read.js.map +1 -1
  63. package/dist/cli/commands/checkpoint-write.js +38 -11
  64. package/dist/cli/commands/checkpoint-write.js.map +1 -1
  65. package/dist/cli/commands/context-budget.js +79 -0
  66. package/dist/cli/commands/context-budget.js.map +1 -0
  67. package/dist/cli/commands/context-plan.js +75 -0
  68. package/dist/cli/commands/context-plan.js.map +1 -0
  69. package/dist/cli/commands/export.js +117 -0
  70. package/dist/cli/commands/export.js.map +1 -0
  71. package/dist/cli/commands/fix-git.js +109 -0
  72. package/dist/cli/commands/fix-git.js.map +1 -0
  73. package/dist/cli/commands/generate-launch.js +35 -3
  74. package/dist/cli/commands/generate-launch.js.map +1 -1
  75. package/dist/cli/commands/history-update.js +1 -1
  76. package/dist/cli/commands/history-update.js.map +1 -1
  77. package/dist/cli/commands/index.js +15 -0
  78. package/dist/cli/commands/index.js.map +1 -1
  79. package/dist/cli/commands/persist.js +67 -0
  80. package/dist/cli/commands/persist.js.map +1 -0
  81. package/dist/cli/commands/resume-summary.js +14 -3
  82. package/dist/cli/commands/resume-summary.js.map +1 -1
  83. package/dist/cli/commands/resume.js +73 -0
  84. package/dist/cli/commands/resume.js.map +1 -0
  85. package/dist/cli/commands/session-artifacts.js +12 -11
  86. package/dist/cli/commands/session-artifacts.js.map +1 -1
  87. package/dist/cli/commands/session-close.js +8 -7
  88. package/dist/cli/commands/session-close.js.map +1 -1
  89. package/dist/cli/commands/session-create.js +5 -1
  90. package/dist/cli/commands/session-create.js.map +1 -1
  91. package/dist/cli/commands/session-resume.js +16 -10
  92. package/dist/cli/commands/session-resume.js.map +1 -1
  93. package/dist/cli/commands/status.js +66 -2
  94. package/dist/cli/commands/status.js.map +1 -1
  95. package/dist/cli/commands/workspace-init.js +21 -2
  96. package/dist/cli/commands/workspace-init.js.map +1 -1
  97. package/dist/cli/context-id.js +133 -0
  98. package/dist/cli/context-id.js.map +1 -0
  99. package/dist/cli/help-groups.js +20 -1
  100. package/dist/cli/help-groups.js.map +1 -1
  101. package/dist/cli/main.js +44 -16
  102. package/dist/cli/main.js.map +1 -1
  103. package/dist/cli/output-mode.js +41 -0
  104. package/dist/cli/output-mode.js.map +1 -0
  105. package/dist/cli/parser.js +10 -0
  106. package/dist/cli/parser.js.map +1 -1
  107. package/dist/cli/registry.js.map +1 -1
  108. package/dist/cli/render.js +53 -0
  109. package/dist/cli/render.js.map +1 -1
  110. package/package.json +1 -1
  111. package/skills/w/SKILL.md +2 -2
  112. package/skills/w/commands/export-diagrams.md +13 -21
  113. package/skills/w/commands/export-manuals.md +15 -21
  114. package/skills/w/commands/export-reports.md +14 -21
  115. package/skills/w/commands/export-scripts.md +14 -21
  116. package/skills/w/commands/fix-git.md +24 -16
  117. package/skills/w/commands/generate-launch.md +13 -32
  118. package/skills/w/commands/persist.md +21 -77
  119. package/skills/w/commands/plan-exec.md +14 -30
  120. package/skills/w/commands/plan-new.md +11 -38
  121. package/skills/w/commands/plan-refine.md +13 -41
  122. package/skills/w/commands/quick.md +13 -20
  123. package/skills/w/commands/resume.md +19 -56
  124. package/skills/w/commands/spec-new.md +28 -69
  125. package/skills/w/commands/spec-refine.md +12 -37
  126. package/skills/w/commands/status.md +12 -55
  127. package/skills/w/commands/workspace-init.md +14 -21
  128. package/skills/w/context/MANIFEST.json +486 -0
  129. package/skills/w/harness/HARNESS.md +1 -1
  130. package/skills/w/hooks/README.md +21 -2
  131. package/skills/w/hooks/hooks.template.json +2 -2
  132. package/skills/w/loops/CHASSIS.md +53 -104
  133. package/skills/w/loops/CODE-POLICIES.md +4 -9
  134. package/skills/w/loops/plan-exec-loop/LOOP.md +5 -12
  135. package/skills/w/loops/plan-new-loop/LOOP.md +8 -32
  136. package/skills/w/loops/plan-refine-loop/LOOP.md +8 -36
  137. package/skills/w/loops/quick-loop/LOOP.md +4 -10
  138. package/skills/w/loops/spec-refine-loop/LOOP.md +7 -49
  139. package/skills/w/modules/ADOPTED-CONTEXT.md +10 -0
  140. package/skills/w/modules/COMPACTION.md +13 -0
  141. package/skills/w/modules/DB-RESEARCH-RULE.md +11 -0
  142. package/skills/w/modules/DB-SCRIPTS-ONLY.md +12 -0
  143. package/skills/w/modules/EXEC-DB-POLICY.md +7 -0
  144. package/skills/w/modules/EXEC-PROBE-TASKS.md +11 -0
  145. package/skills/w/modules/IDEATION-GATE.md +16 -0
  146. package/skills/w/modules/INCREMENTAL-STRATEGY.md +7 -0
  147. package/skills/w/modules/LAUNCH-DETECTION.md +26 -0
  148. package/skills/w/modules/PERSIST-ROUTING.md +16 -0
  149. package/skills/w/modules/PLAN-DESIGN-SPECS.md +12 -0
  150. package/skills/w/modules/PLAN-INPUT.md +26 -0
  151. package/skills/w/modules/PLAN-MODE.md +26 -0
  152. package/skills/w/modules/PLAN-PROBE-TASKS.md +10 -0
  153. package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +7 -0
  154. package/skills/w/modules/PLAN-REFINE-KEYS.md +9 -0
  155. package/skills/w/modules/PLAN-REFINE-SPLIT.md +12 -0
  156. package/skills/w/modules/PLAN-SPLIT-GATE.md +14 -0
  157. package/skills/w/modules/PROBE.md +12 -0
  158. package/skills/w/modules/PROMPT-CONTINUITY.md +13 -0
  159. package/skills/w/modules/RECONNAISSANCE.md +48 -0
  160. package/skills/w/modules/REPLANNING.md +12 -0
  161. package/skills/w/modules/SESSION-NUMBERING.md +19 -0
  162. package/skills/w/modules/SIMULATION-LIFECYCLE.md +11 -0
  163. package/skills/w/modules/SPEC-CHANGE-SHAPE.md +37 -0
  164. package/skills/w/modules/SPEC-REFINE-KEYS.md +14 -0
  165. package/skills/w/modules/SPLIT-GATE.md +42 -0
  166. package/skills/w/modules/WORKSPACE-SCAFFOLD.md +28 -0
  167. package/skills/w/roles/git/ROLE.md +7 -8
  168. package/skills/w/roles/ui-spec/ROLE.md +1 -1
@@ -0,0 +1,42 @@
1
+ # SPLIT-GATE — one deliverable, or several siblings
2
+
3
+ Loaded when the prompt may hold more than one independent outcome (signal `split`).
4
+
5
+ ## Split gate (multi-spec)
6
+
7
+ Right after the reconnaissance and **before writing anything**, assess whether the prompt bundles
8
+ **several independent outcomes**. The unit is the **functional outcome**, not the technical
9
+ boundary: distinct repos, a frontend/backend pair, several microservices, a migration plus the
10
+ code it enables — all **secondary evidence**, never on their own a reason to divide.
11
+
12
+ **Divide only when each part is a result that can be refined, accepted and planned on its own** —
13
+ its own purpose, its own acceptance criteria, worth delivering even if the other part is dropped.
14
+ The gate fires **only on clear signals** (>=2 of: independent deliverables/goals · explicit
15
+ enumeration of distinct features · different requested moments or order · users or value that do
16
+ not depend on each other). Borderline, or evidence too thin to tell → **one spec, no question**:
17
+ the hypothesis goes to `## Assumptions` and the doubt to `## Open questions`.
18
+
19
+ It applies only to a **raw user prompt** (direct invocation, or the `plan-new` mode-3 handoff); it
20
+ **never fires** on the reuse entries — the quick escalation and the `persist` adoption arrive
21
+ already scoped to one objective.
22
+
23
+ - **The offer** — the command's **only** interaction: **one** structured-choice (<=2 content
24
+ questions + the `flow` control; `Cerrar` = abort, nothing is written yet). The question body
25
+ shows the proposed cut in the **user's language**: per part, a name + slug, a 1-line scope and
26
+ the suggested order. Labels: `Dividir en varias specs` (recommended when the signals hold) |
27
+ `Una sola spec`. A free-form answer adjusts the cut (merge/rename/drop parts); if one part
28
+ remains, proceed as a single spec.
29
+ - **The second content question** is allowed **only** for a functional ambiguity with two
30
+ incompatible readings that would change the number of specs (or leave the requested outcome
31
+ unidentifiable). Anything smaller — confirming an observable technology, closing an
32
+ implementation detail, raising confidence from medium to high — is **not** asked: it goes to
33
+ `## Assumptions` or `## Open questions`.
34
+ - **On acceptance** — still single-pass: the cut comes from the prompt plus the reconnaissance
35
+ already done, never from a second look. Per part, mint with `aw next-number docs/specs`
36
+ **immediately before each write**, then write that draft. Numbers come out consecutive, so every
37
+ sibling path is known after the first mint.
38
+ - **Sibling contract**: each `## Origin` records the shared prompt + `split (part i/N)` + the
39
+ **siblings by path** + the suggested order; each `## Scope` Out points to the sibling that owns
40
+ the excluded part. Cross-reference by path, never by bare number.
41
+ - **Report**: list the N files and suggest the next step per spec (`/w:spec-refine` on the first —
42
+ each sibling refines and plans at its own moment).
@@ -0,0 +1,28 @@
1
+ # WORKSPACE-SCAFFOLD — what init versions, ignores and prunes
2
+
3
+ Loaded when the folder already has a workspace, or the user asks what `workspace-init` writes,
4
+ ignores or removes on a re-run (signal `scaffold`).
5
+
6
+ ## Versioning policy (CLI-owned `.gitignore`)
7
+
8
+ Init writes and owns the full set.
9
+
10
+ - **Ignored** — `.workflow/sessions/` (machine-local live log), `.workflow/.lock`,
11
+ `.workflow/processes.json`, `.workflow/launch/`, `docs/logs/` and, when there are external
12
+ sources, `.claude/settings.local.json*` / `.codex/config.toml*` (the patterns cover the
13
+ `.bak.<epoch>` backups).
14
+ - **Versioned** — `.workflow/skills.toml`, `docs/**` (the deliverables) and
15
+ `.workflow/HISTORY.md`, the durable record: `aw session-close` upserts each closed session's
16
+ row there.
17
+
18
+ ## Re-run: reconcile + prune
19
+
20
+ A re-run adds no duplicate entries and overwrites no manual configuration. It prunes the legacy
21
+ upfront scaffold:
22
+
23
+ - `.gitkeep`-only taxonomy folders and stray `.gitkeep` files;
24
+ - an empty `docs/logs/`;
25
+ - a released `.workflow/.lock` leftover.
26
+
27
+ The `.gitignore` is completed to the current set — entries merge under the existing header, never
28
+ duplicated.
@@ -97,14 +97,13 @@ Outside an active session: relax to "1 line + no co-author"; the `session<NNN>`
97
97
 
98
98
  Autonomous `git merge` is forbidden (above), **but** resolving an **in-progress** merge (MERGE_HEAD), or one invoked by the user via `/w:fix-git`, **is** sanctioned work. **Workspace-agnostic**: it operates on any repo (no `.workflow/`, flows or sessions required).
99
99
 
100
- 1. **Detect + identify** with `aw merge-state [<path>|--source <alias>|--all]` (read-only): `is_merging`, `current_branch` (**destination / ours**), `merge_origin` (**origin / theirs**), `conflicted_files`. If `merge_origin` comes empty, check `.git/MERGE_MSG` or `git log --oneline -1 MERGE_HEAD`.
101
- 2. **Analyze each conflict's intent** **before** resolving — never pick a side blindly:
102
- - The three versions: `git show :1:<file>` (base) · `:2:<file>` (ours/destination) · `:3:<file>` (theirs/origin).
103
- - Each side's why: `git log --merge -p -- <file>`; the hunk's history on each branch.
104
- - The code around the marker (coherence with the rest of the file).
105
- 3. **Resolve** by editing the file (remove `<<<<<<<` / `=======` / `>>>>>>>`): pick **ours**, **theirs**, **combine** both intents, or **rewrite** to satisfy both. `git add <file>` what is resolved.
106
- 4. **Ask** (*structured-choice*) when the intent is **ambiguous** or both sides are **incoherent** with each other (not combinable without losing something): one content question per doubtful file/hunk (≤3 + `flow` control), options "Ours (`<destination>`)" / "Theirs (`<origin>`)" / "Combine" / "Edit manually". **Never invent** a resolution under real doubt.
107
- 5. **Proposed commit**: completing the merge is a `git commit` (the merge commit) → **propose-then-execute** like any commit (canonical format above; outside a session → 1 line without the `session<NNN>` tag; never `--no-verify`/`--amend`/`push`). The `git-commit-advisor` hook gates it.
100
+ **The mechanics live in the CLI** (`aw fix-git prepare | apply | commit`); what follows is the reasoning it expects from you. Never edit a conflicted file, `git add` or `git commit` by hand here — see [`../../commands/fix-git.md`](../../commands/fix-git.md) for the exact invocations.
101
+
102
+ 1. **Detect + identify**: `aw fix-git prepare` (read-only) returns the merge direction (**theirs → ours**), the conflicted paths and, per path, its three index stages with their blob hashes. `aw merge-state` remains the lighter inspector when you only need the state.
103
+ 2. **Analyze each conflict's intent** **before** resolving — never pick a side blindly. The request already carries the three versions: `base` (common ancestor), `ours` (destination) and `theirs` (origin). Add `git log --merge -p -- <file>` when the *why* of a hunk is not evident, and read the surrounding code for coherence.
104
+ 3. **Resolve** by composing the complete resolved file: pick **ours**, **theirs**, **combine** both intents, or **rewrite** to satisfy both — with no `<<<<<<<` / `=======` / `>>>>>>>` left. The CLI writes and stages it; a leftover marker is rejected, and so is a path that is no longer in conflict.
105
+ 4. **Ask** (*structured-choice*) when the intent is **ambiguous** or both sides are **incoherent** with each other (not combinable without losing something): answer `state: "ambiguous"` so nothing is written, then ask one content question per doubtful file/hunk (≤3 + `flow` control), options "Ours (`<destination>`)" / "Theirs (`<origin>`)" / "Combine" / "Edit manually". **Never invent** a resolution under real doubt. A **binary** conflict is never resolved automatically: propose `git checkout --ours|--theirs`.
106
+ 5. **Proposed commit**: completing the merge is a `git commit` (the merge commit) → **propose-then-execute** like any commit (canonical format above; outside a session 1 line without the `session<NNN>` tag; never `--no-verify`/`--amend`/`push`). It is a **separate, confirmed** invocation `aw fix-git commit --message "<msg>" --confirm` which refuses while any file stays unmerged. The `git-commit-advisor` hook gates it.
108
107
  6. **Escape hatch**: if the merge must not complete, `git merge --abort` **after user confirmation** (*structured-choice*) — leaves the repo as before the merge.
109
108
 
110
109
  > **Resume via git**: the merge state in `.git` (MERGE_HEAD + index) **is** the checkpoint; re-running `/w:fix-git` resumes from the remaining conflicts. No session, no artifact.
@@ -28,7 +28,7 @@ Given a UI requirement, author a **structured Markdown description** of the scre
28
28
  Two levels, same capability:
29
29
 
30
30
  - **`spec-refine-loop`** (see `../../loops/spec-refine-loop/LOOP.md`) — resolving the **UI unspecified** gap (when the requirement involves UI): authors the spec's `## UI spec` section (the UI's *what*, coarse-grain screens).
31
- - **`plan-new-loop` · `plan-refine-loop`** (see `../../loops/plan-new-loop/LOOP.md` § *Delta 4*) — resolving the **UI without design SPEC** gap (when the **plan includes UI**): authors per-screen **design SPECs** (`NNN-SPEC-<SLUG>.md`) as **PLAN session artifacts** (see `../../artifacts/artifacts-design/SPEC.md`); they derive from `## UI spec` when it exists.
31
+ - **`plan-new-loop` · `plan-refine-loop`** (see `../../modules/PLAN-DESIGN-SPECS.md`, the plan loops' `ui` module) — resolving the **UI without design SPEC** gap (when the **plan includes UI**): authors per-screen **design SPECs** (`NNN-SPEC-<SLUG>.md`) as **PLAN session artifacts** (see `../../artifacts/artifacts-design/SPEC.md`); they derive from `## UI spec` when it exists.
32
32
 
33
33
  In both, the composing loop contributes:
34
34