agileflow 2.61.0 → 2.62.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 (66) hide show
  1. package/README.md +9 -9
  2. package/package.json +1 -1
  3. package/scripts/lib/counter.js +103 -0
  4. package/src/core/commands/auto.md +1 -0
  5. package/src/core/commands/babysit.md +170 -29
  6. package/src/core/commands/board.md +1 -0
  7. package/src/core/commands/ci.md +1 -0
  8. package/src/core/commands/compress.md +1 -0
  9. package/src/core/commands/deploy.md +1 -0
  10. package/src/core/commands/help.md +1 -0
  11. package/src/core/commands/research.md +1 -0
  12. package/src/core/commands/skill/create.md +566 -0
  13. package/src/core/commands/skill/delete.md +189 -0
  14. package/src/core/commands/skill/edit.md +245 -0
  15. package/src/core/commands/skill/list.md +155 -0
  16. package/src/core/commands/skill/test.md +249 -0
  17. package/src/core/commands/template.md +1 -0
  18. package/src/core/commands/tests.md +1 -0
  19. package/src/core/commands/update.md +1 -0
  20. package/src/core/commands/velocity.md +1 -0
  21. package/src/core/experts/refactor/expertise.yaml +17 -12
  22. package/src/core/templates/claude-settings.advanced.example.json +1 -1
  23. package/src/core/templates/claude-settings.example.json +1 -1
  24. package/tools/cli/commands/list.js +8 -13
  25. package/tools/cli/installers/core/installer.js +20 -19
  26. package/tools/cli/installers/ide/_base-ide.js +18 -4
  27. package/tools/cli/installers/ide/claude-code.js +4 -15
  28. package/tools/cli/installers/ide/codex.js +9 -13
  29. package/tools/cli/lib/content-injector.js +162 -31
  30. package/tools/cli/lib/utils.js +87 -0
  31. package/src/core/skills/acceptance-criteria-generator/SKILL.md +0 -46
  32. package/src/core/skills/adr-template/SKILL.md +0 -62
  33. package/src/core/skills/agileflow-acceptance-criteria/SKILL.md +0 -156
  34. package/src/core/skills/agileflow-adr/SKILL.md +0 -147
  35. package/src/core/skills/agileflow-adr/examples/database-choice-example.md +0 -122
  36. package/src/core/skills/agileflow-adr/templates/adr-template.md +0 -69
  37. package/src/core/skills/agileflow-commit-messages/SKILL.md +0 -130
  38. package/src/core/skills/agileflow-commit-messages/reference/bad-examples.md +0 -168
  39. package/src/core/skills/agileflow-commit-messages/reference/good-examples.md +0 -120
  40. package/src/core/skills/agileflow-commit-messages/scripts/check-attribution.sh +0 -15
  41. package/src/core/skills/agileflow-epic-planner/SKILL.md +0 -184
  42. package/src/core/skills/agileflow-retro-facilitator/SKILL.md +0 -119
  43. package/src/core/skills/agileflow-retro-facilitator/cookbook/4ls.md +0 -86
  44. package/src/core/skills/agileflow-retro-facilitator/cookbook/glad-sad-mad.md +0 -79
  45. package/src/core/skills/agileflow-retro-facilitator/cookbook/start-stop-continue.md +0 -142
  46. package/src/core/skills/agileflow-retro-facilitator/prompts/action-items.md +0 -83
  47. package/src/core/skills/agileflow-sprint-planner/SKILL.md +0 -212
  48. package/src/core/skills/agileflow-story-writer/SKILL.md +0 -163
  49. package/src/core/skills/agileflow-story-writer/examples/good-story-example.md +0 -63
  50. package/src/core/skills/agileflow-story-writer/templates/story-template.md +0 -44
  51. package/src/core/skills/agileflow-tech-debt/SKILL.md +0 -215
  52. package/src/core/skills/api-documentation-generator/SKILL.md +0 -65
  53. package/src/core/skills/changelog-entry/SKILL.md +0 -55
  54. package/src/core/skills/commit-message-formatter/SKILL.md +0 -50
  55. package/src/core/skills/deployment-guide-generator/SKILL.md +0 -84
  56. package/src/core/skills/diagram-generator/SKILL.md +0 -65
  57. package/src/core/skills/error-handler-template/SKILL.md +0 -78
  58. package/src/core/skills/migration-checklist/SKILL.md +0 -82
  59. package/src/core/skills/pr-description/SKILL.md +0 -65
  60. package/src/core/skills/sql-schema-generator/SKILL.md +0 -69
  61. package/src/core/skills/story-skeleton/SKILL.md +0 -34
  62. package/src/core/skills/test-case-generator/SKILL.md +0 -63
  63. package/src/core/skills/type-definitions/SKILL.md +0 -65
  64. package/src/core/skills/validation-schema-generator/SKILL.md +0 -64
  65. package/src/core/skills/writing-skills/SKILL.md +0 -352
  66. package/src/core/skills/writing-skills/testing-skills-with-subagents.md +0 -232
