@relipa/ai-flow-kit 0.1.5-beta.1 → 0.1.6

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 (42) hide show
  1. package/bin/aiflow.js +34 -0
  2. package/custom/rules/ml-conventions.md +11 -8
  3. package/custom/rules/project-conventions.md +30 -14
  4. package/custom/skills/design-experiment/SKILL.md +2 -2
  5. package/custom/skills/evaluate-model/SKILL.md +2 -2
  6. package/custom/skills/explore-data/SKILL.md +1 -1
  7. package/custom/skills/figma-to-component/SKILL.md +222 -20
  8. package/custom/skills/frame-ml-problem/SKILL.md +1 -1
  9. package/custom/skills/gate-review/SKILL.md +1 -1
  10. package/custom/skills/generate-spec/SKILL.md +22 -3
  11. package/custom/skills/read-study-requirement/SKILL.md +74 -6
  12. package/custom/skills/review-plan/SKILL.md +26 -3
  13. package/custom/templates/shared/coding-workflow.md +0 -0
  14. package/custom/templates/shared/create-spec-workflow.md +55 -0
  15. package/custom/templates/shared/create-testcase-workflow.md +55 -0
  16. package/custom/templates/shared/gate-workflow.md +131 -19
  17. package/custom/templates/shared/ml-gate-workflow.md +16 -9
  18. package/custom/templates/tools/claude.md +1 -1
  19. package/custom/templates/tools/copilot.md +1 -1
  20. package/custom/templates/tools/cursor.md +1 -1
  21. package/custom/templates/tools/gemini.md +1 -1
  22. package/custom/templates/tools/generic.md +1 -1
  23. package/docs/common/AIFLOW.md +21 -11
  24. package/docs/common/CHANGELOG.md +43 -0
  25. package/docs/common/ai-integration.md +2 -2
  26. package/docs/common/cli-reference.md +3 -1
  27. package/docs/common/workflows/bug-fix.md +2 -2
  28. package/docs/common/workflows/feature.md +2 -2
  29. package/docs/common/workflows/figma.md +176 -105
  30. package/package.json +2 -2
  31. package/scripts/create-score-excel.js +135 -14
  32. package/scripts/detect.js +11 -0
  33. package/scripts/docs-branch.js +264 -0
  34. package/scripts/docs-repo.js +49 -0
  35. package/scripts/hooks/figma-rate-limit.js +83 -0
  36. package/scripts/hooks/session-start.js +49 -14
  37. package/scripts/init.js +33 -2
  38. package/scripts/link-resolver.js +0 -0
  39. package/scripts/prompt.js +56 -11
  40. package/scripts/task.js +39 -23
  41. package/scripts/update.js +4 -0
  42. package/scripts/use.js +6 -5
package/scripts/prompt.js CHANGED
@@ -25,7 +25,7 @@ AI must:
25
25
  1. Load ticket context + read source code related to the bug
