@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.
- package/dist/adapters/git-cli.js +42 -0
- package/dist/adapters/git-cli.js.map +1 -1
- package/dist/application/artifacts-service.js +5 -5
- package/dist/application/artifacts-service.js.map +1 -1
- package/dist/application/checkpoint-service.js +60 -55
- package/dist/application/checkpoint-service.js.map +1 -1
- package/dist/application/checkpoint-write-service.js +61 -66
- package/dist/application/checkpoint-write-service.js.map +1 -1
- package/dist/application/context/budget-service.js +128 -0
- package/dist/application/context/budget-service.js.map +1 -0
- package/dist/application/context/bundle-root.js +41 -0
- package/dist/application/context/bundle-root.js.map +1 -0
- package/dist/application/context/manifest.js +150 -0
- package/dist/application/context/manifest.js.map +1 -0
- package/dist/application/context/measure.js +227 -0
- package/dist/application/context/measure.js.map +1 -0
- package/dist/application/context/plan-service.js +177 -0
- package/dist/application/context/plan-service.js.map +1 -0
- package/dist/application/decisiones-service.js +5 -5
- package/dist/application/decisiones-service.js.map +1 -1
- package/dist/application/export-service.js +250 -0
- package/dist/application/export-service.js.map +1 -0
- package/dist/application/fix-git-service.js +244 -0
- package/dist/application/fix-git-service.js.map +1 -0
- package/dist/application/history-update-service.js +35 -24
- package/dist/application/history-update-service.js.map +1 -1
- package/dist/application/lifecycle-target.js +39 -0
- package/dist/application/lifecycle-target.js.map +1 -0
- package/dist/application/parsers/spec-relation.js +80 -0
- package/dist/application/parsers/spec-relation.js.map +1 -0
- package/dist/application/paths-service.js +8 -0
- package/dist/application/paths-service.js.map +1 -1
- package/dist/application/persist-service.js +285 -0
- package/dist/application/persist-service.js.map +1 -0
- package/dist/application/release-data/artifacts.js +17 -21
- package/dist/application/release-data/artifacts.js.map +1 -1
- package/dist/application/resume-service.js +184 -0
- package/dist/application/resume-service.js.map +1 -0
- package/dist/application/semantic-operation/protocol.js +247 -0
- package/dist/application/semantic-operation/protocol.js.map +1 -0
- package/dist/application/semantic-operation/publish.js +80 -0
- package/dist/application/semantic-operation/publish.js.map +1 -0
- package/dist/application/session-binding-service.js +125 -0
- package/dist/application/session-binding-service.js.map +1 -0
- package/dist/application/session-close-service.js +60 -39
- package/dist/application/session-close-service.js.map +1 -1
- package/dist/application/session-create-service.js +45 -19
- package/dist/application/session-create-service.js.map +1 -1
- package/dist/application/session-resolver.js +180 -44
- package/dist/application/session-resolver.js.map +1 -1
- package/dist/application/session-resume-service.js +39 -9
- package/dist/application/session-resume-service.js.map +1 -1
- package/dist/application/sessions-service.js +0 -2
- package/dist/application/sessions-service.js.map +1 -1
- package/dist/application/status-service.js +24 -388
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/tasks-service.js +5 -5
- package/dist/application/tasks-service.js.map +1 -1
- package/dist/application/workline-index-service.js +510 -0
- package/dist/application/workline-index-service.js.map +1 -0
- package/dist/cli/commands/checkpoint-read.js +10 -6
- package/dist/cli/commands/checkpoint-read.js.map +1 -1
- package/dist/cli/commands/checkpoint-write.js +38 -11
- package/dist/cli/commands/checkpoint-write.js.map +1 -1
- package/dist/cli/commands/context-budget.js +79 -0
- package/dist/cli/commands/context-budget.js.map +1 -0
- package/dist/cli/commands/context-plan.js +75 -0
- package/dist/cli/commands/context-plan.js.map +1 -0
- package/dist/cli/commands/export.js +117 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/fix-git.js +109 -0
- package/dist/cli/commands/fix-git.js.map +1 -0
- package/dist/cli/commands/generate-launch.js +35 -3
- package/dist/cli/commands/generate-launch.js.map +1 -1
- package/dist/cli/commands/history-update.js +1 -1
- package/dist/cli/commands/history-update.js.map +1 -1
- package/dist/cli/commands/index.js +15 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/persist.js +67 -0
- package/dist/cli/commands/persist.js.map +1 -0
- package/dist/cli/commands/resume-summary.js +14 -3
- package/dist/cli/commands/resume-summary.js.map +1 -1
- package/dist/cli/commands/resume.js +73 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/session-artifacts.js +12 -11
- package/dist/cli/commands/session-artifacts.js.map +1 -1
- package/dist/cli/commands/session-close.js +8 -7
- package/dist/cli/commands/session-close.js.map +1 -1
- package/dist/cli/commands/session-create.js +5 -1
- package/dist/cli/commands/session-create.js.map +1 -1
- package/dist/cli/commands/session-resume.js +16 -10
- package/dist/cli/commands/session-resume.js.map +1 -1
- package/dist/cli/commands/status.js +66 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/workspace-init.js +21 -2
- package/dist/cli/commands/workspace-init.js.map +1 -1
- package/dist/cli/context-id.js +133 -0
- package/dist/cli/context-id.js.map +1 -0
- package/dist/cli/help-groups.js +20 -1
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/main.js +44 -16
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output-mode.js +41 -0
- package/dist/cli/output-mode.js.map +1 -0
- package/dist/cli/parser.js +10 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/render.js +53 -0
- package/dist/cli/render.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +2 -2
- package/skills/w/commands/export-diagrams.md +13 -21
- package/skills/w/commands/export-manuals.md +15 -21
- package/skills/w/commands/export-reports.md +14 -21
- package/skills/w/commands/export-scripts.md +14 -21
- package/skills/w/commands/fix-git.md +24 -16
- package/skills/w/commands/generate-launch.md +13 -32
- package/skills/w/commands/persist.md +21 -77
- package/skills/w/commands/plan-exec.md +14 -30
- package/skills/w/commands/plan-new.md +11 -38
- package/skills/w/commands/plan-refine.md +13 -41
- package/skills/w/commands/quick.md +13 -20
- package/skills/w/commands/resume.md +19 -56
- package/skills/w/commands/spec-new.md +28 -69
- package/skills/w/commands/spec-refine.md +12 -37
- package/skills/w/commands/status.md +12 -55
- package/skills/w/commands/workspace-init.md +14 -21
- package/skills/w/context/MANIFEST.json +486 -0
- package/skills/w/harness/HARNESS.md +1 -1
- package/skills/w/hooks/README.md +21 -2
- package/skills/w/hooks/hooks.template.json +2 -2
- package/skills/w/loops/CHASSIS.md +53 -104
- package/skills/w/loops/CODE-POLICIES.md +4 -9
- package/skills/w/loops/plan-exec-loop/LOOP.md +5 -12
- package/skills/w/loops/plan-new-loop/LOOP.md +8 -32
- package/skills/w/loops/plan-refine-loop/LOOP.md +8 -36
- package/skills/w/loops/quick-loop/LOOP.md +4 -10
- package/skills/w/loops/spec-refine-loop/LOOP.md +7 -49
- package/skills/w/modules/ADOPTED-CONTEXT.md +10 -0
- package/skills/w/modules/COMPACTION.md +13 -0
- package/skills/w/modules/DB-RESEARCH-RULE.md +11 -0
- package/skills/w/modules/DB-SCRIPTS-ONLY.md +12 -0
- package/skills/w/modules/EXEC-DB-POLICY.md +7 -0
- package/skills/w/modules/EXEC-PROBE-TASKS.md +11 -0
- package/skills/w/modules/IDEATION-GATE.md +16 -0
- package/skills/w/modules/INCREMENTAL-STRATEGY.md +7 -0
- package/skills/w/modules/LAUNCH-DETECTION.md +26 -0
- package/skills/w/modules/PERSIST-ROUTING.md +16 -0
- package/skills/w/modules/PLAN-DESIGN-SPECS.md +12 -0
- package/skills/w/modules/PLAN-INPUT.md +26 -0
- package/skills/w/modules/PLAN-MODE.md +26 -0
- package/skills/w/modules/PLAN-PROBE-TASKS.md +10 -0
- package/skills/w/modules/PLAN-REFINE-DESIGN-SPECS.md +7 -0
- package/skills/w/modules/PLAN-REFINE-KEYS.md +9 -0
- package/skills/w/modules/PLAN-REFINE-SPLIT.md +12 -0
- package/skills/w/modules/PLAN-SPLIT-GATE.md +14 -0
- package/skills/w/modules/PROBE.md +12 -0
- package/skills/w/modules/PROMPT-CONTINUITY.md +13 -0
- package/skills/w/modules/RECONNAISSANCE.md +48 -0
- package/skills/w/modules/REPLANNING.md +12 -0
- package/skills/w/modules/SESSION-NUMBERING.md +19 -0
- package/skills/w/modules/SIMULATION-LIFECYCLE.md +11 -0
- package/skills/w/modules/SPEC-CHANGE-SHAPE.md +37 -0
- package/skills/w/modules/SPEC-REFINE-KEYS.md +14 -0
- package/skills/w/modules/SPLIT-GATE.md +42 -0
- package/skills/w/modules/WORKSPACE-SCAFFOLD.md +28 -0
- package/skills/w/roles/git/ROLE.md +7 -8
- 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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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 `../../
|
|
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
|
|