@tacuchi/agent-workflow-cli 21.17.0 → 22.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/README.md +4 -16
- package/dist/adapters/git-cli.js +36 -0
- package/dist/adapters/git-cli.js.map +1 -1
- package/dist/application/capability/design-handler.js +67 -21
- package/dist/application/capability/design-handler.js.map +1 -1
- package/dist/application/capability/dispatcher.js +1 -1
- package/dist/application/capability/dispatcher.js.map +1 -1
- package/dist/application/capability/durable-effect.js +1 -1
- package/dist/application/capability/durable-effect.js.map +1 -1
- package/dist/application/check-branch-service.js +1 -0
- package/dist/application/check-branch-service.js.map +1 -1
- package/dist/application/checkpoint-service.js +4 -3
- package/dist/application/checkpoint-service.js.map +1 -1
- package/dist/application/design/consumer-document.js +179 -0
- package/dist/application/design/consumer-document.js.map +1 -0
- package/dist/application/design/design-gate-service.js +18 -1
- package/dist/application/design/design-gate-service.js.map +1 -1
- package/dist/application/design/design-index-service.js +22 -3
- package/dist/application/design/design-index-service.js.map +1 -1
- package/dist/application/design/design-publish-service.js +27 -6
- package/dist/application/design/design-publish-service.js.map +1 -1
- package/dist/application/design/design-simple-service.js +34 -22
- package/dist/application/design/design-simple-service.js.map +1 -1
- package/dist/application/dev-only-services.js +19 -12
- package/dist/application/dev-only-services.js.map +1 -1
- package/dist/application/docs-canon-service.js +79 -5
- package/dist/application/docs-canon-service.js.map +1 -1
- package/dist/application/dsn-reader-service.js +12 -47
- package/dist/application/dsn-reader-service.js.map +1 -1
- package/dist/application/export-service.js +20 -11
- package/dist/application/export-service.js.map +1 -1
- package/dist/application/flow/flow-service.js +25 -0
- package/dist/application/flow/flow-service.js.map +1 -1
- package/dist/application/flow/internal-actions.js +5 -0
- package/dist/application/flow/internal-actions.js.map +1 -1
- package/dist/application/flow/submit.js +152 -22
- package/dist/application/flow/submit.js.map +1 -1
- package/dist/application/history-table.js +82 -44
- package/dist/application/history-table.js.map +1 -1
- package/dist/application/history-update-service.js +19 -9
- package/dist/application/history-update-service.js.map +1 -1
- package/dist/application/hook-git-commit-advisor.js +5 -4
- package/dist/application/hook-git-commit-advisor.js.map +1 -1
- package/dist/application/hook-sql-mutation-guard.js +1 -1
- package/dist/application/hook-sql-mutation-guard.js.map +1 -1
- package/dist/application/lifecycle-target.js +1 -0
- package/dist/application/lifecycle-target.js.map +1 -1
- package/dist/application/local-proposal.js +47 -23
- package/dist/application/local-proposal.js.map +1 -1
- package/dist/application/mcp-connections-service.js +37 -2
- package/dist/application/mcp-connections-service.js.map +1 -1
- package/dist/application/mcp-dbhub-launcher.js +22 -50
- package/dist/application/mcp-dbhub-launcher.js.map +1 -1
- package/dist/application/mcp-doctor-service.js +14 -23
- package/dist/application/mcp-doctor-service.js.map +1 -1
- package/dist/application/mcp-remove-service.js +3 -3
- package/dist/application/mcp-remove-service.js.map +1 -1
- package/dist/application/mcp-setup-service.js +4 -4
- package/dist/application/mcp-setup-service.js.map +1 -1
- package/dist/application/mcp-test-connection-service.js +4 -6
- package/dist/application/mcp-test-connection-service.js.map +1 -1
- package/dist/application/parsers/phases.js +17 -5
- package/dist/application/parsers/phases.js.map +1 -1
- package/dist/application/parsers/project-block.js +5 -11
- package/dist/application/parsers/project-block.js.map +1 -1
- package/dist/application/parsers/sessions-csv.js +16 -14
- package/dist/application/parsers/sessions-csv.js.map +1 -1
- package/dist/application/parsers/spec-relation.js +15 -11
- package/dist/application/parsers/spec-relation.js.map +1 -1
- package/dist/application/parsers/tasks.js +25 -1
- package/dist/application/parsers/tasks.js.map +1 -1
- package/dist/application/persist-service.js +67 -29
- package/dist/application/persist-service.js.map +1 -1
- package/dist/application/plugin-doctor/skills.js +1 -40
- package/dist/application/plugin-doctor/skills.js.map +1 -1
- package/dist/application/plugin-doctor-service.js +1 -3
- package/dist/application/plugin-doctor-service.js.map +1 -1
- package/dist/application/release-data/artifacts.js +1 -0
- package/dist/application/release-data/artifacts.js.map +1 -1
- package/dist/application/release-data/bundles.js +15 -6
- package/dist/application/release-data/bundles.js.map +1 -1
- package/dist/application/release-data/common.js +16 -7
- package/dist/application/release-data/common.js.map +1 -1
- package/dist/application/release-data/sessions.js +36 -8
- package/dist/application/release-data/sessions.js.map +1 -1
- package/dist/application/render/project-block.js +2 -2
- package/dist/application/render/project-block.js.map +1 -1
- package/dist/application/resume-service.js +9 -1
- package/dist/application/resume-service.js.map +1 -1
- package/dist/application/retirement/graph.js +14 -13
- package/dist/application/retirement/graph.js.map +1 -1
- package/dist/application/retirement/prepare.js +15 -2
- package/dist/application/retirement/prepare.js.map +1 -1
- package/dist/application/retirement/resolve.js.map +1 -1
- package/dist/application/self/clean-legacy.js +2 -4
- package/dist/application/self/clean-legacy.js.map +1 -1
- package/dist/application/self/mcp-config.js +8 -9
- package/dist/application/self/mcp-config.js.map +1 -1
- package/dist/application/session-close-service.js +8 -2
- package/dist/application/session-close-service.js.map +1 -1
- package/dist/application/session-create-service.js +26 -14
- package/dist/application/session-create-service.js.map +1 -1
- package/dist/application/session-resolver.js +80 -34
- package/dist/application/session-resolver.js.map +1 -1
- package/dist/application/session-resume-service.js +4 -3
- package/dist/application/session-resume-service.js.map +1 -1
- package/dist/application/source-boundary-policy.js +483 -0
- package/dist/application/source-boundary-policy.js.map +1 -0
- package/dist/application/status-service.js +1 -0
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/workline-index-service.js +42 -20
- package/dist/application/workline-index-service.js.map +1 -1
- package/dist/application/workspace-migrate/apply.js +2 -4
- package/dist/application/workspace-migrate/apply.js.map +1 -1
- package/dist/application/workspace-migrate/plan.js +9 -6
- package/dist/application/workspace-migrate/plan.js.map +1 -1
- package/dist/application/workspace-migrate/preview.js +3 -3
- package/dist/application/workspace-migrate/preview.js.map +1 -1
- package/dist/application/worktree-service.js +3 -0
- package/dist/application/worktree-service.js.map +1 -1
- package/dist/cli/commands/capability.js +89 -5
- package/dist/cli/commands/capability.js.map +1 -1
- package/dist/cli/commands/designs.js +2 -6
- package/dist/cli/commands/designs.js.map +1 -1
- package/dist/cli/commands/dev-only.js +1 -1
- package/dist/cli/commands/dev-only.js.map +1 -1
- package/dist/cli/commands/flow.js +3 -1
- package/dist/cli/commands/flow.js.map +1 -1
- package/dist/cli/commands/index.js +0 -2
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/mcp.js +53 -55
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/persist.js +27 -21
- package/dist/cli/commands/persist.js.map +1 -1
- package/dist/cli/commands/resume.js +2 -2
- package/dist/cli/commands/resume.js.map +1 -1
- package/dist/cli/commands/session-create.js +2 -1
- package/dist/cli/commands/session-create.js.map +1 -1
- package/dist/cli/help-groups.js +0 -1
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/main.js +0 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/parser.js +1 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/tui/data/recommended-skills.js +2 -2
- package/dist/cli/tui/data/recommended-skills.js.map +1 -1
- package/dist/cli/tui/tabs/mcp-tab-helpers.js +1 -1
- package/dist/cli/tui/tabs/mcp-tab.js +2 -2
- package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
- package/dist/domain/capability/protocol.js.map +1 -1
- package/dist/domain/correlative.js +121 -0
- package/dist/domain/correlative.js.map +1 -0
- package/dist/domain/design/capability.js +18 -0
- package/dist/domain/design/capability.js.map +1 -1
- package/dist/domain/docs-canon.js +31 -0
- package/dist/domain/docs-canon.js.map +1 -0
- package/dist/domain/flow/answer.js +57 -1
- package/dist/domain/flow/answer.js.map +1 -1
- package/dist/domain/flow/authority.js +28 -29
- package/dist/domain/flow/authority.js.map +1 -1
- package/dist/domain/flow/execution-result.js +13 -1
- package/dist/domain/flow/execution-result.js.map +1 -1
- package/dist/domain/flow/run-state.js.map +1 -1
- package/dist/domain/mcp-entry.js +7 -12
- package/dist/domain/mcp-entry.js.map +1 -1
- package/dist/domain/retirement/selector.js +16 -14
- package/dist/domain/retirement/selector.js.map +1 -1
- package/dist/domain/source-boundary.js +3 -0
- package/dist/domain/source-boundary.js.map +1 -0
- package/dist/domain/workline-node.js +12 -5
- package/dist/domain/workline-node.js.map +1 -1
- package/dist/runtime/namespace-resolver.js +0 -3
- package/dist/runtime/namespace-resolver.js.map +1 -1
- package/package.json +5 -5
- package/skills/w/SKILL.md +2 -2
- package/skills/w/artifacts/artifacts-core/SCRIPTS.sql +14 -9
- package/skills/w/artifacts/artifacts-research/CONCLUSIONS.md +7 -0
- package/skills/w/commands/export-scripts.md +8 -2
- package/skills/w/commands/plan-new.md +1 -0
- package/skills/w/context/MANIFEST.json +2 -9
- package/skills/w/exports/export-scripts/EXPORT.md +13 -9
- package/skills/w/loops/CHASSIS.md +1 -1
- package/skills/w/loops/plan-exec-loop/LOOP.md +14 -10
- package/skills/w/loops/plan-new-loop/LOOP.md +16 -16
- package/skills/w/loops/plan-refine-loop/LOOP.md +6 -1
- package/skills/w/loops/quick-loop/LOOP.md +2 -2
- package/skills/w/loops/spec-refine-loop/LOOP.md +4 -0
- package/skills/w/modules/DB-RESEARCH-RULE.md +5 -5
- package/skills/w/modules/DB-SCRIPTS-ONLY.md +5 -6
- package/skills/w/modules/EXEC-DB-POLICY.md +2 -2
- package/skills/w/modules/PLAN-INPUT.md +11 -9
- package/skills/w/roles/sql/ROLE.md +9 -9
- package/dist/application/decisiones-service.js +0 -31
- package/dist/application/decisiones-service.js.map +0 -1
- package/dist/application/dev-bootstrap-dsn-service.js +0 -76
- package/dist/application/dev-bootstrap-dsn-service.js.map +0 -1
- package/dist/application/profile/profile-service.js +0 -199
- package/dist/application/profile/profile-service.js.map +0 -1
- package/dist/application/tasks-service.js +0 -45
- package/dist/application/tasks-service.js.map +0 -1
- package/dist/cli/commands/bootstrap-dsn.js +0 -16
- package/dist/cli/commands/bootstrap-dsn.js.map +0 -1
- package/dist/cli/tui/components/process-list.js +0 -43
- package/dist/cli/tui/components/process-list.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tacuchi/agent-workflow-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Runtime CLI for Workline — the stages + loops + artifacts system for agent work. Bundles the universal `w` skill set under `skills/w/` (slash commands `/w:*`: spec-new/spec-refine, plan-new/plan-exec, quick, persist, workspace-init, export-*); `self install --target <host>` copies SKILL + commands + hooks into the host. Pluggable capability skills
|
|
3
|
+
"version": "22.0.0",
|
|
4
|
+
"description": "Runtime CLI for Workline — the stages + loops + artifacts system for agent work. Bundles the universal `w` skill set under `skills/w/` (slash commands `/w:*`: spec-new/spec-refine, plan-new/plan-exec, quick, persist, workspace-init, export-*); `self install --target <host>` copies SKILL + commands + hooks into the host. Pluggable capability skills resolve through `.workflow/skills.toml`. Namespace auto-detected from any `.<ns>/sessions/` dir in CWD; default `workflow`.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"agent-workflow": "dist/cli/main.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": ["dist", "skills", "LICENSE", "README.md"],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"build:watch": "tsc --watch",
|
|
12
|
+
"build": "node scripts/clean-dist.mjs && tsc",
|
|
13
|
+
"build:watch": "node scripts/clean-dist.mjs && tsc --watch",
|
|
14
14
|
"test": "vitest run",
|
|
15
15
|
"test:watch": "vitest",
|
|
16
16
|
"test:golden": "vitest run tests/golden",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"codex",
|
|
32
32
|
"namespace"
|
|
33
33
|
],
|
|
34
|
-
"author": "Tacuchi
|
|
34
|
+
"author": "Tacuchi",
|
|
35
35
|
"license": "AGPL-3.0-or-later",
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
package/skills/w/SKILL.md
CHANGED
|
@@ -55,7 +55,7 @@ USER invokes
|
|
|
55
55
|
- **Layer 2** — the AI iterates end to end until convergence. No direct human invocation.
|
|
56
56
|
- **Layer 3** — ephemeral, internal, process-only. Nobody invokes it by hand.
|
|
57
57
|
|
|
58
|
-
> **Tools pointer:** auxiliary tooling has its home under `docs/tools/<slug>/` (README + run/output structure per the skill's contract; index row in `docs/tools/README.md`), authored by the **ambient `creating-tools` skill** — the host auto-discovers it when authoring any support tool, and the code loops' closing gate catches the miss (`loops/CODE-POLICIES.md` § *Closing review gate*). A ready implementation
|
|
58
|
+
> **Tools pointer:** auxiliary tooling has its home under `docs/tools/<slug>/` (README + run/output structure per the skill's contract; index row in `docs/tools/README.md`), authored by the **ambient `creating-tools` skill** — the host auto-discovers it when authoring any support tool, and the code loops' closing gate catches the miss (`loops/CODE-POLICIES.md` § *Closing review gate*). A ready implementation may be installed independently; Workline does **not** depend on it (ambient, never bound).
|
|
59
59
|
|
|
60
60
|
### The 3 flows
|
|
61
61
|
|
|
@@ -196,7 +196,7 @@ One language per plane — never mix them:
|
|
|
196
196
|
| **Section headings** of artifacts and docs (`## Requirement`, `## Completed`, …) | **English** (parse contract) |
|
|
197
197
|
| 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) |
|
|
198
198
|
| Literal option labels (`Continuar`, `Compactar`, `Cerrar`, `Aceptar recomendaciones`, `Aprobar y guardar`, `Refinar`, …) | canonical product strings — use them **verbatim** |
|
|
199
|
-
| Domain terms (class/route/table names, e.g.
|
|
199
|
+
| Domain terms (class/route/table names, e.g. an existing fleet) | the domain's ubiquitous language (Spanish) — never translated |
|
|
200
200
|
|
|
201
201
|
### The 6 hard invariants
|
|
202
202
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
-- SCRIPTS.sql — session artifact (common)
|
|
2
2
|
--
|
|
3
|
-
-- What it is:
|
|
4
|
-
-- A) READ-ONLY queries
|
|
5
|
-
--
|
|
3
|
+
-- What it is: SQL and remote-read context produced by a session. TWO roles are distinguished:
|
|
4
|
+
-- A) READ-ONLY remote queries: research context captured before plan approval, never
|
|
5
|
+
-- execution validation or a closing proof.
|
|
6
6
|
-- B) DDL/DML migrations (schema/data changes): the AI DRAFTS them as a
|
|
7
7
|
-- deliverable but NEVER executes them; they are exported to docs/scripts/ (forward +
|
|
8
8
|
-- rollback) for a human/DBA to apply.
|
|
@@ -12,24 +12,29 @@
|
|
|
12
12
|
--
|
|
13
13
|
-- Rules:
|
|
14
14
|
-- 1) One entry per script, numbered, with purpose, DB/MCP target and type (A or B).
|
|
15
|
-
-- 2)
|
|
15
|
+
-- 2) A type A entry records `{kind: remote-read, connection, readonly: true, query_artifact,
|
|
16
|
+
-- captured_at, result_digest}` and has a matching note in CONCLUSIONS.md.
|
|
16
17
|
-- 3) Lives in the session (.workflow/sessions/NNN-.../SCRIPTS.sql).
|
|
17
18
|
-- 4) Type B is exported to docs/scripts/ as a deliverable (not executed by the AI).
|
|
18
19
|
|
|
19
20
|
-- ============================================================
|
|
20
|
-
-- [Q1] <purpose of the query> | Type: A (read
|
|
21
|
-
--
|
|
21
|
+
-- [Q1] <purpose of the query> | Type: A (remote-read research context)
|
|
22
|
+
-- Snapshot: {kind: remote-read, connection: <which>, readonly: true,
|
|
23
|
+
-- query_artifact: SCRIPTS.sql#Q1, captured_at: <ISO-8601>, result_digest: <digest>}
|
|
24
|
+
-- Origin: <research gap only; never a plan task/validation/exit condition>
|
|
22
25
|
-- ------------------------------------------------------------
|
|
23
26
|
SELECT ...;
|
|
24
27
|
|
|
25
28
|
-- ============================================================
|
|
26
|
-
-- [Q2] <purpose> | Type: A (read
|
|
27
|
-
--
|
|
29
|
+
-- [Q2] <purpose> | Type: A (remote-read research context)
|
|
30
|
+
-- Snapshot: {kind: remote-read, connection: <which>, readonly: true,
|
|
31
|
+
-- query_artifact: SCRIPTS.sql#Q2, captured_at: <ISO-8601>, result_digest: <digest>}
|
|
32
|
+
-- Origin: <research gap only>
|
|
28
33
|
-- ------------------------------------------------------------
|
|
29
34
|
SELECT ...;
|
|
30
35
|
|
|
31
36
|
-- ============================================================
|
|
32
|
-
-- [M1] <migration> | Type: B — DO NOT EXECUTE (deliverable;
|
|
37
|
+
-- [M1] <migration> | Type: B — DO NOT EXECUTE (deliverable; external application is handoff;
|
|
33
38
|
-- exported to docs/scripts/ via export-*)
|
|
34
39
|
-- DB/MCP: <which> | Origin: <plan task>
|
|
35
40
|
-- ------------------------------------------------------------
|
|
@@ -15,3 +15,10 @@ Example:
|
|
|
15
15
|
|
|
16
16
|
## Details
|
|
17
17
|
Supporting detail, evidence references, or additional context.
|
|
18
|
+
|
|
19
|
+
## Remote context (only when captured)
|
|
20
|
+
|
|
21
|
+
For each read-only remote investigation, record the matching `RemoteContextSnapshot` from
|
|
22
|
+
`SCRIPTS.sql`: connection, query artifact, capture time and result digest. It is research context
|
|
23
|
+
with no automatic expiry; refreshing it requires a plan/spec refine. It is never copied into a
|
|
24
|
+
task, validation, exit condition or closure claim.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use to promote the type-B `SCRIPTS.sql` artifacts of N sessions into a docs/scripts/ bundle — continuous forwards plus rollback. `aw export-scripts` checks
|
|
2
|
+
description: Use to promote the type-B `SCRIPTS.sql` artifacts of N sessions into a docs/scripts/ bundle — continuous forwards plus rollback. `aw export-scripts` checks shape and NEVER executes SQL. Never automatic.
|
|
3
3
|
argument-hint: "[--sessions <ids>] [--since <YYYY-MM-DD>] [--source <alias>]"
|
|
4
4
|
allowed-tools: ["Bash", "Read"]
|
|
5
5
|
---
|
|
@@ -14,9 +14,15 @@ allowed-tools: ["Bash", "Read"]
|
|
|
14
14
|
## What it produces
|
|
15
15
|
|
|
16
16
|
- `docs/scripts/NNN-export-scripts-YYYY-MM-DD/`: `00-ROLLBACK.sql` and `README.md`, both required, + forwards `NN-<nombre>.sql` numbered **continuously from 01**; the CLI rejects a gap.
|
|
17
|
-
- Neither the AI nor the CLI executes the SQL:
|
|
17
|
+
- Neither the AI nor the CLI executes the SQL: its application is a non-blocking handoff to an authorized operator.
|
|
18
18
|
- Never write into `docs/` with a file tool: one pass, all or nothing, no session or loop created/touched.
|
|
19
19
|
|
|
20
|
+
## Net final state
|
|
21
|
+
|
|
22
|
+
Publish the final state, not a session chronology: omit transients, write migrations in final form,
|
|
23
|
+
and reconcile code before delivery. Rollback safely reverses it; exclude concrete identities and test seeds.
|
|
24
|
+
`ESTADO FINAL NETO` · `orden seguro para las dependencias` · `objetos compartidos y necesarios para el estado final`
|
|
25
|
+
|
|
20
26
|
## More context
|
|
21
27
|
|
|
22
28
|
`aw context-plan --command export-scripts --signal <s> --root "${CLAUDE_PLUGIN_ROOT}/skills/w"` returns the extra documents a case needs; read exactly what it lists:
|
|
@@ -13,6 +13,7 @@ allowed-tools:
|
|
|
13
13
|
# plan-new — trampoline to the planning loop
|
|
14
14
|
|
|
15
15
|
SPEC → PLAN bridge. Turns the "what" (refined spec) into the "how" (plan). Delegates to `plan-new-loop` (Layer 2).
|
|
16
|
+
An unready or legacy spec is input, never a block.
|
|
16
17
|
|
|
17
18
|
> **Hard floor — applies even if you read nothing beyond this file:**
|
|
18
19
|
>
|
|
@@ -175,18 +175,11 @@
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"path": "modules/EXEC-DB-POLICY.md",
|
|
178
|
-
"signal": "db"
|
|
179
|
-
"requires": "external-data"
|
|
178
|
+
"signal": "db"
|
|
180
179
|
},
|
|
181
180
|
{
|
|
182
181
|
"path": "modules/DB-SCRIPTS-ONLY.md",
|
|
183
|
-
"signal": "db"
|
|
184
|
-
"requires": "external-data"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"path": "modules/DB-RESEARCH-RULE.md",
|
|
188
|
-
"signal": "db",
|
|
189
|
-
"requires": "external-data"
|
|
182
|
+
"signal": "db"
|
|
190
183
|
},
|
|
191
184
|
{
|
|
192
185
|
"path": "modules/SIMULATION-LIFECYCLE.md",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: export-scripts
|
|
3
|
-
description: "Consolidates
|
|
3
|
+
description: "Consolidates pending SQL into one `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` bundle with continuous numbering after `00-ROLLBACK.sql`. It publishes the net final state, not a chronological transcript. Reads type-B migrations (DDL/DML) from session `SCRIPTS.sql` and standalone `docs/scripts/*.sql`, excluding prior bundles and read-only research. Read-only/report: it NEVER executes SQL nor commits; external application is a handoff. Composes the `sql` capability. User-invoked via `/w:export-scripts`."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# export-scripts — consolidated SQL bundle, simple and direct
|
|
7
7
|
|
|
8
|
-
Consolidates the pending SQL migrations of N sessions + standalone files into a single bundle under `docs/scripts/NNN-export-scripts-YYYY-MM-DD/`, with continuous numbering after `00-ROLLBACK.sql`. **Read-only / report** — the AI **never executes** the SQL;
|
|
8
|
+
Consolidates the pending SQL migrations of N sessions + standalone files into a single bundle under `docs/scripts/NNN-export-scripts-YYYY-MM-DD/`, with continuous numbering after `00-ROLLBACK.sql`. **Read-only / report** — the AI **never executes** the SQL; external application is an optional handoff.
|
|
9
9
|
|
|
10
10
|
> `export-*` family (the only artifact→`docs/` path). Design: `docs/referencias/workflow-exports/export-scripts.md`.
|
|
11
11
|
|
|
@@ -19,16 +19,16 @@ The **`sql`** capability (built-in default `sql`), resolved via `.workflow/skill
|
|
|
19
19
|
|
|
20
20
|
## When to use
|
|
21
21
|
|
|
22
|
-
- "Release SQL bundle", "
|
|
23
|
-
- Before
|
|
22
|
+
- "Release SQL bundle", "consolidate pending SQLs".
|
|
23
|
+
- Before an authorized release handoff.
|
|
24
24
|
- After several `exec`/`quick` sessions left `SCRIPTS.sql` files with migrations.
|
|
25
25
|
|
|
26
26
|
## What it does
|
|
27
27
|
|
|
28
28
|
1. Collects the workspace's SQL from **two sources**: each corpus session's type-B `SCRIPTS.sql` + standalone `docs/scripts/*.sql` (excluding previous bundles).
|
|
29
29
|
2. Classifies the statements by canonical category (DDL-TABLES / DDL-FUNCTIONS / DML / INSERTS).
|
|
30
|
-
3.
|
|
31
|
-
4. Writes the
|
|
30
|
+
3. Resolves the **net final state** across sources, then groups it by category with **continuous numbering** after `00-ROLLBACK.sql`.
|
|
31
|
+
4. Writes only the forwards needed for that final state, retaining traceable origin where useful.
|
|
32
32
|
5. Derives `00-ROLLBACK.sql` **at the end**, reading the already-written forwards.
|
|
33
33
|
6. Writes a minimal `README.md` (Files / Apply / Revert).
|
|
34
34
|
|
|
@@ -90,9 +90,13 @@ If the A + B union is empty → **abort**: there is no pending SQL in the worksp
|
|
|
90
90
|
|
|
91
91
|
`aw next-number docs/scripts` → `docs/scripts/NNN-export-scripts-YYYY-MM-DD/`.
|
|
92
92
|
|
|
93
|
-
### Step 3 —
|
|
93
|
+
### Step 3 — Net final state, classification and internal order
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Reconcile the session and standalone candidates against the code and the declared final state. Omit
|
|
96
|
+
objects born and retired within the sequence; write migrated objects directly in their final form;
|
|
97
|
+
omit explicitly retired objects even when their deletion is absent from the input. Then group the
|
|
98
|
+
remaining statements by canonical category: `01 DDL-TABLES` · `02 DDL-FUNCTIONS` · `03 DML` ·
|
|
99
|
+
`04 INSERTS`. Origin is traceability, not an ordering authority over the final contract.
|
|
96
100
|
|
|
97
101
|
### Step 4 — Continuous numbering (no gaps)
|
|
98
102
|
|
|
@@ -100,7 +104,7 @@ Assign sequential numbers **only to categories with content**, in canonical orde
|
|
|
100
104
|
|
|
101
105
|
### Step 5 — Write the forwards
|
|
102
106
|
|
|
103
|
-
Per category with content, one file with a 1-2 line header (`-- 0N-<CATEGORY>.sql — bundle NNN-export-scripts-YYYY-MM-DD`) and
|
|
107
|
+
Per category with content, one file with a 1-2 line header (`-- 0N-<CATEGORY>.sql — bundle NNN-export-scripts-YYYY-MM-DD`) and traceable origin comments where useful. Write SQL for the reconciled final state, not necessarily the original statement verbatim; preserve explicit intent, idempotency and safe transaction boundaries. Do not replicate motivation/impact already present at the origin; no statement index, no invented verification SELECTs.
|
|
104
108
|
|
|
105
109
|
### Step 6 — Derive `00-ROLLBACK.sql` (at the end)
|
|
106
110
|
|
|
@@ -40,7 +40,7 @@ The persistent objective needs a **checkable done-condition** — otherwise the
|
|
|
40
40
|
- **Form and weight scale**: a chore = "existing tests/build stay green" (one line); a feature = real acceptance tests. The rule is "**always declare the check before**", not "always write new tests".
|
|
41
41
|
- **Subjective deliverable** (analysis/design): the AI **proposes** the rubric and the **human ratifies** it before pursuing it.
|
|
42
42
|
- **Unresolvable criterion** (no evidence, DB unavailable): closes as `inconclusive` and the loop **degrades** — **never iterates against a fake target**.
|
|
43
|
-
- **
|
|
43
|
+
- **Source-bounded**: a closing criterion is demonstrated by a command or inspection tied to the acquired checkout. A deployed product, host runtime or remote connection is research context or an operational handoff, never a done-condition.
|
|
44
44
|
|
|
45
45
|
**Gate integrity (anti-gaming + independent verification).** The gate only counts if it is not gamed to pass. The loop does **not**: modify the check or loosen a `Success criterion` to force green; weaken, delete or skip tests/validations; use trivial or tautological asserts that always pass (the expected value comes from an independent source, never from the output itself); patch the test instead of fixing the cause (prefer fixing production code).
|
|
46
46
|
|
|
@@ -23,7 +23,7 @@ PLAN
|
|
|
23
23
|
`/w:plan-exec` — **resumable** (same chassis mechanism; here resume keys off the plan-doc phase states + checkboxes + CHECKPOINT, see Delta 1).
|
|
24
24
|
|
|
25
25
|
## Reads
|
|
26
|
-
`docs/plans/PPP-plan-<slug>.md` (locate via the `docs/plans/PPP-plan-*.md` glob or the exact path from the command argument) **and its source spec** (resolved through the plan's `## Origin`) — the entry gate reads both. It runs
|
|
26
|
+
`docs/plans/PPP-plan-<slug>.md` (locate via the `docs/plans/PPP-plan-*.md` glob or the exact path from the command argument) **and its source spec** (resolved through the plan's `## Origin`) — the entry gate reads both. It runs any plan whose source contract is executable: `> Límite de ejecución: checkout`, explicit phase/task sources and aliases from `AGENTS.md > Fuentes`. A legacy or v21 plan that lacks it fails closed to [`plan-refine-loop`](../plan-refine-loop/LOOP.md); plan-refine remains auxiliary only after that contract exists. If the plan pins design, it also reads the **UI Design Package** revisions its `## Design references` and its tasks name — **read-only**, at the exact revision each one fixed (§ *Design precondition gate*).
|
|
27
27
|
|
|
28
28
|
## Writes
|
|
29
29
|
- `docs/plans/PPP-plan-<slug>.md` (**read/update**, living doc: phase/task state, `Open questions`).
|
|
@@ -44,7 +44,7 @@ inference, the deferred-validation cycle and conditional Git authorization.
|
|
|
44
44
|
|
|
45
45
|
## Composes
|
|
46
46
|
|
|
47
|
-
`git` (safe branch + proposed commits)
|
|
47
|
+
`git` (safe branch + proposed commits). `plan-exec` does **not** load `external-data`: its proof comes from the acquired checkout only. SQL fixture/ephemeral tests are ordinary local commands; remote MCP reads belong to earlier research, never this loop.
|
|
48
48
|
|
|
49
49
|
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
50
50
|
|
|
@@ -59,11 +59,14 @@ inference, the deferred-validation cycle and conditional Git authorization.
|
|
|
59
59
|
## Entry gate — executability
|
|
60
60
|
|
|
61
61
|
**Before touching code**, read the plan and its spec and check the shape execution depends on:
|
|
62
|
+
this is § *Entry gate — executability*. Once that shape exists, plan-refine is auxiliary, not mandatory.
|
|
62
63
|
|
|
63
|
-
1. every phase
|
|
64
|
-
2.
|
|
65
|
-
3.
|
|
66
|
-
4.
|
|
64
|
+
1. the plan declares `> Límite de ejecución: checkout`; every phase has `> Fuentes:` and every task has `_(fuentes: …)_`; aliases resolve through `AGENTS.md > Fuentes` (except reserved `workspace`) and task sources are a subset of their phase;
|
|
65
|
+
2. every phase declares its `Resultado`, its `Condición de salida` and its `Validación de fase`;
|
|
66
|
+
3. if temporary behavior exists, its current boundary and retirement phase are identifiable; otherwise the simulation check is not applicable;
|
|
67
|
+
4. the primary proof of the first `pendiente` phase is identifiable and is a checkout command or inspection;
|
|
68
|
+
5. no structural contradiction is evident (a phase that undoes an earlier one, evidence nobody can produce).
|
|
69
|
+
6. reading the phase prose shows that no deployed product, installed host, MCP connection or remote URL is a validation or exit condition; those observations belong to research or `Handoff operativo`, never the closure path.
|
|
67
70
|
|
|
68
71
|
Execution **no longer accepts in silence** a plan that would force it to invent its own structure. Two outcomes:
|
|
69
72
|
|
|
@@ -122,8 +125,8 @@ reconciliation** in `CHECKPOINT`, never reported as published.
|
|
|
122
125
|
- **Marking order (hard rule):** a phase reaches `validada` only with its proof run and passed, its
|
|
123
126
|
exit condition true and the combined review green; a blocker is never deferred into `validada`.
|
|
124
127
|
**Never** because all its checkboxes are ticked.
|
|
125
|
-
- **Intermediate states:** `bloqueada` = the phase is stopped on a live blocker — recorded in `CHECKPOINT` + the plan's `## Open questions`, back to `en ejecución` when it clears; it counts as **not validated**. A
|
|
126
|
-
- **A blocker without a reason is not a blocker (hard rule).** Writing `> Estado: bloqueada` **always** writes its `> Bloqueo:` line in the same edit: a state that says "stopped" without saying on what is a dead end for whoever reads `aw status` next. The runtime tolerates a legacy block that states none (`blocker: null`) — this loop never produces one. `CHECKPOINT.Next` names **the action that unblocks it**
|
|
128
|
+
- **Intermediate states:** `bloqueada` = the phase is stopped on a live checkout blocker — recorded in `CHECKPOINT` + the plan's `## Open questions`, back to `en ejecución` when it clears; it counts as **not validated**. A proof that cannot run **stays `bloqueada`**. A deferred check never counts as a passed one. A script awaiting real-world application is a **handoff**, not a blocker: local fixture/ephemeral validation can still establish the promised behavior and the phase may become `validada`.
|
|
129
|
+
- **A blocker without a reason is not a blocker (hard rule).** Writing `> Estado: bloqueada` **always** writes its `> Bloqueo:` line in the same edit: a state that says "stopped" without saying on what is a dead end for whoever reads `aw status` next. The runtime tolerates a legacy block that states none (`blocker: null`) — this loop never produces one. `CHECKPOINT.Next` names **the action that unblocks it** in the checkout, never an operator's deployed run.
|
|
127
130
|
- **Plan-doc residue (hard rule):** execution writes into the plan-doc **only** five things — checkbox flips (`- [ ]` → `- [x]`), the phase's own `> Estado:` line, its `> Bloqueo:` line while blocked, deferrals appended to its `## Open questions`, and the plan's own status mark (its `> Estado:` line and, on close, its `> Cierre:` line — Delta 6). The declared-gap hatch is Deltas 4, 5 and 7. Per-phase results, review-gate findings and metrics go to the session's `DECISION`/`CHECKPOINT` — **never** into the plan-doc. Phase blocks are updated **in place — NEVER append a duplicate `### Fn` block** (same contract as CHECKPOINT sections). The entry gate's consented normalization is the single exception, and it lands before execution starts.
|
|
128
131
|
- **CHECKPOINT per execution unit:** record its effective grouping, functional states, simulation
|
|
129
132
|
boundary when applicable, checks/results, decisions, deferrals and next intent. The task boxes
|
|
@@ -175,9 +178,10 @@ adds nothing of its own beyond running on a verified branch and never
|
|
|
175
178
|
- Each added test is re-weighed at the closing review gate ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Closing review gate* → *Test-value lens*, tag `overtest`): over-testing is a **finding to fix or justify**, never an automatic rejection.
|
|
176
179
|
- Also run the plan's `## Validations` (cross-cutting rules and constraints) + the Final behavior block of `## Solution` (legacy plans: the `## Final behavior` section) + the spec's acceptance/success criteria (its `## Scenarios`, if present, are ready-made test cases: GIVEN=arrange · WHEN=act · THEN=assert).
|
|
177
180
|
- A validation that **runs and fails** → back into the phase (gap): no advancing, no `validada`.
|
|
178
|
-
- **Validation depending on an unapplied migration**: since the AI never executes the DML, it **cannot run it read-only** → the check is **deferred** (handoff to a DBA) and the phase **stays `bloqueada`**. A phase whose implementation is finished but whose operative proof cannot run does not become `validada`: the work may be complete and its boxes ticked, but the state waits until the proof runs and passes. The reason goes on its `> Bloqueo:` line, in `CHECKPOINT`, in the plan's `## Open questions` and in `BACKLOG`, marked "verification pending until the SQL is applied". (Reuses the chassis degrade/defer pattern + `MAX` cap → avoids the "back to the task" loop.)
|
|
179
181
|
|
|
180
|
-
|
|
182
|
+
- **SQL delivery**: validate the migration's behavior against a fixture or ephemeral database in the acquired checkout. The forward/rollback script is delivered through `SCRIPTS.sql` and `export-scripts`; a real application is an optional handoff and never keeps a phase or the plan open.
|
|
183
|
+
|
|
184
|
+
> The **final validation** is PLAN-exec's **convergence gate** = **`Success criteria` green** (*verification-first*; analogous to SPEC's *analyze gate* and plan-new's *coherence gate*): the plan is not marked *done* until local proof passes. For code and persistence these are checkout commands/tests; a script's real-world application is never a closing criterion.
|
|
181
185
|
|
|
182
186
|
## Delta 5 — Closing review gate (conventions, pre-commit)
|
|
183
187
|
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-new-loop
|
|
3
3
|
description: >-
|
|
4
|
-
Generates
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
code/impact-mapping research, planning gap taxonomy, and promotion of the
|
|
9
|
-
design closure to handoff via `design`: reuse a valid one, promote the rest,
|
|
10
|
-
then pin the roots
|
|
11
|
-
when the plan includes UI. If the spec is not refined it suggests
|
|
12
|
-
spec-refine first. Started by /w:plan-new; resumable. Invoke when a spec
|
|
13
|
-
must become an executable plan.
|
|
4
|
+
Generates an executable plan (docs/plans/PPP-plan-<slug>.md) from a spec.
|
|
5
|
+
Heir of CHASSIS: phases are verifiable states; research maps impact and
|
|
6
|
+
gaps; UI design roots are reused or promoted and pinned. Suggests
|
|
7
|
+
spec-refine first when needed. Started by /w:plan-new; resumable.
|
|
14
8
|
---
|
|
15
9
|
|
|
16
10
|
# plan-new-loop
|
|
@@ -27,14 +21,14 @@ PLAN
|
|
|
27
21
|
`/w:plan-new` — **resumable** (same chassis mechanism, keyed off CHECKPOINT).
|
|
28
22
|
|
|
29
23
|
## Reads
|
|
30
|
-
`docs/specs/NNN-spec-*.md` (glob
|
|
24
|
+
`docs/specs/NNN-spec-*.md` (glob or argument path). Readiness comes from frontmatter `status`, never the filename; an unrefined spec only suggests [`PLAN-INPUT`](../../modules/PLAN-INPUT.md)'s refine path. Questions routed to `PLAN` remain input to this loop.
|
|
31
25
|
|
|
32
26
|
## Writes
|
|
33
|
-
`docs/plans/PPP-plan-<slug>.md` (`generate`;
|
|
27
|
+
`docs/plans/PPP-plan-<slug>.md` (`generate`; overwrite needs confirmation), or sibling plans after an accepted split (§ *Split gate (multi-plan)*). With UI it also publishes the scoped design revision in `docs/designs/`; it never graduates/exports anything else to `docs/` — that is separate `export-*` work.
|
|
34
28
|
|
|
35
|
-
> **Naming
|
|
29
|
+
> **Naming:** [`PLAN-INPUT`](../../modules/PLAN-INPUT.md) § *Numbering* claims `PPP` for its run; only its owner fills it and an unpublished close frees it. Plans glob as `docs/plans/PPP-plan-*.md`.
|
|
36
30
|
|
|
37
|
-
> **Adoption (
|
|
31
|
+
> **Adoption (mode 4):** the command transcribes an externally-built plan once into Delta 1, records `## Origin`, then `plan-refine` closes schema gaps. See [`PLAN-INPUT`](../../modules/PLAN-INPUT.md).
|
|
38
32
|
|
|
39
33
|
## Inherits
|
|
40
34
|
|
|
@@ -57,6 +51,7 @@ The plan keeps technical detail and roadmap inline:
|
|
|
57
51
|
|
|
58
52
|
> Derived from docs/specs/NNN-spec-<slug>.md · generated by plan-new-loop
|
|
59
53
|
> Estado: open
|
|
54
|
+
> Límite de ejecución: checkout
|
|
60
55
|
|
|
61
56
|
## Origin source spec/prompt or adopted source + attribution
|
|
62
57
|
## Solution the how: brief AS-IS → TO-BE + closing "Final behavior" block (core)
|
|
@@ -86,19 +81,24 @@ This is the single contract; the other PLAN loops reference it.
|
|
|
86
81
|
```markdown
|
|
87
82
|
### F1 — <result-oriented name>
|
|
88
83
|
> Estado: pendiente
|
|
84
|
+
> Fuentes: workspace, <declared-source>
|
|
89
85
|
|
|
90
86
|
**Resultado:** <the new verifiable state of the system>
|
|
91
87
|
**Trabajo:**
|
|
92
|
-
- [ ] T1.1 — <coherent unit of work>
|
|
88
|
+
- [ ] T1.1 — <coherent unit of work> _(fuentes: <declared-source>)_
|
|
93
89
|
**Validación de fase:** <the primary proof that the promised state was reached>
|
|
94
90
|
**Condición de salida:** <falsifiable result · contract preserved>
|
|
95
91
|
```
|
|
96
92
|
|
|
97
93
|
**Required**: `Resultado` · `Trabajo` · `Validación de fase` · `Condición de salida` · the state
|
|
98
|
-
line
|
|
94
|
+
line · `Fuentes`. Every task declares `_(fuentes: …)_`; task sources are a phase subset and either
|
|
95
|
+
`workspace` or an exact `AGENTS.md > Fuentes` alias. `Impacted` never substitutes them. **Conditional**: `Estado inicial` when unclear · `Recorrido afectado` for a distributed
|
|
99
96
|
change · `Dependencias` when direct sequence is insufficient · `Límite de simulación` (**only** when temporary behavior exists) · `Diferido` when work was consciously excluded.
|
|
100
97
|
**A new phase never writes an empty conditional block.**
|
|
101
98
|
|
|
99
|
+
**Checkout is the only closing surface.** Proof is a local command, fixture, ephemeral DB or checkout
|
|
100
|
+
inspection. A deployed host, product or remote read is research or non-blocking `Handoff operativo`, never phase closure.
|
|
101
|
+
|
|
102
102
|
**Phase state = machine state.** One bare `> Estado: <value>` line uses `pendiente` | `en ejecución`
|
|
103
103
|
| `bloqueada` | `validada`. It is updated in place and counted
|
|
104
104
|
**alongside — not instead of —** checkboxes. `validada` requires completed work, a true exit
|
|
@@ -48,6 +48,9 @@ can establish.
|
|
|
48
48
|
## Writes
|
|
49
49
|
Updates `docs/plans/PPP-plan-<slug>.md` **in place** (when the user picks `Aprobar y guardar`): completes/adjusts sections and **adds** `## Refinement decisions`. Since it overwrites an existing doc, the preview says so and the person approves it **once**. On an accepted split (§ *Split gate — refine semantics*) the same proposal also **creates** the extracted sibling plans (newly minted `docs/plans` files) — one preview, one decision, one all-or-nothing write. It writes `docs/plans` and, when the refine **touches UI**, the **revision it publishes** — scoped to the artifacts the delta actually affects — of the design package under `docs/designs` (chassis § *docs/ boundary*; see [`DESIGN-REFERENCES.md`](../../modules/DESIGN-REFERENCES.md)). It never graduates/exports anything else to `docs/` — that is separate `export-*` work.
|
|
50
50
|
|
|
51
|
+
> **Revision + consumer:** a new baseline carries the final plan as `consumer_document`
|
|
52
|
+
> (path + base digest); package, manifest and plan publish or roll back together.
|
|
53
|
+
|
|
51
54
|
## Inherits
|
|
52
55
|
|
|
53
56
|
Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **always before** these deltas. *(If `../` does not resolve: `CHASSIS.md` next to this file — global layout rule, chassis § Reference resolution.)*
|
|
@@ -127,6 +130,8 @@ This loop's instance of the chassis convergence gate — the same one `plan-exec
|
|
|
127
130
|
- **Contract** — relevant inputs, outputs and observable states identified; the final behavior matches the spec; no functional criterion invented here.
|
|
128
131
|
- **Journey** — main components identified, order reasonable, repo/process boundaries visible, the described architecture the one the project actually has.
|
|
129
132
|
- **Phases** — each leaves a verifiable state with its exit condition, none is a list of layers or files, the order allows early integration, deferrals are explicit.
|
|
133
|
+
- **Source boundary** — the plan declares `> Límite de ejecución: checkout`, each phase declares `> Fuentes:`, every task carries `_(fuentes: …)_`, aliases resolve through `AGENTS.md > Fuentes` (or reserved `workspace`) and task sources stay within their phase.
|
|
134
|
+
- **Source-bounded semantics** — read the meaning of every task, phase validation and exit condition. A deployed product, installed host, MCP connection or remote URL may be research context or `Handoff operativo`, never a prerequisite or proof of closure; rewrite it as a fixture, ephemeral dependency or checkout inspection. This is semantic review, not a word denylist.
|
|
130
135
|
- **Simulation** *(only when the change carries one)* — initial boundary identified, every displacement foreseen, one phase owns the retirement, nothing can stay active by accident. No temporary behavior → the check does not apply, and no empty `Límite de simulación` is required.
|
|
131
136
|
- **Evidence** — every phase declares its primary proof, per-layer tests are justified, the same scenario is not duplicated by default, declared risks have evidence or an explicit deferral.
|
|
132
137
|
- **Execution batches** — every phase appears once; maximal continuous ranges cross no decision, proof, handoff, irreversible action or required recovery boundary.
|
|
@@ -152,7 +157,7 @@ plan-refine-loop(plan):
|
|
|
152
157
|
design (revisions only for the artifacts this refine affects; behavior/acceptance → spec-refine first)
|
|
153
158
|
integrate + update CHECKPOINT # artifact-first cycle
|
|
154
159
|
executability gate (read-only) = Success criteria green:
|
|
155
|
-
- contract · journey · phases · simulation · evidence · execution batches · resumability (§ Executability gate)
|
|
160
|
+
- contract · journey · phases · source boundary · simulation · evidence · execution batches · resumability (§ Executability gate)
|
|
156
161
|
- plan-new checklist (criterion→task · Final behavior block of Solution · deps · Impacted↔Solution · UI→exact roots · minimality)
|
|
157
162
|
# spec-less plan (adopted/hand-written): criteria anchor to the plan's own Final behavior block/Validations (see Delta 2)
|
|
158
163
|
- re-refine's own check: the plan is REALIGNED with what changed
|
|
@@ -52,7 +52,7 @@ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **a
|
|
|
52
52
|
|
|
53
53
|
- **No phases, no plan-doc**: the prompt **is** the task (a single unit). No roadmap.
|
|
54
54
|
- **Proportional verification-first** (minimal ceremony): even here the check is **seeded before**, sized to the task. Code: one test (bug repro → fix) or "existing build/lint/tests stay green" (chore). **Analysis/design**: a **short falsifiable rubric**, *ratified by the user* before pursuing it. It is the run's `SESSION.Success criteria` (see [chassis § *Verification-first*](../CHASSIS.md)).
|
|
55
|
-
- **Git and DB inline** (full policies in [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): before editing, verify each source's expected branch (`aw check-branch`); **proposed** commit (approve first) — never `push`/`--amend`/`--no-verify`. The AI **never executes DML/DDL**: migrations are drafted into the session's `SCRIPTS.sql
|
|
55
|
+
- **Git and DB inline** (full policies in [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): before editing, verify each source's expected branch (`aw check-branch`); **proposed** commit (approve first) — never `push`/`--amend`/`--no-verify`. The AI **never executes DML/DDL**: migrations are drafted into the session's `SCRIPTS.sql`; fixture/ephemeral checks are local proof and any remote read is research context, never closure.
|
|
56
56
|
- **One session. One commit** proposed at the end (only if there were code changes), **after the proportional closing review gate** ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Closing review gate*): diff re-read + ambient conventions; fix or defer; nothing reaches the commit unreviewed.
|
|
57
57
|
- **Entry SIZE GATE** (before creating the session): a quick that should have been a spec costs more than the ceremony it saved, so the size of the objective is judged **before** anything exists. Your part is recognizing the signals; the threshold, the question and its options are the CLI's. A signal already resolved by *adopted context* is **not** a signal (chassis § *Adopted context*). A **resume** of an existing quick never re-fires it.
|
|
58
58
|
- **`Recortar alcance`**, if chosen: propose the **sub-task that DOES fit** a quick (`SESSION.Objective` = the sub-task; the original prompt goes into `## Origin`) and defer the rest to `BACKLOG` ("trimmed at the gate — may warrant its own spec, `/w:spec-new`").
|
|
@@ -81,7 +81,7 @@ quick-loop(prompt):
|
|
|
81
81
|
work the task (minimal loop):
|
|
82
82
|
if it edits code → verify each source's expected branch (`aw check-branch`); mismatch → pause + resolve
|
|
83
83
|
produce the deliverable: edit code (minimal change) OR author the analysis/design
|
|
84
|
-
if
|
|
84
|
+
if fixture/ephemeral DB check → run it from the checkout + capture its proof
|
|
85
85
|
if DB change (DDL/DML) → SCRIPTS.sql (session artifact, DO NOT execute)
|
|
86
86
|
if non-obvious decision → DECISION
|
|
87
87
|
if doubt/gap → inline research, a probe OR structured-choice # chassis § Proof of concept
|
|
@@ -70,6 +70,9 @@ The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*
|
|
|
70
70
|
|
|
71
71
|
> **Two levels of the same capability:** a compact SPEC may already close its exact roots at `handoff`; otherwise SPEC keeps an `outline` reference and PLAN promotes exactly the closure it implements. A valid handoff is reused, never re-authored. One package, two questions — never two formats.
|
|
72
72
|
|
|
73
|
+
> **Compound publication:** a new baseline carries this final spec as `consumer_document`
|
|
74
|
+
> (path + base digest); package, manifest and spec publish or roll back together.
|
|
75
|
+
|
|
73
76
|
Other transversal capabilities the engine always uses: `research` (**inline** — chassis § *Research*), `sql` (DB rule inside research — chassis). All resolved by config; `off` → the loop continues without the capability and, if it was needed, says so or asks. The spec's **prose** follows the **ambient** writing conventions (the host auto-applies an installed writing skill if present), not a composed role.
|
|
74
77
|
|
|
75
78
|
> **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — Workline neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
|
|
@@ -224,6 +227,7 @@ finalize:
|
|
|
224
227
|
- every **blocking** functional decision is resolved, and every remaining question carries its destination;
|
|
225
228
|
- **Minimality** — no gold-plating: every criterion and scope item earns its place (chassis § *Minimality*); speculative scope is cut or deferred, and no technical solution was imposed that the requirement did not ask for;
|
|
226
229
|
- `PLAN` can continue without inventing behavior, scope or product decisions.
|
|
230
|
+
- its gate evidence is checkout-bounded: local inspection/commands may establish it; a deployed product, host runtime or remote query is context or handoff, never a closing condition.
|
|
227
231
|
- Whatever fails **comes back as a gap**. A question owned by `PLAN` **never** fails the gate: it is recorded with its destination, not closed.
|
|
228
232
|
- Passes → `edit_in_place_with_confirm(spec)` + `status: ready-for-plan` → `finalize`. The stamp only counts once the document really carries it.
|
|
229
233
|
- `Cerrar` → the chassis `finalize` (always persists `CHECKPOINT`; `BACKLOG` **only if** something is deferred — here: close reason + deferred `Open questions`).
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Loaded when the run reads or writes a database (signal `db`).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Research is autonomous except for DB choice. A remote read is context, never plan-execution proof.
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
2. Write
|
|
9
|
-
3.
|
|
7
|
+
1. With >1 candidate MCP and no default, ask which one through the content structured-choice (inside the ≤3 + `flow` limit) before querying; otherwise do not ask.
|
|
8
|
+
2. Write queries first in session `SCRIPTS.sql`.
|
|
9
|
+
3. Run them read-only via MCP (`sql-mutation-guard`: never DML/DDL), then record `RemoteContextSnapshot` in `SCRIPTS.sql` plus conclusion/digest in `CONCLUSIONS.md` before plan approval.
|
|
10
10
|
|
|
11
|
-
> The AI **never executes DML/DDL**.
|
|
11
|
+
> Snapshots have no automatic TTL; refreshing during execution means `/w:plan-refine`. The AI **never executes DML/DDL**. Draft migrations in session `SCRIPTS.sql`; `export-*` promotes them separately as handoff.
|
|
@@ -4,11 +4,10 @@ Loaded when a code-editing run touches the database (signal `db`).
|
|
|
4
4
|
|
|
5
5
|
## DB scripts-only — the AI never executes DML/DDL
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Classify by **role**, not file (see [`SCRIPTS.sql`](../artifacts/artifacts-core/SCRIPTS.sql)):
|
|
8
8
|
|
|
9
|
-
- **Read-only
|
|
10
|
-
- **
|
|
9
|
+
- **Read-only remote query** → research context: record query, digest and `RemoteContextSnapshot` before approval.
|
|
10
|
+
- **Fixture/ephemeral DB test** → checkout proof; may validate a phase locally.
|
|
11
|
+
- **DDL/DML migration** → draft in session `SCRIPTS.sql`; **NEVER execute**.
|
|
11
12
|
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
> **Showing beats asserting here:** the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document — it asks the session's script back, because no narration tells drafting from running.
|
|
13
|
+
> Migration application is a non-blocking handoff, never a task, validation or exit condition. The plan closes on its local contract/tests; the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document and it verifies the session script, not narration.
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Loaded when a phase touches the database (signal `db`).
|
|
4
4
|
|
|
5
|
-
## Delta 3 — DB policy: **
|
|
5
|
+
## Delta 3 — DB policy: **checkout proof, never deployed closure**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
See [`DB-SCRIPTS-ONLY.md`](DB-SCRIPTS-ONLY.md) and [`../loops/CODE-POLICIES.md`](../loops/CODE-POLICIES.md). Fixture/ephemeral-DB checks in the acquired checkout may close a phase. Do not open remote reads here: they are captured research context. Draft DDL/DML in `SCRIPTS.sql`; applying it is handoff and never blocks `validada` or plan closure.
|
|
@@ -4,25 +4,27 @@ Loaded when the input is not plainly a `ready-for-plan` spec (signal `input`).
|
|
|
4
4
|
|
|
5
5
|
## plan-new — four modes
|
|
6
6
|
|
|
7
|
-
1. **Ready spec** (`docs/specs/NNN-spec-<slug>.md
|
|
8
|
-
2. **Spec not ready** (`
|
|
9
|
-
3. **Prompt** (no spec
|
|
10
|
-
4. **External plan
|
|
7
|
+
1. **Ready spec** (`docs/specs/NNN-spec-<slug>.md`, `status: ready-for-plan`) → proceed.
|
|
8
|
+
2. **Spec not ready** (`draft`, `refining`, or no mark) → **soft-suggest** `/w:spec-refine`, never a block. `PLAN` questions remain input here.
|
|
9
|
+
3. **Prompt** (no spec) → propose and normally launch `/w:spec-new`, then continue.
|
|
10
|
+
4. **External plan** (host, hand-written, another agent) → **adopt once, NO RESEARCH** at `docs/plans/PPP-plan-<slug>.md`. Normalize only supplied material; set `## Origin` to "adopted from <source>" + host/model/date; offer `/w:plan-refine` or `/w:plan-exec`. A matching Origin resumes; never overwrite a plan-doc.
|
|
11
11
|
|
|
12
12
|
> **Mode 3 vs 4:** a prompt that *describes a wish* → SPEC (mode 3); content that *already is a plan* → adopt (mode 4).
|
|
13
13
|
|
|
14
|
-
>
|
|
14
|
+
> Adoption is CLI-owned: the deterministic steps below are decided by the CLI (`aw flow advance`), not by this document.
|
|
15
|
+
|
|
16
|
+
> **Source-bounded:** new/refined plans declare `> Límite de ejecución: checkout`; each phase `> Fuentes:`; each task `_(fuentes: …)_`. `workspace` is reserved; other aliases exist in `AGENTS.md > Fuentes`; task sources are a phase subset. A legacy/manual plan without this form is adopted but **cannot execute**: `/w:plan-refine` adds it.
|
|
15
17
|
|
|
16
18
|
> **Ready vs not** is read from the spec's frontmatter `status`, never from the filename. **Legacy compat:** a spec with no frontmatter that carries `## Refinement decisions` — or the older `## Q&A traceability` — counts as ready the same way.
|
|
17
19
|
|
|
18
20
|
## plan-refine — three modes
|
|
19
21
|
|
|
20
|
-
1. **Existing plan** (`docs/plans/PPP-plan-<slug>.md`) → proceed
|
|
21
|
-
2. **No plan** →
|
|
22
|
-
3. **Returned by `plan-exec`** (
|
|
22
|
+
1. **Existing plan** (`docs/plans/PPP-plan-<slug>.md`) → proceed regardless of provenance.
|
|
23
|
+
2. **No plan** → soft-suggest `/w:plan-new`; the user decides.
|
|
24
|
+
3. **Returned by `plan-exec`** (unexecutable entry or structural deviation) → retain `validada` phases and redesign only pending work.
|
|
23
25
|
|
|
24
26
|
> **Spec-less plans are legitimate input.** The coherence gate **degrades gracefully**: criteria trace to the plan's own Final behavior block instead of spec criteria, and the "spec criteria uncovered" gap does not apply.
|
|
25
27
|
|
|
26
28
|
## Numbering
|
|
27
29
|
|
|
28
|
-
The
|
|
30
|
+
The name is `docs/plans/PPP-plan-<slug>.md`; `aw next-number docs/plans --claim plan-<slug>.md --code <NNN>` claims it for this run. The slug comes from the Requirement. It does not inherit the spec `NNN`: `## Origin` carries that link.
|