26
26
  2. Trace data flow to form root cause hypothesis (\`superpowers:systematic-debugging\`)
27
27
  3. If unclear → ask ONE question at a time, wait for reply
28
- 4. Output \`plan/[ticket-id]/requirement.md\` with:
28
+ 4. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
29
29
  - Bug analysis (current vs expected behavior)
30
30
  - Root cause hypothesis with evidence from source code
31
31
  - Proposed fix approach (options if multiple)
@@ -52,7 +52,7 @@ Only runs after Gate 2 APPROVED.
52
52
  1. \`superpowers:verification-before-completion\` — all tests PASS (including old tests)
53
53
  2. \`impact-analysis\` skill — fix doesn't cause new bugs elsewhere
54
54
  3. Tick \`custom/rules/review-checklist.md\`
55
- 4. Create \`plan/[ticket-id]/summary.md\`
55
+ 4. Create \`AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md\`
56
56
  - Display: "GATE 4: type APPROVED or BUG: [description]"
57
57
  - Coding bug → fix → repeat Gate 4
58
58
  - Requirement bug → back to Gate 1
@@ -77,7 +77,7 @@ AI must:
77
77
  2. Investigate related files, data flow, existing patterns
78
78
  3. Propose 2-3 solution approaches using Q&A if the problem is complex
79
79
  4. If unclear → ask ONE question at a time, wait for reply
80
- 5. Output \`plan/[ticket-id]/requirement.md\` with:
80
+ 5. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
81
81
  - Requirements summary (AI's understanding in technical language)
82
82
  - Source code analysis (related files, data flow, patterns)
83
83
  - Proposed solution with options (recommended + alternatives)
@@ -104,7 +104,7 @@ Only runs after Gate 2 APPROVED.
104
104
  1. \`superpowers:verification-before-completion\` — all tests PASS
105
105
  2. \`impact-analysis\` skill — no regressions
106
106
  3. Tick \`custom/rules/review-checklist.md\`
107
- 4. Create \`plan/[ticket-id]/summary.md\`
107
+ 4. Create \`AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md\`
108
108
  - Display: "GATE 4: type APPROVED or BUG: [description]"
109
109
  - Coding bug → fix → repeat Gate 4
110
110
  - Requirement bug → back to Gate 1
@@ -129,7 +129,7 @@ AI must:
129
129
  2. **INVOKE:** \`superpowers:systematic-debugging\` — trace through all layers
130
130
  3. **INVOKE:** \`investigate-bug\` skill — trace data flow through all layers
131
131
  4. If unclear → ask ONE question at a time
132
- 5. Output \`plan/[ticket-id]/requirement.md\` with:
132
+ 5. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
133
133
  - Investigation scope and approach
134
134
  - Source code analysis (all related files traced)
135
135
  - Findings with evidence (log output, code references)
@@ -156,7 +156,7 @@ AI must:
156
156
  1. Load ticket context + read source code to understand current state
157
157
  2. **INVOKE:** \`impact-analysis\` skill — map ALL callers and dependants
158
158
  3. If unclear → ask ONE question at a time
159
- 4. Output \`plan/[ticket-id]/requirement.md\` with:
159
+ 4. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
160
160
  - Current state analysis (what exists, what's wrong)
161
161
  - Target state (what it should look like after refactor)
162
162
  - Proposed approach (step-by-step refactor strategy)
@@ -182,7 +182,7 @@ Only runs after Gate 2 APPROVED.
182
182
  1. \`superpowers:verification-before-completion\` — all tests PASS
183
183
  2. \`impact-analysis\` skill — verify no regressions
184
184
  3. Tick \`custom/rules/review-checklist.md\`
185
- 4. Create \`plan/[ticket-id]/summary.md\`
185
+ 4. Create \`AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md\`
186
186
  - Display: "GATE 4: type APPROVED or BUG: [description]"
187
187
 
188
188
  ### GATE 5 — Peer Review & Done
@@ -203,7 +203,7 @@ AI must:
203
203
  1. Load ticket context + read source code thoroughly
204
204
  2. Map all dependencies, callers, services, jobs, tests
205
205
  3. If unclear → ask ONE question at a time
206
- 4. Output \`plan/[ticket-id]/requirement.md\` with:
206
+ 4. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
207
207
  - Change description and scope
208
208
  - Dependency map (all callers, services, jobs, tests)
209
209
  - Impact level: 🟢 Low / 🟡 Medium / 🔴 High / 🔥 Critical
@@ -229,7 +229,7 @@ AI must:
229
229
  1. Load ticket context + read source code thoroughly
230
230
  2. Understand what needs to be tested (unit, integration, e2e)
231
231
  3. If unclear → ask ONE question at a time
232
- 4. Output \`plan/[ticket-id]/requirement.md\` with:
232
+ 4. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
233
233
  - Test scope and strategy
234
234
  - Test cases to cover (happy path + edge cases + failure cases)
235
235
  - Source code references
@@ -239,7 +239,7 @@ AI must:
239
239
  ### GATE 2 — Implementation Plan
240
240
  **INVOKE:** \`generate-spec\` skill, then \`superpowers:writing-plans\`
241
241
  - Create detailed TDD test implementation plan.
242
- - Output \`plan/[ticket-id]/plan.md\`.
242
+ - Output \`AK-Docs/04.Coding/02.Plans/[functionId]/[ticketId].md\`.
243
243
  - Display: "GATE 2 PAUSED: type APPROVED to start coding".
244
244
 
245
245
  ### GATE 3 — Write Tests (TDD)
@@ -265,7 +265,7 @@ AI must:
265
265
  1. Load ticket context + read source code
266
266
  2. Understand what needs to be documented and for whom
267
267
  3. If unclear → ask ONE question at a time
268
- 4. Output \`plan/[ticket-id]/requirement.md\` with:
268
+ 4. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
269
269
  - Documentation scope and target audience
270
270
  - Content outline (sections to cover)
271
271
  - Source code references
@@ -281,6 +281,51 @@ Write documentation based on approved outline.
281
281
  **INVOKE:** \`superpowers:verification-before-completion\`
282
282
  Verify docs match code. No outdated examples.
283
283
  Display: "GATE 3: Documentation complete. Type APPROVED."
284
+ `,
285
+ },
286
+ 'gen-doc': {
287
+ header: 'Generate Document',
288
+ instruction: 'Generate a document from source code / feature analysis as described below.',
289
+ skillWorkflow: `
290
+ ## STRICT GATE WORKFLOW — Generate Document (2-Gate)
291
+
292
+ > ⚡ gen-doc uses a **2-gate flow**: Gate 1 (Requirement) → APPROVED → Gate 2 (Generate + Auto Review).
293
+ > Gate 2 runs immediately after APPROVED — no plan.md, no TDD, no extra coding gates.
294
+
295
+ > gen-doc reuses the same \`AK-Docs/04.Coding/\` folders as the standard Dev workflow (see \`custom/rules/project-conventions.md\`) — only Gate 1–2, no separate section.
296
+
297
+ ### GATE 1 — AI Analyze & Plan Document
298
+ **INVOKE:** \`read-study-requirement\` skill
299
+ 1. Load ticket context + read source code / files to understand scope
300
+ 2. Confirm \`functionId\` (BẮT BUỘC — see "functionId & ticketId" in \`project-conventions.md\`; if it can't be derived for an ad-hoc task, ask directly) and ensure AK-Docs is on branch \`feature/[functionId]/[ticketId]\` (create via \`ak docs branch [functionId] [ticketId] --yes\` only after explicit user confirmation)
301
+ 3. Understand the document goal, target audience, and output format
302
+ 4. If unclear → ask ONE question at a time, wait for reply
303
+ 5. Output \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` with:
304
+ - Document scope and target audience
305
+ - Content outline (sections to cover)
306
+ - Source references (files, features, flows to analyze)
307
+ - Output format: Markdown or Excel (note template path if applicable)
308
+ - Effort estimate
309
+ 6. Display "GATE 1: Document plan ready" → wait for **APPROVED**
310
+
311
+ > **Telemetry:** Run \`ak gate 1 start --ticket [ticket-id]\` when starting.
312
+ > Run \`ak gate 1 approved --ticket [ticket-id]\` immediately when APPROVED is received.
313
+
314
+ ### GATE 2 — Generate Document + Auto Review (runs immediately after APPROVED)
315
+
316
+ **DO NOT create plan.md. DO NOT run TDD. Proceed directly to document generation.**
317
+
318
+ 1. Re-read \`AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md\` (the approved outline)
319
+ 2. Read source code, trace data flows, analyze features as needed
320
+ 3. Generate the output document:
321
+ - **Markdown:** Save to \`AK-Docs/04.Coding/02.Plans/[functionId]/[ticketId].md\` (or the custom path/format noted in the requirement doc — still write a short pointer + summary into this file)
322
+ 4. Self-review: verify content completeness against the approved requirement outline
323
+ 5. Create \`AK-Docs/04.Coding/02.Plans/[functionId]/[ticketId]-summary.md\` with a brief summary of what was generated
324
+ 6. Submit AK-Docs via Merge Request: show the commit/MR title+description, wait for explicit user confirmation, then run \`ak docs submit --title "..." --description "..." --yes\` — PM reviews & merges into \`main\` (never merge it yourself)
325
+ 7. Run: \`ak gate 2 approved --ticket [ticket-id]\` to close the task
326
+ 8. Display: \`GATE 2 DONE: Document generated at [path]\`
327
+
328
+ **Do NOT wait for extra approval before generating the document — only the branch/MR confirmations above gate on the user; run the gate 2 approved command immediately after.**
284
329
  `,
285
330
  },
