agileflow 2.51.0 → 2.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -460
- package/package.json +18 -3
- package/scripts/agileflow-configure.js +134 -63
- package/scripts/agileflow-welcome.js +161 -31
- package/scripts/generators/agent-registry.js +2 -2
- package/scripts/generators/command-registry.js +6 -6
- package/scripts/generators/index.js +2 -6
- package/scripts/generators/inject-babysit.js +9 -2
- package/scripts/generators/inject-help.js +3 -1
- package/scripts/generators/inject-readme.js +7 -3
- package/scripts/generators/skill-registry.js +5 -5
- package/scripts/get-env.js +13 -12
- package/scripts/obtain-context.js +79 -26
- package/scripts/session-coordinator.sh +232 -0
- package/scripts/session-manager.js +512 -0
- package/src/core/agents/orchestrator.md +275 -0
- package/src/core/commands/adr.md +38 -16
- package/src/core/commands/agent.md +39 -22
- package/src/core/commands/assign.md +17 -0
- package/src/core/commands/auto.md +60 -46
- package/src/core/commands/babysit.md +302 -637
- package/src/core/commands/baseline.md +20 -0
- package/src/core/commands/blockers.md +33 -48
- package/src/core/commands/board.md +19 -0
- package/src/core/commands/changelog.md +20 -0
- package/src/core/commands/ci.md +17 -0
- package/src/core/commands/context.md +43 -40
- package/src/core/commands/debt.md +76 -45
- package/src/core/commands/deploy.md +20 -0
- package/src/core/commands/deps.md +40 -46
- package/src/core/commands/diagnose.md +24 -18
- package/src/core/commands/docs.md +18 -0
- package/src/core/commands/epic.md +31 -0
- package/src/core/commands/feedback.md +33 -21
- package/src/core/commands/handoff.md +29 -0
- package/src/core/commands/help.md +16 -7
- package/src/core/commands/impact.md +31 -61
- package/src/core/commands/metrics.md +17 -35
- package/src/core/commands/packages.md +21 -0
- package/src/core/commands/pr.md +15 -0
- package/src/core/commands/readme-sync.md +42 -9
- package/src/core/commands/research.md +58 -11
- package/src/core/commands/retro.md +42 -50
- package/src/core/commands/review.md +22 -27
- package/src/core/commands/session/end.md +53 -297
- package/src/core/commands/session/history.md +38 -257
- package/src/core/commands/session/init.md +44 -446
- package/src/core/commands/session/new.md +152 -0
- package/src/core/commands/session/resume.md +51 -447
- package/src/core/commands/session/status.md +32 -244
- package/src/core/commands/sprint.md +33 -0
- package/src/core/commands/status.md +18 -0
- package/src/core/commands/story-validate.md +32 -0
- package/src/core/commands/story.md +21 -6
- package/src/core/commands/template.md +18 -0
- package/src/core/commands/tests.md +22 -0
- package/src/core/commands/update.md +72 -58
- package/src/core/commands/validate-expertise.md +25 -37
- package/src/core/commands/velocity.md +33 -74
- package/src/core/commands/verify.md +16 -0
- package/src/core/experts/documentation/expertise.yaml +16 -2
- package/src/core/skills/agileflow-retro-facilitator/SKILL.md +57 -219
- package/src/core/skills/agileflow-retro-facilitator/cookbook/4ls.md +86 -0
- package/src/core/skills/agileflow-retro-facilitator/cookbook/glad-sad-mad.md +79 -0
- package/src/core/skills/agileflow-retro-facilitator/cookbook/start-stop-continue.md +142 -0
- package/src/core/skills/agileflow-retro-facilitator/prompts/action-items.md +83 -0
- package/src/core/skills/writing-skills/SKILL.md +352 -0
- package/src/core/skills/writing-skills/testing-skills-with-subagents.md +232 -0
- package/tools/cli/agileflow-cli.js +4 -2
- package/tools/cli/commands/config.js +20 -13
- package/tools/cli/commands/doctor.js +25 -9
- package/tools/cli/commands/list.js +10 -6
- package/tools/cli/commands/setup.js +54 -3
- package/tools/cli/commands/status.js +6 -8
- package/tools/cli/commands/uninstall.js +5 -5
- package/tools/cli/commands/update.js +51 -7
- package/tools/cli/installers/core/installer.js +8 -4
- package/tools/cli/installers/ide/_base-ide.js +3 -1
- package/tools/cli/installers/ide/claude-code.js +3 -7
- package/tools/cli/installers/ide/codex.js +440 -0
- package/tools/cli/installers/ide/manager.js +2 -6
- package/tools/cli/lib/content-injector.js +3 -3
- package/tools/cli/lib/docs-setup.js +3 -2
- package/tools/cli/lib/npm-utils.js +3 -3
- package/tools/cli/lib/ui.js +7 -7
- package/tools/cli/lib/version-checker.js +3 -3
- package/tools/postinstall.js +2 -3
|
@@ -28,55 +28,61 @@ OBJECTIVE: Validate AgileFlow system health, identify issues, and provide action
|
|
|
28
28
|
The `diagnose` command runs comprehensive system health checks on your AgileFlow installation:
|
|
29
29
|
|
|
30
30
|
**What it checks:**
|
|
31
|
-
- JSON file validation (status.json, metadata, settings)
|
|
31
|
+
- JSON file validation (status.json, metadata, settings) using `jq empty`
|
|
32
32
|
- File structure integrity (docs/, .agileflow/, .claude/)
|
|
33
33
|
- Auto-archival system configuration
|
|
34
34
|
- Hooks system setup
|
|
35
35
|
- File size analysis with warnings
|
|
36
36
|
|
|
37
|
-
**JSON Validation
|
|
38
|
-
- Validates all critical JSON files
|
|
37
|
+
**JSON Validation** (using jq):
|
|
38
|
+
- Validates all critical JSON files: `jq empty <file>` check
|
|
39
39
|
- Reports file sizes and warns if status.json exceeds 100KB
|
|
40
40
|
- Distinguishes between critical and optional files
|
|
41
41
|
- Shows detailed error messages for invalid JSON
|
|
42
42
|
|
|
43
|
-
**Auto-Archival System
|
|
44
|
-
- Checks if archive script exists and is executable
|
|
45
|
-
- Verifies hook configuration in settings.json
|
|
43
|
+
**Auto-Archival System**:
|
|
44
|
+
- Checks if archive script exists and is executable (`[ -x <script> ]`)
|
|
45
|
+
- Verifies hook configuration in settings.json (jq queries)
|
|
46
46
|
- Reports archival threshold from metadata
|
|
47
47
|
- Identifies missing or misconfigured components
|
|
48
48
|
|
|
49
|
-
**Hooks System
|
|
50
|
-
- Validates .claude/settings.json structure
|
|
49
|
+
**Hooks System** (parsing required):
|
|
50
|
+
- Validates .claude/settings.json structure (jq parsing)
|
|
51
51
|
- Counts SessionStart, UserPromptSubmit, and Stop hooks
|
|
52
52
|
- Reports configuration issues
|
|
53
53
|
|
|
54
|
-
**File Size Analysis
|
|
54
|
+
**File Size Analysis**:
|
|
55
55
|
- Monitors status.json size with thresholds (50KB warning, 100KB critical)
|
|
56
|
-
-
|
|
56
|
+
- Uses `stat` command to get file sizes
|
|
57
|
+
- Uses `jq '.stories | length'` to count stories
|
|
57
58
|
- Recommends archival when needed
|
|
58
59
|
|
|
59
|
-
**
|
|
60
|
-
|
|
60
|
+
**Diagnostic Checks**:
|
|
61
|
+
1. **JSON File Validation** → Check status.json, metadata, settings validity
|
|
62
|
+
2. **Auto-Archival System** → Verify archive script + hook configuration
|
|
63
|
+
3. **Hooks System** → Validate .claude/settings.json structure
|
|
64
|
+
4. **File Size Analysis** → Check status.json size and story count
|
|
65
|
+
|
|
66
|
+
**Output Format**:
|
|
67
|
+
- Indicators: ✅ (pass), ❌ (fail), ⚠️ (warning), ℹ️ (info)
|
|
61
68
|
- Shows file sizes in KB and story counts
|
|
62
69
|
- Provides actionable next steps for each issue
|
|
63
70
|
- Exit code 0 (healthy) or 1 (issues found)
|
|
64
71
|
|
|
65
|
-
**Common Issues Detected
|
|
66
|
-
1. Invalid JSON syntax
|
|
67
|
-
2. Large status.json files needing archival
|
|
72
|
+
**Common Issues Detected**:
|
|
73
|
+
1. Invalid JSON syntax (jq validation failure)
|
|
74
|
+
2. Large status.json files needing archival (>100KB)
|
|
68
75
|
3. Missing critical files (metadata, status.json)
|
|
69
76
|
4. Auto-archival not configured or not executable
|
|
70
77
|
5. Hooks system misconfiguration
|
|
71
78
|
|
|
72
|
-
**Recommended Actions
|
|
79
|
+
**Recommended Actions**:
|
|
73
80
|
- Run after AgileFlow setup to verify installation
|
|
74
81
|
- Run before major operations to catch issues early
|
|
75
82
|
- Run periodically to maintain system health
|
|
76
|
-
- Run after manual configuration changes
|
|
77
83
|
- Use exit code in CI/CD pipelines for validation
|
|
78
84
|
|
|
79
|
-
**Usage
|
|
85
|
+
**Usage**:
|
|
80
86
|
```bash
|
|
81
87
|
/agileflow:diagnose
|
|
82
88
|
```
|
|
@@ -85,6 +85,24 @@ node .agileflow/scripts/obtain-context.js docs
|
|
|
85
85
|
- Markdown gap report with categorized findings
|
|
86
86
|
- List of recommended actions with previews
|
|
87
87
|
- Optional: Pull request with documentation updates (if approved)
|
|
88
|
+
|
|
89
|
+
**Tool Usage Example**:
|
|
90
|
+
When asking for approval before creating docs:
|
|
91
|
+
```xml
|
|
92
|
+
<invoke name="AskUserQuestion">
|
|
93
|
+
<parameter name="questions">[{
|
|
94
|
+
"question": "Create missing documentation for detected code changes?",
|
|
95
|
+
"header": "Documentation Sync",
|
|
96
|
+
"multiSelect": false,
|
|
97
|
+
"options": [
|
|
98
|
+
{"label": "Create all missing docs", "description": "Auto-generate stubs for all missing documentation"},
|
|
99
|
+
{"label": "Review each one first", "description": "Preview each change before creating"},
|
|
100
|
+
{"label": "Skip documentation", "description": "Don't create docs now"}
|
|
101
|
+
]
|
|
102
|
+
}]</parameter>
|
|
103
|
+
</invoke>
|
|
104
|
+
```
|
|
105
|
+
|
|
88
106
|
<!-- COMPACT_SUMMARY_END -->
|
|
89
107
|
|
|
90
108
|
---
|
|
@@ -77,6 +77,37 @@ Create a new epic with optional child stories.
|
|
|
77
77
|
5. Ask: "Proceed with epic creation? (YES/NO)"
|
|
78
78
|
6. On YES: Execute all writes
|
|
79
79
|
7. On NO: Abort without changes
|
|
80
|
+
|
|
81
|
+
**Tool Usage Examples**:
|
|
82
|
+
|
|
83
|
+
TodoWrite:
|
|
84
|
+
```xml
|
|
85
|
+
<invoke name="TodoWrite">
|
|
86
|
+
<parameter name="content">1. Parse inputs (EPIC, TITLE, OWNER, GOAL, STORIES)
|
|
87
|
+
2. Create epic file from template
|
|
88
|
+
3. For each story: create docs/06-stories/
|
|
89
|
+
4. Merge into status.json
|
|
90
|
+
5. Append assign events to bus log
|
|
91
|
+
6. Show preview and wait for confirmation</parameter>
|
|
92
|
+
<parameter name="status">in-progress</parameter>
|
|
93
|
+
</invoke>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
AskUserQuestion:
|
|
97
|
+
```xml
|
|
98
|
+
<invoke name="AskUserQuestion">
|
|
99
|
+
<parameter name="questions">[{
|
|
100
|
+
"question": "Create epic EP-0010: Authentication with 3 stories?",
|
|
101
|
+
"header": "Confirm Epic Creation",
|
|
102
|
+
"multiSelect": false,
|
|
103
|
+
"options": [
|
|
104
|
+
{"label": "Yes, create epic", "description": "Create epic and all stories"},
|
|
105
|
+
{"label": "No, revise", "description": "Modify before creating"},
|
|
106
|
+
{"label": "Cancel", "description": "Don't create"}
|
|
107
|
+
]
|
|
108
|
+
}]</parameter>
|
|
109
|
+
</invoke>
|
|
110
|
+
```
|
|
80
111
|
<!-- COMPACT_SUMMARY_END -->
|
|
81
112
|
|
|
82
113
|
## Prompt
|
|
@@ -19,7 +19,7 @@ Collect feedback from agents and humans for continuous process improvement.
|
|
|
19
19
|
**Purpose**: Collect feedback on stories, agents, and processes for continuous improvement
|
|
20
20
|
|
|
21
21
|
**Quick Usage**:
|
|
22
|
-
```
|
|
22
|
+
```bash
|
|
23
23
|
/agileflow:agent-feedback SCOPE=story STORY=US-0042
|
|
24
24
|
/agileflow:agent-feedback SCOPE=epic EPIC=EP-0010
|
|
25
25
|
/agileflow:agent-feedback SCOPE=sprint
|
|
@@ -27,30 +27,31 @@ Collect feedback from agents and humans for continuous process improvement.
|
|
|
27
27
|
|
|
28
28
|
**What It Does**:
|
|
29
29
|
1. Prompts for feedback at trigger points (story done, epic complete, sprint end)
|
|
30
|
-
2. Collects structured feedback (ratings, comments, blockers)
|
|
31
|
-
3. Saves feedback to `docs/08-project/feedback/`
|
|
30
|
+
2. Collects structured feedback (ratings 1-5, comments, blockers)
|
|
31
|
+
3. Saves feedback to `docs/08-project/feedback/` (markdown format)
|
|
32
32
|
4. Analyzes patterns and generates insights
|
|
33
33
|
5. Suggests improvement stories for recurring issues
|
|
34
34
|
6. Tracks metrics over time (clarity, estimates, blockers)
|
|
35
35
|
|
|
36
36
|
**Required Inputs**:
|
|
37
|
-
- `SCOPE
|
|
37
|
+
- `SCOPE`: story|epic|sprint (default: story)
|
|
38
38
|
|
|
39
39
|
**Optional Inputs**:
|
|
40
|
-
- `STORY
|
|
41
|
-
- `EPIC
|
|
42
|
-
- `ANONYMOUS
|
|
43
|
-
|
|
44
|
-
**
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
- `STORY`: <US-ID> (required if SCOPE=story)
|
|
41
|
+
- `EPIC`: <EP-ID> (required if SCOPE=epic)
|
|
42
|
+
- `ANONYMOUS`: yes|no (default: no)
|
|
43
|
+
|
|
44
|
+
**Data Sources** (parsing required):
|
|
45
|
+
1. Story frontmatter files (US-*.md) - YAML extraction for dates, estimates
|
|
46
|
+
2. status.json - Story metadata (JSON parsing)
|
|
47
|
+
3. bus/log.jsonl - Activity logs for pattern detection (JSON line parsing)
|
|
48
|
+
4. Feedback files (markdown parsing for metrics extraction)
|
|
49
|
+
|
|
50
|
+
**Feedback Collection**:
|
|
51
|
+
- **Story Completion**: AC clarity, dependencies resolved, estimate accuracy, smoothness (1-5 scale)
|
|
52
|
+
- **Agent Performance**: Completion rate, test coverage, reliability metrics
|
|
53
|
+
- **Epic Retrospective**: Success metrics, wins, challenges, learnings
|
|
54
|
+
- **Sprint Retrospective**: Continue/Stop/Start, experiments, blockers
|
|
54
55
|
|
|
55
56
|
**Metrics Tracked**:
|
|
56
57
|
- Avg story clarity score (target: >4.0)
|
|
@@ -63,11 +64,22 @@ Collect feedback from agents and humans for continuous process improvement.
|
|
|
63
64
|
1. Auto-prompt at trigger (story→done, epic complete, sprint end)
|
|
64
65
|
2. Present feedback form with pre-filled context
|
|
65
66
|
3. Ask: "Provide feedback now? (YES/NO/LATER)"
|
|
66
|
-
4. Collect ratings and comments
|
|
67
|
-
5. Save to feedback
|
|
68
|
-
6. Analyze patterns across feedback
|
|
67
|
+
4. Collect ratings (1-5 scale) and free-form comments
|
|
68
|
+
5. Save to docs/08-project/feedback/<YYYYMMDD>-<ID>.md
|
|
69
|
+
6. Analyze patterns across feedback (pattern matching for recurring themes)
|
|
69
70
|
7. Suggest improvement stories for recurring issues
|
|
70
71
|
|
|
72
|
+
**Analysis** (pattern detection):
|
|
73
|
+
- Scan all feedback for patterns: "unclear AC" → improve template
|
|
74
|
+
- Calculate metrics: avg clarity score, estimate variance, blocker frequency
|
|
75
|
+
- Track trends over time (metrics comparison)
|
|
76
|
+
- Generate actionable recommendations
|
|
77
|
+
|
|
78
|
+
**Output Files**:
|
|
79
|
+
- Feedback notes: `docs/08-project/feedback/<YYYYMMDD>-<ID>.md`
|
|
80
|
+
- Summary log: `docs/08-project/retrospectives.md`
|
|
81
|
+
- Optional: Auto-generated improvement stories for issues
|
|
82
|
+
|
|
71
83
|
**Example Story Feedback**:
|
|
72
84
|
```markdown
|
|
73
85
|
## Story Feedback: US-0042
|
|
@@ -73,6 +73,35 @@ All endpoints tested and passing.
|
|
|
73
73
|
- Documenting progress before pause
|
|
74
74
|
- Highlighting blockers for next agent
|
|
75
75
|
- Creating audit trail of work transitions
|
|
76
|
+
|
|
77
|
+
**Tool Usage Examples**:
|
|
78
|
+
|
|
79
|
+
TodoWrite:
|
|
80
|
+
```xml
|
|
81
|
+
<invoke name="TodoWrite">
|
|
82
|
+
<parameter name="content">1. Parse inputs (STORY, FROM, TO, SUMMARY, BLOCKERS)
|
|
83
|
+
2. Create handoff note from template
|
|
84
|
+
3. Append bus line with type="handoff"
|
|
85
|
+
4. Show preview and wait for confirmation</parameter>
|
|
86
|
+
<parameter name="status">in-progress</parameter>
|
|
87
|
+
</invoke>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
AskUserQuestion:
|
|
91
|
+
```xml
|
|
92
|
+
<invoke name="AskUserQuestion">
|
|
93
|
+
<parameter name="questions">[{
|
|
94
|
+
"question": "Create handoff from AG-API to AG-UI for US-0042?",
|
|
95
|
+
"header": "Confirm Handoff",
|
|
96
|
+
"multiSelect": false,
|
|
97
|
+
"options": [
|
|
98
|
+
{"label": "Yes, create", "description": "Create handoff note and bus log"},
|
|
99
|
+
{"label": "No, cancel", "description": "Don't create"}
|
|
100
|
+
]
|
|
101
|
+
}]</parameter>
|
|
102
|
+
</invoke>
|
|
103
|
+
```
|
|
104
|
+
|
|
76
105
|
<!-- COMPACT_SUMMARY_END -->
|
|
77
106
|
|
|
78
107
|
## Prompt
|
|
@@ -34,15 +34,24 @@ node .agileflow/scripts/obtain-context.js help
|
|
|
34
34
|
- **Command**: /agileflow:help
|
|
35
35
|
- **Purpose**: Display AgileFlow system overview
|
|
36
36
|
- **No Arguments**: Shows system overview automatically
|
|
37
|
-
- **Output**: Markdown overview (no file writes)
|
|
38
|
-
- **Key Actions**:
|
|
39
|
-
1. Print folder map (docs/*)
|
|
40
|
-
2. Explain Epics, Stories, ADRs, status.json, bus/log.jsonl
|
|
41
|
-
3. Show daily workflow
|
|
42
|
-
4. List all available commands with examples
|
|
37
|
+
- **Output**: Markdown overview (no file writes, display only)
|
|
38
|
+
- **Key Actions**: Print folder map → Explain concepts → Show workflow → List all commands
|
|
43
39
|
- **Workflow**: Pick story → Implement to AC → Tests → PR → Update status
|
|
44
40
|
- **WIP Limit**: Max 2 stories/agent
|
|
45
|
-
|
|
41
|
+
|
|
42
|
+
### Tool Usage
|
|
43
|
+
|
|
44
|
+
This command uses NO tools (display-only, no file writes).
|
|
45
|
+
|
|
46
|
+
Output includes:
|
|
47
|
+
- Folder map (docs/*) and what lives where
|
|
48
|
+
- What Epics, Stories, ADRs are
|
|
49
|
+
- How docs/09-agents/status.json and bus/log.jsonl work
|
|
50
|
+
- Daily flow: Pick story → Implement to AC → Tests → PR → Update status
|
|
51
|
+
- WIP limit: max 2 stories/agent
|
|
52
|
+
- All available commands with examples
|
|
53
|
+
- Dynamic injection: <!-- {{COMMAND_LIST}} -->
|
|
54
|
+
|
|
46
55
|
- **Related**: All AgileFlow commands, system documentation
|
|
47
56
|
<!-- COMPACT_SUMMARY_END -->
|
|
48
57
|
|
|
@@ -55,8 +55,8 @@ ACTIVATION_SCRIPT
|
|
|
55
55
|
**Purpose**: Analyze code change impact across codebase to prevent regressions
|
|
56
56
|
|
|
57
57
|
**Core Workflow**:
|
|
58
|
-
1. Detect changed files (git diff or FILES param)
|
|
59
|
-
2. Build dependency graph (direct + indirect imports, 2 levels)
|
|
58
|
+
1. Detect changed files (`git diff` or FILES param)
|
|
59
|
+
2. Build dependency graph (direct + indirect imports, 2 levels deep)
|
|
60
60
|
3. Find related tests (unit, integration, E2E)
|
|
61
61
|
4. Analyze breaking changes (function signatures, types)
|
|
62
62
|
5. Generate impact report with risk levels
|
|
@@ -64,77 +64,47 @@ ACTIVATION_SCRIPT
|
|
|
64
64
|
|
|
65
65
|
**Key Analysis Methods**:
|
|
66
66
|
- **Static Analysis**: AST parsing for imports, dependency graphs, circular deps, dead code
|
|
67
|
-
- **Test Coverage Mapping**: Parse coverage reports, map changed lines to tests
|
|
68
|
-
- **Pattern Matching**: Route tests for API changes, component tests for UI
|
|
67
|
+
- **Test Coverage Mapping**: Parse coverage reports (coverage/lcov.info), map changed lines to tests
|
|
68
|
+
- **Pattern Matching**: Route tests for API changes, component tests for UI changes
|
|
69
69
|
|
|
70
70
|
**Input Parameters** (optional):
|
|
71
|
-
- `FILES
|
|
72
|
-
- `BASE
|
|
73
|
-
- `RUN_TESTS
|
|
71
|
+
- `FILES`: <paths> (comma-separated file paths, default: auto-detect from git)
|
|
72
|
+
- `BASE`: <branch> (base branch for comparison, default: main/master)
|
|
73
|
+
- `RUN_TESTS`: yes|no (execute affected tests, default: yes if found)
|
|
74
|
+
|
|
75
|
+
**Parsing Strategy**:
|
|
76
|
+
1. Run `git diff <BASE>...HEAD --name-only` → Extract file paths
|
|
77
|
+
2. For each file: Parse imports/requires (regex or AST parsing)
|
|
78
|
+
3. Build adjacency list for dependency graph
|
|
79
|
+
4. Query coverage reports to map changed lines to tests
|
|
80
|
+
5. Pattern-match to identify test files (*.test.*, *.spec.*)
|
|
81
|
+
6. Run DFS for direct/indirect dependents (2 levels)
|
|
82
|
+
|
|
83
|
+
**Impact Analysis Steps**:
|
|
84
|
+
1. Detect changed files → Parse dependencies → Build graph
|
|
85
|
+
2. Find related tests (unit, integration, E2E)
|
|
86
|
+
3. Detect breaking changes (function signature changes, type modifications)
|
|
87
|
+
4. Identify affected callers with line numbers
|
|
88
|
+
5. Calculate risk scores (critical/recommended/optional)
|
|
89
|
+
6. Generate impact report → Optionally run tests
|
|
74
90
|
|
|
75
|
-
**
|
|
91
|
+
**Example Usage**:
|
|
92
|
+
```bash
|
|
93
|
+
/agileflow:impact
|
|
94
|
+
/agileflow:impact FILES=src/api/auth.ts,src/middleware/jwt.ts
|
|
95
|
+
/agileflow:impact BASE=develop RUN_TESTS=no
|
|
76
96
|
```
|
|
77
|
-
# Impact Analysis Report
|
|
78
|
-
- Changed Files: N
|
|
79
|
-
- Affected Files: M
|
|
80
|
-
- Tests to Run: X
|
|
81
|
-
|
|
82
|
-
## Direct Impacts
|
|
83
|
-
For each changed file:
|
|
84
|
-
- Type (API/UI/Service/Model)
|
|
85
|
-
- Changes (line count)
|
|
86
|
-
- Direct dependents (imports this file)
|
|
87
|
-
- Indirect dependents (2-level chain)
|
|
88
|
-
- Related tests (✅ exists, ⚠️ needs update, ❌ missing)
|
|
89
|
-
- Related stories (from docs/06-stories/)
|
|
90
|
-
- Coverage percentage
|
|
91
|
-
|
|
92
|
-
## Breaking Changes Detection
|
|
93
|
-
- Function signature changes
|
|
94
|
-
- Type modifications
|
|
95
|
-
- Affected callers with line numbers
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
- Critical (always run): Direct tests
|
|
99
|
-
- Recommended (affected): Integration/E2E tests
|
|
100
|
-
- Optional (low risk): Peripheral tests
|
|
101
|
-
```
|
|
98
|
+
**Output**: Impact report with changed files, affected files, tests to run, breaking changes detection, test recommendations, optional test execution
|
|
102
99
|
|
|
103
100
|
**Actions After Analysis**:
|
|
104
101
|
1. Show impact summary
|
|
105
102
|
2. Prompt: "Run affected tests? (YES/NO)"
|
|
106
|
-
3. If YES: Execute
|
|
103
|
+
3. If YES: Execute with `npm test -- <test-files>`
|
|
107
104
|
4. If tests fail: Show failures, suggest regression story
|
|
108
105
|
5. If breaking changes: Warn user, suggest ADR, create update stories
|
|
109
106
|
|
|
110
|
-
**Integration
|
|
111
|
-
- CI optimization (only run affected tests)
|
|
112
|
-
- Story updates (append impact notes)
|
|
113
|
-
- Event logging (bus/log.jsonl)
|
|
114
|
-
- Dependency visualization (tree format)
|
|
115
|
-
|
|
116
|
-
**Rules**:
|
|
117
|
-
- Use static analysis over running tests (faster)
|
|
118
|
-
- Prioritize tests by risk (critical path first)
|
|
119
|
-
- Never skip tests for modified files
|
|
120
|
-
- Warn about uncovered changes
|
|
121
|
-
- Suggest creating tests for gaps
|
|
122
|
-
- Always diff before modifying files
|
|
123
|
-
|
|
124
|
-
**Example Usage**:
|
|
125
|
-
```bash
|
|
126
|
-
# Auto-detect changes
|
|
127
|
-
/agileflow:impact
|
|
128
|
-
|
|
129
|
-
# Specific files
|
|
130
|
-
/agileflow:impact FILES=src/api/auth.ts,src/middleware/jwt.ts
|
|
131
|
-
|
|
132
|
-
# Different base branch
|
|
133
|
-
/agileflow:impact BASE=develop
|
|
134
|
-
|
|
135
|
-
# Skip test execution
|
|
136
|
-
/agileflow:impact RUN_TESTS=no
|
|
137
|
-
```
|
|
107
|
+
**Integration**: CI optimization (run only affected tests), story updates, event logging, dependency visualization
|
|
138
108
|
<!-- COMPACT_SUMMARY_END -->
|
|
139
109
|
|
|
140
110
|
---
|
|
@@ -34,24 +34,13 @@ Comprehensive project analytics dashboard with cycle time, lead time, throughput
|
|
|
34
34
|
- `docs/06-stories/**/US-*.md` - Story metadata and frontmatter
|
|
35
35
|
- `docs/05-epics/*.md` - Epic-level data
|
|
36
36
|
|
|
37
|
-
**Core Metrics**:
|
|
38
|
-
1. **Cycle Time**: Time from "in-progress" to "done" (actual work time)
|
|
39
|
-
2. **Lead Time**: Time from creation to "done" (total time including waiting)
|
|
40
|
-
3. **Throughput**: Stories completed per week
|
|
41
|
-
4. **WIP**: Current work in progress vs limits
|
|
42
|
-
5. **Agent Utilization**: Work distribution across agents
|
|
43
|
-
6. **Epic Health**: Progress and blocking indicators
|
|
44
|
-
7. **Estimation Accuracy**: Estimates vs actuals
|
|
45
|
-
8. **Blocked Story Analysis**: Patterns and duration
|
|
46
|
-
9. **Flow Efficiency**: Active work time / total lead time
|
|
47
|
-
10. **Cumulative Flow**: Story distribution over time
|
|
37
|
+
**Core Metrics**: Cycle Time, Lead Time, Throughput, WIP, Agent Utilization, Epic Health, Estimation Accuracy, Blocked Story Analysis, Flow Efficiency, Cumulative Flow
|
|
48
38
|
|
|
49
39
|
**Critical Behavioral Rules**:
|
|
50
40
|
- Calculate from raw data sources, never assume or estimate
|
|
51
41
|
- Show trends (↗↘) compared to previous period
|
|
52
42
|
- Use health indicators (🟢🟡🔴) for quick status assessment
|
|
53
43
|
- Provide actionable recommendations based on data
|
|
54
|
-
- Respect privacy: agent-level only, no individual metrics
|
|
55
44
|
- Always include timeframe and generation timestamp
|
|
56
45
|
|
|
57
46
|
**Input Parameters**:
|
|
@@ -62,29 +51,22 @@ Comprehensive project analytics dashboard with cycle time, lead time, throughput
|
|
|
62
51
|
- `METRIC`: cycle-time|lead-time|throughput|all (default: all)
|
|
63
52
|
|
|
64
53
|
**Workflow**:
|
|
65
|
-
1. Parse input parameters
|
|
66
|
-
2.
|
|
67
|
-
3.
|
|
68
|
-
4.
|
|
69
|
-
5.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
- Related commands for deeper analysis
|
|
82
|
-
|
|
83
|
-
**Integration Points**:
|
|
84
|
-
- After `/agileflow:velocity` for detailed trends
|
|
85
|
-
- After `/agileflow:board` to understand bottlenecks
|
|
86
|
-
- Before `/agileflow:retro` to gather retrospective data
|
|
87
|
-
- Auto-triggered by `/agileflow:babysit` when velocity drops
|
|
54
|
+
1. Parse input parameters → Load data from bus/log.jsonl and status.json
|
|
55
|
+
2. Calculate metrics using timestamps → Compute statistics (avg, median, p85, trends)
|
|
56
|
+
3. Generate visualizations (ASCII bars, distributions)
|
|
57
|
+
4. Identify patterns and anomalies → Generate actionable recommendations
|
|
58
|
+
5. Format output per FORMAT parameter → Optionally save to docs/08-project/metrics-reports/
|
|
59
|
+
|
|
60
|
+
**Example Usage**:
|
|
61
|
+
```bash
|
|
62
|
+
/agileflow:metrics
|
|
63
|
+
/agileflow:metrics TIMEFRAME=90d EPIC=EP-0010
|
|
64
|
+
/agileflow:metrics METRIC=cycle-time FORMAT=json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Output**: ASCII dashboard with key metrics, WIP status, epic health, and recommendations
|
|
68
|
+
|
|
69
|
+
**Integration**: After `/velocity` for trends, before `/retro` for retrospective data, auto-triggered by `/babysit`
|
|
88
70
|
|
|
89
71
|
<!-- COMPACT_SUMMARY_END -->
|
|
90
72
|
|
|
@@ -52,6 +52,27 @@ node .agileflow/scripts/obtain-context.js packages
|
|
|
52
52
|
- **Output**: Dashboard report, update report, or audit report
|
|
53
53
|
- **Safety**: Never auto-update without approval, preview all commands
|
|
54
54
|
- **Related**: Security audits, CI integration, Dependabot config
|
|
55
|
+
|
|
56
|
+
**Tools Used**:
|
|
57
|
+
- TodoWrite: Track 8-step dependency management workflow
|
|
58
|
+
|
|
59
|
+
**TodoWrite Example**:
|
|
60
|
+
```xml
|
|
61
|
+
<invoke name="TodoWrite">
|
|
62
|
+
<parameter name="content">
|
|
63
|
+
1. Parse inputs (ACTION, SCOPE, OUTPUT, INCLUDE_DEV, SAVE_TO, AUTO_PR)
|
|
64
|
+
2. Detect package manager(s) (npm, pip, cargo, etc.)
|
|
65
|
+
3. Run analysis based on ACTION (dashboard/update/audit)
|
|
66
|
+
4. Generate report with findings
|
|
67
|
+
5. For ACTION=update: Show update plan and wait for YES/NO
|
|
68
|
+
6. Apply updates (if approved)
|
|
69
|
+
7. Save reports to docs/08-project/
|
|
70
|
+
8. Create stories for security issues (if needed)
|
|
71
|
+
</parameter>
|
|
72
|
+
<parameter name="status">in-progress</parameter>
|
|
73
|
+
</invoke>
|
|
74
|
+
```
|
|
75
|
+
|
|
55
76
|
<!-- COMPACT_SUMMARY_END -->
|
|
56
77
|
|
|
57
78
|
---
|
package/src/core/commands/pr.md
CHANGED
|
@@ -86,6 +86,21 @@ This gathers git status, stories/epics, session state, and registers for PreComp
|
|
|
86
86
|
- Preserve checkbox states from AC_CHECKED input
|
|
87
87
|
- Format test evidence clearly and readably
|
|
88
88
|
- Suggest meaningful commit messages aligned with change type
|
|
89
|
+
|
|
90
|
+
**Tool Usage Examples**:
|
|
91
|
+
|
|
92
|
+
TodoWrite:
|
|
93
|
+
```xml
|
|
94
|
+
<invoke name="TodoWrite">
|
|
95
|
+
<parameter name="content">1. Parse inputs (STORY, TITLE, AC_CHECKED, TEST_EVIDENCE, NOTES)
|
|
96
|
+
2. Read story file to extract epic/summary/deps
|
|
97
|
+
3. Generate PR description with all sections
|
|
98
|
+
4. Output paste-ready PR body
|
|
99
|
+
5. Suggest Conventional Commit subject</parameter>
|
|
100
|
+
<parameter name="status">in-progress</parameter>
|
|
101
|
+
</invoke>
|
|
102
|
+
```
|
|
103
|
+
|
|
89
104
|
<!-- COMPACT_SUMMARY_END -->
|
|
90
105
|
|
|
91
106
|
---
|
|
@@ -36,18 +36,51 @@ node .agileflow/scripts/obtain-context.js readme-sync
|
|
|
36
36
|
- **Purpose**: Synchronize folder README.md with current contents
|
|
37
37
|
- **Arguments**: FOLDER=<path> | FOLDER=all
|
|
38
38
|
- **Agent Spawning**: Spawns `readme-updater` agent for actual work
|
|
39
|
-
- **Key Actions**:
|
|
40
|
-
1. List all files and subdirectories in FOLDER
|
|
41
|
-
2. Read current README.md (if exists)
|
|
42
|
-
3. Extract descriptions from each file (first heading or sentence)
|
|
43
|
-
4. Build new "## Contents" section with bullet list
|
|
44
|
-
5. Show diff and ask for confirmation via AskUserQuestion
|
|
45
|
-
6. Update if approved using Edit tool
|
|
39
|
+
- **Key Actions**: List files → Extract descriptions → Build Contents section → Show diff → Update if approved
|
|
46
40
|
- **FOLDER=all**: Sync all docs/*/ subdirectories in parallel
|
|
47
|
-
|
|
41
|
+
|
|
42
|
+
### Tool Usage Examples
|
|
43
|
+
|
|
44
|
+
**Task** (to spawn readme-updater agent):
|
|
45
|
+
```xml
|
|
46
|
+
<invoke name="Task">
|
|
47
|
+
<parameter name="description">Sync README for docs/02-practices</parameter>
|
|
48
|
+
<parameter name="prompt">Audit and synchronize README.md for: docs/02-practices
|
|
49
|
+
1. List all files and subdirectories
|
|
50
|
+
2. Read current README.md (if exists)
|
|
51
|
+
3. Extract descriptions from each file
|
|
52
|
+
4. Build new '## Contents' section
|
|
53
|
+
5. Show diff and ask for confirmation
|
|
54
|
+
6. Update if approved</parameter>
|
|
55
|
+
<parameter name="subagent_type">agileflow-readme-updater</parameter>
|
|
56
|
+
</invoke>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**AskUserQuestion** (when folder is missing):
|
|
60
|
+
```xml
|
|
61
|
+
<invoke name="AskUserQuestion">
|
|
62
|
+
<parameter name="questions">[{"question": "Which folder should I sync?", "header": "Folder", "multiSelect": false, "options": [{"label": "docs/02-practices (Recommended)", "description": "Sync practices documentation folder"}, {"label": "docs/04-architecture", "description": "Sync architecture documentation"}, {"label": "all", "description": "Sync all docs/ subfolders"}]}]</parameter>
|
|
63
|
+
</invoke>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**AskUserQuestion** (for confirmation):
|
|
67
|
+
```xml
|
|
68
|
+
<invoke name="AskUserQuestion">
|
|
69
|
+
<parameter name="questions">[{"question": "Apply these changes to README.md?", "header": "Update", "multiSelect": false, "options": [{"label": "Yes, update README (Recommended)", "description": "Write the proposed ## Contents section"}, {"label": "No, abort", "description": "Cancel without making changes"}]}]</parameter>
|
|
70
|
+
</invoke>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Edit** (to update README contents):
|
|
74
|
+
```xml
|
|
75
|
+
<invoke name="Edit">
|
|
76
|
+
<parameter name="file_path">/full/path/to/docs/02-practices/README.md</parameter>
|
|
77
|
+
<parameter name="old_string">## Contents\n\n[old file list]</parameter>
|
|
78
|
+
<parameter name="new_string">## Contents\n\n- **file.md** – Description\n- **folder/** – Description</parameter>
|
|
79
|
+
</invoke>
|
|
80
|
+
```
|
|
81
|
+
|
|
48
82
|
- **Output**: Updates only "## Contents" section, preserves all other sections
|
|
49
83
|
- **Use Cases**: After adding files, before releases, documentation cleanup, reorganizing folders
|
|
50
|
-
- **Related**: Async agent spawning patterns, AskUserQuestion format
|
|
51
84
|
<!-- COMPACT_SUMMARY_END -->
|
|
52
85
|
|
|
53
86
|
---
|