@tacuchi/agent-workflow-cli 6.2.0 → 7.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.
Files changed (181) hide show
  1. package/README.md +65 -12
  2. package/dist/application/profile/profile-service.d.ts +53 -0
  3. package/dist/application/profile/profile-service.d.ts.map +1 -0
  4. package/dist/application/profile/profile-service.js +210 -0
  5. package/dist/application/profile/profile-service.js.map +1 -0
  6. package/dist/application/self/bootstrap.js +2 -1
  7. package/dist/application/self/bootstrap.js.map +1 -1
  8. package/dist/application/self/detect-hosts.d.ts +18 -0
  9. package/dist/application/self/detect-hosts.d.ts.map +1 -0
  10. package/dist/application/self/detect-hosts.js +37 -0
  11. package/dist/application/self/detect-hosts.js.map +1 -0
  12. package/dist/application/self/install-hooks.d.ts +30 -0
  13. package/dist/application/self/install-hooks.d.ts.map +1 -0
  14. package/dist/application/self/install-hooks.js +253 -0
  15. package/dist/application/self/install-hooks.js.map +1 -0
  16. package/dist/application/self/install-skill.d.ts +2 -0
  17. package/dist/application/self/install-skill.d.ts.map +1 -1
  18. package/dist/application/self/install-skill.js +69 -3
  19. package/dist/application/self/install-skill.js.map +1 -1
  20. package/dist/cli/commands/self.d.ts.map +1 -1
  21. package/dist/cli/commands/self.js +9 -1
  22. package/dist/cli/commands/self.js.map +1 -1
  23. package/dist/cli/tui/tabs/skills-tab.d.ts.map +1 -1
  24. package/dist/cli/tui/tabs/skills-tab.js +100 -24
  25. package/dist/cli/tui/tabs/skills-tab.js.map +1 -1
  26. package/package.json +2 -2
  27. package/skills/agent-workflow/commands/README.md +24 -0
  28. package/skills/agent-workflow/commands/agent-workflow-compact.md +24 -0
  29. package/skills/agent-workflow/commands/agent-workflow-doctor.md +100 -0
  30. package/skills/agent-workflow/commands/agent-workflow-export-arq.md +77 -0
  31. package/skills/agent-workflow/commands/agent-workflow-export-conclusions.md +78 -0
  32. package/skills/agent-workflow/commands/agent-workflow-export-plan.md +74 -0
  33. package/skills/agent-workflow/commands/agent-workflow-export-qa-note.md +30 -0
  34. package/skills/agent-workflow/commands/agent-workflow-export-report.md +78 -0
  35. package/skills/agent-workflow/commands/agent-workflow-export-requirement.md +30 -0
  36. package/skills/agent-workflow/commands/agent-workflow-export-scripts.md +92 -0
  37. package/skills/agent-workflow/commands/agent-workflow-export-tech-manuals.md +75 -0
  38. package/skills/agent-workflow/commands/agent-workflow-export-tech-note.md +30 -0
  39. package/skills/agent-workflow/commands/agent-workflow-hub-init.md +82 -0
  40. package/skills/agent-workflow/commands/agent-workflow-migrate.md +56 -0
  41. package/skills/agent-workflow/commands/agent-workflow-project-init.md +60 -0
  42. package/skills/agent-workflow/commands/agent-workflow-resume.md +22 -0
  43. package/skills/agent-workflow/commands/agent-workflow-rules.md +40 -0
  44. package/skills/agent-workflow/commands/agent-workflow-session.md +35 -0
  45. package/skills/agent-workflow/doctrine/README.md +15 -0
  46. package/skills/agent-workflow/doctrine/compact/SKILL.md +145 -0
  47. package/skills/agent-workflow/doctrine/doctor/SKILL.md +86 -0
  48. package/skills/agent-workflow/doctrine/doctor/SKILL.md.tmp +0 -0
  49. package/skills/agent-workflow/doctrine/hub-init/SKILL.md +157 -0
  50. package/skills/agent-workflow/doctrine/hub-init/SKILL.md.tmp +0 -0
  51. package/skills/agent-workflow/doctrine/hub-init/references/multiroot-manual.md +51 -0
  52. package/skills/agent-workflow/doctrine/implement/SKILL.md +290 -0
  53. package/skills/agent-workflow/doctrine/implement/references/branch-verification.md +16 -0
  54. package/skills/agent-workflow/doctrine/implement/references/design-md-template.md +108 -0
  55. package/skills/agent-workflow/doctrine/implement/references/rollback-guide.md +81 -0
  56. package/skills/agent-workflow/doctrine/migrate/SKILL.md +281 -0
  57. package/skills/agent-workflow/doctrine/migrate/SKILL.md.tmp +0 -0
  58. package/skills/agent-workflow/doctrine/project-init/SKILL.md +100 -0
  59. package/skills/agent-workflow/doctrine/project-init/SKILL.md.tmp +0 -0
  60. package/skills/agent-workflow/doctrine/refactor/SKILL.md +208 -0
  61. package/skills/agent-workflow/doctrine/refactor/references/refactor-md-template.md +108 -0
  62. package/skills/agent-workflow/doctrine/refactor/references/strangler-checklist.md +116 -0
  63. package/skills/agent-workflow/doctrine/resume/SKILL.md +199 -0
  64. package/skills/agent-workflow/doctrine/rules/SKILL.md +224 -0
  65. package/skills/agent-workflow/doctrine/rules/SKILL.md.tmp +0 -0
  66. package/skills/agent-workflow/doctrine/session/SKILL.md +383 -0
  67. package/skills/agent-workflow/doctrine/session/references/auto-plan-rules.md +63 -0
  68. package/skills/agent-workflow/doctrine/session/references/backlog-template.md +95 -0
  69. package/skills/agent-workflow/doctrine/session/references/branch-verification.md +198 -0
  70. package/skills/agent-workflow/doctrine/session/references/commits-policy.md +111 -0
  71. package/skills/agent-workflow/doctrine/session/references/communication-style.md +50 -0
  72. package/skills/agent-workflow/doctrine/session/references/graduacion-routing.md +88 -0
  73. package/skills/agent-workflow/doctrine/session/references/lifecycle-deep.md +160 -0
  74. package/skills/agent-workflow/doctrine/session/references/prompts/C1-specialty-selection.md +11 -0
  75. package/skills/agent-workflow/doctrine/session/references/prompts/C2-cost-guard.md +14 -0
  76. package/skills/agent-workflow/doctrine/session/references/prompts/M1-closure-commit-prompt.md +104 -0
  77. package/skills/agent-workflow/doctrine/session/references/prompts/M10-next-step.md +17 -0
  78. package/skills/agent-workflow/doctrine/session/references/prompts/M11-context.md +16 -0
  79. package/skills/agent-workflow/doctrine/session/references/prompts/M2-branch-caso-A.md +14 -0
  80. package/skills/agent-workflow/doctrine/session/references/prompts/M3-branch-caso-C.md +33 -0
  81. package/skills/agent-workflow/doctrine/session/references/prompts/M4-cross-source-hard-gate.md +33 -0
  82. package/skills/agent-workflow/doctrine/session/references/prompts/M5-modality-analyze.md +15 -0
  83. package/skills/agent-workflow/doctrine/session/references/prompts/M6-phase-gate.md +31 -0
  84. package/skills/agent-workflow/doctrine/session/references/prompts/M7-refactor-legacy-detected.md +28 -0
  85. package/skills/agent-workflow/doctrine/session/references/prompts/M8-refactor-cleanup.md +16 -0
  86. package/skills/agent-workflow/doctrine/session/references/prompts/M9-contract-review.md +39 -0
  87. package/skills/agent-workflow/doctrine/session/references/prompts/S1-type-design.md +15 -0
  88. package/skills/agent-workflow/doctrine/session/references/prompts/S2-topic-change-detection.md +14 -0
  89. package/skills/agent-workflow/doctrine/session/references/prompts/S3-flow-detection.md +28 -0
  90. package/skills/agent-workflow/doctrine/session/references/prompts/S4-resume.md +27 -0
  91. package/skills/agent-workflow/doctrine/session/references/prompts/S5-post-compact.md +17 -0
  92. package/skills/agent-workflow/doctrine/session/references/prompts/S6-scope.md +16 -0
  93. package/skills/agent-workflow/doctrine/session/references/prompts/S7-design-review.md +37 -0
  94. package/skills/agent-workflow/doctrine/session/references/prompts-catalog.md +210 -0
  95. package/skills/agent-workflow/doctrine/session/references/sandbox-readonly-rules.md +82 -0
  96. package/skills/agent-workflow/doctrine/session/references/specialty-decision-tree.md +56 -0
  97. package/skills/agent-workflow/doctrine/session/references/topic-change-rules.md +67 -0
  98. package/skills/agent-workflow/exports/README.md +15 -0
  99. package/skills/agent-workflow/exports/export-arq/SKILL.md +229 -0
  100. package/skills/agent-workflow/exports/export-arq/SKILL.md.tmp +0 -0
  101. package/skills/agent-workflow/exports/export-arq/references/lexico-tecnico.md +94 -0
  102. package/skills/agent-workflow/exports/export-arq/references/template-c4.md +293 -0
  103. package/skills/agent-workflow/exports/export-arq/references/template-plantuml.puml +77 -0
  104. package/skills/agent-workflow/exports/export-arq/references/template-structurizr.dsl +72 -0
  105. package/skills/agent-workflow/exports/export-arq/references/validations.md +231 -0
  106. package/skills/agent-workflow/exports/export-conclusions/SKILL.md +169 -0
  107. package/skills/agent-workflow/exports/export-conclusions/references/dedup-rules.md +154 -0
  108. package/skills/agent-workflow/exports/export-conclusions/references/template-conclusions.md +158 -0
  109. package/skills/agent-workflow/exports/export-plan/SKILL.md +225 -0
  110. package/skills/agent-workflow/exports/export-plan/references/state-transitions.md +141 -0
  111. package/skills/agent-workflow/exports/export-plan/references/template-plan.md +132 -0
  112. package/skills/agent-workflow/exports/export-qa-note/SKILL.md +31 -0
  113. package/skills/agent-workflow/exports/export-report/SKILL.md +262 -0
  114. package/skills/agent-workflow/exports/export-report/SKILL.md.tmp +0 -0
  115. package/skills/agent-workflow/exports/export-report/references/lexico.md +174 -0
  116. package/skills/agent-workflow/exports/export-report/references/template-a.md +95 -0
  117. package/skills/agent-workflow/exports/export-report/references/template-b.md +221 -0
  118. package/skills/agent-workflow/exports/export-report/references/template-c.md +180 -0
  119. package/skills/agent-workflow/exports/export-report/references/validations.md +255 -0
  120. package/skills/agent-workflow/exports/export-requirement/SKILL.md +31 -0
  121. package/skills/agent-workflow/exports/export-scripts/SKILL.md +324 -0
  122. package/skills/agent-workflow/exports/export-scripts/references/code-scan-recommendations.md +83 -0
  123. package/skills/agent-workflow/exports/export-scripts/references/deprecation-plan.md +80 -0
  124. package/skills/agent-workflow/exports/export-scripts/references/lexico-tecnico.md +80 -0
  125. package/skills/agent-workflow/exports/export-scripts/references/manifest-template.md +253 -0
  126. package/skills/agent-workflow/exports/export-scripts/references/readme-template.md +79 -0
  127. package/skills/agent-workflow/exports/export-scripts/references/theme-handling.md +168 -0
  128. package/skills/agent-workflow/exports/export-scripts/references/validations.md +242 -0
  129. package/skills/agent-workflow/exports/export-tech-manuals/SKILL.md +214 -0
  130. package/skills/agent-workflow/exports/export-tech-manuals/references/lexico-tecnico.md +97 -0
  131. package/skills/agent-workflow/exports/export-tech-manuals/references/template-index.md +123 -0
  132. package/skills/agent-workflow/exports/export-tech-manuals/references/template-manual.md +143 -0
  133. package/skills/agent-workflow/exports/export-tech-manuals/references/validations.md +211 -0
  134. package/skills/agent-workflow/exports/export-tech-note/SKILL.md +31 -0
  135. package/skills/agent-workflow/hooks/README.md +15 -0
  136. package/skills/agent-workflow/hooks/hooks.template.json +90 -0
  137. package/skills/agent-workflow/references/README.md +12 -0
  138. package/skills/agent-workflow/references/legacy-anchors.md +50 -0
  139. package/skills/agent-workflow/references/profile-parametrization.md +88 -0
  140. package/skills/agent-workflow/specialties/README.md +14 -0
  141. package/skills/agent-workflow/specialties/analyze-conclude/SKILL.md +175 -0
  142. package/skills/agent-workflow/specialties/analyze-conclude/references/incident-classification.md +61 -0
  143. package/skills/agent-workflow/specialties/analyze-investigate/SKILL.md +148 -0
  144. package/skills/agent-workflow/specialties/analyze-investigate/SKILL.md.tmp +0 -0
  145. package/skills/agent-workflow/specialties/analyze-investigate/references/cost-guard.md +85 -0
  146. package/skills/agent-workflow/specialties/analyze-synthesize/SKILL.md +127 -0
  147. package/skills/agent-workflow/specialties/design-brief/SKILL.md +90 -0
  148. package/skills/agent-workflow/specialties/design-deliver/SKILL.md +121 -0
  149. package/skills/agent-workflow/specialties/design-develop/SKILL.md +115 -0
  150. package/skills/agent-workflow/specialties/design-discover/SKILL.md +103 -0
  151. package/skills/agent-workflow/standards/README.md +12 -0
  152. package/skills/agent-workflow/standards/coding-standards/SKILL.md +102 -0
  153. package/skills/agent-workflow/standards/coding-standards/SKILL.md.tmp +0 -0
  154. package/skills/agent-workflow/standards/coding-standards/references/angular-typescript.md +266 -0
  155. package/skills/agent-workflow/standards/coding-standards/references/database-conventions.md +170 -0
  156. package/skills/agent-workflow/standards/coding-standards/references/fe-be-integration.md +300 -0
  157. package/skills/agent-workflow/standards/coding-standards/references/frontend-structure.md +182 -0
  158. package/skills/agent-workflow/standards/coding-standards/references/java-spring.md +244 -0
  159. package/skills/agent-workflow/standards/coding-standards/references/project-structure.md +197 -0
  160. package/skills/agent-workflow/standards/frontend-design/SKILL.md +62 -0
  161. package/skills/agent-workflow/standards/frontend-design/references/feedback-toasts-patterns.md +249 -0
  162. package/skills/agent-workflow/standards/frontend-design/references/form-patterns.md +278 -0
  163. package/skills/agent-workflow/standards/frontend-design/references/list-patterns.md +256 -0
  164. package/skills/agent-workflow/standards/frontend-design/references/modal-patterns.md +220 -0
  165. package/skills/agent-workflow/standards/frontend-design/references/navigation-patterns.md +224 -0
  166. package/skills/agent-workflow/standards/redaccion-simple/SKILL.md +128 -0
  167. package/skills/agent-workflow/standards/sql-rollback-generator/SKILL.md +197 -0
  168. package/skills/agent-workflow/standards/sql-rollback-generator/references/irreversible-checklist.md +161 -0
  169. package/skills/agent-workflow/standards/sql-rollback-generator/references/release-rollback.md +131 -0
  170. package/skills/agent-workflow/standards/sql-rollback-generator/references/rollback-patterns.md +255 -0
  171. package/skills/agent-workflow/standards/sql-script-organizer/SKILL.md +244 -0
  172. package/skills/agent-workflow/standards/sql-script-organizer/references/bundle-readme-template.md +82 -0
  173. package/skills/agent-workflow/standards/sql-script-organizer/references/categorization-rules.md +122 -0
  174. package/skills/agent-workflow/standards/sql-script-organizer/references/consolidation-cross-session.md +125 -0
  175. package/skills/agent-workflow/standards/sql-script-organizer/references/scripts-sql-format.md +140 -0
  176. package/skills/agent-workflow/standards/testing-strategy/SKILL.md +113 -0
  177. package/skills/agent-workflow/standards/testing-strategy/references/test-levels.md +255 -0
  178. package/skills/agent-workflow/workflows/README.md +12 -0
  179. package/skills/agent-workflow/workflows/analyze-workflow/SKILL.md +107 -0
  180. package/skills/agent-workflow/workflows/design-workflow/SKILL.md +100 -0
  181. package/skills/agent-workflow/workflows/dev-workflow/SKILL.md +195 -0
