@tacuchi/agent-workflow-cli 15.1.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/w/README.md +14 -14
- package/skills/w/SKILL.md +96 -75
- package/skills/w/artifacts/README.md +6 -6
- package/skills/w/artifacts/artifacts-core/SESSION.md +1 -7
- package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
- package/skills/w/artifacts/artifacts-exec/TECHNICAL-NOTE.md +9 -54
- 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 +104 -97
- 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 -80
- package/skills/w/loops/plan-new-loop/SKILL.md +88 -58
- package/skills/w/loops/plan-refine-loop/SKILL.md +69 -45
- package/skills/w/loops/quick-loop/SKILL.md +79 -79
- package/skills/w/loops/spec-refine-loop/SKILL.md +93 -97
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tacuchi/agent-workflow-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.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,107 +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
|
+
|
|
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
|
+
|
|
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`).
|
|
82
91
|
|
|
83
92
|
### The commands (`/w:` namespace)
|
|
84
93
|
|
|
85
|
-
- `/w:workspace-init` —
|
|
86
|
-
- `/w:spec-new` —
|
|
87
|
-
- `/w:spec-refine` —
|
|
88
|
-
- `/w:plan-new` —
|
|
89
|
-
- `/w:plan-refine` —
|
|
90
|
-
- `/w:plan-exec` —
|
|
91
|
-
- `/w:quick` —
|
|
92
|
-
- `/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/`.
|
|
93
102
|
|
|
94
103
|
### Transversal skills (no flow) — `/w:status` · `/w:fix-git`
|
|
95
104
|
|
|
96
|
-
|
|
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.)*
|
|
97
106
|
|
|
98
|
-
- `/w:status` —
|
|
99
|
-
- `/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`.
|
|
100
109
|
|
|
101
110
|
### The loops (Layer 2)
|
|
102
111
|
|
|
103
|
-
|
|
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.
|
|
104
113
|
|
|
105
|
-
|
|
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).
|
|
106
115
|
|
|
107
|
-
`spec-new` no
|
|
116
|
+
`spec-new` has no loop (single-pass): **6 commands / 5 loops**.
|
|
108
117
|
|
|
109
|
-
### The `export-*` family (
|
|
118
|
+
### The `export-*` family (the only artifact → `docs/` path)
|
|
110
119
|
|
|
111
|
-
| Export |
|
|
120
|
+
| Export | Reads | Produces |
|
|
112
121
|
|---|---|---|
|
|
113
|
-
| `export-scripts` | `SCRIPTS.sql` (
|
|
114
|
-
| `export-manuals` |
|
|
115
|
-
| `export-diagrams` |
|
|
116
|
-
| `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) |
|
|
117
126
|
|
|
118
|
-
|
|
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).
|
|
119
128
|
|
|
120
129
|
### Capability skills + `.workflow/skills.toml`
|
|
121
130
|
|
|
122
|
-
|
|
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.
|
|
123
132
|
|
|
124
133
|
```toml
|
|
125
134
|
[skills]
|
|
@@ -127,54 +136,66 @@ ui-design = "ui-spec" # built-in default
|
|
|
127
136
|
sql = "sql"
|
|
128
137
|
git = "git"
|
|
129
138
|
research = "research"
|
|
130
|
-
# diagrams = "off" # ←
|
|
131
|
-
# ui-design = "acme/figma-spec" # ← skill
|
|
139
|
+
# diagrams = "off" # ← capability disabled
|
|
140
|
+
# ui-design = "acme/figma-spec" # ← third-party skill (via skills.sh)
|
|
132
141
|
```
|
|
133
142
|
|
|
134
|
-
**
|
|
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).
|
|
135
144
|
|
|
136
|
-
|
|
145
|
+
Role catalog and defaults:
|
|
137
146
|
|
|
138
147
|
| Role | Default | Tier | Composed by |
|
|
139
148
|
|---|---|---|---|
|
|
140
149
|
| `ui-design` | `ui-spec` | must | `spec-refine-loop` (UI) · `plan-new-loop` / `plan-refine-loop` (design SPECs) |
|
|
141
150
|
| `sql` | `sql` | must | research · `plan-exec-loop` · `quick-loop` · `export-scripts` |
|
|
142
151
|
| `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
|
|
143
|
-
| `research` | `research` | should |
|
|
152
|
+
| `research` | `research` | should | every loop (inline capability) |
|
|
144
153
|
| `diagrams` | `diagrams` | should | `export-diagrams` |
|
|
145
|
-
| `overview` | `workflow` | should |
|
|
154
|
+
| `overview` | `workflow` | should | anyone (orientation) |
|
|
146
155
|
|
|
147
|
-
> **
|
|
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).
|
|
148
157
|
|
|
149
|
-
|
|
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.
|
|
150
159
|
|
|
151
|
-
### Harness (
|
|
160
|
+
### Harness (harness-agnostic)
|
|
152
161
|
|
|
153
|
-
|
|
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).
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
Key capabilities:
|
|
156
165
|
|
|
157
|
-
- **structured-choice** —
|
|
158
|
-
- **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.
|
|
159
168
|
- **command-invocation** · **procedure-loading** · **subagent-dispatch** (opt.) · **persistent-context** · **external-data** (MCP) · **dry-run/preview**.
|
|
160
169
|
|
|
161
|
-
|
|
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 |
|
|
162
183
|
|
|
163
184
|
### The 6 hard invariants
|
|
164
185
|
|
|
165
|
-
1. **
|
|
166
|
-
2. **
|
|
167
|
-
3. **
|
|
168
|
-
4. **
|
|
169
|
-
5. **
|
|
170
|
-
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`.
|
|
171
192
|
|
|
172
|
-
> **
|
|
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).
|
|
173
194
|
|
|
174
195
|
## Output
|
|
175
196
|
|
|
176
|
-
|
|
197
|
+
None. Pure orientation: it writes no documents or artifacts.
|
|
177
198
|
|
|
178
199
|
## Source
|
|
179
200
|
|
|
180
|
-
|
|
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.)
|
|
@@ -19,7 +19,7 @@ Central distinction of the model:
|
|
|
19
19
|
|
|
20
20
|
> An artifact may be **promoted** to a `docs/` document (e.g. `SCRIPTS.sql` → `docs/scripts/`) — but **only via dedicated `export-*` skills**, **never** automatically by the loops. The spec and the plan **are not** artifacts: they are documents.
|
|
21
21
|
|
|
22
|
-
> **Routing by operating context
|
|
22
|
+
> **Routing by operating context** (canonical rules: [`../SKILL.md`](../SKILL.md) § *Contexto operativo*): inside a flow → the **active/continued** session (a prompt with no command edits the most recent session's artifacts); workspace without flow → `docs/` by convention + numbering; no workspace → vanilla. Session→`docs/` promotion is still **only** via `export-*`.
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
@@ -58,9 +58,9 @@ Sessions are created by the loops as needed — **one session per run**. The ses
|
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
-
## Invariants (hard rules —
|
|
61
|
+
## Invariants (hard rules — canonical list: [`../SKILL.md`](../SKILL.md) § *The 6 hard invariants*)
|
|
62
62
|
|
|
63
|
-
1. **No auto-export**:
|
|
64
|
-
2. **Each flow touches only its `docs/` folders**: SPEC→`specs` · PLAN→`plans` · QUICK→none
|
|
65
|
-
3. **Spec and plan are documents
|
|
66
|
-
4. **DB scripts-only**:
|
|
63
|
+
1. **No auto-export**: only `export-*` promotes to `docs/`, explicitly.
|
|
64
|
+
2. **Each flow touches only its `docs/` folders**: SPEC→`specs` · PLAN→`plans` · QUICK→none.
|
|
65
|
+
3. **Spec and plan are documents**, never session artifacts. *(Design SPECs `NNN-SPEC-<SLUG>.md` are a different thing: per-screen UI artifacts of PLAN sessions — [`artifacts-design/`](artifacts-design/).)*
|
|
66
|
+
4. **DB scripts-only**: never execute DML/DDL; migrations (type B) stay in `SCRIPTS.sql` and ship via `export-scripts`; only read-only queries (type A) run via MCP.
|
|
@@ -21,10 +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
|
|
25
|
-
|
|
26
|
-
- **Executable** (code/script/fix): **runnable** tests/checks (unit, build, lint, bug repro) — literal TDD. May **reference** the repo's tests rather than copy them.
|
|
27
|
-
- **Rubric** (analysis/design and other non-executable deliverables): items checked by **inspection** (e.g. "identifies every affected site with `file:line`"; "each decision: rationale + ≥1 alternative"). For **subjective** deliverables the AI **proposes** the rubric and the **human ratifies** it before pursuing it.
|
|
28
|
-
|
|
29
|
-
> **Spec/plan** may **reference** the document's acceptance criteria instead of duplicating them. **Research** is the original particular case: its checklist marks the research concluded.
|
|
30
|
-
> **If an item cannot be met** (no evidence, DB unavailable, irresolvable): it closes as `inconcluso` with a reason and the loop **degrades** (asks the human or defers to `Open questions`/`BACKLOG`) — never spinning in place.
|
|
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*.
|
|
@@ -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,62 +1,24 @@
|
|
|
1
1
|
# TECHNICAL-NOTE.md — technical design note (schema reference)
|
|
2
2
|
|
|
3
|
-
> **Model note:** in PLAN these sections live **inline in the plan-doc** (
|
|
3
|
+
> **Model note:** in PLAN these sections live **inline in the plan-doc** (rich plan — `plan-new-loop` § *Delta 1*); this artifact **is not created** in PLAN sessions. It remains only for a `quick` session that needs scoped technical context without a plan-doc.
|
|
4
4
|
|
|
5
5
|
## Solution
|
|
6
|
-
|
|
6
|
+
How it will be implemented (technical/functional).
|
|
7
7
|
|
|
8
8
|
## Impacted
|
|
9
|
-
|
|
10
|
-
- Frontend
|
|
11
|
-
- Backend
|
|
12
|
-
- Database (schemas/tables/functions)
|
|
13
|
-
- APIs (controllers/endpoints)
|
|
14
|
-
- Integrations with external systems
|
|
9
|
+
Frontend · Backend · Database (schemas/tables/functions) · APIs · external integrations.
|
|
15
10
|
|
|
16
11
|
## Dependencies
|
|
17
|
-
|
|
12
|
+
Sessions / documents / sources / databases.
|
|
18
13
|
|
|
19
14
|
## Current State
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Example:
|
|
23
|
-
```
|
|
24
|
-
ContratoEfectivoData.demo()
|
|
25
|
-
│
|
|
26
|
-
▼
|
|
27
|
-
ContratoTemplateRenderer
|
|
28
|
-
(iface)
|
|
29
|
-
│ @Service impl
|
|
30
|
-
▼
|
|
31
|
-
ThymeleafContratoTemplateRenderer ──── reads ──> templates/contratos/efectivo.html
|
|
32
|
-
│ (returns String HTML)
|
|
33
|
-
▼
|
|
34
|
-
PreviewController.efectivoHtml() ──> respond TEXT_HTML
|
|
35
|
-
│
|
|
36
|
-
└─> efectivoPdf() ─> PdfRenderer (iface @Qualifier("chromePdfRenderer"))
|
|
37
|
-
│ @Service impl
|
|
38
|
-
▼
|
|
39
|
-
CdpPdfRenderer ──> Chrome headless via CDP
|
|
40
|
-
│
|
|
41
|
-
▼
|
|
42
|
-
respond APPLICATION_PDF
|
|
43
|
-
```
|
|
15
|
+
AS-IS wiring (interfaces and methods), brief.
|
|
44
16
|
|
|
45
17
|
## Target State
|
|
46
|
-
|
|
18
|
+
TO-BE wiring, brief.
|
|
47
19
|
|
|
48
20
|
## Final Behavior
|
|
49
|
-
How the
|
|
50
|
-
|
|
51
|
-
Example:
|
|
52
|
-
The user must be able to recover their password via OTP to their mobile number and the mobile number must be saved in the user's data:
|
|
53
|
-
1. [User] Accesses the login screen
|
|
54
|
-
2. [User] Clicks [Forgot Password]
|
|
55
|
-
3. [System] Shows a window to enter mobile number
|
|
56
|
-
4. [User] Enters mobile number
|
|
57
|
-
5. [System] Sends OTP via SMS
|
|
58
|
-
6. [System] Confirms OTP
|
|
59
|
-
7. [System] Saves the mobile number and associates it with the [User]
|
|
21
|
+
How the flow behaves end-to-end — aligned with the acceptance/success criteria in `SESSION.md`.
|
|
60
22
|
|
|
61
23
|
## Impact / Risks
|
|
62
24
|
Technical impacts and risks.
|
|
@@ -65,17 +27,10 @@ Technical impacts and risks.
|
|
|
65
27
|
Assumptions.
|
|
66
28
|
|
|
67
29
|
## Estimated Time
|
|
68
|
-
|
|
69
|
-
The work week has 5 days (Monday–Friday only).
|
|
70
|
-
Size scale XS/S/M/L/XL:
|
|
71
|
-
- XS -> 1 day or less
|
|
72
|
-
- S -> 1 to 2 days
|
|
73
|
-
- M -> 3 to 5 days
|
|
74
|
-
- L -> 6 to 10 days
|
|
75
|
-
- XL -> More than 10 days
|
|
30
|
+
XS–XL sizing (development + internal testing); scale defined in the plan schema (`plan-new-loop` § *Delta 1*).
|
|
76
31
|
|
|
77
32
|
## Validations
|
|
78
33
|
Validations, constraints, business-specific logic.
|
|
79
34
|
|
|
80
35
|
## Open Questions
|
|
81
|
-
Pending items, doubts
|
|
36
|
+
Pending items, doubts.
|
|
@@ -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.
|