286
331
  };
package/scripts/task.js CHANGED
@@ -2,12 +2,14 @@ const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
  const chalk = require('chalk');
4
4
  const { confirm } = require('@inquirer/prompts');
5
+ const { resolveDocsRepoPath } = require('./docs-repo');
5
6
 
6
7
  const PROJECT_DIR = process.cwd();
7
8
  const AIFLOW_DIR = path.join(PROJECT_DIR, '.aiflow');
8
9
  const CONTEXT_DIR = path.join(AIFLOW_DIR, 'context');
9
10
  const CURRENT_FILE = path.join(CONTEXT_DIR, 'current.json');
10
11
  const TASKS_DIR = path.join(AIFLOW_DIR, 'tasks');
12
+ const CODING_DIR = path.join(resolveDocsRepoPath(PROJECT_DIR, 'AK-Docs'), '04.Coding');
11
13
 
12
14
  // ──────────────────────────────────────────────────────────────
13
15
  // Entry point
@@ -216,7 +218,7 @@ async function resetTask(taskId) {
216
218
  console.log(chalk.gray(` Gate: ${taskState.currentGate} → 1 | Approvals cleared | Status: active`));
217
219
 
218
220
  const deletePlan = planFiles.length > 0 && await confirm({
219
- message: `Also delete ${planFiles.length} gate doc file(s) (04.Coding/ + legacy plan/) for ${taskId}?`,
221
+ message: `Also delete ${planFiles.length} gate doc file(s) (AK-Docs/04.Coding/ + legacy plan/) for ${taskId}?`,
220
222
  default: false,
221
223
  });
222
224
 
@@ -329,17 +331,22 @@ async function nextGate(taskId) {
329
331
  const nextGateNum = currentGate + 1;
330
332
 
331
333
  // Save context snapshot if current task is active
334
+ let taskType = null;
332
335
  if (await fs.pathExists(CURRENT_FILE)) {
333
336
  const ctx = await fs.readJson(CURRENT_FILE).catch(() => null);
334
337
  if (ctx && ctx.taskId === resolvedId) {
338
+ taskType = ctx.taskType || null;
335
339
  await fs.writeJson(path.join(taskDir, 'context.json'), ctx, { spaces: 2 });
336
340
  }
337
341
  }
338
342
 
343
+ const isGenDoc = taskType === 'gen-doc';
344
+ const maxGate = isGenDoc ? 2 : 5;
345
+
339
346
  const taskState = {
340
347
  ...existing,
341
348
  taskId: resolvedId,
342
- status: 'pending',
349
+ status: nextGateNum > maxGate ? 'done' : 'pending',
343
350
  updatedAt: now,
344
351
  pausedAt: now,
345
352
  currentGate: nextGateNum,
@@ -352,20 +359,26 @@ async function nextGate(taskId) {
352
359
 
353
360
  // Generate cumulative task-summary.md (task-internal state — lives in .aiflow/, not gate docs)
354
361
  const summaryPath = path.join(TASKS_DIR, resolvedId, 'task-summary.md');
355
- const summaryContent = await generateMarkdownSummary(taskState);
362
+ const summaryContent = await generateMarkdownSummary(taskState, taskType);
356
363
  await fs.writeFile(summaryPath, summaryContent, 'utf-8');
357
364
 
358
- const taskType = existing.taskType || 'feature';
359
365
  console.log(chalk.green(`✓ Gate ${currentGate} approved for ${resolvedId}.`));
360
366
  console.log(chalk.gray(` Summary saved to: .aiflow/tasks/${resolvedId}/task-summary.md`));
361
- const nextLabel = gateLabel(nextGateNum, taskType);
362
- console.log(chalk.white(`\n Next: Gate ${nextGateNum} ${nextLabel}`));
363
- console.log(chalk.cyan(`\n To continue in a fresh session (Recommended to avoid context pollution):`));
364
- console.log(chalk.gray(` 1. Open a NEW chatbox or terminal session.`));
365
- console.log(chalk.gray(` 2. Run: aiflow task resume ${resolvedId} (to load context).`));
366
- console.log(chalk.gray(` 3. Type "start" or "continue from the current plan".`));
367
- console.log(chalk.yellow(` (Note: Gate 3 progress is saved via [x] checkboxes in the Gate 2 plan doc (04.Coding/02.Plans/).`));
368
- console.log(chalk.yellow(` The AI will automatically resume the exact task you left off.)`));
367
+
368
+ if (isGenDoc && currentGate >= maxGate) {
369
+ console.log(chalk.green('\n Document workflow complete. Task is done.'));
370
+ } else {
371
+ const nextLabel = gateLabel(nextGateNum, taskType);
372
+ console.log(chalk.white(`\n Next: Gate ${nextGateNum} ${nextLabel}`));
373
+ console.log(chalk.cyan(`\n To continue in a fresh session (Recommended to avoid context pollution):`));
374
+ console.log(chalk.gray(` 1. Open a NEW chatbox or terminal session.`));
375
+ console.log(chalk.gray(` 2. Run: aiflow task resume ${resolvedId} (to load context).`));
376
+ console.log(chalk.gray(` 3. Type "start" or "continue from the current plan".`));
377
+ if (!isGenDoc) {
378
+ console.log(chalk.yellow(` (Note: Gate 3 progress is saved via [x] checkboxes in the Gate 2 plan doc (AK-Docs/04.Coding/02.Plans/).`));
379
+ console.log(chalk.yellow(` The AI will automatically resume the exact task you left off.)`));
380
+ }
381
+ }
369
382
  console.log();
370
383
  }
371
384
 
@@ -374,18 +387,17 @@ async function nextGate(taskId) {
374
387
  // ──────────────────────────────────────────────────────────────
375
388
 
376
389
  /**
377
- * Find gate output docs for a task under 04.Coding/<section>/<functionId>/<taskId>.md
390
+ * Find gate output docs for a task under AK-Docs/04.Coding/<section>/<functionId>/<taskId>.md
378
391
  * (new convention) plus the legacy plan/<taskId>/ folder. Returns absolute paths.
379
392
  */
380
393
  async function findTaskDocs(taskId) {
381
394
  const results = [];
382
395
 
383
- const codingDir = path.join(PROJECT_DIR, '04.Coding');
384
- if (await fs.pathExists(codingDir)) {
385
- const sections = await fs.readdir(codingDir, { withFileTypes: true }).catch(() => []);
396
+ if (await fs.pathExists(CODING_DIR)) {
397
+ const sections = await fs.readdir(CODING_DIR, { withFileTypes: true }).catch(() => []);
386
398
  for (const section of sections) {
387
399
  if (!section.isDirectory()) continue;
388
- const sectionDir = path.join(codingDir, section.name);
400
+ const sectionDir = path.join(CODING_DIR, section.name);
389
401
  const featureDirs = await fs.readdir(sectionDir, { withFileTypes: true }).catch(() => []);
390
402
  for (const feature of featureDirs) {
391
403
  if (!feature.isDirectory()) continue;
@@ -442,9 +454,9 @@ async function detectCurrentGate(taskId) {
442
454
  if (state.currentGate) return state.currentGate;
443
455
  }
444
456
 
445
- // New convention: 04.Coding/<section>/<functionId>/<taskId>.md
457
+ // New convention: AK-Docs/04.Coding/<section>/<functionId>/<taskId>.md
446
458
  const hasDocInSection = async (section) => {
447
- const dir = path.join(PROJECT_DIR, '04.Coding', section);
459
+ const dir = path.join(CODING_DIR, section);
448
460
  if (!(await fs.pathExists(dir))) return false;
449
461
  const features = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);
450
462
  for (const f of features) {
@@ -465,9 +477,9 @@ async function detectCurrentGate(taskId) {
465
477
  return 1;
466
478
  }
467
479
 
468
- async function generateMarkdownSummary(taskState) {
469
- const taskType = taskState.taskType || 'feature';
470
- const maxGate = taskType === 'testing' ? 4 : 5;
480
+ async function generateMarkdownSummary(taskState, taskType = null) {
481
+ taskType = taskType || taskState.taskType || 'feature';
482
+ const maxGate = taskType === 'testing' ? 4 : (taskType === 'gen-doc' ? 2 : 5);
471
483
  const lines = [];
472
484
  lines.push(`# Task Summary: ${taskState.taskId}`);
473
485
  lines.push(`**Title:** ${taskState.title}`);
@@ -491,7 +503,7 @@ async function generateMarkdownSummary(taskState) {
491
503
  return lines.join('\n');
492
504
  }
493
505
 
494
- function gateLabel(n, taskType) {
506
+ function gateLabel(n, taskType = null) {
495
507
  if (taskType === 'testing') {
496
508
  const labels = {
497
509
  1: 'Phân tích & Confirm',
@@ -501,6 +513,10 @@ function gateLabel(n, taskType) {
501
513
  };
502
514
  return labels[n] || `Gate ${n}`;
503
515
  }
516
+ if (taskType === 'gen-doc') {
517
+ if (n === 2) return 'Generate Document';
518
+ if (n >= 3) return 'Done';
519
+ }
504
520
  const labels = {
505
521
  1: 'AI Analyze Requirement',
506
522
  2: 'Implementation Plan',
package/scripts/update.js CHANGED
@@ -2,6 +2,7 @@ const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
  const chalk = require('chalk');
4
4
  const { confirm, select } = require('@inquirer/prompts');
5
+ const { syncDocsRepos } = require('./docs-repo');
5
6
 
6
7
  const PKG_DIR = path.join(__dirname, '..');
7
8
  const PKG_VERSION = require('../package.json').version;
@@ -25,6 +26,9 @@ module.exports = async function update(options = {}) {
25
26
  return;
26
27
  }
27
28
 
29
+ // ── Sync AK-Docs / Shared-Docs sibling repos ──────────────────
30
+ await syncDocsRepos(projectDir);
31
+
28
32
  const state = await fs.readJson(stateFile);
29
33
  const currentVersion = state.current_version;
30
34
 
package/scripts/use.js CHANGED
@@ -234,7 +234,7 @@ async function loadFromBacklog(issueKey, options = {}) {
234
234
  options.cto != null ||
235
235
  options.commentsTo != null ||
236
236
  options["comments-to"] != null;
237
-
237
+
238
238
  if (loadComments) {
239
239
  console.log(chalk.gray(" ℹ Comments requested..."));
240
240
  }
@@ -349,13 +349,13 @@ async function fetchBacklogComments(domain, apiKey, issueKey) {
349
349
  if (minId) {
350
350
  url += `&minId=${minId}`;
351
351
  }
352
-
352
+
353
353
  const batch = await backlogGet(url);
354
354
  if (!batch || batch.length === 0) break;
355
-
355
+
356
356
  all.push(...batch);
357
357
  if (batch.length < 100) break;
358
-
358
+
359
359
  // Use the last ID as minId for the next batch
360
360
  minId = batch[batch.length - 1].id;
361
361
  }
@@ -467,7 +467,7 @@ async function loadFromJira(issueKey, options = {}) {
467
467
  options.cto != null ||
468
468
  options.commentsTo != null ||
469
469
  options["comments-to"] != null;
470
-
470
+
471
471
  if (loadComments) {
472
472
  console.log(chalk.gray(" ℹ Comments requested..."));
473
473
  }
@@ -709,6 +709,7 @@ async function manualContext(prefillId = "") {
709
709
  { name: td("🔍 Investigation", "Analysis", "Investigate, analyze root cause"), value: "investigation" },
710
710
  { name: td("📊 Impact Analysis", "Analysis", "Assess scope and risk of changes"), value: "impact-analysis" },
711
711
  { name: td("📖 Documentation", "Document", "Write docs, README, API reference"), value: "documentation" },
712
+ { name: td("📝 Generate Doc 2 Gate", "Document", "Generate new documentation"), value: "gen-doc" },
712
713
  ],
713
714
  default: existing.taskType || undefined,
714
715
  });