@@ -1,12 +1,14 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Box, Text, useInput } from "ink";
3
3
  import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { selfInstallHooks } from "../../../application/self/install-hooks.js";
4
5
  import { selfInstallSkill } from "../../../application/self/install-skill.js";
5
6
  import { selfUninstallSkill } from "../../../application/self/uninstall-skill.js";
6
7
  import { SectionedMenu, } from "../components/sectioned-menu.js";
7
8
  import { Toast } from "../components/toast.js";
8
9
  import { useInputLock } from "../input-lock.js";
9
10
  import { colors, icons } from "../theme.js";
11
+ const HOOKS_SUPPORTED_TARGETS = new Set(["claude"]);
10
12
  const INSTALLED_TRAILING = {
11
13
  icon: icons.check,
12
14
  color: colors.success,
@@ -21,13 +23,25 @@ function buildActionMenuItems(skill) {
21
23
  const items = [
22
24
  {
23
25
  kind: "item",
24
- label: skill.installed ? "Reinstalar / actualizar" : "Instalar",
26
+ label: skill.installed ? "Reinstalar / actualizar skill" : "Instalar skill",
25
27
  value: "install",
26
28
  trailing: skill.installed ? INSTALLED_TRAILING : NOT_INSTALLED_TRAILING,
27
29
  },
28
30
  ];
29
31
  if (skill.installed) {
30
- items.push({ kind: "item", label: "Desinstalar", value: "uninstall" });
32
+ items.push({ kind: "item", label: "Desinstalar skill", value: "uninstall" });
33
+ }
34
+ if (skill.hooks_supported) {
35
+ items.push({
36
+ kind: "item",
37
+ label: skill.hooks_installed ? "Reinstalar hooks" : "Instalar hooks",
38
+ value: "install-hooks",
39
+ });
40
+ items.push({
41
+ kind: "item",
42
+ label: "Instalar hooks (sin limpiar caché)",
43
+ value: "install-hooks-keep-cache",
44
+ });
31
45
  }
32
46
  return items;
33
47
  }
@@ -53,23 +67,45 @@ export function SkillsTab({ ctx, isActive }) {
53
67
  }, [unlock]);
