agileflow 2.75.0 → 2.77.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/package.json +1 -1
- package/scripts/agileflow-configure.js +110 -32
- package/scripts/agileflow-statusline.sh +155 -9
- package/scripts/agileflow-welcome.js +171 -47
- package/scripts/auto-self-improve.js +344 -0
- package/scripts/check-update.js +1 -4
- package/scripts/get-env.js +15 -7
- package/scripts/lib/frontmatter-parser.js +4 -1
- package/scripts/obtain-context.js +59 -48
- package/scripts/ralph-loop.js +503 -0
- package/scripts/validate-expertise.sh +19 -15
- package/src/core/agents/design.md +1 -1
- package/src/core/agents/documentation.md +1 -1
- package/src/core/agents/integrations.md +1 -1
- package/src/core/agents/mobile.md +1 -1
- package/src/core/agents/monitoring.md +1 -1
- package/src/core/agents/performance.md +1 -1
- package/src/core/commands/babysit.md +73 -0
- package/src/core/commands/configure.md +50 -7
- package/src/core/experts/documentation/expertise.yaml +4 -0
- package/src/core/experts/research/expertise.yaml +2 -2
- package/tools/cli/commands/list.js +3 -1
- package/tools/cli/commands/uninstall.js +4 -5
- package/tools/cli/commands/update.js +11 -3
- package/tools/cli/lib/content-injector.js +6 -1
- package/tools/cli/lib/docs-setup.js +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Interactive mentor for end-to-end feature implementation
|
|
3
|
+
argument-hint: "[EPIC=<id>] [MODE=loop] [MAX=<iterations>]"
|
|
3
4
|
compact_context:
|
|
4
5
|
priority: critical
|
|
5
6
|
preserve_rules:
|
|
@@ -34,6 +35,78 @@ This gathers: git status, stories/epics, session state, docs structure, research
|
|
|
34
35
|
|
|
35
36
|
---
|
|
36
37
|
|
|
38
|
+
## LOOP MODE (Autonomous Execution)
|
|
39
|
+
|
|
40
|
+
When invoked with `MODE=loop`, babysit runs autonomously through an epic's stories:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
/agileflow:babysit EPIC=EP-0042 MODE=loop MAX=20
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### How Loop Mode Works
|
|
47
|
+
|
|
48
|
+
1. **Initialization**: Writes loop config to `session-state.json`
|
|
49
|
+
2. **First Story**: Picks first "ready" story, marks it "in_progress"
|
|
50
|
+
3. **Work**: You implement the story normally
|
|
51
|
+
4. **Stop Hook**: When you stop, `ralph-loop.js` runs:
|
|
52
|
+
- Runs `npm test` (or configured test command)
|
|
53
|
+
- If tests pass → marks story complete, loads next story
|
|
54
|
+
- If tests fail → shows failures, you continue fixing
|
|
55
|
+
5. **Loop**: Continues until epic complete or MAX iterations reached
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
| Parameter | Required | Description |
|
|
60
|
+
|-----------|----------|-------------|
|
|
61
|
+
| `EPIC` | Yes | Epic ID to process (e.g., EP-0042) |
|
|
62
|
+
| `MODE` | Yes | Must be `loop` for autonomous mode |
|
|
63
|
+
| `MAX` | No | Max iterations (default: 20) |
|
|
64
|
+
|
|
65
|
+
### To Start Loop Mode
|
|
66
|
+
|
|
67
|
+
After running the context script, if EPIC and MODE=loop are specified:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Initialize the loop
|
|
71
|
+
node scripts/ralph-loop.js --init --epic=EP-0042 --max=20
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or manually write to session-state.json:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"ralph_loop": {
|
|
79
|
+
"enabled": true,
|
|
80
|
+
"epic": "EP-0042",
|
|
81
|
+
"current_story": "US-0015",
|
|
82
|
+
"iteration": 0,
|
|
83
|
+
"max_iterations": 20
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Loop Control Commands
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
node scripts/ralph-loop.js --status # Check loop status
|
|
92
|
+
node scripts/ralph-loop.js --stop # Stop the loop
|
|
93
|
+
node scripts/ralph-loop.js --reset # Reset loop state
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### When to Use Loop Mode
|
|
97
|
+
|
|
98
|
+
**Good for:**
|
|
99
|
+
- Working through a well-defined epic with clear stories
|
|
100
|
+
- Test-driven development (tests define "done")
|
|
101
|
+
- Batch processing multiple stories overnight
|
|
102
|
+
|
|
103
|
+
**Not good for:**
|
|
104
|
+
- Exploratory work without clear acceptance criteria
|
|
105
|
+
- Stories requiring human review before proceeding
|
|
106
|
+
- Complex multi-domain work needing coordination
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
37
110
|
<!-- COMPACT_SUMMARY_START -->
|
|
38
111
|
|
|
39
112
|
## Compact Summary
|
|
@@ -36,7 +36,9 @@ node .agileflow/scripts/agileflow-configure.js --repair=statusline # Fix specif
|
|
|
36
36
|
|
|
37
37
|
### Features
|
|
38
38
|
|
|
39
|
-
`sessionstart`, `precompact`, `archival`, `statusline`, `autoupdate`
|
|
39
|
+
`sessionstart`, `precompact`, `ralphloop`, `selfimprove`, `archival`, `statusline`, `autoupdate`
|
|
40
|
+
|
|
41
|
+
**Stop hooks** (ralphloop, selfimprove) run when Claude completes or pauses work.
|
|
40
42
|
|
|
41
43
|
### Critical Rules
|
|
42
44
|
|
|
@@ -162,12 +164,12 @@ node .agileflow/scripts/agileflow-configure.js --enable=archival --archival-days
|
|
|
162
164
|
|
|
163
165
|
## Profile Details
|
|
164
166
|
|
|
165
|
-
| Profile | SessionStart | PreCompact | Archival | StatusLine |
|
|
166
|
-
|
|
167
|
-
| `full` | ✅ | ✅ | ✅ 30 days | ✅ |
|
|
168
|
-
| `basic` | ✅ | ✅ | ✅ 30 days | ❌ |
|
|
169
|
-
| `minimal` | ✅ | ❌ | ✅ 30 days | ❌ |
|
|
170
|
-
| `none` | ❌ | ❌ | ❌ | ❌ |
|
|
167
|
+
| Profile | SessionStart | PreCompact | RalphLoop | SelfImprove | Archival | StatusLine |
|
|
168
|
+
|---------|-------------|------------|-----------|-------------|----------|------------|
|
|
169
|
+
| `full` | ✅ | ✅ | ✅ | ✅ | ✅ 30 days | ✅ |
|
|
170
|
+
| `basic` | ✅ | ✅ | ❌ | ❌ | ✅ 30 days | ❌ |
|
|
171
|
+
| `minimal` | ✅ | ❌ | ❌ | ❌ | ✅ 30 days | ❌ |
|
|
172
|
+
| `none` | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
|
|
171
173
|
|
|
172
174
|
## Interactive Mode (via /configure command)
|
|
173
175
|
|
|
@@ -204,6 +206,8 @@ Based on selection, run appropriate command.
|
|
|
204
206
|
"options": [
|
|
205
207
|
{"label": "SessionStart Hook", "description": "Welcome display with project status"},
|
|
206
208
|
{"label": "PreCompact Hook", "description": "Context preservation on compact"},
|
|
209
|
+
{"label": "RalphLoop (Stop Hook)", "description": "Autonomous story loop - runs tests, advances stories"},
|
|
210
|
+
{"label": "SelfImprove (Stop Hook)", "description": "Auto-update agent expertise from work"},
|
|
207
211
|
{"label": "Archival", "description": "Auto-archive old completed stories"},
|
|
208
212
|
{"label": "Status Line", "description": "Custom status bar"},
|
|
209
213
|
{"label": "Auto-Update", "description": "Automatically update AgileFlow on session start"}
|
|
@@ -215,6 +219,8 @@ Based on selection, run appropriate command.
|
|
|
215
219
|
Map selections:
|
|
216
220
|
- "SessionStart Hook" → `sessionstart`
|
|
217
221
|
- "PreCompact Hook" → `precompact`
|
|
222
|
+
- "RalphLoop (Stop Hook)" → `ralphloop`
|
|
223
|
+
- "SelfImprove (Stop Hook)" → `selfimprove`
|
|
218
224
|
- "Archival" → `archival`
|
|
219
225
|
- "Status Line" → `statusline`
|
|
220
226
|
- "Auto-Update" → `autoupdate`
|
|
@@ -241,6 +247,43 @@ node .agileflow/scripts/agileflow-configure.js --enable=autoupdate
|
|
|
241
247
|
|
|
242
248
|
**Check frequencies:** `hourly`, `daily`, `weekly`, `never`
|
|
243
249
|
|
|
250
|
+
## Stop Hook Features
|
|
251
|
+
|
|
252
|
+
Stop hooks run when Claude completes a task or pauses for user input. These enable autonomous workflows.
|
|
253
|
+
|
|
254
|
+
### RalphLoop (`ralphloop`)
|
|
255
|
+
|
|
256
|
+
Autonomous story processing loop (named after the "Ralph Wiggum" pattern):
|
|
257
|
+
- Runs tests automatically when Claude stops
|
|
258
|
+
- If tests pass → marks story as completed, loads next story in epic
|
|
259
|
+
- If tests fail → shows failures for Claude to fix
|
|
260
|
+
- Tracks iterations with configurable limits (default: 20)
|
|
261
|
+
- Enable: `--enable=ralphloop`
|
|
262
|
+
|
|
263
|
+
**How to use:**
|
|
264
|
+
1. Enable: `node .agileflow/scripts/agileflow-configure.js --enable=ralphloop`
|
|
265
|
+
2. Start a loop: `node .agileflow/scripts/ralph-loop.js --init --epic=EP-XXXX`
|
|
266
|
+
3. Work on stories - tests run automatically when Claude stops
|
|
267
|
+
4. Check status: `node .agileflow/scripts/ralph-loop.js --status`
|
|
268
|
+
5. Stop loop: `node .agileflow/scripts/ralph-loop.js --stop`
|
|
269
|
+
|
|
270
|
+
### SelfImprove (`selfimprove`)
|
|
271
|
+
|
|
272
|
+
Automatic agent expertise learning:
|
|
273
|
+
- Analyzes git changes when Claude stops
|
|
274
|
+
- Detects which domain (database, api, ui, etc.) was modified
|
|
275
|
+
- Appends learnings to the relevant agent's expertise.yaml
|
|
276
|
+
- Helps agents improve over time based on actual work
|
|
277
|
+
- Enable: `--enable=selfimprove`
|
|
278
|
+
|
|
279
|
+
**What it learns:**
|
|
280
|
+
- Files modified per domain
|
|
281
|
+
- New patterns discovered
|
|
282
|
+
- Test file changes
|
|
283
|
+
- Configuration updates
|
|
284
|
+
|
|
285
|
+
Both Stop hooks use error suppression (`2>/dev/null || true`) to avoid blocking Claude if they fail.
|
|
286
|
+
|
|
244
287
|
## Format Migration Details
|
|
245
288
|
|
|
246
289
|
The script handles these migrations automatically:
|
|
@@ -113,6 +113,10 @@ conventions:
|
|
|
113
113
|
|
|
114
114
|
# Learned from AgileFlow codebase exploration
|
|
115
115
|
learnings:
|
|
116
|
+
- date: "2026-01-01"
|
|
117
|
+
auto_generated: true
|
|
118
|
+
context: "Test learning"
|
|
119
|
+
insight: "This is a test"
|
|
116
120
|
- date: 2025-12-21
|
|
117
121
|
context: "Analyzed docs/ directory structure"
|
|
118
122
|
insight: "10 numbered directories (00-meta through 10-research) organize all project documentation"
|
|
@@ -85,7 +85,7 @@ patterns:
|
|
|
85
85
|
example: "See [Research](../10-research/20251216-agent-experts-self-improving-agents.md)"
|
|
86
86
|
|
|
87
87
|
- name: Context Export
|
|
88
|
-
description: "/agileflow:
|
|
88
|
+
description: "/agileflow:research:ask for external AI research prompts"
|
|
89
89
|
command: "/agileflow:research:ask TOPIC=<topic>"
|
|
90
90
|
purpose: "Generate prompt for ChatGPT/external AI with project context"
|
|
91
91
|
|
|
@@ -97,7 +97,7 @@ conventions:
|
|
|
97
97
|
- "Include TL;DR at top for quick scanning"
|
|
98
98
|
- "Flag research >90 days old as potentially stale"
|
|
99
99
|
- "Create retrospective notes after major implementations"
|
|
100
|
-
- "Use /agileflow:
|
|
100
|
+
- "Use /agileflow:research:ask for external AI research prompts prompts"
|
|
101
101
|
|
|
102
102
|
research_categories:
|
|
103
103
|
- "Technology evaluation (framework, library)"
|
|
@@ -10,7 +10,9 @@ const fs = require('fs-extra');
|
|
|
10
10
|
const yaml = require('js-yaml');
|
|
11
11
|
const { Installer } = require('../installers/core/installer');
|
|
12
12
|
const { displayLogo, displaySection, success, warning, info } = require('../lib/ui');
|
|
13
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
parseFrontmatter: parseYamlFrontmatter,
|
|
15
|
+
} = require('../../../scripts/lib/frontmatter-parser');
|
|
14
16
|
|
|
15
17
|
const installer = new Installer();
|
|
16
18
|
|
|
@@ -49,10 +49,7 @@ module.exports = {
|
|
|
49
49
|
|
|
50
50
|
// Confirm removal
|
|
51
51
|
if (!options.force) {
|
|
52
|
-
const proceed = await confirm(
|
|
53
|
-
`Remove ${formatIdeName(ideName)} configuration?`,
|
|
54
|
-
false
|
|
55
|
-
);
|
|
52
|
+
const proceed = await confirm(`Remove ${formatIdeName(ideName)} configuration?`, false);
|
|
56
53
|
if (!proceed) {
|
|
57
54
|
console.log(chalk.dim('\nCancelled\n'));
|
|
58
55
|
process.exit(0);
|
|
@@ -91,7 +88,9 @@ module.exports = {
|
|
|
91
88
|
|
|
92
89
|
console.log(chalk.green(`\n${formatIdeName(ideName)} has been removed.\n`));
|
|
93
90
|
if (status.ides.length > 1) {
|
|
94
|
-
console.log(
|
|
91
|
+
console.log(
|
|
92
|
+
chalk.dim(`Remaining IDEs: ${status.ides.filter(i => i !== ideName).join(', ')}\n`)
|
|
93
|
+
);
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
process.exit(0);
|
|
@@ -107,12 +107,20 @@ module.exports = {
|
|
|
107
107
|
console.log();
|
|
108
108
|
warning('Your global CLI is outdated!');
|
|
109
109
|
console.log(
|
|
110
|
-
chalk.dim(
|
|
110
|
+
chalk.dim(
|
|
111
|
+
` You have a global installation at v${localCliVersion}, but v${npmLatestVersion} is available.\n`
|
|
112
|
+
)
|
|
111
113
|
);
|
|
112
114
|
console.log(chalk.dim(` Options:`));
|
|
113
115
|
console.log(chalk.dim(` 1. Cancel and run: `) + chalk.cyan(`npx agileflow@latest update`));
|
|
114
|
-
console.log(
|
|
115
|
-
|
|
116
|
+
console.log(
|
|
117
|
+
chalk.dim(` 2. Remove global: `) +
|
|
118
|
+
chalk.cyan(`npm uninstall -g agileflow`) +
|
|
119
|
+
chalk.dim(` (recommended)`)
|
|
120
|
+
);
|
|
121
|
+
console.log(
|
|
122
|
+
chalk.dim(` 3. Update global: `) + chalk.cyan(`npm install -g agileflow@latest\n`)
|
|
123
|
+
);
|
|
116
124
|
|
|
117
125
|
const useOutdated = options.force
|
|
118
126
|
? true
|
|
@@ -26,7 +26,12 @@ const path = require('path');
|
|
|
26
26
|
|
|
27
27
|
// Use shared modules
|
|
28
28
|
const { parseFrontmatter, normalizeTools } = require('../../../scripts/lib/frontmatter-parser');
|
|
29
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
countCommands,
|
|
31
|
+
countAgents,
|
|
32
|
+
countSkills,
|
|
33
|
+
getCounts,
|
|
34
|
+
} = require('../../../scripts/lib/counter');
|
|
30
35
|
|
|
31
36
|
// =============================================================================
|
|
32
37
|
// List Generation Functions
|
|
@@ -208,7 +208,7 @@ Research findings, investigations, and technical explorations.
|
|
|
208
208
|
|
|
209
209
|
## Format
|
|
210
210
|
|
|
211
|
-
Use \`/agileflow:research\` to
|
|
211
|
+
Use \`/agileflow:research:ask\` to generate research prompts for web AI, then \`/agileflow:research:import\` to bring results back.
|
|
212
212
|
|
|
213
213
|
| Date | Topic | Path | Summary |
|
|
214
214
|
|------|-------|------|---------|
|