@tacuchi/agent-workflow-cli 15.2.0 → 16.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/dist/application/templates/session.js +1 -1
- package/package.json +1 -1
- package/skills/w/README.md +14 -14
- package/skills/w/SKILL.md +94 -82
- package/skills/w/artifacts/README.md +1 -1
- package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +15 -13
- package/skills/w/artifacts/artifacts-core/SESSION.md +1 -1
- package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
- package/skills/w/artifacts/artifacts-research/CONCLUSIONS.md +1 -1
- package/skills/w/commands/README.md +22 -22
- package/skills/w/commands/export-diagrams.md +9 -9
- package/skills/w/commands/export-manuals.md +9 -9
- package/skills/w/commands/export-reports.md +9 -9
- package/skills/w/commands/export-scripts.md +9 -9
- package/skills/w/commands/fix-git.md +12 -12
- package/skills/w/commands/plan-exec.md +19 -19
- package/skills/w/commands/plan-new.md +18 -18
- package/skills/w/commands/plan-refine.md +22 -22
- package/skills/w/commands/quick.md +16 -16
- package/skills/w/commands/spec-new.md +35 -34
- package/skills/w/commands/spec-refine.md +16 -16
- package/skills/w/commands/status.md +18 -16
- package/skills/w/commands/workspace-init.md +14 -14
- package/skills/w/exports/README.md +5 -5
- package/skills/w/exports/export-diagrams/SKILL.md +58 -58
- package/skills/w/exports/export-manuals/SKILL.md +61 -61
- package/skills/w/exports/export-reports/SKILL.md +51 -51
- package/skills/w/exports/export-scripts/SKILL.md +60 -60
- package/skills/w/harness/SKILL.md +48 -47
- package/skills/w/loops/CHASSIS.md +103 -98
- package/skills/w/loops/CODE-POLICIES.md +21 -21
- package/skills/w/loops/README.md +30 -29
- package/skills/w/loops/plan-exec-loop/SKILL.md +77 -77
- package/skills/w/loops/plan-new-loop/SKILL.md +80 -80
- package/skills/w/loops/plan-refine-loop/SKILL.md +62 -62
- package/skills/w/loops/quick-loop/SKILL.md +79 -79
- package/skills/w/loops/spec-refine-loop/SKILL.md +93 -94
- package/skills/w/roles/README.md +2 -2
- package/skills/w/roles/diagrams/SKILL.md +50 -47
- package/skills/w/roles/git/SKILL.md +58 -58
- package/skills/w/roles/research/SKILL.md +65 -62
- package/skills/w/roles/sql/SKILL.md +59 -55
- package/skills/w/roles/ui-spec/SKILL.md +60 -74
|
@@ -45,7 +45,7 @@ ${renderOriginSection(values.origin)}
|
|
|
45
45
|
${values.type}
|
|
46
46
|
|
|
47
47
|
## Success criteria
|
|
48
|
-
<!-- Verification-first done-condition, seeded BEFORE executing: falsifiable [ ] items (tests for code, a by-inspection rubric for analysis/design). The loop persists until all are green. -->
|
|
48
|
+
<!-- Verification-first done-condition, seeded BEFORE executing: falsifiable [ ] items (tests for code, a by-inspection rubric for analysis/design). The loop persists until all are green and flips each to [x] at the convergence gate; replace this comment when filling. -->
|
|
49
49
|
- [ ]
|
|
50
50
|
`;
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tacuchi/agent-workflow-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Agnostic runtime CLI for AI development workflows — a stages + loops + artifacts harness. Bundles the universal `w` skill set under `skills/w/` (slash commands `/w:*`: spec-new/spec-refine, plan-new/plan-exec, quick, 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": {
|
package/skills/w/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# w — agent-workflow skill bundle
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> The `w` bundle (`w` = *workflow*) packages the agent-workflow harness as Claude Code skills + `/w:` slash commands. Runtime: [`@tacuchi/agent-workflow-cli`](../../README.md) (`agent-workflow` / `aw`).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It implements the **stages + loops + artifacts** model. The design source lives under `docs/referencias/` in the agent-workflow hub. This README is the bundle index; the normative text lives in its canonical docs:
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
7
|
+
- **Full model** — 3 layers + `docs/` zone, the 3 flows (SPEC/PLAN/QUICK), commands, composable capabilities and the 6 hard invariants: [`SKILL.md`](SKILL.md) (the `workflow` orientation skill).
|
|
8
|
+
- **Loop engine** — persistent objective + verification-first, gap-driven, sessions, structured-choice, compact/resume, git/DB/review-gate policies: [`loops/CHASSIS.md`](loops/CHASSIS.md) (the 5 loops are heirs) + [`loops/CODE-POLICIES.md`](loops/CODE-POLICIES.md).
|
|
9
|
+
- **Capability→harness binding** (Claude Code / Codex / Gemini-Antigravity / OpenCode / Crush / Warp): [`harness/SKILL.md`](harness/SKILL.md).
|
|
10
10
|
|
|
11
11
|
## Folders
|
|
12
12
|
|
|
13
13
|
| Folder | Layer | Contains |
|
|
14
14
|
|---|---|---|
|
|
15
|
-
| [`commands/`](commands/) | 1 |
|
|
16
|
-
| [`loops/`](loops/) | 2 | [`CHASSIS.md`](loops/CHASSIS.md) (
|
|
17
|
-
| [`exports/`](exports/) | 1 |
|
|
18
|
-
| [`roles/`](roles/) | cross-cutting |
|
|
19
|
-
| [`harness/`](harness/SKILL.md) | cross-cutting |
|
|
20
|
-
| [`artifacts/`](artifacts/) | 3 |
|
|
21
|
-
| [`hooks/`](hooks/) | — |
|
|
22
|
-
| [`SKILL.md`](SKILL.md) | overview |
|
|
15
|
+
| [`commands/`](commands/) | 1 | The `/w:` slash commands the user invokes |
|
|
16
|
+
| [`loops/`](loops/) | 2 | [`CHASSIS.md`](loops/CHASSIS.md) (the engine) + the 5 loop heirs the AI runs |
|
|
17
|
+
| [`exports/`](exports/) | 1 | The `export-*` family — the only artifact→`docs/` path |
|
|
18
|
+
| [`roles/`](roles/) | cross-cutting | Pluggable capabilities (built-in defaults; rebindable via `.workflow/skills.toml`) |
|
|
19
|
+
| [`harness/`](harness/SKILL.md) | cross-cutting | Capability→mechanism binding per harness |
|
|
20
|
+
| [`artifacts/`](artifacts/) | 3 | Session artifact templates the loops manage |
|
|
21
|
+
| [`hooks/`](hooks/) | — | Host hook template (branch-check, sql-mutation-guard, checkpoint, …) |
|
|
22
|
+
| [`SKILL.md`](SKILL.md) | overview | The `workflow` orientation skill (guide to the full model) |
|
|
23
23
|
|
|
24
24
|
## Bootstrap
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Run [`/w:workspace-init`](commands/workspace-init.md) once to turn a folder into a workspace (`.workflow/` + `docs/` taxonomy + `WORKSPACE` block + `.workflow/skills.toml`). No project/hub distinction — a workspace has 1+ sources.
|
package/skills/w/SKILL.md
CHANGED
|
@@ -19,116 +19,116 @@ description: >-
|
|
|
19
19
|
|
|
20
20
|
## Purpose
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Explain the **complete model** of agent-workflow so an agent knows: what the user invokes, what the AI runs, where every deliverable lands, and which rules never break. This is the map; the fine detail lives in each loop/command/export/role.
|
|
23
23
|
|
|
24
24
|
## Composed by
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Anyone needing orientation — a loop at start, a new agent in the workspace, or the user asking "how does this work?".
|
|
27
27
|
|
|
28
28
|
## Knowledge
|
|
29
29
|
|
|
30
|
-
### Workspace (
|
|
30
|
+
### Workspace (no modes)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
A single concept: **workspace**. There is no project/hub split. The folder where the agent starts becomes a workspace with `/w:workspace-init` (scaffolding `.workflow/` + `docs/` + the `WORKSPACE` block in CLAUDE.md + `.workflow/skills.toml`). It has 1+ sources (repos); "standalone" = a single source.
|
|
33
33
|
|
|
34
34
|
### The 3-layer architecture + `docs/` zone
|
|
35
35
|
|
|
36
36
|
```
|
|
37
|
-
|
|
38
|
-
LAYER 1 · COMMANDS (
|
|
37
|
+
USER invokes
|
|
38
|
+
LAYER 1 · COMMANDS (the only thing the user invokes)
|
|
39
39
|
FLOWS: spec-new · spec-refine · plan-new · plan-refine · plan-exec · quick
|
|
40
40
|
EXPORTS: export-scripts · export-manuals · export-diagrams · export-reports
|
|
41
|
-
│
|
|
41
|
+
│ starts / delegates
|
|
42
42
|
▼
|
|
43
|
-
LAYER 2 · LOOPS (
|
|
43
|
+
LAYER 2 · LOOPS (the AI runs them, gap-driven; engine: loops/CHASSIS.md)
|
|
44
44
|
spec-refine-loop · plan-new-loop · plan-refine-loop · plan-exec-loop · quick-loop
|
|
45
|
-
│
|
|
45
|
+
│ creates / reads / writes
|
|
46
46
|
▼
|
|
47
|
-
LAYER 3 · SESSIONS + ARTIFACTS (.workflow/sessions/ —
|
|
48
|
-
│
|
|
47
|
+
LAYER 3 · SESSIONS + ARTIFACTS (.workflow/sessions/ — ephemeral, internal)
|
|
48
|
+
│ the export-* read the artifacts
|
|
49
49
|
▼
|
|
50
|
-
|
|
51
|
-
specs · plans (
|
|
50
|
+
docs/ ZONE — permanent, user-facing documents
|
|
51
|
+
specs · plans (flows) · scripts · manuals · diagrams · reports (export-*) · tools (ambient)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
- **Layer 1** —
|
|
55
|
-
- **Layer 2** —
|
|
56
|
-
- **Layer 3** —
|
|
54
|
+
- **Layer 1** — high level. Single-pass or starts a loop. No iteration logic.
|
|
55
|
+
- **Layer 2** — the AI iterates end to end until convergence. No direct human invocation.
|
|
56
|
+
- **Layer 3** — ephemeral, internal, process-only. Nobody invokes it by hand.
|
|
57
57
|
|
|
58
58
|
### The 3 flows
|
|
59
59
|
|
|
60
|
-
| Flow | Commands | docs/
|
|
60
|
+
| Flow | Commands | Own docs/ | Loops |
|
|
61
61
|
|---|---|---|---|
|
|
62
|
-
| **SPEC** (
|
|
63
|
-
| **PLAN** (
|
|
64
|
-
| **QUICK** (
|
|
62
|
+
| **SPEC** (the *what*) | `spec-new` *(single-pass)* · `spec-refine` | `docs/specs` | `spec-refine-loop` |
|
|
63
|
+
| **PLAN** (the *how* + execute) | `plan-new` · `plan-refine` *(aux, optional)* · `plan-exec` | `docs/plans` | `plan-new-loop` · `plan-refine-loop` · `plan-exec-loop` |
|
|
64
|
+
| **QUICK** (lightweight shortcut) | `quick` | — | `quick-loop` |
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Typical chain: prompt → `spec-new` generates `docs/specs/NNN-spec-<slug>.md` → `spec-refine` runs the loop and refines **that same spec in place** → `plan-new` → `docs/plans/PPP-plan-<slug>.md` → *(optional)* `plan-refine` adjusts **that same plan in place** if changes arise before executing → `plan-exec` executes and updates the plan (living doc) + artifacts in sessions. Promoting anything else to `docs/` is **always** a separate step via `export-*`.
|
|
67
67
|
|
|
68
|
-
QUICK
|
|
68
|
+
QUICK can **escalate live to SPEC** when the objective exceeds a quick (entry size gate) or the task grows mid-loop: with consent via structured-choice, the work line moves to the SPEC flow (draft via the `spec-new` procedure + `spec-refine-loop` directly); escalation to PLAN stays **deferred** (seed + pointer). See `loops/quick-loop/SKILL.md` § *QUICK delta*.
|
|
69
69
|
|
|
70
|
-
###
|
|
70
|
+
### Operating context — where everything lands
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Before any loop, the AI resolves its **operating context** on **every prompt** with two detections: **workspace?** (`.<ns>/sessions/` exists) + **session to continue?** (an active one, or a recent one this prompt continues). That decides the behavior and **where artifacts land** (SQL, scripts, decisions, …):
|
|
73
73
|
|
|
74
|
-
|
|
|
74
|
+
| Workspace? | Trigger | → Behavior + routing |
|
|
75
75
|
|---|---|---|
|
|
76
|
-
| **
|
|
77
|
-
| **
|
|
78
|
-
| **
|
|
79
|
-
| **No** |
|
|
76
|
+
| **Yes** | **flow command** (`quick`·`spec-*`·`plan-*`) | **new work line** → creates a **new** session (except re-running the same flow over the same input: `create_or_resume` reopens the existing one), starts the loop → artifacts go to **that** session (`SCRIPTS.sql`, …) |
|
|
77
|
+
| **Yes** | **prompt with no command** (related) | **continues/reopens the most recent session** → scripts edit **its** `SCRIPTS.sql` (no new session) |
|
|
78
|
+
| **Yes** | **prompt with no command** (unrelated / no session) | **no flow**: direct work → writes into `docs/` by convention + numbering (`aw next-number`) |
|
|
79
|
+
| **No** | anything | **vanilla** — no workspace, no flow; the AI is free (native) |
|
|
80
80
|
|
|
81
|
-
**
|
|
81
|
+
**Continuity rule** (single source — the chassis and the loops reference here):
|
|
82
82
|
|
|
83
|
-
1. **
|
|
84
|
-
2. **
|
|
85
|
-
3. **
|
|
86
|
-
4. **Prompt
|
|
87
|
-
5.
|
|
88
|
-
6.
|
|
83
|
+
1. **Flow command** = **new work line** → new session.
|
|
84
|
+
2. **Exception — re-run:** the same command over the **same input** (e.g. `/w:spec-refine` over the same spec) does **not** open another line: `create_or_resume` locates that flow's session (descriptor + `## Origin`) and **resumes or reopens** it (removes `.closed`), never duplicating it.
|
|
85
|
+
3. **Consented exception — escalation:** an **accepted escalation** inside a loop (e.g. quick → SPEC) opens a **new work line without a command**; the signal is the user's **explicit consent** in the structured-choice, equivalent to having invoked the destination flow's command.
|
|
86
|
+
4. **Prompt with no command** = "same line" → continue/reopen the **most recent** session (the *last started*).
|
|
87
|
+
5. Only if the prompt is clearly **unrelated**: offer choosing (`continuar NNN` | `trabajo nuevo`) or fall to "no flow".
|
|
88
|
+
6. **Convergence closes** the session; a later related prompt **reopens** it (resume removes `.closed`).
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
It is the **inter-turn** face of the *persistent objective* (same `CHECKPOINT`+resume, applied to the next prompt) — agnostic doctrine, not a host hook. It applies to **every artifact** (`SCRIPTS.sql` is the worked example; QUICK case: `loops/quick-loop/SKILL.md`).
|
|
91
91
|
|
|
92
92
|
### The commands (`/w:` namespace)
|
|
93
93
|
|
|
94
|
-
- `/w:workspace-init` —
|
|
95
|
-
- `/w:spec-new` —
|
|
96
|
-
- `/w:spec-refine` —
|
|
97
|
-
- `/w:plan-new` —
|
|
98
|
-
- `/w:plan-refine` —
|
|
99
|
-
- `/w:plan-exec` —
|
|
100
|
-
- `/w:quick` —
|
|
101
|
-
- `/w:export-scripts` · `/w:export-manuals` · `/w:export-diagrams` · `/w:export-reports` —
|
|
94
|
+
- `/w:workspace-init` — initializes the workspace.
|
|
95
|
+
- `/w:spec-new` — generates an initial spec (single-pass, no loop).
|
|
96
|
+
- `/w:spec-refine` — starts `spec-refine-loop` to refine the spec.
|
|
97
|
+
- `/w:plan-new` — starts `plan-new-loop` to derive an executable plan from the refined spec.
|
|
98
|
+
- `/w:plan-refine` — starts `plan-refine-loop` to refine the plan in place (auxiliary, **not mandatory**) before executing.
|
|
99
|
+
- `/w:plan-exec` — starts `plan-exec-loop` to execute and maintain the plan.
|
|
100
|
+
- `/w:quick` — starts `quick-loop` (shortcut, no `docs/`; escalates live to SPEC when the objective exceeds a quick).
|
|
101
|
+
- `/w:export-scripts` · `/w:export-manuals` · `/w:export-diagrams` · `/w:export-reports` — promote artifacts to `docs/`.
|
|
102
102
|
|
|
103
103
|
### Transversal skills (no flow) — `/w:status` · `/w:fix-git`
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
**Flow-independent invocable** skills: triggered with `/w:` like any command, but they do **not** belong to SPEC/PLAN/QUICK, do **not** manage `docs/`, and do **not** count in **6 flow commands / 5 loops**. *(In the bundle they are packaged under `commands/` so `/w:` can invoke them; in the design they are the `workflow-skills/` category.)*
|
|
106
106
|
|
|
107
|
-
- `/w:status` —
|
|
108
|
-
- `/w:fix-git` —
|
|
107
|
+
- `/w:status` — read-only workspace dashboard (Done/Missing/Discarded, dates humanized in the user's language). Writes nothing; backed by `aw status`.
|
|
108
|
+
- `/w:fix-git` — resolves an in-progress merge's conflicts in any repo (identifies origin↔destination, analyzes intent, *structured-choice* on ambiguity). No session, never touches `docs/`; git-safe; backed by `aw merge-state`.
|
|
109
109
|
|
|
110
110
|
### The loops (Layer 2)
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
A loop is a skill that teaches the AI **how to iterate** to a deliverable: detect gaps, resolve them (human via structured-choice, inline research or a composed capability), integrate and repeat until convergence. The 5 loops run the same **common engine** — persistent objective + verification-first, gap-driven convergent, single session per run, structured-choice + `flow` control (`Compactar`/`Cerrar`), compact/resume, artifacts as a live log, convergence gate — whose canon lives in [`loops/CHASSIS.md`](loops/CHASSIS.md); each loop is an **heir** adding only its deltas.
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
The **code-editing** loops (`plan-exec-loop`, `quick-loop`) additionally apply the *code-editing loop policies*: safe git, DB scripts-only and the pre-commit **closing review gate** (nothing reaches a proposed commit unreviewed) — see [`loops/CODE-POLICIES.md`](loops/CODE-POLICIES.md) (the chassis' sibling doc; document loops do not load it).
|
|
115
115
|
|
|
116
|
-
`spec-new` no
|
|
116
|
+
`spec-new` has no loop (single-pass): **6 commands / 5 loops**.
|
|
117
117
|
|
|
118
|
-
### The `export-*` family (
|
|
118
|
+
### The `export-*` family (the only artifact → `docs/` path)
|
|
119
119
|
|
|
120
|
-
| Export |
|
|
120
|
+
| Export | Reads | Produces |
|
|
121
121
|
|---|---|---|
|
|
122
|
-
| `export-scripts` | `SCRIPTS.sql` (
|
|
123
|
-
| `export-manuals` |
|
|
124
|
-
| `export-diagrams` |
|
|
125
|
-
| `export-reports` | corpus
|
|
122
|
+
| `export-scripts` | `SCRIPTS.sql` (migrations) from N sessions | `docs/scripts/` (numbered forwards + `00-ROLLBACK.sql`) |
|
|
123
|
+
| `export-manuals` | sessions + decisions + plan + code | `docs/manuals/` |
|
|
124
|
+
| `export-diagrams` | source code + plan (AS-IS/TO-BE) | `docs/diagrams/` (C4 / mermaid) |
|
|
125
|
+
| `export-reports` | session corpus + plan + `docs/` | `docs/reports/` (executive/functional report) |
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
Common: Layer 1, explicit (user-invoked, never by a loop) · single-pass, read-only over sessions · cross-session (consolidate N sessions + `docs/`) · no loop, no internal sessions (options via args).
|
|
128
128
|
|
|
129
129
|
### Capability skills + `.workflow/skills.toml`
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
A loop does **not** compose a concrete skill; it composes a **capability by its role** (e.g. `ui-design`). Which skill fulfills the role is decided by config, never by the loop. Swapping implementations = one config line.
|
|
132
132
|
|
|
133
133
|
```toml
|
|
134
134
|
[skills]
|
|
@@ -136,54 +136,66 @@ ui-design = "ui-spec" # built-in default
|
|
|
136
136
|
sql = "sql"
|
|
137
137
|
git = "git"
|
|
138
138
|
research = "research"
|
|
139
|
-
# diagrams = "off" # ←
|
|
140
|
-
# ui-design = "acme/figma-spec" # ← skill
|
|
139
|
+
# diagrams = "off" # ← capability disabled
|
|
140
|
+
# ui-design = "acme/figma-spec" # ← third-party skill (via skills.sh)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
**
|
|
143
|
+
**Resolution cascade**: built-in default → `~/.workflow/skills.toml` (global, machine) → `.workflow/skills.toml` (workspace). Workspace overrides global; global overrides default. Unbound role → built-in default. `off` → disabled (the loop continues without it; if it was needed, it says so or asks).
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Role catalog and defaults:
|
|
146
146
|
|
|
147
147
|
| Role | Default | Tier | Composed by |
|
|
148
148
|
|---|---|---|---|
|
|
149
149
|
| `ui-design` | `ui-spec` | must | `spec-refine-loop` (UI) · `plan-new-loop` / `plan-refine-loop` (design SPECs) |
|
|
150
150
|
| `sql` | `sql` | must | research · `plan-exec-loop` · `quick-loop` · `export-scripts` |
|
|
151
151
|
| `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
|
|
152
|
-
| `research` | `research` | should |
|
|
152
|
+
| `research` | `research` | should | every loop (inline capability) |
|
|
153
153
|
| `diagrams` | `diagrams` | should | `export-diagrams` |
|
|
154
|
-
| `overview` | `workflow` | should |
|
|
154
|
+
| `overview` | `workflow` | should | anyone (orientation) |
|
|
155
155
|
|
|
156
|
-
> **
|
|
156
|
+
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — the workflow neither binds nor depends on them. Full doctrine: [roles/README.md](roles/README.md).
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
The **loop chassis** is NOT bound: it is the common engine of the 5 loops ([`loops/CHASSIS.md`](loops/CHASSIS.md), a referenced doc), not a pluggable capability.
|
|
159
159
|
|
|
160
|
-
### Harness (
|
|
160
|
+
### Harness (harness-agnostic)
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
The doctrine names abstract **capabilities**, never a concrete harness tool. A single doc —`harness/SKILL.md`— binds each capability to each harness's mechanism (Claude Code, Codex, Gemini/Antigravity, OpenCode, Crush, Warp, generic). Two principles: **capability-not-tool** (loops/commands reference the capability by name) and **progressive-enhancement** (use the harness's richest mechanism; degrade to a universal fallback when it does not exist).
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
Key capabilities:
|
|
165
165
|
|
|
166
|
-
- **structured-choice** —
|
|
167
|
-
- **compaction** —
|
|
166
|
+
- **structured-choice** — ask the human ≤3 content questions + 1 `flow` control. Claude Code: `AskUserQuestion`. Fallback: numbered markdown.
|
|
167
|
+
- **compaction** — shrink the context without losing the thread. Claude Code: `/compact`. Fallback: `CHECKPOINT` + resume.
|
|
168
168
|
- **command-invocation** · **procedure-loading** · **subagent-dispatch** (opt.) · **persistent-context** · **external-data** (MCP) · **dry-run/preview**.
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
The only `must` capabilities for a loop's cycle are **structured-choice** and **compaction**, and both degrade to text → any harness with chat + files runs the full model. Detail, binding matrix and distribution (canonical `AGENTS.md` + `CLAUDE.md` symlink): see `harness/SKILL.md`.
|
|
171
|
+
|
|
172
|
+
### Language policy (per surface)
|
|
173
|
+
|
|
174
|
+
One language per plane — never mix them:
|
|
175
|
+
|
|
176
|
+
| Surface | Language |
|
|
177
|
+
|---|---|
|
|
178
|
+
| Doctrine (this bundle: chassis, loops, commands, roles, exports, harness) | **English** |
|
|
179
|
+
| **Section headings** of artifacts and docs (`## Requirement`, `## Completed`, …) | **English** (parse contract) |
|
|
180
|
+
| Everything **user-facing**: structured-choice questions, reports, dashboards, the **content** the AI writes into artifacts and `docs/` deliverables, commit messages | **the user's language** (this product: Spanish) |
|
|
181
|
+
| Literal option labels (`Compactar`, `Cerrar`, `Guardar plan`, …) | canonical product strings — use them **verbatim** |
|
|
182
|
+
| Domain terms (class/route/table names, e.g. the QTC fleet) | the domain's ubiquitous language (Spanish) — never translated |
|
|
171
183
|
|
|
172
184
|
### The 6 hard invariants
|
|
173
185
|
|
|
174
|
-
1. **
|
|
175
|
-
2. **
|
|
176
|
-
3. **
|
|
177
|
-
4. **
|
|
178
|
-
5. **
|
|
179
|
-
6. **
|
|
186
|
+
1. **No auto-export** — loops never graduate/export to `docs/`. Only `export-*` does, explicitly.
|
|
187
|
+
2. **Each flow touches only its `docs/` folders** — SPEC→`specs` · PLAN→`plans` · QUICK→none · rest→`export-*`. (`docs/tools` belongs to no flow: the ambient skill `creating-tools` writes it.)
|
|
188
|
+
3. **The spec and the plan are documents** (`docs/`), not session artifacts. *(Not to be confused with the **design SPECs** `NNN-SPEC-<SLUG>.md`: **per-screen** UI design artifacts that PLAN sessions produce via the `ui-design` capability when the plan includes UI — see `artifacts/artifacts-design/` — they are not the requirement-spec.)*
|
|
189
|
+
4. **DB scripts-only** — the AI never executes DML/DDL; migrations stay in `SCRIPTS.sql` and the user applies them. Only read-only reads via MCP.
|
|
190
|
+
5. **Safe git** — expected branch verified before editing; proposed commits per source; never `push`/`--amend`/`--no-verify`.
|
|
191
|
+
6. **Loop chassis** — the 5 loops run the same **common engine**; each loop is an heir adding only its deltas, nothing of the engine is re-declared. Detail: `loops/CHASSIS.md`.
|
|
180
192
|
|
|
181
|
-
> **
|
|
193
|
+
> **Scope of #1/#2:** they govern the **session → `docs/`** plane (only `export-*` crosses it). *Direct no-flow authoring* (see § *Operating context*) is **another plane**: with no active session, `docs/` is the only managed surface → the AI writes there by convention + numbering. It is not auto-export (there is no session to graduate from).
|
|
182
194
|
|
|
183
195
|
## Output
|
|
184
196
|
|
|
185
|
-
|
|
197
|
+
None. Pure orientation: it writes no documents or artifacts.
|
|
186
198
|
|
|
187
199
|
## Source
|
|
188
200
|
|
|
189
|
-
|
|
201
|
+
Authored from the design model (`docs/referencias/`): architecture README (3 layers + 6 invariants), `workflow-commands/`, `workflow-loops/`, `workflow-artifacts/`, `workflow-exports/`, `workflow-roles/`, `workflow-skills/`, `workflow-harness/`. Current, deployed model. (Compat: replaces the legacy `session` bundle orientation + dev/design/analyze flows.)
|
|
@@ -43,7 +43,7 @@ Sessions are created by the loops as needed — **one session per run**. The ses
|
|
|
43
43
|
|
|
44
44
|
## Common artifacts (any session)
|
|
45
45
|
|
|
46
|
-
`SESSION` (descriptor: Objective / Origin / Type / **Success criteria**
|
|
46
|
+
`SESSION` (descriptor: Objective / Origin / Type / **Success criteria** — the verification-first done-condition; the convergence gate flips them green) · `CHECKPOINT` (resume — **fixed headings, updated in place, never duplicated**; see its contract) · `SCRIPTS.sql` (read-only queries **executable** + DDL/DML migrations **deliverable**, not executed) · `TASKS` · `BACKLOG` (only when there's something to defer).
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# CHECKPOINT.md — session resume state (common)
|
|
2
2
|
|
|
3
3
|
> What it is: the live resume state of a session — lets the loop resume exactly where it left off.
|
|
4
|
-
> **Live log (artifact-first):** `Pending
|
|
5
|
-
> Owned by: **every session** (`refine` · `exec` · `quick`). Persisted **always** on close/compact (the resume key
|
|
4
|
+
> **Live log (artifact-first):** `Pending / Next` = the intent (what is about to be done, seeded BEFORE executing); `Completed` = the result (AFTER). Updated at every gap/phase boundary, not only on `Compactar`/`Cerrar`.
|
|
5
|
+
> Owned by: **every session** (`refine` · `exec` · `quick`). Persisted **always** on close/compact (the resume key), unlike `BACKLOG`, which is written only when something is deferred.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
Summary of the activity done so far.
|
|
7
|
+
## Contract (hard rules)
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
1. **Fixed headings, exactly these three**: `## Completed` · `## Pending / Next` · `## Open questions` (plus the optional ones below).
|
|
10
|
+
2. **Update in place — NEVER duplicate a section.** Every update edits the existing section's content; appending a second `## <same heading>` is a contract violation.
|
|
11
|
+
3. New entries go at the top of their section (most recent first) or extend an existing bullet — each section stays a single block.
|
|
12
12
|
|
|
13
13
|
## Completed
|
|
14
|
-
|
|
14
|
+
What already happened: finished phases/tasks/gaps with their outcome (ref: plan-doc `docs/plans/PPP-plan.md`, the spec's gaps, or `TASKS.md` if the session created its own split). Fold the key context a resume needs (settled decisions, discoveries) into these bullets.
|
|
15
15
|
|
|
16
|
-
##
|
|
17
|
-
|
|
16
|
+
## Pending / Next
|
|
17
|
+
The intent: what remains and what comes immediately next (seeded BEFORE executing — artifact-first). A resume starts here.
|
|
18
18
|
|
|
19
|
-
##
|
|
20
|
-
|
|
19
|
+
## Open questions
|
|
20
|
+
Live doubts not yet resolved (ideally "None"). Deferred ones move to the session's `BACKLOG` or the flow doc's `## Open questions`.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
### Optional sections
|
|
23
|
+
|
|
24
|
+
- `## Excluded` — phases/tasks explicitly excluded, with reason (the `aw status` dashboard reads it for the discarded list).
|
|
25
|
+
- The `checkpoint-write` hook (PreCompact/SessionEnd) may write a **machine snapshot** with its own headings (`Last action`, `Next step`, `Files touched`, `Refs`, …) and `_[AI: …]_` placeholders — complete the placeholders; the loop-owned contract above still governs what the loop writes.
|
|
@@ -21,4 +21,4 @@ Session type, **set by the parent loop** (not the user). Authoritative catalog:
|
|
|
21
21
|
> `research` is **not** a session type the loops create. Research is an **inline** activity: ANALYSIS-FILE / CONCLUSIONS are written into whatever session is active (`refine`/`exec`/`quick`) when it does investigation.
|
|
22
22
|
|
|
23
23
|
## Success criteria
|
|
24
|
-
The run's **done-condition**, seeded at session creation: a checklist `[ ]` of **falsifiable** items. Executable deliverable → runnable tests/checks; non-executable → inspection rubric (the human ratifies it if subjective). Spec/plan sessions may **reference** the doc's acceptance criteria instead of duplicating them. Full doctrine: [`../../loops/CHASSIS.md`](../../loops/CHASSIS.md) § *Verification-first*.
|
|
24
|
+
The run's **done-condition**, seeded at session creation: a checklist `[ ]` of **falsifiable** items. Executable deliverable → runnable tests/checks; non-executable → inspection rubric (the human ratifies it if subjective). Spec/plan sessions may **reference** the doc's acceptance criteria instead of duplicating them. The convergence gate **flips** each criterion to `- [x]` as it turns green — on close the checklist reflects the real final state. Full doctrine: [`../../loops/CHASSIS.md`](../../loops/CHASSIS.md) § *Verification-first*.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TASKS.md — internal task breakdown (optional, common)
|
|
2
2
|
|
|
3
|
-
> What it is: an internal phases/tasks breakdown for sessions that need their own
|
|
3
|
+
> What it is: an internal phases/tasks breakdown for sessions that need their own split. **Optional artifact** — in the PLAN flow, phases and tasks live in the **plan-doc** (`docs/plans/PPP-plan.md`, living). Use this only when a session needs a breakdown that is not covered by the plan-doc.
|
|
4
4
|
|
|
5
5
|
## Phases
|
|
6
6
|
Grouping phases. Phases should have a complexity between XS and S.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CONCLUSIONS.md — research conclusions
|
|
2
2
|
|
|
3
|
-
> What it is: the conclusions of an **inline research** activity, written into the active session (`refine`/`exec`/`quick`). Produced when the research concludes (success or `
|
|
3
|
+
> What it is: the conclusions of an **inline research** activity, written into the active session (`refine`/`exec`/`quick`). Produced when the research concludes (success or `inconclusive`). The parent loop reads this to resolve the gap that triggered the research.
|
|
4
4
|
|
|
5
5
|
## Conclusion
|
|
6
6
|
Direct answer to the initial question.
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
# w — Command map (Layer 1)
|
|
2
2
|
|
|
3
|
-
> README
|
|
3
|
+
> README of the `/w:` namespace (`w` = *workflow*): everything listed here is the **only thing the user invokes** directly. Commands are **Layer 1** — single-pass or they start a loop; no iteration logic.
|
|
4
4
|
>
|
|
5
|
-
> **Canon**:
|
|
5
|
+
> **Canon**: the full model (3 layers + `docs/` zone, the 3 flows, hard invariants) lives in [`../SKILL.md`](../SKILL.md); the **loop engine** in [`../loops/CHASSIS.md`](../loops/CHASSIS.md). This README is only the folder index.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Bootstrap
|
|
10
10
|
|
|
11
|
-
[`/w:workspace-init`](workspace-init.md)
|
|
11
|
+
[`/w:workspace-init`](workspace-init.md) turns the current folder into a **workspace** (`.workflow/` + `docs/` + `WORKSPACE` block + `.workflow/skills.toml`). No project/hub distinction; run once before any flow.
|
|
12
12
|
|
|
13
13
|
## Index
|
|
14
14
|
|
|
15
|
-
| Command |
|
|
15
|
+
| Command | What it does | Mode |
|
|
16
16
|
|---|---|---|
|
|
17
|
-
| [`workspace-init`](workspace-init.md) |
|
|
18
|
-
| [`spec-new`](spec-new.md) |
|
|
19
|
-
| [`spec-refine`](spec-refine.md) |
|
|
20
|
-
| [`plan-new`](plan-new.md) |
|
|
21
|
-
| [`plan-refine`](plan-refine.md) |
|
|
22
|
-
| [`plan-exec`](plan-exec.md) |
|
|
23
|
-
| [`quick`](quick.md) |
|
|
24
|
-
| [`status`](status.md) |
|
|
25
|
-
| [`fix-git`](fix-git.md) |
|
|
26
|
-
| [`export-scripts`](export-scripts.md) |
|
|
27
|
-
| [`export-manuals`](export-manuals.md) |
|
|
28
|
-
| [`export-diagrams`](export-diagrams.md) |
|
|
29
|
-
| [`export-reports`](export-reports.md) |
|
|
30
|
-
|
|
31
|
-
> **
|
|
17
|
+
| [`workspace-init`](workspace-init.md) | Workspace bootstrap | single-pass, interactive |
|
|
18
|
+
| [`spec-new`](spec-new.md) | Generates the spec draft (`docs/specs/NNN-spec-<slug>.md`) | single-pass, no loop |
|
|
19
|
+
| [`spec-refine`](spec-refine.md) | Refines the spec **in place** until unambiguous | starts `spec-refine-loop` |
|
|
20
|
+
| [`plan-new`](plan-new.md) | Derives the executable plan (`docs/plans/PPP-plan-<slug>.md`) from the spec | starts `plan-new-loop` |
|
|
21
|
+
| [`plan-refine`](plan-refine.md) | Refines the plan **in place** before executing (aux, optional) | starts `plan-refine-loop` |
|
|
22
|
+
| [`plan-exec`](plan-exec.md) | Executes the plan (code/DB/git) and maintains it as a living doc | starts `plan-exec-loop` |
|
|
23
|
+
| [`quick`](quick.md) | Lightweight shortcut for scoped work; never touches `docs/` | starts `quick-loop` |
|
|
24
|
+
| [`status`](status.md) | Read-only workspace dashboard | single-pass (transversal) |
|
|
25
|
+
| [`fix-git`](fix-git.md) | Resolves an in-progress merge, git-safe | single-pass (transversal) |
|
|
26
|
+
| [`export-scripts`](export-scripts.md) | Promotes session SQL migrations to `docs/scripts/` | single-pass, read-only |
|
|
27
|
+
| [`export-manuals`](export-manuals.md) | Generates manuals in `docs/manuals/` | single-pass, read-only |
|
|
28
|
+
| [`export-diagrams`](export-diagrams.md) | Generates C4/mermaid diagrams in `docs/diagrams/` | single-pass, read-only |
|
|
29
|
+
| [`export-reports`](export-reports.md) | Generates reports in `docs/reports/` | single-pass, read-only |
|
|
30
|
+
|
|
31
|
+
> **Intentional asymmetry:** in SPEC, `spec-new` generates the draft single-pass (no loop) and the loop lives in `spec-refine`; in PLAN, all 3 commands start loops. Total: **6 flow commands / 5 loops**.
|
|
32
32
|
>
|
|
33
|
-
> **
|
|
33
|
+
> **Transversal (no flow):** `status` and `fix-git` belong to no SPEC/PLAN/QUICK flow and do not count in 6/5. In the design they are their own category (`workflow-skills/`); here they are packaged under `commands/` so `/w:` can invoke them — see [`../harness/SKILL.md`](../harness/SKILL.md) § *Command packaging*.
|
|
34
34
|
|
|
35
35
|
## Schema of each command file
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Every `<command>.md` in this folder uses this frontmatter + body structure — the schema (including `allowed-tools:` and the `Skill` tool) is the **Claude Code binding**; other harnesses wrap the same contract in their format (see [`../harness/SKILL.md`](../harness/SKILL.md) § *Command packaging*):
|
|
38
38
|
|
|
39
39
|
| Field | Description |
|
|
40
40
|
|---|---|
|
|
41
|
-
| `description:` | One line: what + when (drives discovery in `/`-picker) |
|
|
41
|
+
| `description:` | One line: what + when (drives discovery in the `/`-picker) |
|
|
42
42
|
| `argument-hint:` | Argument signature for the user |
|
|
43
43
|
| `allowed-tools:` | YAML list (typically `Bash`/`Read`/`Write`/`Edit`). Loops/exports are **read-and-followed**, not invoked with `Skill:` — so `Skill` is **not** in `allowed-tools`. |
|
|
44
44
|
| Body | 1-3 orienting lines, then the invocation: **read-and-follow** the sibling loop/export `SKILL.md`, or call the `aw` CLI; then `## Plan mode`, `## Resources` |
|