54
68
  const refresh = useCallback(async () => {
55
69
  const home = ctx.env.homeDir();
70
+ const settingsPath = `${home}/.claude/settings.json`;
71
+ let hooksInstalled = false;
72
+ if (await ctx.fs.exists(settingsPath)) {
73
+ try {
74
+ const parsed = JSON.parse(await ctx.fs.readText(settingsPath));
75
+ hooksInstalled =
76
+ typeof parsed === "object" &&
77
+ parsed !== null &&
78
+ "hooks" in parsed &&
79
+ typeof parsed.hooks === "object" &&
80
+ Object.keys(parsed.hooks).length > 0;
81
+ }
82
+ catch {
83
+ hooksInstalled = false;
84
+ }
85
+ }
56
86
  const next = [
57
87
  {
58
88
  id: "claude",
59
89
  label: "Claude Code",
60
90
  installed: await ctx.fs.exists(`${home}/.claude/skills/agent-workflow`),
91
+ hooks_installed: hooksInstalled,
92
+ hooks_supported: HOOKS_SUPPORTED_TARGETS.has("claude"),
61
93
  path: "~/.claude/skills/agent-workflow/",
62
94
  },
63
95
  {
64
96
  id: "codex",
65
97
  label: "Codex",
66
98
  installed: await ctx.fs.exists(`${home}/.codex/skills/agent-workflow`),
99
+ hooks_installed: false,
100
+ hooks_supported: HOOKS_SUPPORTED_TARGETS.has("codex"),
67
101
  path: "~/.codex/skills/agent-workflow/",
68
102
  },
69
103
  {
70
104
  id: "warp",
71
105
  label: "Warp Terminal",
72
106
  installed: await ctx.fs.exists(`${home}/.warp/skills/agent-workflow`),
107
+ hooks_installed: false,
108
+ hooks_supported: HOOKS_SUPPORTED_TARGETS.has("warp"),
73
109
  path: "~/.warp/skills/agent-workflow/",
74
110
  },
75
111
  ];
@@ -86,23 +122,9 @@ export function SkillsTab({ ctx, isActive }) {
86
122
  setBusy(label);
87
123
  setToast(null);
88
124
  try {
89
- const args = {
90
- rest: [action === "install" ? "install-skill" : "uninstall-skill"],
91
- plugin: {},
92
- flags: new Set(action === "install" ? ["--force"] : []),
93
- values: new Map([["target", target]]),
94
- valuesMulti: new Map(),
95
- };
96
- const result = action === "install"
97
- ? await selfInstallSkill(args, ctx)
98
- : await selfUninstallSkill(args, ctx);
125
+ const result = await dispatchAction(action, target, ctx);
99
126
  if (result.ok) {
100
- setToast({
101
- tone: "success",
102
- message: action === "install"
103
- ? `Skill instalada/actualizada en ${target}.`
104
- : `Skill desinstalada de ${target}.`,
105
- });
127
+ setToast({ tone: "success", message: buildSuccessMessage(action, target) });
106
128
  }
107
129
  else {
108
130
  setToast({ tone: "error", message: result.error?.message ?? "La acción falló." });
@@ -148,15 +170,69 @@ export function SkillsTab({ ctx, isActive }) {
148
170
  return;
149
171
  const { id, label } = mode.target;
150
172
  setMode({ kind: "idle" });
151
- const busyLabel = action === "install" ? `instalando en ${label}…` : `desinstalando de ${label}…`;
173
+ const busyLabel = buildBusyLabel(action, label);
152
174
  void runAction(action, id, busyLabel);
153
175
  }, [mode, runAction]);
154
176
  if (mode.kind === "action-menu") {
155
177
  return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: colors.fg, bold: true, children: ["Skill ", ctx.runtime.binName] }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.fgSubtle, children: [icons.bullet, " acciones para", " ", _jsx(Text, { color: colors.fg, bold: true, children: mode.target.label })] }) }), _jsx(Box, { marginTop: 1, children: _jsx(SectionedMenu, { items: buildActionMenuItems(mode.target), onSelect: handleActionSelect, isActive: isActive }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.fgMoreSubtle, children: "Esc para cerrar sin aplicar." }) })] }));