package/README.md CHANGED
@@ -3,9 +3,9 @@
3
3
  </p>
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/agileflow?color=brightgreen)](https://www.npmjs.com/package/agileflow)
6
- [![Commands](https://img.shields.io/badge/commands-41-blue)](docs/04-architecture/commands.md)
7
- [![Agents/Experts](https://img.shields.io/badge/agents%2Fexperts-26-orange)](docs/04-architecture/subagents.md)
8
- [![Skills](https://img.shields.io/badge/skills-23-purple)](docs/04-architecture/skills.md)
6
+ [![Commands](https://img.shields.io/badge/commands-53-blue)](docs/04-architecture/commands.md)
7
+ [![Agents/Experts](https://img.shields.io/badge/agents%2Fexperts-27-orange)](docs/04-architecture/subagents.md)
8
+ [![Skills](https://img.shields.io/badge/skills-dynamic-purple)](docs/04-architecture/skills.md)
9
9
 
10
10
  **AI-driven agile development for Claude Code, Cursor, Windsurf, OpenAI Codex CLI, and more.** Combining Scrum, Kanban, ADRs, and docs-as-code principles into one framework-agnostic system.
11
11
 
@@ -66,9 +66,9 @@ AgileFlow combines three proven methodologies:
66
66
 
67
67
  | Component | Count | Description |
68
68
  |-----------|-------|-------------|
69
- | [Commands](docs/04-architecture/commands.md) | 41 | Slash commands for agile workflows |
70
- | [Agents/Experts](docs/04-architecture/subagents.md) | 26 | Specialized agents with self-improving knowledge bases |
71
- | [Skills](docs/04-architecture/skills.md) | 23 | Auto-activated context helpers |
69
+ | [Commands](docs/04-architecture/commands.md) | 53 | Slash commands for agile workflows |
70
+ | [Agents/Experts](docs/04-architecture/subagents.md) | 27 | Specialized agents with self-improving knowledge bases |
71
+ | [Skills](docs/04-architecture/skills.md) | Dynamic | Generated on-demand with `/agileflow:skill:create` |
72
72
 
73
73
  ---
74
74
 
@@ -77,9 +77,9 @@ AgileFlow combines three proven methodologies:
77
77
  Full documentation lives in [`docs/04-architecture/`](docs/04-architecture/):
78
78
 
79
79
  ### Reference
80
- - [Commands](docs/04-architecture/commands.md) - All 41 slash commands
81
- - [Agents/Experts](docs/04-architecture/subagents.md) - 26 specialized agents with self-improving knowledge
82
- - [Skills](docs/04-architecture/skills.md) - 23 auto-loaded skills
80
+ - [Commands](docs/04-architecture/commands.md) - All 53 slash commands
81
+ - [Agents/Experts](docs/04-architecture/subagents.md) - 27 specialized agents with self-improving knowledge
82
+ - [Skills](docs/04-architecture/skills.md) - Dynamic skill generator with MCP integration
83
83
 
84
84
  ### Architecture
85
85
  - [AgileFlow CLI Overview](docs/04-architecture/agileflow-cli-overview.md) - System architecture
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "2.61.0",
3
+ "version": "2.62.0",
4
4
  "description": "AI-driven agile development system for Claude Code, Cursor, Windsurf, and more",
5
5
  "keywords": [
6
6
  "agile",
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Shared Counter Module
3
+ *
4
+ * Single source of truth for counting AgileFlow components.
5
+ * Used by: sync-counts.js, content-injector.js, installer.js
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ /**
12
+ * Count command files in a directory (including subdirectories like session/)
13
+ * @param {string} commandsDir - Path to commands directory
14
+ * @returns {number} Total command count
15
+ */
16
+ function countCommands(commandsDir) {
17
+ if (!fs.existsSync(commandsDir)) return 0;
18
+
19
+ let count = 0;
20
+ const entries = fs.readdirSync(commandsDir, { withFileTypes: true });
21
+
22
+ for (const entry of entries) {
23
+ if (entry.isFile() && entry.name.endsWith('.md')) {
24
+ count++;
25
+ } else if (entry.isDirectory()) {
26
+ // Count commands in subdirectories (e.g., session/)
27
+ const subDir = path.join(commandsDir, entry.name);
28
+ const subFiles = fs.readdirSync(subDir).filter(f => f.endsWith('.md'));
29
+ count += subFiles.length;
30
+ }
31
+ }
32
+
33
+ return count;
34
+ }
35
+
36
+ /**
37
+ * Count agent files in a directory
38
+ * @param {string} agentsDir - Path to agents directory
39
+ * @returns {number} Total agent count
40
+ */
41
+ function countAgents(agentsDir) {
42
+ if (!fs.existsSync(agentsDir)) return 0;
43
+ return fs.readdirSync(agentsDir).filter(f => f.endsWith('.md')).length;
44
+ }
45
+
46
+ /**
47
+ * Count skill directories (each skill has a SKILL.md file)
48
+ * @param {string} skillsDir - Path to skills directory
49
+ * @returns {number} Total skill count
50
+ */
51
+ function countSkills(skillsDir) {
52
+ if (!fs.existsSync(skillsDir)) return 0;
53
+
54
+ let count = 0;
55
+
56
+ function scanDir(dir) {
57
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
58
+ for (const entry of entries) {
59
+ if (entry.isDirectory()) {
60
+ const skillFile = path.join(dir, entry.name, 'SKILL.md');
61
+ if (fs.existsSync(skillFile)) {
62
+ count++;
63
+ }
64
+ // Recurse into subdirectories
65
+ scanDir(path.join(dir, entry.name));
66
+ }
67
+ }
68
+ }
69
+
70
+ scanDir(skillsDir);
71
+ return count;
72
+ }
73
+
74
+ /**
75
+ * Get all counts at once from a core directory
76
+ * @param {string} coreDir - Path to core directory containing commands/, agents/, skills/
77
+ * @returns {Object} Counts object { commands, agents, skills }
78
+ */
79
+ function getCounts(coreDir) {
80
+ return {
81
+ commands: countCommands(path.join(coreDir, 'commands')),
82
+ agents: countAgents(path.join(coreDir, 'agents')),
83
+ skills: countSkills(path.join(coreDir, 'skills')),
84
+ };
85
+ }
86
+
87
+ /**
88
+ * Get counts from CLI package source
89
+ * @param {string} cliRoot - Path to packages/cli directory
90
+ * @returns {Object} Counts object { commands, agents, skills }
91
+ */
92
+ function getSourceCounts(cliRoot) {
93
+ const coreDir = path.join(cliRoot, 'src', 'core');
94
+ return getCounts(coreDir);
95
+ }
96
+
97
+ module.exports = {
98
+ countCommands,
99
+ countAgents,
100
+ countSkills,
101
+ getCounts,
102
+ getSourceCounts,
103
+ };
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Auto-generate stories from PRDs, mockups, or specs
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # auto-story
@@ -4,6 +4,7 @@ compact_context:
4
4
  priority: critical
5
5
  preserve_rules:
6
6
  - "ACTIVE COMMAND: /agileflow-babysit - Mentor mode with expert delegation"
7
+ - "MUST use EnterPlanMode FIRST for ANY non-trivial task (explore codebase, design approach, get approval)"
7
8
  - "MUST delegate complex work to domain experts (don't do everything yourself)"
8
9
  - "MUST use AskUserQuestion for decisions, TodoWrite for tracking"
9
10
  - "Simple task → do yourself | Complex single-domain → spawn expert | Multi-domain → spawn orchestrator"
@@ -66,14 +67,16 @@ This gathers: git status, stories/epics, session state, docs structure, research
66
67
 
67
68
  ### Critical Rules
68
69
 
69
- 1. **DELEGATE COMPLEX WORK** - You have all tools, but experts produce higher quality
70
- 2. **ASK FOR DECISIONS** - Use AskUserQuestion for choices, not permissions
71
- 3. **TRACK PROGRESS** - Use TodoWrite throughout
72
- 4. **END WITH OPTIONS** - Every response ends with AskUserQuestion
70
+ 1. **USE PLAN MODE** - For ANY non-trivial task, enter plan mode FIRST to explore and design
71
+ 2. **DELEGATE COMPLEX WORK** - You have all tools, but experts produce higher quality
72
+ 3. **ASK FOR DECISIONS** - Use AskUserQuestion for choices, not permissions
73
+ 4. **TRACK PROGRESS** - Use TodoWrite throughout
74
+ 5. **END WITH OPTIONS** - Every response ends with AskUserQuestion
73
75
 
74
76
  ### Tool Patterns
75
77
 
76
78
  ```
79
+ EnterPlanMode → FIRST for ANY non-trivial task (explore codebase, design approach)
77
80
  AskUserQuestion → User decisions (task selection, approach, next steps)
78
81
  TodoWrite → Track progress (update as you complete steps)
79
82
  Task → Spawn experts (complex work delegation)
@@ -229,25 +232,37 @@ TaskOutput(task_id: "<ui_id>", block: true)
229
232
 
230
233
  ## WORKFLOW
231
234
 
232
- ### Phase 1: Context & Planning
235
+ ### Phase 1: Context & Task Selection
233
236
 
234
237
  1. **Run context script** (mandatory first action)
235
238
  2. **Present task options** using AskUserQuestion
236
- 3. **Identify scope** - simple, single-domain, or multi-domain
237
- 4. **Plan delegation** - which expert(s) to spawn
239
+ 3. **User selects task**
238
240
 
239
- ### Phase 2: Execution
241
+ ### Phase 2: Plan Mode (MANDATORY for non-trivial tasks)
240
242
 
241
- 5. **Spawn expert(s)** based on delegation framework
242
- 6. **Collect results** if async
243
- 7. **Verify** tests pass, code works
244
- 8. **Update status.json** as work progresses
243
+ 4. **Enter plan mode** - `EnterPlanMode` tool
244
+ 5. **Explore codebase** - Use Glob, Grep, Read to understand existing patterns
245
+ 6. **Design approach** - Write implementation plan to plan file
246
+ 7. **Get user approval** - `ExitPlanMode` presents plan for review
247
+ 8. **Identify scope** - Determine if simple, single-domain, or multi-domain
245
248
 
246
- ### Phase 3: Completion
249
+ **Skip plan mode ONLY if:**
250
+ - Task is truly trivial (typo fix, one-liner)
251
+ - User provides extremely detailed instructions
252
+ - Task is pure coordination (status update, etc.)
247
253
 
248
- 9. **Update story status** → in-review
249
- 10. **Generate PR description**
250
- 11. **Present next steps** via AskUserQuestion
254
+ ### Phase 3: Execution
255
+
256
+ 9. **Delegate to experts** based on delegation framework
257
+ 10. **Collect results** if async
258
+ 11. **Verify** tests pass, code works
259
+ 12. **Update status.json** as work progresses
260
+
261
+ ### Phase 4: Completion
262
+
263
+ 13. **Update story status** → in-review
264
+ 14. **Generate PR description**
265
+ 15. **Present next steps** via AskUserQuestion
251
266
 
252
267
  ---
253
268
 
@@ -354,23 +369,129 @@ After loading context, analyze and present ranked options:
354
369
 
355
370
  ---
356
371
 
357
- ## PLAN MODE
372
+ ## PLAN MODE (CRITICAL)
373
+
374
+ **Plan mode is your primary tool for non-trivial tasks.** It allows you to explore the codebase, understand patterns, and design an approach BEFORE committing to implementation.
358
375
 
359
- For complex implementations, use plan mode:
376
+ ### When to Use Plan Mode
360
377
 
361
378
  ```
362
- Simple fix? → Just do it
363
- Detailed instructions? → Follow them
364
- Complex/unclear? → EnterPlanMode first
379
+ ┌─────────────────────────────────────────────────────────────┐
380
+ │ PLAN MODE DECISION │
381
+ ├─────────────────────────────────────────────────────────────┤
382
+ │ │
383
+ │ What's the task? │
384
+ │ │ │
385
+ │ ├─► Trivial (typo, obvious one-liner) │
386
+ │ │ └─► Skip plan mode, just do it │
387
+ │ │ │
388
+ │ ├─► User gave detailed instructions with files │
389
+ │ │ └─► Skip plan mode, follow instructions │
390
+ │ │ │
391
+ │ └─► Everything else │
392
+ │ └─► USE PLAN MODE │
393
+ │ EnterPlanMode → Explore → Design → Exit │
394
+ │ │
395
+ └─────────────────────────────────────────────────────────────┘
365
396
  ```
366
397
 
367
- **Plan Mode Flow:**
368
- 1. `EnterPlanMode`
369
- 2. Explore with Glob, Grep, Read
370
- 3. Design approach
371
- 4. Get user approval
372
- 5. `ExitPlanMode`
373
- 6. Implement
398
+ ### Why Plan Mode Matters
399
+
400
+ | Without Plan Mode | With Plan Mode |
401
+ |-------------------|----------------|
402
+ | Guess at patterns | Understand existing conventions |
403
+ | Miss edge cases | Discover edge cases early |
404
+ | Redo work when wrong | Get alignment before coding |
405
+ | User surprises | User approves approach |
406
+
407
+ ### Plan Mode Flow
408
+
409
+ 1. **Enter** - Call `EnterPlanMode` tool
410
+ 2. **Explore** - Use Glob, Grep, Read to understand:
411
+ - How similar features are implemented
412
+ - What patterns exist in the codebase
413
+ - What files will need changes
414
+ - What dependencies exist
415
+ 3. **Design** - Write plan to the plan file:
416
+ - Implementation steps
417
+ - Files to modify/create
418
+ - Key decisions and trade-offs
419
+ - Testing approach
420
+ 4. **Approve** - Call `ExitPlanMode` for user review
421
+ 5. **Execute** - Implement the approved plan
422
+
423
+ ### Plan Mode Examples
424
+
425
+ **Example 1: Add New Feature**
426
+ ```
427
+ User: "Add a logout button to the header"
428
+
429
+ → EnterPlanMode
430
+ → Read header component to understand structure
431
+ → Grep for existing auth patterns
432
+ → Check how other buttons are styled
433
+ → Write plan: "Add logout button next to profile, use existing Button component, call auth.logout()"
434
+ → ExitPlanMode
435
+ → User approves
436
+ → Implement
437
+ ```
438
+
439
+ **Example 2: Fix Bug**
440
+ ```
441
+ User: "Users are seeing stale data after update"
442
+
443
+ → EnterPlanMode
444
+ → Grep for caching patterns
445
+ → Read data fetching logic
446
+ → Identify cache invalidation issue
447
+ → Write plan: "Add cache invalidation after mutation in useUpdateProfile hook"
448
+ → ExitPlanMode
449
+ → User approves
450
+ → Implement
451
+ ```
452
+
453
+ **Example 3: Complex Multi-Domain**
454
+ ```
455
+ User: "Add user preferences with API and UI"
456
+
457
+ → EnterPlanMode
458
+ → Explore API patterns, UI patterns, database schema
459
+ → Write plan with: database changes, API endpoints, UI components
460
+ → ExitPlanMode
461
+ → User approves
462
+ → Spawn orchestrator to coordinate experts
463
+ ```
464
+
465
+ ### Plan Mode Anti-Patterns
466
+
467
+ ❌ **DON'T:** Skip plan mode and start coding immediately
468
+ ```
469
+ User: "Add email notifications"
470
+ [immediately starts writing code without exploring]
471
+ ```
472
+
473
+ ✅ **DO:** Always plan first for non-trivial tasks
474
+ ```
475
+ User: "Add email notifications"
476
+ → EnterPlanMode
477
+ → Explore notification patterns, email service setup
478
+ → Design approach
479
+ → ExitPlanMode
480
+ → Implement
481
+ ```
482
+
483
+ ❌ **DON'T:** Use plan mode for trivial tasks
484
+ ```
485
+ User: "Fix the typo in README"
486
+ → EnterPlanMode [unnecessary overhead]
487
+ ```
488
+
489
+ ✅ **DO:** Just fix trivial tasks directly
490
+ ```
491
+ User: "Fix the typo in README"
492
+ [fixes typo directly]
493
+ "Fixed. What's next?"
494
+ ```
374
495
 
375
496
  ---
376
497
 
@@ -409,13 +530,33 @@ After running context script:
409
530
  Based on your project state:
410
531
  [Present 3-5 ranked suggestions via AskUserQuestion]
411
532
 
412
- I can spawn specialized experts (Database, API, UI, etc.) or handle simple tasks directly.
533
+ **My approach:**
534
+ 1. You select a task
535
+ 2. I enter plan mode to explore and design the approach
536
+ 3. You approve the plan
537
+ 4. I execute (directly or via domain experts)
413
538
  ```
414
539
 
415
540
  ---
416
541
 
417
542
  ## ANTI-PATTERNS
418
543
 
544
+ ❌ **DON'T:** Skip plan mode and start coding immediately
545
+ ```
546
+ User: "Add user authentication"
547
+ [immediately starts writing auth code without exploring]
548
+ ```
549
+
550
+ ✅ **DO:** Use plan mode first for non-trivial tasks
551
+ ```
552
+ User: "Add user authentication"
553
+ → EnterPlanMode
554
+ → Explore existing auth patterns, session handling, user model
555
+ → Design approach with user approval
556
+ → ExitPlanMode
557
+ → Delegate to experts
558
+ ```
559
+
419
560
  ❌ **DON'T:** Do multi-domain work yourself
420
561
  ```
421
562
  "I'll create the API endpoint, then the UI component, then write tests..."
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Display visual kanban board with WIP limits
3
+ argument-hint: (no arguments)
3
4
  model: haiku
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Bootstrap CI/CD workflow with testing and quality checks
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # ci-setup
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Compress status.json by removing verbose fields and keeping only tracking metadata
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # compress
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Set up automated deployment pipeline
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # setup-deployment
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Display AgileFlow system overview and commands
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # system-help
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Initialize research note with structured template
3
+ argument-hint: (no arguments)
3
4
  ---
4
5
 
5
6
  # research-init