@tacuchi/agent-workflow-cli 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,9 @@ export interface SelfDoctorReport {
21
21
  skill: {
22
22
  installed: boolean;
23
23
  path: string;
24
+ legacy_leftover?: boolean;
25
+ legacy_leftover_path?: string;
26
+ legacy_leftover_warning?: string;
24
27
  };
25
28
  }
26
29
  export declare function selfDoctor(ctx: CliContext): Promise<CommandResult<SelfDoctorReport>>;
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-self.d.ts","sourceRoot":"","sources":["../../../src/application/self/doctor-self.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,KAAK,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CA+B1F"}
1
+ {"version":3,"file":"doctor-self.d.ts","sourceRoot":"","sources":["../../../src/application/self/doctor-self.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,KAAK,EAAE;QACL,SAAS,EAAE,OAAO,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAC;KAClC,CAAC;CACH;AAID,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAyC1F"}
@@ -1,8 +1,11 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { join } from "node:path";
3
+ const LEGACY_SKILL_DIR = "agent-workflow-manager";
3
4
  export async function selfDoctor(ctx) {
4
5
  const skillPath = join(ctx.env.homeDir(), ".claude", "skills", "agent-workflow");
5
6
  const skillInstalled = await ctx.fs.exists(skillPath);
7
+ const legacyPath = join(ctx.env.homeDir(), ".claude", "skills", LEGACY_SKILL_DIR);
8
+ const legacyLeftover = await ctx.fs.exists(legacyPath);
6
9
  return {
7
10
  ok: true,
8
11
  data: {
@@ -26,6 +29,13 @@ export async function selfDoctor(ctx) {
26
29
  skill: {
27
30
  installed: skillInstalled,
28
31
  path: skillPath,
32
+ ...(legacyLeftover
33
+ ? {
34
+ legacy_leftover: true,
35
+ legacy_leftover_path: legacyPath,
36
+ legacy_leftover_warning: `Skill legacy detectada en ${legacyPath}. Reemplazada por '${skillPath}' tras el rename de agent-workflow-manager → agent-workflow. Recomendado: mv ${legacyPath} ${legacyPath}.bak (preserva evidencia) y cuando estés tranquilo, rm -rf el .bak.`,
37
+ }
38
+ : {}),
29
39
  },
30
40
  },
31
41
  exitCode: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-self.js","sourceRoot":"","sources":["../../../src/application/self/doctor-self.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAyBjC,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAe;IAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IACjF,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAEtD,OAAO;QACL,EAAE,EAAE,IAAI;QACR,IAAI,EAAE;YACJ,WAAW,EAAE,kBAAkB,EAAE;YACjC,SAAS,EAAE;gBACT,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,SAAS;gBAC9B,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,MAAM;aAC7B;YACD,KAAK,EAAE;gBACL,SAAS,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE;gBAC/B,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE;gBAC7B,YAAY,EAAE,GAAG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W,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC9E;YACD,KAAK,EAAE;gBACL,SAAS,EAAE,cAAc;gBACzB,IAAI,EAAE,SAAS;gBACf,GAAG,CAAC,cAAc;oBAChB,CAAC,CAAC;wBACE,eAAe,EAAE,IAAI;wBACrB,oBAAoB,EAAE,UAAU;wBAChC,uBAAuB,EAAE,6BAA6B,UAAU,sBAAsB,SAAS,gFAAgF,UAAU,IAAI,UAAU,qEAAqE;qBAC7Q;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;SACF;QACD,QAAQ,EAAE,CAAC;KACZ,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,uBAAuB,CAAyB,CAAC;QACrE,OAAO,GAAG,CAAC,OAAO,IAAI,SAAS,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacuchi/agent-workflow-cli",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "Agnostic runtime CLI for session-lifecycle workflows. Auto-detects namespace from any `.<ns>/sessions/` dir in CWD; falls back to 'agent-workflow'. Plugins like `qtc-workflow-plugin` reclaim a fixed namespace via SessionStart hook (writes to `~/.config/agent-workflow/namespace`). Bundles the universal `agent-workflow` skill in the tarball — `self install-skill` copies it from the bundled location to `~/.claude/skills/agent-workflow/`. Override the source with `--from <local-path>` for skill development.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -231,7 +231,7 @@ Empresa nueva que adopta el workflow desde cero.
231
231
 
232
232
  ```bash
233
233
  # 1. Instalar CLI
234
- npm install -g @tacuchi/agent-workflow
234
+ npm install -g @tacuchi/agent-workflow-cli
235
235
 
236
236
  # 2. Instalar skill (si usás Claude Code)
237
237
  agent-workflow self install-skill
@@ -251,7 +251,7 @@ agent-workflow sources
251
251
 
252
252
  ```bash
253
253
  agent-workflow self update # check
254
- npm i -g @tacuchi/agent-workflow@latest # actualizar binario
254
+ npm i -g @tacuchi/agent-workflow-cli@latest # actualizar binario
255
255
  agent-workflow self install-skill --force # actualizar skill
256
256
  ```
257
257
 
@@ -260,7 +260,7 @@ agent-workflow self install-skill --force # actualizar skill
260
260
  | Error | Causa probable | Acción |
261
261
  |---|---|---|
262
262
  | `NOT_IN_WORKSPACE` | Namespace apunta a tree no existente | `self namespace` para ver el resuelto; setear `--namespace` o env. |
263
- | Mismatch entre `self doctor.cli_version` y `package.json` | Binario global desactualizado | `npm i -g @tacuchi/agent-workflow@latest` |
263
+ | Mismatch entre `self doctor.cli_version` y `package.json` | Binario global desactualizado | `npm i -g @tacuchi/agent-workflow-cli@latest` |
264
264
  | Hook `branch-check` bloquea edits inesperadamente | Sesión declara una rama distinta a la actual | `agent-workflow check-branch --source <alias>` para ver expected vs current; checkout o re-declarar. |
265
265
 
266
266
  ## 11. Referencias
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-workflow
3
- description: Universal skill for the @tacuchi/agent-workflow-cli CLI. Teach Claude Code how to drive session-lifecycle workflows (planning → execution → validation → closure), history bookkeeping, source/branch checks, checkpoints, doctor, hooks, and self-management. Use whenever the user works with session-based development inside a workspace that hosts an `.agent-workflow/` (or `.qtc/` for the QTC plugin family) artifact tree.
4
- version: 1.1.0
3
+ description: Universal skill for the @tacuchi/agent-workflow-cli CLI. Teach Claude Code how to drive session-lifecycle workflows (planning → execution → validation → closure), history bookkeeping, source/branch checks, checkpoints, doctor, hooks, and self-management. Use whenever the user works with session-based development inside a workspace that hosts an `.agent-workflow/` or `.workflow/` (QTC plugin family) artifact tree.
4
+ version: 1.2.0
5
5
  ---
6
6
 
7
7
  # agent-workflow — universal CLI skill
@@ -31,11 +31,12 @@ Short alias: `aw`.
31
31
  1. CLI flag `--namespace <name>`
32
32
  2. Env var `AW_NAMESPACE` (or `AGENT_WORKFLOW_NAMESPACE`)
33
33
  3. User config `~/.config/agent-workflow/namespace`
34
- 4. Default literal: `agent-workflow`
34
+ 4. Workspace auto-detect: `.<ns>/sessions/` directory in CWD
35
+ 5. Default literal: `agent-workflow`
35
36
 
36
- For QTC plugin compatibility, qtc-* plugins export `AW_NAMESPACE=qtc` from their SessionStart hooks; the CLI then reads/writes `~/.qtc/`, `.qtc/sessions/`, and the `QTC-PROJECT` block in `CLAUDE.md` / `AGENTS.md`.
37
+ For QTC plugin compatibility, the `qtc` plugin reclaims namespace `workflow` from its SessionStart hook by writing `workflow` to `~/.config/agent-workflow/namespace`; the CLI then reads/writes `~/.workflow/`, `.workflow/sessions/`, and the `QTC-PROJECT` block in `CLAUDE.md` / `AGENTS.md`.
37
38
 
38
- When you invoke the CLI from a fresh shell where no plugin has set the env, use `--namespace <name>` explicitly or the binary will operate on the default `agent-workflow` namespace and miss the QTC artifacts.
39
+ When you invoke the CLI from a fresh shell where no plugin has set the user-config, use `--namespace <name>` explicitly or run from inside a workspace whose `.<ns>/sessions/` dir is autodetected. The binary will otherwise operate on the default `agent-workflow` namespace.
39
40
 
40
41
  ### Output contract
41
42
 
@@ -50,7 +50,7 @@ Una empresa nueva (sin plugins QTC) instala skill + CLI y completa un workflow E
50
50
 
51
51
  - **Precondición**: máquina sin `agent-workflow` ni skill instalado.
52
52
  - **Pasos**:
53
- 1. `npm install -g @tacuchi/agent-workflow`.
53
+ 1. `npm install -g @tacuchi/agent-workflow-cli`.
54
54
  2. `agent-workflow self install-skill`.
55
55
  3. `agent-workflow self doctor`.
56
56
  - **Criterio**: doctor reporta `cli_version >= 1.2.0`, `skill.installed = true`, `skill.path` apunta al directorio correcto.