156
178
  }
157
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: colors.fg, bold: true, children: ["Skill ", ctx.runtime.binName] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: skills.map((s, i) => {
158
- const focused = isActive && i === cursor;
159
- return (_jsxs(Box, { children: [_jsxs(Text, { color: focused ? colors.primary : colors.fgMoreSubtle, bold: focused, children: [focused ? icons.focusBullet : " ", " "] }), _jsxs(Text, { color: s.installed ? colors.success : colors.fgMoreSubtle, bold: true, children: [s.installed ? icons.check : icons.cross, " "] }), _jsx(Text, { color: focused ? colors.fg : colors.fgSubtle, bold: focused, children: s.label }), _jsx(Text, { color: colors.fgMoreSubtle, children: " \u00B7 " }), _jsx(Text, { color: colors.fgSubtle, children: s.path })] }, s.id));
160
- }) }), busy ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.warning, children: [icons.spinner, " ", busy] }) })) : null, toast ? _jsx(Toast, { tone: toast.tone, message: toast.message }) : null] }));
179
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: colors.fg, bold: true, children: ["Skill ", ctx.runtime.binName] }), _jsx(Box, { marginTop: 1, flexDirection: "column", children: skills.map((s, i) => (_jsx(SkillRow, { skill: s, focused: isActive && i === cursor }, s.id))) }), busy ? (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.warning, children: [icons.spinner, " ", busy] }) })) : null, toast ? _jsx(Toast, { tone: toast.tone, message: toast.message }) : null] }));
180
+ }
181
+ function SkillRow({ skill: s, focused }) {
182
+ return (_jsxs(Box, { children: [_jsxs(Text, { color: focused ? colors.primary : colors.fgMoreSubtle, bold: focused, children: [focused ? icons.focusBullet : " ", " "] }), _jsxs(Text, { color: s.installed ? colors.success : colors.fgMoreSubtle, bold: true, children: [s.installed ? icons.check : icons.cross, " "] }), _jsx(Text, { color: focused ? colors.fg : colors.fgSubtle, bold: focused, children: s.label }), _jsx(Text, { color: colors.fgMoreSubtle, children: " \u00B7 " }), _jsx(Text, { color: colors.fgSubtle, children: s.path }), s.hooks_supported ? (_jsxs(_Fragment, { children: [_jsx(Text, { color: colors.fgMoreSubtle, children: " \u00B7 " }), _jsxs(Text, { color: s.hooks_installed ? colors.success : colors.fgMoreSubtle, children: ["hooks ", s.hooks_installed ? icons.check : icons.cross] })] })) : null] }));
183
+ }
184
+ function buildArgsFor(action, target) {
185
+ const flags = new Set();
186
+ const sub = action === "install"
187
+ ? "install-skill"
188
+ : action === "uninstall"
189
+ ? "uninstall-skill"
190
+ : "install-hooks";
191
+ if (action === "install")
192
+ flags.add("--force");
193
+ if (action === "install-hooks-keep-cache")
194
+ flags.add("--keep-cache");
195
+ return {
196
+ rest: [sub],
197
+ plugin: {},
198
+ flags,
199
+ values: new Map([["target", target]]),
200
+ valuesMulti: new Map(),
201
+ };
202
+ }
203
+ async function dispatchAction(action, target, ctx) {
204
+ const args = buildArgsFor(action, target);
205
+ switch (action) {
206
+ case "install":
207
+ return selfInstallSkill(args, ctx);
208
+ case "uninstall":
209
+ return selfUninstallSkill(args, ctx);
210
+ case "install-hooks":
211
+ case "install-hooks-keep-cache":
212
+ return selfInstallHooks(args, ctx);
213
+ }
214
+ }
215
+ function buildBusyLabel(action, label) {
216
+ switch (action) {
217
+ case "install":
218
+ return `instalando skill en ${label}…`;
219
+ case "uninstall":
220
+ return `desinstalando skill de ${label}…`;
221
+ case "install-hooks":
222
+ return `instalando hooks en ${label}…`;
223
+ case "install-hooks-keep-cache":
224
+ return `instalando hooks en ${label} (sin limpiar caché)…`;
225
+ }
226
+ }
227
+ function buildSuccessMessage(action, target) {
228
+ switch (action) {
229
+ case "install":
230
+ return `Skill instalada/actualizada en ${target}.`;
231
+ case "uninstall":
232
+ return `Skill desinstalada de ${target}.`;
233
+ case "install-hooks":
234
+ case "install-hooks-keep-cache":
235
+ return `Hooks instalados en ${target}.`;
236
+ }
161
237
  }
162
238
  //# sourceMappingURL=skills-tab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills-tab.js","sourceRoot":"","sources":["../../../../src/cli/tui/tabs/skills-tab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsB,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAGlF,OAAO,EAGL,aAAa,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,EAAkB,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAkB,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAkB5D,MAAM,kBAAkB,GAAqB;IAC3C,IAAI,EAAE,KAAK,CAAC,KAAK;IACjB,KAAK,EAAE,MAAM,CAAC,OAAoB;IAClC,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF,MAAM,sBAAsB,GAAqB;IAC/C,IAAI,EAAE,KAAK,CAAC,KAAK;IACjB,KAAK,EAAE,MAAM,CAAC,YAAyB;IACvC,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,SAAS,oBAAoB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GAAG,CAAC;QACzC,KAAK,WAAW;YACd,OAAO,0BAA0B,KAAK,GAAG,CAAC;QAC5C,KAAK,eAAe;YAClB,OAAO,uBAAuB,KAAK,GAAG,CAAC;QACzC,KAAK,0BAA0B;YAC7B,OAAO,uBAAuB,KAAK,uBAAuB,CAAC;IAC/D,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAmB,EAAE,MAAqB;IACrE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,kCAAkC,MAAM,GAAG,CAAC;QACrD,KAAK,WAAW;YACd,OAAO,yBAAyB,MAAM,GAAG,CAAC;QAC5C,KAAK,eAAe,CAAC;QACrB,KAAK,0BAA0B;YAC7B,OAAO,uBAAuB,MAAM,GAAG,CAAC;IAC5C,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tacuchi/agent-workflow-cli",
