agileflow 2.92.0 → 2.93.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/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/codebase-indexer.js +2 -1
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +106 -0
- package/scripts/agileflow-welcome.js +135 -22
- package/scripts/document-repl.js +793 -0
- package/scripts/lib/configure-features.js +8 -1
- package/scripts/lib/context-loader.js +16 -16
- package/scripts/query-codebase.js +8 -3
- package/scripts/session-manager.js +374 -16
- package/scripts/spawn-parallel.js +72 -30
- package/src/core/agents/accessibility.md +19 -125
- package/src/core/agents/adr-writer.md +18 -1
- package/src/core/agents/analytics.md +19 -125
- package/src/core/agents/api.md +5 -130
- package/src/core/agents/ci.md +26 -131
- package/src/core/agents/compliance.md +21 -125
- package/src/core/agents/database.md +20 -125
- package/src/core/agents/datamigration.md +20 -125
- package/src/core/agents/design.md +19 -125
- package/src/core/agents/devops.md +12 -129
- package/src/core/agents/documentation.md +18 -1
- package/src/core/agents/epic-planner.md +31 -10
- package/src/core/agents/integrations.md +19 -125
- package/src/core/agents/mobile.md +19 -125
- package/src/core/agents/monitoring.md +19 -125
- package/src/core/agents/performance.md +19 -125
- package/src/core/agents/product.md +18 -1
- package/src/core/agents/qa.md +21 -125
- package/src/core/agents/readme-updater.md +18 -1
- package/src/core/agents/refactor.md +19 -125
- package/src/core/agents/research.md +3 -1
- package/src/core/agents/rlm-subcore.md +202 -0
- package/src/core/agents/security.md +7 -125
- package/src/core/agents/testing.md +20 -125
- package/src/core/agents/ui.md +14 -135
- package/src/core/commands/adr/list.md +20 -0
- package/src/core/commands/adr/update.md +24 -1
- package/src/core/commands/adr/view.md +23 -1
- package/src/core/commands/adr.md +2 -2
- package/src/core/commands/agent.md +11 -1
- package/src/core/commands/assign.md +15 -6
- package/src/core/commands/auto.md +11 -1
- package/src/core/commands/babysit.md +15 -4
- package/src/core/commands/baseline.md +11 -1
- package/src/core/commands/batch.md +11 -1
- package/src/core/commands/blockers.md +11 -1
- package/src/core/commands/board.md +11 -1
- package/src/core/commands/changelog.md +11 -0
- package/src/core/commands/choose.md +16 -1
- package/src/core/commands/ci.md +11 -1
- package/src/core/commands/configure.md +73 -2
- package/src/core/commands/context/export.md +8 -0
- package/src/core/commands/context/full.md +8 -0
- package/src/core/commands/context/note.md +8 -0
- package/src/core/commands/debt.md +11 -0
- package/src/core/commands/deploy.md +10 -0
- package/src/core/commands/deps.md +11 -1
- package/src/core/commands/diagnose.md +10 -0
- package/src/core/commands/docs.md +12 -2
- package/src/core/commands/epic/list.md +20 -0
- package/src/core/commands/epic/view.md +25 -0
- package/src/core/commands/epic.md +5 -6
- package/src/core/commands/feedback.md +11 -0
- package/src/core/commands/handoff.md +12 -2
- package/src/core/commands/help.md +10 -0
- package/src/core/commands/ideate.md +10 -0
- package/src/core/commands/impact.md +11 -1
- package/src/core/commands/metrics.md +11 -1
- package/src/core/commands/multi-expert.md +11 -1
- package/src/core/commands/packages.md +11 -0
- package/src/core/commands/pr.md +10 -0
- package/src/core/commands/readme-sync.md +10 -5
- package/src/core/commands/research/analyze.md +60 -3
- package/src/core/commands/research/ask.md +9 -1
- package/src/core/commands/research/import.md +8 -0
- package/src/core/commands/research/list.md +8 -0
- package/src/core/commands/research/synthesize.md +9 -1
- package/src/core/commands/research/view.md +8 -0
- package/src/core/commands/retro.md +12 -2
- package/src/core/commands/review.md +11 -1
- package/src/core/commands/rlm.md +363 -0
- package/src/core/commands/roadmap/analyze.md +1 -1
- package/src/core/commands/rpi.md +9 -1
- package/src/core/commands/session/cleanup.md +250 -0
- package/src/core/commands/session/end.md +10 -0
- package/src/core/commands/session/history.md +11 -1
- package/src/core/commands/session/init.md +10 -0
- package/src/core/commands/session/new.md +132 -13
- package/src/core/commands/session/resume.md +10 -0
- package/src/core/commands/session/spawn.md +8 -0
- package/src/core/commands/session/status.md +10 -0
- package/src/core/commands/skill/create.md +1 -1
- package/src/core/commands/skill/delete.md +11 -1
- package/src/core/commands/skill/edit.md +11 -1
- package/src/core/commands/skill/test.md +11 -1
- package/src/core/commands/skill/upgrade.md +11 -1
- package/src/core/commands/sprint.md +14 -3
- package/src/core/commands/status.md +15 -6
- package/src/core/commands/story/list.md +23 -0
- package/src/core/commands/story/view.md +24 -0
- package/src/core/commands/story.md +4 -5
- package/src/core/commands/template.md +10 -0
- package/src/core/commands/tests.md +10 -0
- package/src/core/commands/update.md +10 -0
- package/src/core/commands/validate-expertise.md +10 -1
- package/src/core/commands/velocity.md +11 -1
- package/src/core/commands/verify.md +13 -1
- package/src/core/commands/whats-new.md +8 -0
- package/src/core/commands/workflow.md +16 -1
- package/src/core/templates/agent-coordination-pattern.md +38 -0
- package/src/core/templates/agileflow-metadata.json +25 -0
- package/src/core/templates/preserve-rules-common.md +107 -0
- package/src/core/templates/preserve-rules.json +42 -0
- package/src/core/templates/proactive-action-spec.md +29 -0
- package/src/core/templates/quality-gate-priorities.md +34 -0
- package/src/core/templates/session-harness-protocol.md +128 -0
- package/tools/cli/commands/setup.js +12 -3
- package/tools/cli/installers/ide/windsurf.js +1 -1
- package/tools/cli/lib/content-injector.js +336 -0
- package/tools/cli/lib/ide-registry.js +2 -4
- package/tools/cli/lib/ui.js +2 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
### AGENT COORDINATION
|
|
2
|
+
|
|
3
|
+
This agent coordinates with other AgileFlow agents via the bus messaging system.
|
|
4
|
+
|
|
5
|
+
**Coordination Files**:
|
|
6
|
+
- `docs/09-agents/status.json` - Story statuses and assignments
|
|
7
|
+
- `docs/09-agents/bus/log.jsonl` - Inter-agent messages (append-only)
|
|
8
|
+
|
|
9
|
+
**When to Send Bus Messages**:
|
|
10
|
+
1. **Status Update**: After changing story status in status.json
|
|
11
|
+
2. **Blocked**: When waiting for another agent's work
|
|
12
|
+
3. **Unblock**: When completing work that unblocks others
|
|
13
|
+
4. **Finding**: When discovering issues that affect other agents
|
|
14
|
+
|
|
15
|
+
**Bus Message Format**:
|
|
16
|
+
```jsonl
|
|
17
|
+
{"ts":"<ISO-timestamp>","from":"{AGENT_ID}","type":"<type>","story":"<US-ID>","text":"<message>"}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Message Types**:
|
|
21
|
+
| Type | When to Use | Example |
|
|
22
|
+
|------|-------------|---------|
|
|
23
|
+
| `status` | After status.json update | "Completed implementation, ready for review" |
|
|
24
|
+
| `blocked` | Cannot proceed | "Blocked: waiting for API endpoint from AG-API" |
|
|
25
|
+
| `unblock` | Unblocking another agent | "API ready, unblocking US-0042" |
|
|
26
|
+
| `finding` | Discovered issue | "Finding: Performance issue in component X" |
|
|
27
|
+
| `request` | Requesting help | "Request: Need security review before release" |
|
|
28
|
+
|
|
29
|
+
**Reading the Bus**:
|
|
30
|
+
On invocation, check last 10 messages for requests or blockers:
|
|
31
|
+
```bash
|
|
32
|
+
tail -10 docs/09-agents/bus/log.jsonl | grep "{AGENT_ID}"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Coordination with Other Agents**:
|
|
36
|
+
- **Before starting**: Check if your work will unblock others
|
|
37
|
+
- **After completing**: Notify waiting agents via unblock message
|
|
38
|
+
- **On blocker**: Document clearly with blocked message and reference story ID
|
|
@@ -94,6 +94,31 @@
|
|
|
94
94
|
"10-research": true
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
+
"sessions": {
|
|
98
|
+
"defaultStartupMode": "normal",
|
|
99
|
+
"startupModes": {
|
|
100
|
+
"normal": {
|
|
101
|
+
"label": "Normal",
|
|
102
|
+
"description": "Standard Claude with permission prompts",
|
|
103
|
+
"flags": null
|
|
104
|
+
},
|
|
105
|
+
"skip-permissions": {
|
|
106
|
+
"label": "Skip permissions",
|
|
107
|
+
"description": "claude --dangerously-skip-permissions (trusted mode)",
|
|
108
|
+
"flags": "--dangerous"
|
|
109
|
+
},
|
|
110
|
+
"accept-edits": {
|
|
111
|
+
"label": "Accept edits only",
|
|
112
|
+
"description": "claude --permission-mode acceptEdits",
|
|
113
|
+
"flags": "--claude-args \"--permission-mode acceptEdits\""
|
|
114
|
+
},
|
|
115
|
+
"no-claude": {
|
|
116
|
+
"label": "Don't start Claude",
|
|
117
|
+
"description": "Create worktree only, start Claude manually",
|
|
118
|
+
"flags": "--no-claude"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
97
122
|
"git": {
|
|
98
123
|
"initialized": false,
|
|
99
124
|
"remoteConfigured": false,
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Common Preserve Rules
|
|
2
|
+
|
|
3
|
+
This template provides standardized preserve rules that can be injected into command frontmatter.
|
|
4
|
+
Commands reference rule sets using `{{RULES:<category>}}` syntax in their preserve_rules.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
In command frontmatter:
|
|
9
|
+
```yaml
|
|
10
|
+
compact_context:
|
|
11
|
+
preserve_rules:
|
|
12
|
+
- "ACTIVE COMMAND: /agileflow:command-name"
|
|
13
|
+
- "{{RULES:json_operations}}"
|
|
14
|
+
- "{{RULES:file_preview}}"
|
|
15
|
+
- "Command-specific rule here"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Rule Categories
|
|
21
|
+
|
|
22
|
+
### json_operations
|
|
23
|
+
Rules for safe JSON file modifications (status.json, etc.)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
- "MUST use Edit tool or jq for JSON operations (never echo/cat > file.json)"
|
|
27
|
+
- "MUST validate JSON after every modification (jq . file.json)"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### file_preview
|
|
31
|
+
Rules for showing previews before writing files
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- "MUST show diff preview before confirming writes (diff-first pattern)"
|
|
35
|
+
- "Wait for YES/NO confirmation BEFORE writing any file"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### user_confirmation
|
|
39
|
+
Rules for using AskUserQuestion tool
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
- "MUST use AskUserQuestion tool for user decisions (not text prompts)"
|
|
43
|
+
- "Options: YES to confirm, NO to cancel, or specific choices"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### todo_tracking
|
|
47
|
+
Rules for using TodoWrite tool
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
- "MUST create TodoWrite task list for 3+ step workflows"
|
|
51
|
+
- "Mark tasks in_progress before starting, completed when done"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### bus_messaging
|
|
55
|
+
Rules for bus message logging
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
- "MUST append status update to docs/09-agents/bus/log.jsonl"
|
|
59
|
+
- "Bus format: {ts, from, type, story, text} as single-line JSON"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### plan_mode
|
|
63
|
+
Rules for using EnterPlanMode
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
- "MUST use EnterPlanMode for non-trivial implementation tasks"
|
|
67
|
+
- "Plan first, get approval, then implement"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### commit_approval
|
|
71
|
+
Rules about git commits
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
- "NEVER auto-commit without explicit user approval"
|
|
75
|
+
- "Always show diff and ask before committing"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### delegation
|
|
79
|
+
Rules for expert delegation
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
- "Delegate complex work to domain experts (don't do everything yourself)"
|
|
83
|
+
- "Simple task -> do yourself | Complex single-domain -> spawn expert"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## How Injection Works
|
|
89
|
+
|
|
90
|
+
The content-injector.js processes preserve_rules arrays and expands
|
|
91
|
+
`{{RULES:category}}` markers into the actual rule strings.
|
|
92
|
+
|
|
93
|
+
Example:
|
|
94
|
+
```yaml
|
|
95
|
+
# Before injection
|
|
96
|
+
preserve_rules:
|
|
97
|
+
- "ACTIVE COMMAND: /agileflow:story"
|
|
98
|
+
- "{{RULES:json_operations}}"
|
|
99
|
+
|
|
100
|
+
# After injection
|
|
101
|
+
preserve_rules:
|
|
102
|
+
- "ACTIVE COMMAND: /agileflow:story"
|
|
103
|
+
- "MUST use Edit tool or jq for JSON operations (never echo/cat > file.json)"
|
|
104
|
+
- "MUST validate JSON after every modification (jq . file.json)"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
This eliminates duplication while maintaining readability.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"json_operations": [
|
|
3
|
+
"MUST use Edit tool or jq for JSON operations (never echo/cat > file.json)",
|
|
4
|
+
"MUST validate JSON after every modification (jq . file.json)"
|
|
5
|
+
],
|
|
6
|
+
"file_preview": [
|
|
7
|
+
"MUST show diff preview before confirming writes (diff-first pattern)",
|
|
8
|
+
"Wait for YES/NO confirmation BEFORE writing any file"
|
|
9
|
+
],
|
|
10
|
+
"user_confirmation": [
|
|
11
|
+
"MUST use AskUserQuestion tool for user decisions (not text prompts)",
|
|
12
|
+
"Options: YES to confirm, NO to cancel, or specific choices"
|
|
13
|
+
],
|
|
14
|
+
"todo_tracking": [
|
|
15
|
+
"MUST create TodoWrite task list for 3+ step workflows",
|
|
16
|
+
"Mark tasks in_progress before starting, completed when done"
|
|
17
|
+
],
|
|
18
|
+
"bus_messaging": [
|
|
19
|
+
"MUST append status update to docs/09-agents/bus/log.jsonl",
|
|
20
|
+
"Bus format: {ts, from, type, story, text} as single-line JSON"
|
|
21
|
+
],
|
|
22
|
+
"plan_mode": [
|
|
23
|
+
"MUST use EnterPlanMode for non-trivial implementation tasks",
|
|
24
|
+
"Plan first, get approval, then implement"
|
|
25
|
+
],
|
|
26
|
+
"commit_approval": [
|
|
27
|
+
"NEVER auto-commit without explicit user approval",
|
|
28
|
+
"Always show diff and ask before committing"
|
|
29
|
+
],
|
|
30
|
+
"delegation": [
|
|
31
|
+
"Delegate complex work to domain experts (don't do everything yourself)",
|
|
32
|
+
"Simple task -> do yourself | Complex single-domain -> spawn expert"
|
|
33
|
+
],
|
|
34
|
+
"research_first": [
|
|
35
|
+
"Check docs/10-research/ for existing research before starting",
|
|
36
|
+
"Invoke /agileflow:research:ask if research is missing or stale"
|
|
37
|
+
],
|
|
38
|
+
"status_updates": [
|
|
39
|
+
"Update docs/09-agents/status.json after each status change",
|
|
40
|
+
"Valid statuses: ready|in-progress|blocked|in-review|done"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
### PROACTIVE ACTION SPECIFICATIONS
|
|
2
|
+
|
|
3
|
+
This agent performs proactive actions under specific, well-defined conditions. Each action has a clear trigger, detection mechanism, and output format.
|
|
4
|
+
|
|
5
|
+
**Trigger Types**:
|
|
6
|
+
| Trigger | Detection Mechanism | Example |
|
|
7
|
+
|---------|---------------------|---------|
|
|
8
|
+
| **On Invocation** | Agent is spawned/called | First action when user invokes this agent |
|
|
9
|
+
| **On Story Assignment** | `status.json` shows story with `owner=={AGENT_ID}` | When a story is assigned to this agent |
|
|
10
|
+
| **On Blocker Request** | `bus/log.jsonl` contains request for `{AGENT_ID}` | Another agent requests help |
|
|
11
|
+
| **On Status Change** | Story status changes in `status.json` | Story moves to `in-progress`, `in-review`, etc. |
|
|
12
|
+
|
|
13
|
+
**Action Execution Pattern**:
|
|
14
|
+
```
|
|
15
|
+
IF [trigger condition detected]
|
|
16
|
+
THEN:
|
|
17
|
+
1. [Load context - specific files/locations]
|
|
18
|
+
2. [Analyze/process - specific operations]
|
|
19
|
+
3. [Output result - specific format]
|
|
20
|
+
4. [Update state - status.json, bus message]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Standard Output Formats**:
|
|
24
|
+
- **Status Update**: `{"ts":"<ISO>","from":"{AGENT_ID}","type":"status","story":"<US_ID>","text":"<summary>"}`
|
|
25
|
+
- **Blocked Notice**: `{"ts":"<ISO>","from":"{AGENT_ID}","type":"blocked","story":"<US_ID>","text":"Blocked: <reason>"}`
|
|
26
|
+
- **Unblock Notice**: `{"ts":"<ISO>","from":"{AGENT_ID}","type":"unblock","story":"<US_ID>","text":"Unblocking <target_story>: <reason>"}`
|
|
27
|
+
- **Finding/Alert**: `{"ts":"<ISO>","from":"{AGENT_ID}","type":"finding","story":"<US_ID>","text":"Finding: <details>"}`
|
|
28
|
+
|
|
29
|
+
**DO NOT** perform proactive actions without a clear trigger. Vague instructions like "proactively do X" require explicit conditions to be actionable.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
### QUALITY GATE PRIORITIES
|
|
2
|
+
|
|
3
|
+
Quality gates are grouped by priority. **CRITICAL gates cannot be overridden**, HIGH gates require documentation, and MEDIUM gates can flex for MVP.
|
|
4
|
+
|
|
5
|
+
| Priority | Meaning | Override? |
|
|
6
|
+
|----------|---------|-----------|
|
|
7
|
+
| **CRITICAL** | Must pass. No exceptions. | ❌ No |
|
|
8
|
+
| **HIGH** | Should pass. Document if skipped. | ⚠️ Yes, with issue |
|
|
9
|
+
| **MEDIUM** | Ideal to pass. Can flex for MVP. | ✅ Yes, note in PR |
|
|
10
|
+
|
|
11
|
+
**UNIVERSAL CRITICAL GATES** (Apply to ALL agents):
|
|
12
|
+
- [ ] **Tests pass** - All existing tests must pass
|
|
13
|
+
- [ ] **No hardcoded secrets** - API keys, passwords, tokens in env vars only
|
|
14
|
+
- [ ] **No security regressions** - No new vulnerabilities introduced
|
|
15
|
+
- [ ] **Build succeeds** - Project compiles/builds without errors
|
|
16
|
+
|
|
17
|
+
**UNIVERSAL HIGH GATES** (Apply to ALL agents):
|
|
18
|
+
- [ ] **Test coverage** - New code has meaningful test coverage
|
|
19
|
+
- [ ] **No lint errors** - Code passes linting rules
|
|
20
|
+
- [ ] **No type errors** - TypeScript/type checking passes (if applicable)
|
|
21
|
+
- [ ] **Documentation updated** - README/API docs reflect changes (if applicable)
|
|
22
|
+
|
|
23
|
+
**UNIVERSAL MEDIUM GATES** (Apply to ALL agents):
|
|
24
|
+
- [ ] **Code review ready** - Self-reviewed, obvious issues fixed
|
|
25
|
+
- [ ] **Performance acceptable** - No obvious performance regressions
|
|
26
|
+
- [ ] **Accessibility basics** - Core accessibility not broken (UI only)
|
|
27
|
+
|
|
28
|
+
**Override Documentation Format**:
|
|
29
|
+
When overriding a HIGH gate, append to bus message:
|
|
30
|
+
```jsonl
|
|
31
|
+
{"ts":"{TIMESTAMP}","from":"{AGENT_ID}","type":"warning","story":"{STORY_ID}","text":"Override: [GATE NAME] skipped. Reason: [explanation]. Tracked in: [issue link]"}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Remember**: CRITICAL gates protect the project. Skipping them creates debt that compounds.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
SESSION HARNESS & VERIFICATION PROTOCOL (v2.25.0+)
|
|
2
|
+
|
|
3
|
+
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
4
|
+
|
|
5
|
+
**PRE-IMPLEMENTATION VERIFICATION**
|
|
6
|
+
|
|
7
|
+
Before starting work on ANY story:
|
|
8
|
+
|
|
9
|
+
1. **Check Session Harness**:
|
|
10
|
+
- Look for `docs/00-meta/environment.json`
|
|
11
|
+
- If exists → Session harness is active
|
|
12
|
+
- If missing → Suggest `/agileflow:session:init` to user
|
|
13
|
+
|
|
14
|
+
2. **Test Baseline Check**:
|
|
15
|
+
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
16
|
+
- If `"passing"` → Proceed with implementation
|
|
17
|
+
- If `"failing"` → STOP. Cannot start new work with failing baseline
|
|
18
|
+
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
19
|
+
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
20
|
+
|
|
21
|
+
3. **Environment Verification** (if session harness active):
|
|
22
|
+
- Run `/agileflow:session:resume` to verify environment and load context
|
|
23
|
+
- Check for regressions (tests were passing, now failing)
|
|
24
|
+
- If regression detected → Fix before proceeding with new story
|
|
25
|
+
|
|
26
|
+
**DURING IMPLEMENTATION**
|
|
27
|
+
|
|
28
|
+
1. **Incremental Testing**:
|
|
29
|
+
- Run tests frequently during development (not just at end)
|
|
30
|
+
- Fix test failures immediately (don't accumulate debt)
|
|
31
|
+
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
32
|
+
|
|
33
|
+
2. **Real-time Status Updates**:
|
|
34
|
+
- Update `test_status` in status.json as tests are written/fixed
|
|
35
|
+
- Append bus messages when tests pass milestone checkpoints
|
|
36
|
+
|
|
37
|
+
**POST-IMPLEMENTATION VERIFICATION**
|
|
38
|
+
|
|
39
|
+
After completing ANY changes:
|
|
40
|
+
|
|
41
|
+
1. **Run Full Test Suite**:
|
|
42
|
+
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
43
|
+
- Check exit code (0 = success required for completion)
|
|
44
|
+
- Review test output for warnings or flaky tests
|
|
45
|
+
|
|
46
|
+
2. **Update Test Status**:
|
|
47
|
+
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
48
|
+
- Verify the update was successful
|
|
49
|
+
- Expected: `test_status: "passing"` with test results metadata
|
|
50
|
+
|
|
51
|
+
3. **Regression Check**:
|
|
52
|
+
- Compare test results to baseline (initial test status)
|
|
53
|
+
- If new failures introduced → Fix before marking complete
|
|
54
|
+
- If test count decreased → Investigate deleted tests
|
|
55
|
+
|
|
56
|
+
4. **Story Completion Requirements**:
|
|
57
|
+
- Story can ONLY be marked `"in-review"` if `test_status: "passing"`
|
|
58
|
+
- If tests failing → Story remains `"in-progress"` until fixed
|
|
59
|
+
- No exceptions unless documented override (see below)
|
|
60
|
+
|
|
61
|
+
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
62
|
+
|
|
63
|
+
If tests are failing but you need to proceed:
|
|
64
|
+
|
|
65
|
+
1. **Document Override Decision**:
|
|
66
|
+
- Append bus message with full explanation:
|
|
67
|
+
```jsonl
|
|
68
|
+
{"ts":"2025-12-06T14:00:00Z","from":"{AGENT_ID}","type":"warning","story":"US-0040","text":"Override: Marking in-review with 1 failing test. Reason: Test requires external service mock, tracked in US-0099."}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. **Update Story Dev Agent Record**:
|
|
72
|
+
- Add note to "Issues Encountered" section explaining override
|
|
73
|
+
- Link to tracking issue for the failing test
|
|
74
|
+
- Document risk and mitigation plan
|
|
75
|
+
|
|
76
|
+
3. **Create Follow-up Story**:
|
|
77
|
+
- If test failure is real but out of scope → Create new story
|
|
78
|
+
- Link dependency in status.json
|
|
79
|
+
- Notify user of the override and follow-up story
|
|
80
|
+
|
|
81
|
+
**BASELINE MANAGEMENT**
|
|
82
|
+
|
|
83
|
+
After completing major milestones (epic complete, sprint end):
|
|
84
|
+
|
|
85
|
+
1. **Establish Baseline**:
|
|
86
|
+
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
87
|
+
- Requires: All tests passing, git working tree clean
|
|
88
|
+
- Creates git tag + metadata for reset point
|
|
89
|
+
|
|
90
|
+
2. **Baseline Benefits**:
|
|
91
|
+
- Known-good state to reset to if needed
|
|
92
|
+
- Regression detection reference point
|
|
93
|
+
- Deployment readiness checkpoint
|
|
94
|
+
- Sprint/epic completion marker
|
|
95
|
+
|
|
96
|
+
**INTEGRATION WITH WORKFLOW**
|
|
97
|
+
|
|
98
|
+
The verification protocol integrates into the standard workflow:
|
|
99
|
+
|
|
100
|
+
1. **Before creating feature branch**: Run pre-implementation verification
|
|
101
|
+
2. **Before marking in-review**: Run post-implementation verification
|
|
102
|
+
3. **After merge**: Verify baseline is still passing
|
|
103
|
+
|
|
104
|
+
**ERROR HANDLING**
|
|
105
|
+
|
|
106
|
+
If `/agileflow:verify` fails:
|
|
107
|
+
- Read error output carefully
|
|
108
|
+
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
109
|
+
- Verify test dependencies are installed
|
|
110
|
+
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
111
|
+
- If tests are misconfigured → Coordinate with AG-CI
|
|
112
|
+
|
|
113
|
+
**SESSION RESUME PROTOCOL**
|
|
114
|
+
|
|
115
|
+
When resuming work after context loss:
|
|
116
|
+
|
|
117
|
+
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
118
|
+
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
119
|
+
3. **Verify Test Status**: Ensure no regressions occurred
|
|
120
|
+
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
121
|
+
|
|
122
|
+
**KEY PRINCIPLES**
|
|
123
|
+
|
|
124
|
+
- **Tests are the contract**: Passing tests = feature works as specified
|
|
125
|
+
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
126
|
+
- **Context preservation**: Session harness maintains progress across context windows
|
|
127
|
+
- **Transparency**: Document all override decisions fully
|
|
128
|
+
- **Accountability**: test_status field creates audit trail
|
|
@@ -185,7 +185,12 @@ ${claudeMdMarker}
|
|
|
185
185
|
|
|
186
186
|
// Update metadata with config tracking
|
|
187
187
|
try {
|
|
188
|
-
const metadataPath = path.join(
|
|
188
|
+
const metadataPath = path.join(
|
|
189
|
+
config.directory,
|
|
190
|
+
config.docsFolder,
|
|
191
|
+
'00-meta',
|
|
192
|
+
'agileflow-metadata.json'
|
|
193
|
+
);
|
|
189
194
|
if (fs.existsSync(metadataPath)) {
|
|
190
195
|
const metadata = JSON.parse(fs.readFileSync(metadataPath, 'utf8'));
|
|
191
196
|
const packageJson = require(path.join(__dirname, '..', '..', '..', 'package.json'));
|
|
@@ -223,8 +228,12 @@ ${claudeMdMarker}
|
|
|
223
228
|
// Shell alias reload reminder
|
|
224
229
|
if (coreResult.shellAliases?.configured?.length > 0) {
|
|
225
230
|
console.log(chalk.bold('\nShell aliases:'));
|
|
226
|
-
info(
|
|
227
|
-
|
|
231
|
+
info(
|
|
232
|
+
`Reload shell to use: ${chalk.cyan('source ~/.bashrc')} or ${chalk.cyan('source ~/.zshrc')}`
|
|
233
|
+
);
|
|
234
|
+
info(
|
|
235
|
+
`Then run ${chalk.cyan('af')} to start Claude in tmux (or ${chalk.cyan('claude')} for normal)`
|
|
236
|
+
);
|
|
228
237
|
}
|
|
229
238
|
|
|
230
239
|
console.log(chalk.dim(`\nInstalled to: ${coreResult.path}\n`));
|
|
@@ -15,7 +15,7 @@ const { BaseIdeSetup } = require('./_base-ide');
|
|
|
15
15
|
*/
|
|
16
16
|
class WindsurfSetup extends BaseIdeSetup {
|
|
17
17
|
constructor() {
|
|
18
|
-
super('windsurf', 'Windsurf',
|
|
18
|
+
super('windsurf', 'Windsurf', false);
|
|
19
19
|
this.configDir = '.windsurf';
|
|
20
20
|
this.workflowsDir = 'workflows';
|
|
21
21
|
}
|