@tacuchi/agent-workflow-cli 20.21.0 → 20.23.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 +17 -6
- package/dist/adapters/git-cli.js +42 -0
- package/dist/adapters/git-cli.js.map +1 -1
- package/dist/application/artifacts-service.js +5 -5
- package/dist/application/artifacts-service.js.map +1 -1
- package/dist/application/checkpoint-service.js +60 -55
- package/dist/application/checkpoint-service.js.map +1 -1
- package/dist/application/checkpoint-write-service.js +61 -66
- package/dist/application/checkpoint-write-service.js.map +1 -1
- package/dist/application/decisiones-service.js +5 -5
- package/dist/application/decisiones-service.js.map +1 -1
- package/dist/application/export-service.js +250 -0
- package/dist/application/export-service.js.map +1 -0
- package/dist/application/fix-git-service.js +244 -0
- package/dist/application/fix-git-service.js.map +1 -0
- package/dist/application/history-update-service.js +35 -24
- package/dist/application/history-update-service.js.map +1 -1
- package/dist/application/lifecycle-target.js +39 -0
- package/dist/application/lifecycle-target.js.map +1 -0
- package/dist/application/markdown.js +61 -16
- package/dist/application/markdown.js.map +1 -1
- package/dist/application/parsers/phases.js +38 -45
- package/dist/application/parsers/phases.js.map +1 -1
- package/dist/application/parsers/plan-status.js +75 -0
- package/dist/application/parsers/plan-status.js.map +1 -0
- package/dist/application/parsers/spec-relation.js +80 -0
- package/dist/application/parsers/spec-relation.js.map +1 -0
- package/dist/application/paths-service.js +8 -0
- package/dist/application/paths-service.js.map +1 -1
- package/dist/application/persist-service.js +285 -0
- package/dist/application/persist-service.js.map +1 -0
- package/dist/application/release-data/artifacts.js +17 -21
- package/dist/application/release-data/artifacts.js.map +1 -1
- package/dist/application/resume-service.js +184 -0
- package/dist/application/resume-service.js.map +1 -0
- package/dist/application/semantic-operation/protocol.js +247 -0
- package/dist/application/semantic-operation/protocol.js.map +1 -0
- package/dist/application/semantic-operation/publish.js +80 -0
- package/dist/application/semantic-operation/publish.js.map +1 -0
- package/dist/application/session-binding-service.js +125 -0
- package/dist/application/session-binding-service.js.map +1 -0
- package/dist/application/session-close-service.js +60 -39
- package/dist/application/session-close-service.js.map +1 -1
- package/dist/application/session-create-service.js +45 -19
- package/dist/application/session-create-service.js.map +1 -1
- package/dist/application/session-resolver.js +180 -44
- package/dist/application/session-resolver.js.map +1 -1
- package/dist/application/session-resume-service.js +39 -9
- package/dist/application/session-resume-service.js.map +1 -1
- package/dist/application/sessions-service.js +0 -2
- package/dist/application/sessions-service.js.map +1 -1
- package/dist/application/status-service.js +24 -352
- package/dist/application/status-service.js.map +1 -1
- package/dist/application/tasks-service.js +5 -5
- package/dist/application/tasks-service.js.map +1 -1
- package/dist/application/workline-index-service.js +510 -0
- package/dist/application/workline-index-service.js.map +1 -0
- package/dist/cli/commands/checkpoint-read.js +10 -6
- package/dist/cli/commands/checkpoint-read.js.map +1 -1
- package/dist/cli/commands/checkpoint-write.js +38 -11
- package/dist/cli/commands/checkpoint-write.js.map +1 -1
- package/dist/cli/commands/export.js +117 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/fix-git.js +109 -0
- package/dist/cli/commands/fix-git.js.map +1 -0
- package/dist/cli/commands/generate-launch.js +35 -3
- package/dist/cli/commands/generate-launch.js.map +1 -1
- package/dist/cli/commands/history-update.js +1 -1
- package/dist/cli/commands/history-update.js.map +1 -1
- package/dist/cli/commands/index.js +11 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/persist.js +67 -0
- package/dist/cli/commands/persist.js.map +1 -0
- package/dist/cli/commands/resume-summary.js +14 -3
- package/dist/cli/commands/resume-summary.js.map +1 -1
- package/dist/cli/commands/resume.js +73 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/session-artifacts.js +12 -11
- package/dist/cli/commands/session-artifacts.js.map +1 -1
- package/dist/cli/commands/session-close.js +8 -7
- package/dist/cli/commands/session-close.js.map +1 -1
- package/dist/cli/commands/session-create.js +5 -1
- package/dist/cli/commands/session-create.js.map +1 -1
- package/dist/cli/commands/session-resume.js +16 -10
- package/dist/cli/commands/session-resume.js.map +1 -1
- package/dist/cli/commands/status.js +66 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/workspace-init.js +21 -2
- package/dist/cli/commands/workspace-init.js.map +1 -1
- package/dist/cli/context-id.js +133 -0
- package/dist/cli/context-id.js.map +1 -0
- package/dist/cli/help-groups.js +16 -1
- package/dist/cli/help-groups.js.map +1 -1
- package/dist/cli/main.js +44 -16
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output-mode.js +41 -0
- package/dist/cli/output-mode.js.map +1 -0
- package/dist/cli/parser.js +6 -0
- package/dist/cli/parser.js.map +1 -1
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/render.js +53 -0
- package/dist/cli/render.js.map +1 -1
- package/package.json +1 -1
- package/skills/w/SKILL.md +3 -1
- package/skills/w/commands/export-diagrams.md +19 -10
- package/skills/w/commands/export-manuals.md +20 -10
- package/skills/w/commands/export-reports.md +20 -11
- package/skills/w/commands/export-scripts.md +20 -10
- package/skills/w/commands/fix-git.md +31 -12
- package/skills/w/commands/generate-launch.md +1 -1
- package/skills/w/commands/persist.md +33 -68
- package/skills/w/commands/plan-new.md +1 -1
- package/skills/w/commands/resume.md +25 -41
- package/skills/w/commands/spec-refine.md +12 -0
- package/skills/w/commands/status.md +12 -40
- package/skills/w/commands/workspace-init.md +3 -3
- package/skills/w/hooks/README.md +21 -2
- package/skills/w/hooks/hooks.template.json +2 -2
- package/skills/w/loops/README.md +5 -3
- package/skills/w/loops/plan-exec-loop/LOOP.md +10 -5
- package/skills/w/loops/plan-new-loop/LOOP.md +17 -8
- package/skills/w/loops/plan-refine-loop/LOOP.md +3 -1
- package/skills/w/loops/spec-refine-loop/LOOP.md +20 -7
- package/skills/w/roles/git/ROLE.md +7 -8
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const OUTPUT_FORMATS = ["human", "json"];
|
|
2
|
+
export function resolveOutputMode(args, isTTY) {
|
|
3
|
+
const declared = readDeclaredFormat(args);
|
|
4
|
+
if (!declared.ok)
|
|
5
|
+
return declared;
|
|
6
|
+
const detail = args.flags.has("--detail");
|
|
7
|
+
if (detail && declared.format === "json") {
|
|
8
|
+
return {
|
|
9
|
+
ok: false,
|
|
10
|
+
message: "--detail solo aplica a la salida humana: el modelo JSON ya es completo",
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const format = declared.format ?? (detail || isTTY ? "human" : "json");
|
|
14
|
+
return { ok: true, mode: { format, detail } };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The format the invocation *declares*, or none. Contradictions fail here
|
|
18
|
+
* rather than resolving by precedence: a caller who wrote both `--json` and
|
|
19
|
+
* `--format human` has a bug, and silently honoring one hides it.
|
|
20
|
+
*/
|
|
21
|
+
function readDeclaredFormat(args) {
|
|
22
|
+
const json = args.flags.has("--json");
|
|
23
|
+
const raw = args.values.get("format");
|
|
24
|
+
if (raw === undefined) {
|
|
25
|
+
if (args.flags.has("--format")) {
|
|
26
|
+
return { ok: false, message: "--format requiere un valor: human | json" };
|
|
27
|
+
}
|
|
28
|
+
return json ? { ok: true, format: "json" } : { ok: true };
|
|
29
|
+
}
|
|
30
|
+
if (!isOutputFormat(raw)) {
|
|
31
|
+
return { ok: false, message: `--format debe ser human o json (got '${raw}')` };
|
|
32
|
+
}
|
|
33
|
+
if (json && raw !== "json") {
|
|
34
|
+
return { ok: false, message: `--json contradice --format ${raw}: declará uno solo` };
|
|
35
|
+
}
|
|
36
|
+
return { ok: true, format: raw };
|
|
37
|
+
}
|
|
38
|
+
function isOutputFormat(value) {
|
|
39
|
+
return OUTPUT_FORMATS.includes(value);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=output-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-mode.js","sourceRoot":"","sources":["../../src/cli/output-mode.ts"],"names":[],"mappings":"AAiCA,MAAM,cAAc,GAAsB,CAAC,OAAO,EAA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C;IAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,wCAAwC,GAAG,IAAI,EAAE,CAAC;IACjF,CAAC;IACD,IAAI,IAAI,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,8BAA8B,GAAG,oBAAoB,EAAE,CAAC;IACvF,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/cli/parser.js
CHANGED
|
@@ -59,6 +59,12 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
59
59
|
"include-graduated",
|
|
60
60
|
"include-legacy",
|
|
61
61
|
"include-recent-closed",
|
|
62
|
+
"can-pause",
|
|
63
|
+
// Output projection (see output-mode.ts). `--format` takes a value and stays
|
|
64
|
+
// out; these two are presence-only and MUST be here or `aw status --json` and
|
|
65
|
+
// `aw resume --detail 009` would swallow the following positional.
|
|
66
|
+
"json",
|
|
67
|
+
"detail",
|
|
62
68
|
"include-docs",
|
|
63
69
|
"from-sources",
|
|
64
70
|
"exported-only",
|
package/dist/cli/parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAgB,EAAE,IAAY;IACtD,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC,KA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G,CAAC;QACrB,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC;QAC5B,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EACxB,CAAC;QACD,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC5B,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;IACjB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/cli/registry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/cli/registry.ts"],"names":[],"mappings":"AAwBA,MAAM,OAAO,eAAe;IACT,QAAQ,GAAG,IAAI,GAAG,EAAsB,CAAC;IAE1D,QAAQ,CAAC,OAAmB;QAC1B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,YAAY,OAAO,CAAC,IAAI,yBAAyB,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAED,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;CACF"}
|
package/dist/cli/render.js
CHANGED
|
@@ -11,9 +11,62 @@ export function fail(code, message, data, exitCode = 1) {
|
|
|
11
11
|
exitCode,
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Canonical envelope for a failed session resolution: the stable `code`, the
|
|
16
|
+
* human message, and — in `data` — the relevant candidates plus one valid next
|
|
17
|
+
* action. Every session-scoped command reports the failure this way, so the
|
|
18
|
+
* shape never depends on which command hit it.
|
|
19
|
+
*/
|
|
20
|
+
export function failSessionResolution(error) {
|
|
21
|
+
return fail(error.code, error.message, {
|
|
22
|
+
candidates: error.candidates,
|
|
23
|
+
action: error.action,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Canonical failure of a hybrid operation: the stable code, the message, and
|
|
28
|
+
* the next valid action in `data` — the same shape `failSessionResolution`
|
|
29
|
+
* established, so every command's errors read the same way.
|
|
30
|
+
*
|
|
31
|
+
* The single cast lives here on purpose. On the failure path `data` carries the
|
|
32
|
+
* next action, never the command's success payload, and `renderHumanError`
|
|
33
|
+
* reads it structurally rather than through `T`. Three copies of this cast is
|
|
34
|
+
* what it replaces.
|
|
35
|
+
*/
|
|
36
|
+
export function failSemantic(failure) {
|
|
37
|
+
return {
|
|
38
|
+
ok: false,
|
|
39
|
+
error: { code: failure.code, message: failure.message },
|
|
40
|
+
data: { action: failure.action },
|
|
41
|
+
exitCode: 1,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
14
44
|
export function renderRaw(payload) {
|
|
15
45
|
return `${JSON.stringify(payload, null, 2)}\n`;
|
|
16
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Human projection of a failed result: the stable code, the message, and the
|
|
49
|
+
* next valid action when the command supplied one.
|
|
50
|
+
*
|
|
51
|
+
* It reads `action` out of the SAME `data` the JSON envelope carries (the shape
|
|
52
|
+
* `failSessionResolution` already produces), so the two projections cannot
|
|
53
|
+
* disagree about what to do next. The exit code is decided elsewhere and is
|
|
54
|
+
* untouched by which projection printed.
|
|
55
|
+
*/
|
|
56
|
+
export function renderHumanError(error, data) {
|
|
57
|
+
const code = error?.code ?? "UNKNOWN";
|
|
58
|
+
const lines = [`✗ ${code}`, error?.message ?? "el comando falló sin detallar la causa"];
|
|
59
|
+
const action = readNextAction(data);
|
|
60
|
+
if (action !== undefined)
|
|
61
|
+
lines.push("", `Siguiente acción: ${action}`);
|
|
62
|
+
return `${lines.join("\n")}\n`;
|
|
63
|
+
}
|
|
64
|
+
function readNextAction(data) {
|
|
65
|
+
if (typeof data !== "object" || data === null)
|
|
66
|
+
return undefined;
|
|
67
|
+
const action = data.action;
|
|
68
|
+
return typeof action === "string" && action.length > 0 ? action : undefined;
|
|
69
|
+
}
|
|
17
70
|
export function renderError(error) {
|
|
18
71
|
return `${JSON.stringify({ ok: false, error }, null, 2)}\n`;
|
|
19
72
|
}
|
package/dist/cli/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/cli/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/cli/render.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAClB,IAAY,EACZ,OAAe,EACf,IAAQ,EACR,WAAkB,CAAC;IAEnB,OAAO;QACL,EAAE,EAAE,KAAK;QACT,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACxB,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,QAAQ;KACT,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA6B;IACjE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE;QACrC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC,CAAC;AACL,CAA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AC,KAAoB;IAC9C,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,iCAAiC;AACjC,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAoB;IAC5C,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,iBAA2B;IAC/E,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,oBAAoB,OAAO,EAAE;QACtC,OAAO,EAAE;YACP,OAAO;YACP,SAAS,EAAE,uDAAuD;YAClE,kBAAkB,EAAE,iBAAiB;SACtC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;AAC3C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tacuchi/agent-workflow-cli",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.23.0",
|
|
4
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 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/SKILL.md
CHANGED
|
@@ -67,7 +67,9 @@ USER invokes
|
|
|
67
67
|
|
|
68
68
|
Typical chain: prompt → `spec-new` generates `docs/specs/NNN-spec-<slug>.md` → `spec-refine` runs the loop and refines **that same spec in place** until PLAN can design without inventing behavior, stamping `status: ready-for-plan` → `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-*`.
|
|
69
69
|
|
|
70
|
-
> **A plan is a sequence of functional states.** Every `### Fn` phase names a verifiable state of the system, carries its own primary proof, and — **only when the change carries one** — declares where a temporary simulation lives and when it retires. Its `> Estado:` line (`pendiente` | `en ejecución` | `bloqueada` | `validada`) is machine state that `aw status` counts **alongside** the checkbox progress: ticking every checkbox is **not** validation, and neither is a proof nobody ran — a phase whose check could not be executed stays `bloqueada` until it runs and passes. Execution runs those states without redesigning them — a structural deviation returns to `plan-refine`, a functional one to `spec-refine`.
|
|
70
|
+
> **A plan is a sequence of functional states.** Every `### Fn` phase names a verifiable state of the system, carries its own primary proof, and — **only when the change carries one** — declares where a temporary simulation lives and when it retires. Its `> Estado:` line (`pendiente` | `en ejecución` | `bloqueada` | `validada`) is machine state that `aw status` counts **alongside** the checkbox progress: ticking every checkbox is **not** validation, and neither is a proof nobody ran — a phase whose check could not be executed stays `bloqueada` until it runs and passes, stating on its `> Bloqueo:` line what it waits on. Execution runs those states without redesigning them — a structural deviation returns to `plan-refine`, a functional one to `spec-refine`.
|
|
71
|
+
|
|
72
|
+
> **Three axes, and none stands in for another.** A **task completed** is work done (checkboxes); a **phase validated** is a functional state demonstrated (`> Estado: validada`); a **plan closed** is the whole solution validated — the plan's own `> Estado:` line under the title (`open` | `done`, with the date and session on its `> Cierre:` line). 100% of tasks does not imply validated phases, every phase validated does not imply the **final validation** ran, and a `done` declared over open work is a contradiction `aw status` reports as `inconsistent` rather than a closure. The runtime derives that third axis (`plan_state`) from the declaration **and** the counters; it never infers it from either alone.
|
|
71
73
|
|
|
72
74
|
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/LOOP.md` § *QUICK delta*.
|
|
73
75
|
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [--
|
|
2
|
+
description: Exports architecture/flow diagrams from N sessions to docs/diagrams/ as a numbered dossier. Backed by `aw export-diagrams`, which owns the corpus, the numbering, the shape check and the atomic publication. Explicit, separate step — never automatic.
|
|
3
|
+
argument-hint: "[--sessions <ids>] [--since <YYYY-MM-DD>] [--source <alias>]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|
|
6
6
|
"Bash",
|
|
7
7
|
"Read",
|
|
8
|
-
"Write",
|
|
9
8
|
]
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
# export-diagrams — export diagrams
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Promotes diagram material from `.workflow/sessions/` into a numbered dossier under `docs/diagrams/`. Single-pass, read-only over sessions. **Transversal**: no flow, no loop, **never creates a session**.
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Run
|
|
16
|
+
|
|
17
|
+
1. `aw export-diagrams prepare --format human [--sessions <a,b>] [--since <YYYY-MM-DD>] [--source <alias>]` (`--detail` prints the full response contract). Returns the corpus, the destination, the required shape and an `input_digest`.
|
|
18
|
+
2. **Synthesize the deliverable.** Compose one JSON answer: `version`, `operation` and `input_digest` copied **verbatim**; `state: "proposed"`; `artifacts` with one `{ path, content }` per file, every path inside the destination the request declares. The `NNN` is consultative — `apply` reassigns it inside the lock.
|
|
19
|
+
3. `echo '<json>' | aw export-diagrams validate --format human` → preview + `approval_digest`.
|
|
20
|
+
4. **Confirm scope and destination with the user**, showing that preview.
|
|
21
|
+
5. `echo '<json>' | aw export-diagrams apply --approval <digest> --format human`.
|
|
22
|
+
|
|
23
|
+
Every rejection names its cause and one valid next action; nothing was written. Fix the answer and repeat from step 3.
|
|
24
|
+
|
|
25
|
+
> **The CLI owns everything but the synthesis**: corpus selection and filters, numbering, the shape check, the write authorization and the atomic publication. Never write into `docs/` with a file tool — `Write` is deliberately not in `allowed-tools`. A dossier lands whole or not at all.
|
|
17
26
|
|
|
18
27
|
## What it produces
|
|
19
28
|
|
|
20
|
-
- `docs/diagrams/`:
|
|
21
|
-
- Does **not** mutate sessions
|
|
22
|
-
- Writes only `docs/diagrams/`.
|
|
29
|
+
- `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/`: `README.md` (required) + the diagrams in Markdown, plus their DSL (`.dsl`/`.puml`/`.mmd`) when it helps.
|
|
30
|
+
- Does **not** mutate sessions, touch another `docs/` folder, or open/close loops.
|
|
23
31
|
|
|
24
32
|
## Plan mode
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
Run `aw export-diagrams prepare` (read-only) and describe the deliverable and the destination it would publish, without applying.
|
|
27
35
|
|
|
28
36
|
## Resources
|
|
29
37
|
|
|
30
|
-
-
|
|
38
|
+
- CLI: `aw export-diagrams prepare | validate | apply` (service `export-service` over `semantic-operation/`)
|
|
39
|
+
- Diagram authoring reference: `../exports/export-diagrams/EXPORT.md` (engine `--engine`, notation) — no longer loaded on the normal path
|
|
31
40
|
- Design reference: `docs/referencias/workflow-exports/README.md`
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [--sessions <ids>] [--
|
|
2
|
+
description: Exports user/operator manuals from N sessions to docs/manuals/ as a numbered dossier. Backed by `aw export-manuals`; docs/manuals/INDEX.md is the only overwritable file and requires --overwrite. Explicit, separate step — never automatic.
|
|
3
|
+
argument-hint: "[--sessions <ids>] [--since <YYYY-MM-DD>] [--source <alias>]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|
|
6
6
|
"Bash",
|
|
7
7
|
"Read",
|
|
8
|
-
"Write",
|
|
9
8
|
]
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
# export-manuals — export manuals
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Promotes manual material from `.workflow/sessions/` into a numbered dossier under `docs/manuals/`. Single-pass, read-only over sessions. **Transversal**: no flow, no loop, **never creates a session**.
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Run
|
|
16
|
+
|
|
17
|
+
1. `aw export-manuals prepare --format human [--sessions <a,b>] [--since <YYYY-MM-DD>] [--source <alias>]` (`--detail` prints the full response contract). Returns the corpus, the destination, the required shape and an `input_digest`.
|
|
18
|
+
2. **Synthesize the deliverable.** Compose one JSON answer: `version`, `operation` and `input_digest` copied **verbatim**; `state: "proposed"`; `artifacts` with one `{ path, content }` per file, every path inside the destination the request declares. The `NNN` is consultative — `apply` reassigns it inside the lock.
|
|
19
|
+
3. `echo '<json>' | aw export-manuals validate --format human` → preview + `approval_digest`.
|
|
20
|
+
4. **Confirm scope and destination with the user**, showing that preview.
|
|
21
|
+
5. `echo '<json>' | aw export-manuals apply --approval <digest> --format human [--overwrite]`.
|
|
22
|
+
|
|
23
|
+
Every rejection names its cause and one valid next action; nothing was written. Fix the answer and repeat from step 3.
|
|
24
|
+
|
|
25
|
+
> **The CLI owns everything but the synthesis**: corpus selection and filters, numbering, the shape check, the write authorization and the atomic publication. Never write into `docs/` with a file tool — `Write` is deliberately not in `allowed-tools`. A dossier lands whole or not at all.
|
|
17
26
|
|
|
18
27
|
## What it produces
|
|
19
28
|
|
|
20
|
-
- `docs/manuals/`:
|
|
21
|
-
-
|
|
22
|
-
-
|
|
29
|
+
- `docs/manuals/NNN-export-manuals-YYYY-MM-DD/`: `README.md` (required) + the manuals in Markdown.
|
|
30
|
+
- Optionally `docs/manuals/INDEX.md` — the **only** file an export may replace, and only with an explicit `--overwrite` the user approved.
|
|
31
|
+
- Does **not** mutate sessions, touch another `docs/` folder, or open/close loops.
|
|
23
32
|
|
|
24
33
|
## Plan mode
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
Run `aw export-manuals prepare` (read-only) and describe the deliverable and the destination it would publish, without applying.
|
|
27
36
|
|
|
28
37
|
## Resources
|
|
29
38
|
|
|
30
|
-
-
|
|
39
|
+
- CLI: `aw export-manuals prepare | validate | apply` (service `export-service` over `semantic-operation/`)
|
|
40
|
+
- Manual authoring reference: `../exports/export-manuals/EXPORT.md` — no longer loaded on the normal path
|
|
31
41
|
- Design reference: `docs/referencias/workflow-exports/README.md`
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: [--sessions <ids>] [--
|
|
2
|
+
description: Exports a bounded report from N sessions to docs/reports/ as a numbered Markdown document. Backed by `aw export-reports`, which owns the corpus, the numbering and the write. Explicit, separate step — never automatic.
|
|
3
|
+
argument-hint: "[--sessions <ids>] [--since <YYYY-MM-DD>] [--source <alias>]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|
|
6
6
|
"Bash",
|
|
7
7
|
"Read",
|
|
8
|
-
"Write",
|
|
9
8
|
]
|
|
10
9
|
---
|
|
11
10
|
|
|
12
|
-
# export-reports — export
|
|
11
|
+
# export-reports — export a report
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
Promotes session findings into one numbered report under `docs/reports/`. Single-pass, read-only over sessions. **Transversal**: no flow, no loop, **never creates a session**.
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Run
|
|
16
|
+
|
|
17
|
+
1. `aw export-reports prepare --format human [--sessions <a,b>] [--since <YYYY-MM-DD>] [--source <alias>]` (`--detail` prints the full response contract). Returns the corpus, the destination, the required shape and an `input_digest`.
|
|
18
|
+
2. **Synthesize the deliverable.** Compose one JSON answer: `version`, `operation` and `input_digest` copied **verbatim**; `state: "proposed"`; `artifacts` with one `{ path, content }` per file, every path inside the destination the request declares. The `NNN` is consultative — `apply` reassigns it inside the lock.
|
|
19
|
+
3. `echo '<json>' | aw export-reports validate --format human` → preview + `approval_digest`.
|
|
20
|
+
4. **Confirm scope and destination with the user**, showing that preview.
|
|
21
|
+
5. `echo '<json>' | aw export-reports apply --approval <digest> --format human`.
|
|
22
|
+
|
|
23
|
+
Every rejection names its cause and one valid next action; nothing was written. Fix the answer and repeat from step 3.
|
|
24
|
+
|
|
25
|
+
> **The CLI owns everything but the synthesis**: corpus selection and filters, numbering, the shape check, the write authorization and the atomic publication. Never write into `docs/` with a file tool — `Write` is deliberately not in `allowed-tools`. A dossier lands whole or not at all.
|
|
17
26
|
|
|
18
27
|
## What it produces
|
|
19
28
|
|
|
20
|
-
- `docs/reports
|
|
21
|
-
- Does **not** mutate sessions
|
|
22
|
-
- Writes only `docs/reports/`.
|
|
29
|
+
- `docs/reports/NNN-<slug>-YYYY-MM-DD.md`: ONE document that declares its audience and its scope in the opening lines.
|
|
30
|
+
- Does **not** mutate sessions, touch another `docs/` folder, or open/close loops.
|
|
23
31
|
|
|
24
32
|
## Plan mode
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
Run `aw export-reports prepare` (read-only) and describe the deliverable and the destination it would publish, without applying.
|
|
27
35
|
|
|
28
36
|
## Resources
|
|
29
37
|
|
|
30
|
-
-
|
|
38
|
+
- CLI: `aw export-reports prepare | validate | apply` (service `export-service` over `semantic-operation/`)
|
|
39
|
+
- Report authoring reference: `../exports/export-reports/EXPORT.md` — no longer loaded on the normal path
|
|
31
40
|
- Design reference: `docs/referencias/workflow-exports/README.md`
|
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Exports DB scripts (type-B SCRIPTS.sql) from N sessions to docs/scripts/ as
|
|
3
|
-
argument-hint: [--sessions <ids>] [--
|
|
2
|
+
description: Exports DB scripts (type-B SCRIPTS.sql) from N sessions to docs/scripts/ as a bundle with continuous forwards + rollback. Backed by `aw export-scripts`, which validates the bundle shape and NEVER executes SQL. Explicit, separate step — never automatic.
|
|
3
|
+
argument-hint: "[--sessions <ids>] [--since <YYYY-MM-DD>] [--source <alias>]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|
|
6
6
|
"Bash",
|
|
7
7
|
"Read",
|
|
8
|
-
"Write",
|
|
9
8
|
]
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
# export-scripts — export DB scripts
|
|
13
12
|
|
|
14
|
-
Promotes the `SCRIPTS.sql` artifacts (type B — migrations) of N sessions from `.workflow/sessions/`
|
|
13
|
+
Promotes the `SCRIPTS.sql` artifacts (type B — migrations) of N sessions from `.workflow/sessions/` into a bundle under `docs/scripts/`. Single-pass, read-only over sessions. **Transversal**: no flow, no loop, **never creates a session**.
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Run
|
|
16
|
+
|
|
17
|
+
1. `aw export-scripts prepare --format human [--sessions <a,b>] [--since <YYYY-MM-DD>] [--source <alias>]` (`--detail` prints the full response contract). Returns the corpus, the destination, the required shape and an `input_digest`.
|
|
18
|
+
2. **Synthesize the deliverable.** Compose one JSON answer: `version`, `operation` and `input_digest` copied **verbatim**; `state: "proposed"`; `artifacts` with one `{ path, content }` per file, every path inside the destination the request declares. The `NNN` is consultative — `apply` reassigns it inside the lock.
|
|
19
|
+
3. `echo '<json>' | aw export-scripts validate --format human` → preview + `approval_digest`.
|
|
20
|
+
4. **Confirm scope and destination with the user**, showing that preview.
|
|
21
|
+
5. `echo '<json>' | aw export-scripts apply --approval <digest> --format human`.
|
|
22
|
+
|
|
23
|
+
Every rejection names its cause and one valid next action; nothing was written. Fix the answer and repeat from step 3.
|
|
24
|
+
|
|
25
|
+
> **The CLI owns everything but the synthesis**: corpus selection and filters, numbering, the shape check, the write authorization and the atomic publication. Never write into `docs/` with a file tool — `Write` is deliberately not in `allowed-tools`. A dossier lands whole or not at all.
|
|
17
26
|
|
|
18
27
|
## What it produces
|
|
19
28
|
|
|
20
|
-
- `docs/scripts/`:
|
|
21
|
-
-
|
|
22
|
-
-
|
|
29
|
+
- `docs/scripts/NNN-export-scripts-YYYY-MM-DD/`: `00-ROLLBACK.sql` and `README.md` (both required) + the forwards `NN-<nombre>.sql`, numbered **continuously from 01** — the CLI rejects a gap.
|
|
30
|
+
- The AI **never executes** the SQL, and neither does the CLI: the bundle is for a human/DBA to apply.
|
|
31
|
+
- Does **not** mutate sessions, touch another `docs/` folder, or open/close loops.
|
|
23
32
|
|
|
24
33
|
## Plan mode
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
Run `aw export-scripts prepare` (read-only) and describe the deliverable and the destination it would publish, without applying.
|
|
27
36
|
|
|
28
37
|
## Resources
|
|
29
38
|
|
|
30
|
-
-
|
|
39
|
+
- CLI: `aw export-scripts prepare | validate | apply` (service `export-service` over `semantic-operation/`)
|
|
40
|
+
- SQL bundle reference: `../exports/export-scripts/EXPORT.md` (rollback derivation, ordering) — no longer loaded on the normal path
|
|
31
41
|
- Design reference: `docs/referencias/workflow-exports/README.md`
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Use when a merge
|
|
3
|
-
argument-hint: "[
|
|
2
|
+
description: Use when a merge left conflicts to resolve. Backed by `aw fix-git`, which reads the three versions of each conflict, validates the semantic resolution and stages only files still in conflict. You supply the resolved content; the CLI decides which paths stay authorized and owns edit, stage and commit. Git-safe — the merge commit is a separate confirmed action, never push/--amend/--no-verify. Transversal (not a flow), no session, never touches docs/.
|
|
3
|
+
argument-hint: "[--source <alias> | --path <ruta>]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|
|
6
6
|
"Bash",
|
|
7
7
|
"Read",
|
|
8
|
-
"Edit",
|
|
9
8
|
]
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
# fix-git — merge-conflict resolver (transversal)
|
|
13
12
|
|
|
14
|
-
Single-pass, **no loop, no session**, **never writes `docs/`**. **
|
|
13
|
+
Single-pass, **no loop, no session**, **never writes `docs/`**. **Workspace-agnostic**: any git repo, with or without `.workflow/`. User-facing output in the **user's language**.
|
|
14
|
+
|
|
15
|
+
> **Hard floor — applies even if you read nothing beyond this file:**
|
|
16
|
+
>
|
|
17
|
+
> 1. **You supply content; the CLI owns the effects.** Never edit a conflicted file, never `git add`, never `git commit` by hand — `Edit` is deliberately not in `allowed-tools`.
|
|
18
|
+
> 2. **Only unambiguous resolutions.** Anything you cannot resolve on evidence is `state: "ambiguous"`, which the CLI turns into a question. Never guess a side.
|
|
19
|
+
> 3. **The commit is a separate action**, always confirmed, and the message is proposed to the user first. Never `--no-verify`, `--amend` or push.
|
|
20
|
+
> 4. **Never `git merge --abort` on your own** — propose it; the user decides.
|
|
15
21
|
|
|
16
22
|
## Run
|
|
17
23
|
|
|
18
|
-
1.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
1. `aw fix-git prepare --format human [--source <alias> | --path <ruta>]` (`--detail` prints the response contract and the request size). Returns the merge direction (`theirs → ours`), the conflicted paths, their three index stages and their blob hashes.
|
|
25
|
+
2. **Resolve each conflict from the three versions the request carries** — `base` (common ancestor), `ours` (HEAD) and `theirs` (the incoming branch). Read both sides' *intent*, not just their text: `ours`, `theirs`, a combination, or a rewrite that preserves both intents.
|
|
26
|
+
3. Compose one JSON answer: `version`, `operation` and `input_digest` copied verbatim; `state: "proposed"`; `artifacts` with **one `{ path, content }` per conflicted file**, `content` being the complete resolved file with **no conflict markers**.
|
|
27
|
+
- Any file you cannot settle on evidence → `state: "ambiguous"` with `reason`. Nothing is written; present the choice to the user.
|
|
28
|
+
- A binary conflict is rejected by the CLI: propose `git checkout --ours|--theirs` to the user instead.
|
|
29
|
+
4. `echo '<json>' | aw fix-git apply --format human [--source …]`. The invocation authorizes the write **because** the set is unambiguous and still current — a conflict another process resolved meanwhile fails as stale.
|
|
30
|
+
5. **Propose the merge commit** to the user (canonical one-line format). On approval:
|
|
31
|
+
`aw fix-git commit --message "<mensaje>" --confirm [--source …]`.
|
|
32
|
+
|
|
33
|
+
Every rejection names its cause and one valid next action; nothing was written. Fix the answer and repeat from step 4.
|
|
34
|
+
|
|
35
|
+
> **No merge in progress?** If the user explicitly asked to merge a branch, run `git -C <path> merge <branch>` and continue. Otherwise report there is nothing to resolve and stop.
|
|
36
|
+
|
|
37
|
+
## What the CLI decides (do not re-derive)
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
- **Which paths are writable**: exactly the files still unmerged. A path outside that set is rejected, not silently skipped.
|
|
40
|
+
- **Whether the conflict is still yours**: the blob hashes seal the set; if it moved, `apply` fails stale instead of overwriting someone else's resolution.
|
|
41
|
+
- **Whether the content is really resolved**: leftover `<<<<<<<` / `=======` / `>>>>>>>` is a rejection.
|
|
42
|
+
- **Whether the merge can close**: `commit` refuses while any file stays unmerged.
|
|
24
43
|
|
|
25
44
|
## Plan mode
|
|
26
45
|
|
|
27
|
-
Run `aw
|
|
46
|
+
Run `aw fix-git prepare` (read-only), report **origin ↔ destination** and the per-file conflicts, and describe the resolution you would propose — without applying or committing.
|
|
28
47
|
|
|
29
48
|
## Resources
|
|
30
49
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
50
|
+
- CLI: `aw fix-git prepare | apply | commit` (service `fix-git-service` over `semantic-operation/`) · `aw merge-state` (read-only inspector)
|
|
51
|
+
- Reference: `../roles/git/ROLE.md` § *Merge-conflict resolution* — the reasoning about intent; the mechanics now live in the CLI
|
|
33
52
|
- Design reference: `docs/referencias/workflow-skills/fix-git.md`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "(Re)generates the per-source launch scripts (.workflow/launch/<alias>/ — launch.json + run.sh + run.ps1) by detecting each source's stack and launch mode (interactive TUI vs server). Idempotent: pristine files regenerate, hand-edited ones are preserved (--force overwrites). Confirms the mode/command via structured-choice when it matters. Backed by `aw generate-launch`. Transversal command (not a flow); no session, never touches docs/."
|
|
2
|
+
description: "(Re)generates the per-source launch scripts (.workflow/launch/<alias>/ — launch.json + run.sh + run.ps1) by detecting each source's stack and launch mode (interactive TUI vs server). Idempotent: pristine files regenerate, hand-edited ones are preserved (--force overwrites). Confirms the mode/command via structured-choice when it matters. Backed by `aw generate-launch --format human`. Transversal command (not a flow); no session, never touches docs/."
|
|
3
3
|
argument-hint: "[--source <alias>] [--mode interactive|server] [--command <cmd>] [--force] [--dry-run]"
|
|
4
4
|
allowed-tools:
|
|
5
5
|
[
|