3
- "version": "6.2.0",
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 can 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/` and `~/.codex/skills/agent-workflow/` (dual-target by default; opt-out with `--target claude|codex`). Override the source with `--from <local-path>` for skill development.",
3
+ "version": "7.0.0",
4
+ "description": "Agnostic runtime CLI for session-lifecycle workflows. Auto-detects namespace from any `.<ns>/sessions/` dir in CWD; falls back to 'agent-workflow'. Bundles the universal `agent-workflow` skill (35 skills + 17 commands + 7 hooks template) in the tarball — `self install-skill --target <host>` (obligatory) copies it to the host's skill directory. Multi-empresa parametrization via `profile.json` cascade (flag AW_PROFILE env → ~/.config/agent-workflow/profile.json workspace → defaults). Hooks for Claude Code via `self install-hooks --target claude` (JSON merge into ~/.claude/settings.json with backup).",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "agent-workflow": "./dist/cli/main.js",
@@ -0,0 +1,24 @@
1
+ # commands/
2
+
3
+ Slash commands `/agent-workflow:*` registrables por el host (Claude Code, Codex, Warp, OZ).
4
+
5
+ Contenido esperado (T2 PR2):
6
+
7
+ - `session.md` — entry point unificado: create / resume / close / list.
8
+ - `resume.md` — atajo a session resume.
9
+ - `export-plan.md` … `export-diagrams.md` — 7 comandos export-*.
10
+ - `rules.md` — carga doctrine/* on-demand.
11
+ - `migrate.md` — migración inter-empresa via `profile.migrate_legacy_rules[]`.
12
+ - `doctor.md` — diagnóstico end-to-end.
13
+ - `project-init.md` / `hub-init.md` — inicializadores de workspace.
14
+
15
+ Naming final: `/agent-workflow:<comando>` (decidido en D1 session082). Los aliases legacy de empresas existentes (e.g., `/qtc:*` en el caso de QTC) viven en el plugin hijo de la empresa correspondiente bajo `legacy-aliases/` por 2 sprints después del cutover (T5 del plan migración).
16
+
17
+ Estado post-T2 (PR2): 17 commands migrados con prefijo `agent-workflow-` y todas las refs `/qtc:` reescritas a `/agent-workflow:`. Lista actual:
18
+
19
+ - `agent-workflow-session.md`, `agent-workflow-compact.md`, `agent-workflow-resume.md`
20
+ - `agent-workflow-export-plan.md`, `agent-workflow-export-scripts.md`, `agent-workflow-export-conclusions.md`
21
+ - `agent-workflow-export-report.md`, `agent-workflow-export-arq.md`, `agent-workflow-export-tech-manuals.md`
22
+ - `agent-workflow-export-qa-note.md`, `agent-workflow-export-requirement.md`, `agent-workflow-export-tech-note.md`
23
+ - `agent-workflow-project-init.md`, `agent-workflow-hub-init.md`, `agent-workflow-doctor.md`
24
+ - `agent-workflow-migrate.md`, `agent-workflow-rules.md`
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Persiste estado de la sesión activa en CHECKPOINT.md y dispara /compact host. Combina auto-extracción + síntesis del AI para preservar contexto antes de liberar tokens.
3
+ argument-hint: (sin args)
4
+ allowed-tools:
5
+ [
6
+ "Bash",
7
+ "Read",
8
+ "Write",
9
+ "Edit",
10
+ ]
11
+ ---
12
+
13
+ # Compact — agent-workflow
14
+
15
+ Invoca el skill `compact` (canónico de agent-workflow).
16
+
17
+ ## Acción
18
+
19
+ 1. Detectar sesión activa via `project-md-upsert --read`.
20
+ 2. Escribir draft auto-extraído con `checkpoint-write`.
21
+ 3. Completar placeholders sintéticos editando CHECKPOINT.md.
22
+ 4. Disparar `/compact` host (excepto si el trigger fue SessionEnd hook).
23
+
24
+ Ver `skills/compact/SKILL.md` para detalles.
@@ -0,0 +1,100 @@
1
+ ---
2
+ description: Health check de plugins agent-workflow-* (core/dev/design/analyze). Solo lectura. Default scope=all en hub mode; cwd en single-repo.
3
+ argument-hint: (opcional) --scope <core|dev|design|analyze|all> [--plugin-root PATH]
4
+ allowed-tools:
5
+ [
6
+ "Bash",
7
+ "Read",
8
+ ]
9
+ ---
10
+
11
+ # Doctor — agent-workflow-* Health Check (orchestrator desde core)
12
+
13
+ Diagnostica el estado de uno o varios plugins de la familia `agent-workflow-*`. El runtime CLI (`@tacuchi/agent-workflow-cli`) corre los checks por plugin; este comando los orquesta.
14
+
15
+ ## Argumentos
16
+
17
+ - `--scope <alias|all>` (default: `all` en hub mode; `cwd` en single-repo) — qué plugin chequear.
18
+ - `core` → `core-workflow-plugin`.
19
+ - `dev` → `developer-workflow-plugin`.
20
+ - `design` → `design-workflow-plugin`.
21
+ - `analyze` → `analyze-workflow-plugin`.
22
+ - `all` → los 4 plugins de la familia (resueltos desde `agent-workflow sources`).
23
+ - `--plugin-root PATH` (opcional, sin `--scope`) — checkear el plugin en `PATH` directamente. Útil para single-repo.
24
+
25
+ Default: si `agent-workflow workspace-mode` retorna `hub` → `--scope all`. Sino → `--scope cwd` (alias del plugin del cwd).
26
+
27
+ ## Qué verifica (por plugin, vía `agent-workflow plugin-doctor --plugin-root <path>`)
28
+
29
+ 1. **CLI presente**: `agent-workflow --version` responde correctamente.
30
+ 2. **Manifests**: `.claude-plugin/plugin.json` y `.codex-plugin/plugin.json` existen y la versión coincide entre ambos.
31
+ 3. **Hooks**: `hooks/hooks.json` y `codex-hooks/hooks.json` parsean como JSON válido y los `command` apuntan al CLI (`agent-workflow ...`) — no a scripts Python locales.
32
+ 4. **Skills**: el directorio `skills/` existe; cada subdir tiene un `SKILL.md` con frontmatter completo (`name`, `description`, `version` semver) y `name` coincide con directorio.
33
+ 5. **MCP config** (si aplica): `.mcp.json` válido y env vars del DSN seteadas (qtc-dev only).
34
+ 6. **runtime.json instalado** (agent-workflow only): `~/.workflow/agent-workflow/runtime.json` existe y matchea `config/agent-workflow-runtime.json`.
35
+
36
+ ## Qué NO verifica (post-v6.3)
37
+
38
+ - Versiones del CLI vs plugin: el CLI se actualiza independiente.
39
+ - Existencia de scripts Python o `qtc_core/`: la familia migró a single-path npm en session032.
40
+
41
+ ## Ejecución por scope
42
+
43
+ ### `--scope all` (hub mode)
44
+
45
+ 1. `agent-workflow sources` → leer `sources[]`.
46
+ 2. Filtrar por alias que termine en `-workflow-plugin` (los 4 plugins de la familia).
47
+ 3. Por cada uno: `agent-workflow plugin-doctor --plugin-root <path>`. Capturar `status`, `plugin_version`, `manifests`, `errors`/`warnings` (si los expone).
48
+ 4. Agregar resultados en una tabla compacta:
49
+
50
+ ```
51
+ plugin version status findings
52
+ ────────────────────────── ──────── ────── ────────
53
+ core-workflow-plugin 3.29.0 ok —
54
+ developer-workflow-plugin 2.7.0 ok —
55
+ design-workflow-plugin 1.4.0 ok —
56
+ analyze-workflow-plugin 1.5.0 warn SKILL.md sin version
57
+ ```
58
+
59
+ 5. Resumen final: `<N>/4 plugins ok` o lista de los con findings.
60
+
61
+ **Si `agent-workflow` aparece en sources** (post-Fase B de la Propuesta 002): incluirlo también, mapping `qtc` → `agent-workflow`. Hasta que tenga manifest, el plugin-doctor reportará error informativo y queda flaggeado en la tabla.
62
+
63
+ ### `--scope <alias>`
64
+
65
+ 1. Resolver alias → path:
66
+ - Si hub mode: leer `agent-workflow sources` y matchear el alias correspondiente al `<alias>-workflow-plugin` (excepto `dev` → `developer-workflow-plugin`).
67
+ - Si single-repo: error con mensaje claro ("scope `<alias>` requiere hub mode; usá `--plugin-root PATH` o cambia al cwd del plugin").
68
+ 2. `agent-workflow plugin-doctor --plugin-root <path>`.
69
+ 3. Mostrar resultado completo (todos los campos del JSON de plugin-doctor).
70
+
71
+ ### Sin `--scope`, sin `--plugin-root` (default)
72
+
73
+ 1. `agent-workflow workspace-mode` → si `hub` → comportarse como `--scope all`.
74
+ 2. Sino → comportarse como `--plugin-root <cwd>` (single-repo, plugin actual).
75
+
76
+ ### `--plugin-root PATH` (sin `--scope`)
77
+
78
+ 1. `agent-workflow plugin-doctor --plugin-root <PATH>`.
79
+ 2. Mostrar resultado completo.
80
+
81
+ ## Interpretación
82
+
83
+ 1. **Resumen por plugin** según `status`:
84
+ - `ok` → "saludable" + versión del manifest.
85
+ - `warn` → resumen de findings (ej. SKILL.md sin frontmatter).
86
+ - `error` → resumen de findings críticos (ej. CLI no encontrado, manifest corrupto).
87
+ 2. **Resumen global** (scope=all):
88
+ - "Familia agent-workflow-* saludable" si todos `ok`.
89
+ - "<N> plugin(s) con findings: <lista>" si alguno warn/error.
90
+
91
+ ## Accionables típicos
92
+
93
+ - `agent-workflow CLI not found in PATH` → `npm install -g @tacuchi/agent-workflow-cli`.
94
+ - `manifest version mismatch claude vs codex` → editar el plugin.json y bump coordinado.
95
+ - `runtime.json missing` (agent-workflow) → reload Claude Code/Codex (SessionStart hook lo escribe).
96
+ - `<plugin> sin manifest` (post-Fase A pre-B en `agent-workflow`) → esperar Fase B (migración de skeletons) antes de incluir en checks.
97
+
98
+ ## Plan mode
99
+
100
+ Read-only. En plan mode el comando solo describe los checks que correría sin invocar `agent-workflow plugin-doctor` ni `agent-workflow sources`.
@@ -0,0 +1,77 @@
1
+ ---
2
+ description: Genera documentación técnica de arquitectura (`.md` con diagramas C4 embebidos) consolidando sesiones del workspace + `docs/` (arq, especificaciones, decisiones): contexto, contenedores, componentes, integraciones, modelo de datos (si MCP), decisiones arquitectónicas y riesgos. Structurizr default; Mermaid y PlantUML opt-in. Read-only.
3
+ argument-hint: (opcional) --since sessionNNN | --source <alias> | --diagrams mermaid|structurizr|plantuml | --scope c4|integraciones|datos|decisiones|riesgos|todo | --dry-run
4
+ allowed-tools:
5
+ [
6
+ "Read",
7
+ "Write",
8
+ "Bash",
9
+ "Grep",
10
+ "Glob",
11
+ ]
12
+ ---
13
+
14
+ # Export Arq
15
+
16
+ Genera documentación técnica de arquitectura del workspace agregando fuentes declaradas + corpus de sesiones + MCP read-only cuando aplique. Delega al skill `export-arq` (`agent-workflow/skills/export-arq/SKILL.md`).
17
+
18
+ El skill **nunca** ejecuta commits, merges, push, SQL ni envía correos. Solo produce:
19
+
20
+ - `<docs>/arquitectura/NNN-export-arq-YYYY-MM-DD/arquitectura.md` — documento principal con Mermaid embebido.
21
+ - `<docs>/arquitectura/NNN-export-arq-YYYY-MM-DD/workspace.dsl` — opcional (`--diagrams structurizr`).
22
+ - `<docs>/arquitectura/NNN-export-arq-YYYY-MM-DD/arquitectura.puml` — opcional (`--diagrams plantuml`).
23
+ - `<docs>/arquitectura/NNN-export-arq-YYYY-MM-DD/README.md` — índice del dossier.
24
+
25
+ Donde `<docs>` es:
26
+ - `Path.cwd() / docs` por default (project mode o hub workspace base).
27
+ - `<source.path>/docs` si se pasa `--source <alias>` en hub mode.
28
+
29
+ Segundo comando de la familia `/agent-workflow:export-*` definida en `docs/conclusiones/007-export-commands-family.md`.
30
+
31
+ ## Excepción session-aware
32
+
33
+ Esta skill (junto con `release`, `release-scripts`, `export-func`) requiere conocimiento del lifecycle pero las consume solo via CLI `agent-workflow`. No lee paths hardcodeados.
34
+
35
+ **Audiencia**: devs/arquitectos. Sin léxico ejecutivo (a diferencia de `/agent-workflow:export-func`). Términos técnicos del dominio (propuesta, MCP, C4, hook, skill) están autorizados.
36
+
37
+ **Argumentos:** $ARGUMENTS
38
+
39
+ ### Argumentos soportados
40
+
41
+ - `--since sessionNNN` — filtra **sólo** la sección "Decisiones arquitectónicas". El snapshot del sistema vigente no se filtra.
42
+ - `--source <alias>` — en hub mode, limita el output a una sola fuente y sus integraciones internas.
43
+ - `--diagrams mermaid|structurizr|plantuml` — motor del render de C4 (default: `mermaid`).
44
+ - `--scope c4|integraciones|datos|decisiones|riesgos|todo` — qué secciones aparecen (default: `todo`).
45
+ - `--dry-run` — no escribir; reportar lo que se generaría.
46
+
47
+ Matriz completa y reglas en `skills/export-arq/SKILL.md` §"Entrada".
48
+
49
+ ## Flujo
50
+
51
+ Antes de generar, el skill llama al CLI `agent-workflow`:
52
+
53
+ ```
54
+ agent-workflow project-md-upsert --read # workspace_mode, fuentes, integraciones declaradas
55
+ agent-workflow history-data # sesiones cerradas
56
+ agent-workflow decisiones-list --code <CODE> # DEC-NNN cronológicas
57
+ agent-workflow next-number docs/arquitectura # numeración determinística
58
+ ```
59
+
60
+ Si `--scope` incluye `datos` y MCP `<mcp-cert>`/`<mcp-prod>` está configurado: consulta esquemas BD (`SELECT count(*)`, `\d`, `EXPLAIN`) respetando cost guard. Si MCP no disponible: sección "Modelo de datos" aparece con nota inline explícita (Patrón B de V4.a).
61
+
62
+ Luego renderiza `references/template-c4.md` aplicando léxico técnico mínimo + Mermaid C4 embebido (o Structurizr/PlantUML opt-in). Valida V1-V6 (`references/validations.md`) antes de escribir.
63
+
64
+ ## Plan mode
65
+
66
+ Reglas generales en `skills/session/references/sandbox-readonly-rules.md`. Describir en el plan file: variante de diagrama + scope resuelto, fuentes a inspeccionar + integraciones declaradas, MCP queries propuestas (si `--scope datos`), hallazgos de V4 (Modelo de datos presente/omitido por MCP, Decisiones presente/omitido por count), warnings esperados (V5/V6).
67
+
68
+ ## Recursos
69
+
70
+ - `skills/export-arq/SKILL.md` v1.0.0 — orquestador del comando.
71
+ - `skills/export-arq/references/template-c4.md` — plantilla canónica (Mermaid).
72
+ - `skills/export-arq/references/template-structurizr.dsl` — variante DSL opt-in.
73
+ - `skills/export-arq/references/template-plantuml.puml` — variante PUML opt-in.
74
+ - `skills/export-arq/references/lexico-tecnico.md` — léxico técnico mínimo + lista vetada V2.
75
+ - `skills/export-arq/references/validations.md` — V1-V6 detalladas (3 patrones de V4.a).
76
+ - `docs/conclusiones/007-export-commands-family.md` — Propuesta original de la familia `/agent-workflow:export-*`.
77
+ - `agent-workflow/skills/export-func/SKILL.md` — hermano (informe ejecutivo).
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: Consolida N sesiones del workspace (con CONCLUSIONS.md presente) + `docs/conclusiones/` ya graduadas en un documento curado bajo `docs/conclusiones/NNN-export-conclusions-YYYY-MM-DD.md`. Sintetiza Resumen ejecutivo + C-items por sesión + R-items deduplicados cross-session + Roadmap derivado opcional. Aplica dedup por slug + cross-slug similarity opcional + conflict resolution. Complementa graduate --kind conclusion (single-session). Read-only. Séptimo comando de la familia /agent-workflow:export-*.
3
+ argument-hint: (opcional) --sessions NNN[,NNN] | --since sessionNNN | --source <alias> | --slug <kebab> | --dry-run
4
+ allowed-tools:
5
+ [
6
+ "Read",
7
+ "Write",
8
+ "Bash",
9
+ "Grep",
10
+ "Glob",
11
+ ]
12
+ ---
13
+
14
+ # Export Conclusions
15
+
16
+ Consolida N sesiones que tengan `CONCLUSIONS.md` presente en un documento curado bajo `docs/conclusiones/NNN-export-conclusions-YYYY-MM-DD.md`. Delega al skill `export-conclusions` (`agent-workflow/skills/export-conclusions/SKILL.md`).
17
+
18
+ El skill **nunca** ejecuta commits, merges, push, SQL ni envía correos. Solo produce:
19
+
20
+ - `<docs>/conclusiones/NNN-<slug>-YYYY-MM-DD.md` — documento único MD con Resumen ejecutivo + Sesiones consolidadas + C-items por sesión + R-items deduplicados + Roadmap derivado opcional + Refs.
21
+
22
+ Donde `<docs>` es:
23
+ - `Path.cwd() / docs` por default (project mode o hub workspace base).
24
+ - `<source.path>/docs` si se pasa `--source <alias>` en hub mode.
25
+
26
+ Séptimo comando de la familia `/agent-workflow:export-*` definida en `docs/conclusiones/008-roadmap-export-plan-lifecycle.md` (F-B). Bundle plugin v2.10.0 junto con `/agent-workflow:export-plan` (F-A).
27
+
28
+ ## Excepción session-aware
29
+
30
+ Este skill requiere conocimiento del lifecycle pero lo consume sólo vía CLI `agent-workflow`. No lee paths hardcodeados.
31
+
32
+ **Audiencia**: PMs / leads / arquitectos. Términos del dominio (`CONCLUSIONS`, `R-items`, `roadmap`, `dedup`, `NNN`, `hub`) autorizados.
33
+
34
+ **Argumentos:** $ARGUMENTS
35
+
36
+ ### Argumentos soportados
37
+
38
+ - `--sessions NNN[,NNN]` — filtro discreto por código. Precede a `--since`.
39
+ - `--since sessionNNN` — incluye sólo sesiones posteriores a NNN (inclusive). Ignorado si `--sessions` presente.
40
+ - `--source <alias>` — en hub mode, limita a una fuente específica.
41
+ - `--slug <kebab>` — override del slug del filename (default: `export-conclusions`).
42
+ - `--dry-run` — reporte propositivo sin escribir.
43
+
44
+ Sin args: incluye todas las sesiones del workspace con `CONCLUSIONS.md` presente.
45
+
46
+ Ejemplo: `/agent-workflow:export-conclusions --sessions 049,051,062 --slug runtime-evolution-roadmap`.
47
+
48
+ ## Flujo
49
+
50
+ Antes de generar, el skill llama al CLI `agent-workflow`:
51
+
52
+ ```
53
+ agent-workflow release-data --include-graduated [--sessions NNN[,NNN]] [--since sessionNNN] [--source <alias>]
54
+ agent-workflow session-artifacts --code <CODE> # verificar CONCLUSIONS.md presence
55
+ agent-workflow next-number docs/conclusiones # numeración (coexiste con graduate)
56
+ ```
57
+
58
+ Filtra el corpus descartando sesiones sin `CONCLUSIONS.md`. Si el filtro queda vacío → abortar con mensaje claro.
59
+
60
+ Luego aplica el algoritmo de dedup (`references/dedup-rules.md`) sobre R-items y sintetiza Roadmap derivado si hay ≥3 R-items consolidados.
61
+
62
+ ## Plan mode
63
+
64
+ Reglas generales en `skills/session/references/sandbox-readonly-rules.md`. Describir en el plan file: NNN resuelto + sesiones del corpus (post-filtro) + R-items consolidados esperados + conflicts detectados + estructura final del MD.
65
+
66
+ ## Relación con `graduate --kind conclusion`
67
+
68
+ `graduate --kind conclusion --session NNN` sigue siendo el path canónico para **promover una sesión single al canon** (copia `CONCLUSIONS.md` tal cual a `docs/conclusiones/NNN-<slug>.md`).
69
+
70
+ `export-conclusions` es **complementario**: aplica cuando hay valor en consolidación cross-session (dedup + roadmap + trazabilidad multi-origen). Coexisten bajo el mismo counter `next-number docs/conclusiones`.
71
+
72
+ ## Recursos
73
+
74
+ - `skills/export-conclusions/SKILL.md` v1.0.0 — orquestador del comando.
75
+ - `skills/export-conclusions/references/template-conclusions.md` — plantilla canónica + ejemplo single-session.
76
+ - `skills/export-conclusions/references/dedup-rules.md` — algoritmo de dedup R-NNN + casos edge.
77
+ - `docs/conclusiones/008-roadmap-export-plan-lifecycle.md` — diseño F-B.
78
+ - Siblings: `commands/export-plan.md` (F-A), `commands/export-scripts.md`, `commands/export-arq.md`, `commands/export-tech-manuals.md`, `commands/export-report.md`.
@@ -0,0 +1,74 @@
1
+ ---
2
+ description: Consolida N sesiones del workspace + `docs/planes/` ya graduados + `docs/decisiones/` / `docs/conclusiones/` para referencias en un plan ejecutable bajo `docs/planes/NNN-export-plan-YYYY-MM-DD.md`. Lee OBJECTIVE/TASKS/CONCLUSIONS de las sesiones fuente y deriva Resumen + Fases + Tasks (con dependencias) + Riesgos + Refs. Frontmatter YAML con state (draft/active/done/archived). Read-only. Sexto comando de la familia /agent-workflow:export-*.
3
+ argument-hint: (opcional) --sessions NNN[,NNN] | --since sessionNNN | --source <alias> | --slug <kebab> | --dry-run
4
+ allowed-tools:
5
+ [
6
+ "Read",
7
+ "Write",
8
+ "Bash",
9
+ "Grep",
10
+ "Glob",
11
+ ]
12
+ ---
13
+
14
+ # Export Plan
15
+
16
+ Consolida N sesiones (cerradas o activas con artefactos completos) en un plan ejecutable bajo `docs/planes/NNN-export-plan-YYYY-MM-DD.md`. Delega al skill `export-plan` (`agent-workflow/skills/export-plan/SKILL.md`).
17
+
18
+ El skill **nunca** ejecuta commits, merges, push, SQL ni envía correos. Solo produce:
19
+
20
+ - `<docs>/planes/NNN-<slug>-YYYY-MM-DD.md` — plan único MD con frontmatter YAML (`state: draft`).
21
+
22
+ Donde `<docs>` es:
23
+ - `Path.cwd() / docs` por default (project mode o hub workspace base).
24
+ - `<source.path>/docs` si se pasa `--source <alias>` en hub mode.
25
+
26
+ Sexto comando de la familia `/agent-workflow:export-*` definida en `docs/conclusiones/008-roadmap-export-plan-lifecycle.md` (F-A). Bundle plugin v2.10.0.
27
+
28
+ ## Excepción session-aware
29
+
30
+ Este skill (junto con `release`, `release-scripts`, `export-scripts`, `export-report`, `export-arq`, `export-tech-manuals`) requiere conocimiento del lifecycle pero lo consume sólo vía CLI `agent-workflow`. No lee paths hardcodeados.
31
+
32
+ **Audiencia**: devs / PMs / leads. Términos técnicos del dominio (`OBJECTIVE`, `TASKS`, `flow`, `phase`, `NNN`, `hub`) autorizados.
33
+
34
+ **Argumentos:** $ARGUMENTS
35
+
36
+ ### Argumentos soportados
37
+
38
+ - `--sessions NNN[,NNN]` — filtro discreto por código. Precede a `--since`.
39
+ - `--since sessionNNN` — incluye sólo sesiones posteriores a NNN (inclusive). Ignorado si `--sessions` presente.
40
+ - `--source <alias>` — en hub mode, limita a una fuente específica.
41
+ - `--slug <kebab>` — override del slug del filename (default: `export-plan`).
42
+ - `--dry-run` — reporte propositivo sin escribir el plan.
43
+
44
+ Sin args: incluye todas las sesiones cerradas + activas con artefactos completos.
45
+
46
+ Ejemplo: `/agent-workflow:export-plan --sessions 055,061 --slug runtime-evolution`.
47
+
48
+ ## Flujo
49
+
50
+ Antes de generar, el skill llama al CLI `agent-workflow`:
51
+
52
+ ```
53
+ agent-workflow release-data --include-graduated [--sessions NNN[,NNN]] [--since sessionNNN] [--source <alias>]
54
+ agent-workflow session-artifacts --code <CODE> # lazy read por sesión
55
+ agent-workflow next-number docs/planes # numeración determinística
56
+ ```
57
+
58
+ Luego sintetiza Resumen + Fases + Tasks + Dependencias + Riesgos + Refs siguiendo la plantilla `references/template-plan.md`. Estado inicial: `draft`. Transiciones futuras: ver `references/state-transitions.md`.
59
+
60
+ ## Plan mode
61
+
62
+ Reglas generales en `skills/session/references/sandbox-readonly-rules.md`. Describir en el plan file: NNN resuelto + sesiones incluidas + sección por sección del plan generado + frontmatter YAML preview.
63
+
64
+ ## Relación con `/agent-workflow:session --from-plan`
65
+
66
+ Cuando F-E.3 esté operativo (Sprint 4 del roadmap), `agent-workflow session-create --from-plan <NNN>` consumirá el plan generado por este comando y transicionará `state: draft → active`. Hoy: F-E.3 no está implementado todavía; el plan queda en `draft` hasta que el usuario inicie la sesión manualmente.
67
+
68
+ ## Recursos
69
+
70
+ - `skills/export-plan/SKILL.md` v1.0.0 — orquestador del comando.
71
+ - `skills/export-plan/references/template-plan.md` — plantilla canónica del plan.
72
+ - `skills/export-plan/references/state-transitions.md` — árbol de decisión G3 + spec `AskUserQuestion plan-state`.
73
+ - `docs/conclusiones/008-roadmap-export-plan-lifecycle.md` — diseño F-A.
74
+ - Siblings: `commands/export-scripts.md`, `commands/export-arq.md`, `commands/export-tech-manuals.md`, `commands/export-report.md`.