@howlil/ez-agents 3.4.2 → 3.5.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 +77 -2
- package/agents/ez-observer-agent.md +260 -0
- package/agents/ez-release-agent.md +333 -0
- package/agents/ez-requirements-agent.md +377 -0
- package/agents/ez-scrum-master-agent.md +242 -0
- package/agents/ez-tech-lead-agent.md +267 -0
- package/bin/install.js +3221 -3272
- package/commands/ez/arch-review.md +102 -0
- package/commands/ez/execute-phase.md +11 -0
- package/commands/ez/export-session.md +79 -0
- package/commands/ez/gather-requirements.md +117 -0
- package/commands/ez/git-workflow.md +72 -0
- package/commands/ez/hotfix.md +120 -0
- package/commands/ez/import-session.md +82 -0
- package/commands/ez/list-sessions.md +96 -0
- package/commands/ez/package-manager.md +316 -0
- package/commands/ez/plan-phase.md +9 -1
- package/commands/ez/preflight.md +79 -0
- package/commands/ez/progress.md +13 -1
- package/commands/ez/release.md +153 -0
- package/commands/ez/resume.md +107 -0
- package/commands/ez/standup.md +85 -0
- package/ez-agents/bin/ez-tools.cjs +1095 -716
- package/ez-agents/bin/lib/bdd-validator.cjs +622 -0
- package/ez-agents/bin/lib/content-scanner.cjs +238 -0
- package/ez-agents/bin/lib/context-cache.cjs +154 -0
- package/ez-agents/bin/lib/context-errors.cjs +71 -0
- package/ez-agents/bin/lib/context-manager.cjs +220 -0
- package/ez-agents/bin/lib/discussion-synthesizer.cjs +458 -0
- package/ez-agents/bin/lib/file-access.cjs +207 -0
- package/ez-agents/bin/lib/git-errors.cjs +83 -0
- package/ez-agents/bin/lib/git-utils.cjs +321 -203
- package/ez-agents/bin/lib/git-workflow-engine.cjs +1157 -0
- package/ez-agents/bin/lib/index.cjs +46 -2
- package/ez-agents/bin/lib/lockfile-validator.cjs +227 -0
- package/ez-agents/bin/lib/logger.cjs +124 -154
- package/ez-agents/bin/lib/memory-compression.cjs +256 -0
- package/ez-agents/bin/lib/metrics-tracker.cjs +406 -0
- package/ez-agents/bin/lib/package-manager-detector.cjs +203 -0
- package/ez-agents/bin/lib/package-manager-executor.cjs +385 -0
- package/ez-agents/bin/lib/package-manager-service.cjs +216 -0
- package/ez-agents/bin/lib/release-validator.cjs +614 -0
- package/ez-agents/bin/lib/safe-exec.cjs +128 -214
- package/ez-agents/bin/lib/session-chain.cjs +304 -0
- package/ez-agents/bin/lib/session-errors.cjs +81 -0
- package/ez-agents/bin/lib/session-export.cjs +251 -0
- package/ez-agents/bin/lib/session-import.cjs +262 -0
- package/ez-agents/bin/lib/session-manager.cjs +280 -0
- package/ez-agents/bin/lib/tier-manager.cjs +428 -0
- package/ez-agents/bin/lib/url-fetch.cjs +170 -0
- package/ez-agents/references/metrics-schema.md +118 -0
- package/ez-agents/references/planning-config.md +140 -0
- package/ez-agents/references/tier-strategy.md +103 -0
- package/ez-agents/templates/bdd-feature.md +173 -0
- package/ez-agents/templates/discussion.md +68 -0
- package/ez-agents/templates/incident-runbook.md +205 -0
- package/ez-agents/templates/release-checklist.md +133 -0
- package/ez-agents/templates/rollback-plan.md +201 -0
- package/ez-agents/workflows/arch-review.md +54 -0
- package/ez-agents/workflows/autonomous.md +844 -743
- package/ez-agents/workflows/execute-phase.md +45 -0
- package/ez-agents/workflows/export-session.md +255 -0
- package/ez-agents/workflows/gather-requirements.md +206 -0
- package/ez-agents/workflows/help.md +92 -0
- package/ez-agents/workflows/hotfix.md +291 -0
- package/ez-agents/workflows/import-session.md +303 -0
- package/ez-agents/workflows/new-milestone.md +713 -384
- package/ez-agents/workflows/new-project.md +1107 -1113
- package/ez-agents/workflows/plan-phase.md +22 -0
- package/ez-agents/workflows/progress.md +15 -25
- package/ez-agents/workflows/release.md +253 -0
- package/ez-agents/workflows/resume-session.md +215 -0
- package/ez-agents/workflows/standup.md +64 -0
- package/package.json +9 -2
|
@@ -12,6 +12,34 @@ Read STATE.md before any operation to load project context.
|
|
|
12
12
|
|
|
13
13
|
<process>
|
|
14
14
|
|
|
15
|
+
<auto_invoke>
|
|
16
|
+
Run BEFORE the initialize step. Check flags from ARGUMENTS:
|
|
17
|
+
|
|
18
|
+
**Flag handling:**
|
|
19
|
+
- If ARGUMENTS contains `--no-auto`: skip all auto_invoke blocks, proceed directly to initialize.
|
|
20
|
+
- If ARGUMENTS contains `--verbose`: display detail for every auto_invoke step.
|
|
21
|
+
|
|
22
|
+
**Pre-flight health check (always, unless --no-auto):**
|
|
23
|
+
```bash
|
|
24
|
+
SMART_ORCH=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" config-get smart_orchestration.enabled 2>/dev/null || echo "true")
|
|
25
|
+
```
|
|
26
|
+
If `SMART_ORCH` is `"false"`: skip all auto_invoke, proceed to initialize.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
HEALTH=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" health --json 2>/dev/null)
|
|
30
|
+
```
|
|
31
|
+
- If output shows status FAIL: display error, STOP execution.
|
|
32
|
+
- If PASS: display `[auto] ✅ health check passed` only when `--verbose` flag is present; otherwise silent.
|
|
33
|
+
|
|
34
|
+
**Conditional discuss-phase:**
|
|
35
|
+
Read tier from `.planning/config.json` (`release.tier`). If tier is `medium` or `enterprise` AND no CONTEXT.md exists in the phase directory AND `--skip-discussion` is not in ARGUMENTS:
|
|
36
|
+
→ Display: `[auto] Running pre-flight discussion...`
|
|
37
|
+
→ Invoke: Skill(ez:discuss-phase, args: phase_number + " --auto")
|
|
38
|
+
→ Continue to initialize.
|
|
39
|
+
|
|
40
|
+
If conditions are not met: skip silently.
|
|
41
|
+
</auto_invoke>
|
|
42
|
+
|
|
15
43
|
<step name="initialize" priority="first">
|
|
16
44
|
Load all context in one call:
|
|
17
45
|
|
|
@@ -447,6 +475,23 @@ Read and follow `~/.claude/ez-agents/workflows/transition.md`, passing through t
|
|
|
447
475
|
```
|
|
448
476
|
</step>
|
|
449
477
|
|
|
478
|
+
<auto_invoke_post>
|
|
479
|
+
Run AFTER all waves complete. Skip if --no-auto is in ARGUMENTS or `smart_orchestration.enabled` is false.
|
|
480
|
+
|
|
481
|
+
**Post-execution verify-work:**
|
|
482
|
+
Display: `[auto] Running verification...`
|
|
483
|
+
Invoke: Skill(ez:verify-work, args: phase_number)
|
|
484
|
+
- If PASS: display `[auto] ✅ Verification passed`
|
|
485
|
+
- If FAIL: display `⚠️ Verification warnings (non-blocking)` — show details, do NOT block
|
|
486
|
+
|
|
487
|
+
**Scope creep detection:**
|
|
488
|
+
Check if there is scope creep from DISCUSSION.md (if it exists):
|
|
489
|
+
```bash
|
|
490
|
+
grep -i "scope creep\|out of scope\|BLOCKER" .planning/phases/${PHASE_DIR}/DISCUSSION.md 2>/dev/null
|
|
491
|
+
```
|
|
492
|
+
If any match found: display `[auto] Scope creep detected — creating todos...` → Invoke: Skill(ez:add-todo)
|
|
493
|
+
</auto_invoke_post>
|
|
494
|
+
|
|
450
495
|
</process>
|
|
451
496
|
|
|
452
497
|
<context_efficiency>
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Workflow: export-session
|
|
2
|
+
|
|
3
|
+
**Purpose:** Export session data for model handoff or archival
|
|
4
|
+
|
|
5
|
+
**Related Commands:** `/ez:export-session`
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Workflow Steps
|
|
10
|
+
|
|
11
|
+
### 1. Parameters
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
session_id: string (default: 'last')
|
|
15
|
+
format: 'markdown' | 'json' (default: 'markdown')
|
|
16
|
+
output_path: string (default: auto-generated)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### 2. Resolve Session
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
SessionManager mgr = new SessionManager();
|
|
23
|
+
|
|
24
|
+
if (session_id === 'last') {
|
|
25
|
+
session = mgr.getLastSession();
|
|
26
|
+
if (!session) {
|
|
27
|
+
throw error("No sessions found");
|
|
28
|
+
}
|
|
29
|
+
session_id = session.metadata.session_id;
|
|
30
|
+
} else {
|
|
31
|
+
session = mgr.loadSession(session_id);
|
|
32
|
+
if (!session) {
|
|
33
|
+
throw error(`Session not found: ${session_id}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
logger.info('Exporting session', { session_id });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 3. Validate Format
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
if (!['markdown', 'json'].includes(format)) {
|
|
44
|
+
throw error("Format must be 'markdown' or 'json'");
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 4. Generate Output Path
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
if (!output_path) {
|
|
52
|
+
ext = format === 'markdown' ? 'md' : 'json';
|
|
53
|
+
output_path = `.planning/sessions/export-${session_id}.${ext}`;
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 5. Export
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
SessionExport exporter = new SessionExport(mgr);
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
result = exporter.exportToFile(session_id, format, output_path);
|
|
64
|
+
} catch (SessionExportError err) {
|
|
65
|
+
logger.error('Export failed', { session_id, format, error: err.message });
|
|
66
|
+
throw error(`Export failed: ${err.message}`);
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 6. Verify Output
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
if (!fs.existsSync(output_path)) {
|
|
74
|
+
throw error("Export verification failed: File not created");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const stats = fs.statSync(output_path);
|
|
78
|
+
if (stats.size === 0) {
|
|
79
|
+
throw error("Export verification failed: File is empty");
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
logger.info('Export verified', { path: output_path, size: stats.size });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 7. Log Success
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
logger.info('Session exported', {
|
|
89
|
+
session_id,
|
|
90
|
+
format,
|
|
91
|
+
output_path,
|
|
92
|
+
size: stats.size
|
|
93
|
+
});
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 8. Return Result
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
return {
|
|
100
|
+
success: true,
|
|
101
|
+
path: output_path,
|
|
102
|
+
format: format,
|
|
103
|
+
size: stats.size
|
|
104
|
+
};
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Output Format Examples
|
|
110
|
+
|
|
111
|
+
### Markdown Export
|
|
112
|
+
```markdown
|
|
113
|
+
# Session Export: session-20260319-143052
|
|
114
|
+
|
|
115
|
+
**Exported:** 2026-03-19T15:45:00.000Z
|
|
116
|
+
**Model:** qwen
|
|
117
|
+
**Phase:** 18
|
|
118
|
+
**Plan:** 18
|
|
119
|
+
**Duration:** 1h 15m
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Session Summary
|
|
124
|
+
|
|
125
|
+
**Objective:** Implement session memory and model continuity
|
|
126
|
+
|
|
127
|
+
**Completed:**
|
|
128
|
+
- Task 1: Create session error classes
|
|
129
|
+
- Task 2: Create session manager
|
|
130
|
+
|
|
131
|
+
**Incomplete:**
|
|
132
|
+
- Task 3: Create session export module
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Key Decisions
|
|
137
|
+
|
|
138
|
+
1. **Use timestamp-based session IDs**
|
|
139
|
+
- Rationale: Easy to sort and identify
|
|
140
|
+
- Status: Implemented
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## File Changes
|
|
145
|
+
|
|
146
|
+
| File | Action | Reason |
|
|
147
|
+
|------|--------|--------|
|
|
148
|
+
| ez-agents/bin/lib/session-errors.cjs | created | Error classes |
|
|
149
|
+
| ez-agents/bin/lib/session-manager.cjs | created | Core module |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Open Questions
|
|
154
|
+
|
|
155
|
+
None
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Blockers/Concerns
|
|
160
|
+
|
|
161
|
+
None
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Recommended Next Actions
|
|
166
|
+
|
|
167
|
+
- Complete session export module implementation
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Session Chain
|
|
172
|
+
|
|
173
|
+
- Previous: session-20260319-120000
|
|
174
|
+
- Current: session-20260319-143052
|
|
175
|
+
- Next: none
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### JSON Export
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"export_version": "1.0",
|
|
182
|
+
"exported_at": "2026-03-19T15:45:00.000Z",
|
|
183
|
+
"export_format": "json",
|
|
184
|
+
"session": {
|
|
185
|
+
"metadata": {
|
|
186
|
+
"session_id": "session-20260319-143052",
|
|
187
|
+
"session_version": "1.0",
|
|
188
|
+
"started_at": "2026-03-19T14:30:52.000Z",
|
|
189
|
+
"ended_at": "2026-03-19T15:45:00.000Z",
|
|
190
|
+
"model": "qwen",
|
|
191
|
+
"phase": 18,
|
|
192
|
+
"plan": 18,
|
|
193
|
+
"status": "completed",
|
|
194
|
+
"session_chain": ["session-20260319-120000"],
|
|
195
|
+
"token_usage": {
|
|
196
|
+
"input": 50000,
|
|
197
|
+
"output": 30000,
|
|
198
|
+
"total": 80000
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"context": {
|
|
202
|
+
"transcript": "...",
|
|
203
|
+
"tasks": [],
|
|
204
|
+
"decisions": [],
|
|
205
|
+
"file_changes": [],
|
|
206
|
+
"open_questions": [],
|
|
207
|
+
"blockers": []
|
|
208
|
+
},
|
|
209
|
+
"state": {
|
|
210
|
+
"current_phase": 18,
|
|
211
|
+
"current_plan": 18,
|
|
212
|
+
"incomplete_tasks": [],
|
|
213
|
+
"last_action": "Task 2 complete",
|
|
214
|
+
"next_recommended_action": "Continue with Task 3"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Error Handling
|
|
223
|
+
|
|
224
|
+
### Session Not Found
|
|
225
|
+
```
|
|
226
|
+
if (!session) {
|
|
227
|
+
throw error(`Session not found: ${session_id}`);
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Invalid Format
|
|
232
|
+
```
|
|
233
|
+
if (!['markdown', 'json'].includes(format)) {
|
|
234
|
+
throw error(`Unsupported export format: ${format}`);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Write Failure
|
|
239
|
+
```
|
|
240
|
+
try {
|
|
241
|
+
safePlanningWriteSync(output_path, content);
|
|
242
|
+
} catch (err) {
|
|
243
|
+
logger.error('Write failed', { path: output_path, error: err.message });
|
|
244
|
+
throw error(`Failed to write export file: ${err.message}`);
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Related Files
|
|
251
|
+
|
|
252
|
+
- `ez-agents/bin/lib/session-manager.cjs` - Session loading
|
|
253
|
+
- `ez-agents/bin/lib/session-export.cjs` - Export logic
|
|
254
|
+
- `ez-agents/bin/lib/planning-write.cjs` - Safe file writes
|
|
255
|
+
- `.planning/sessions/` - Output directory
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Orchestrate BDD requirements gathering for a phase. Spawns ez-requirements-agent to interview user, produce .feature files, validate INVEST, and create acceptance criteria documents.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
## 1. Initialize
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
INIT=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" init plan-phase "${PHASE}" 2>/dev/null || echo '{}')
|
|
11
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Parse JSON for: `phase_number`, `phase_name`, `phase_dir`, `padded_phase`, `phase_slug`, `context_path`, `requirements_path`, `state_path`, `roadmap_path`.
|
|
15
|
+
|
|
16
|
+
**If `.planning/` missing:** Error — run `/ez:new-project` first.
|
|
17
|
+
|
|
18
|
+
## 2. Parse Arguments
|
|
19
|
+
|
|
20
|
+
Extract from $ARGUMENTS:
|
|
21
|
+
- Phase number (integer or decimal like `3.1`)
|
|
22
|
+
- `--auto` flag — skip interactive interview, derive from context
|
|
23
|
+
|
|
24
|
+
**If no phase number:** Detect next unplanned phase from roadmap.
|
|
25
|
+
|
|
26
|
+
## 3. Check Phase Exists
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
PHASE_INFO=$(node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" roadmap get-phase "${PHASE}")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**If not found:** Error — phase does not exist in ROADMAP.md.
|
|
33
|
+
|
|
34
|
+
Display:
|
|
35
|
+
```
|
|
36
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
37
|
+
EZ ► GATHERING REQUIREMENTS — Phase {X}: {Name}
|
|
38
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 4. Check Existing .feature Files
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ls specs/features/ 2>/dev/null
|
|
45
|
+
find specs/features/ -name "*.feature" 2>/dev/null | wc -l
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**If .feature files exist for this phase:**
|
|
49
|
+
|
|
50
|
+
Check `.planning/phases/{phase_dir}/{phase_num}-ACCEPTANCE-CRITERIA.md`.
|
|
51
|
+
|
|
52
|
+
If exists, ask:
|
|
53
|
+
1. "Regenerate — replace existing requirements" → Clear old files, re-gather
|
|
54
|
+
2. "Extend — add more scenarios" → Append mode
|
|
55
|
+
3. "View existing" → Display ACCEPTANCE-CRITERIA.md and exit
|
|
56
|
+
|
|
57
|
+
**If no .feature files:** Proceed to step 5.
|
|
58
|
+
|
|
59
|
+
## 5. Spawn ez-requirements-agent
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
+
◆ Spawning requirements agent...
|
|
64
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Requirements prompt:
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
<objective>
|
|
71
|
+
Gather BDD requirements for Phase {phase_number}: {phase_name}.
|
|
72
|
+
Mode: {interactive | auto}
|
|
73
|
+
</objective>
|
|
74
|
+
|
|
75
|
+
<files_to_read>
|
|
76
|
+
- {state_path} (Project State)
|
|
77
|
+
- {roadmap_path} (Roadmap — phase goal and requirements)
|
|
78
|
+
- {requirements_path} (Existing requirements)
|
|
79
|
+
- {context_path} (USER DECISIONS from /ez:discuss-phase, if exists)
|
|
80
|
+
</files_to_read>
|
|
81
|
+
|
|
82
|
+
<phase_info>
|
|
83
|
+
Phase: {phase_number}
|
|
84
|
+
Name: {phase_name}
|
|
85
|
+
Goal: {goal from ROADMAP}
|
|
86
|
+
Phase directory: {phase_dir}
|
|
87
|
+
Padded phase: {padded_phase}
|
|
88
|
+
</phase_info>
|
|
89
|
+
|
|
90
|
+
<mode>
|
|
91
|
+
{If --auto:}
|
|
92
|
+
AUTO MODE: Do NOT ask the user questions. Derive all requirements from:
|
|
93
|
+
1. ROADMAP.md phase goal and description
|
|
94
|
+
2. CONTEXT.md locked decisions (if exists)
|
|
95
|
+
3. Existing REQUIREMENTS.md entries for this phase
|
|
96
|
+
|
|
97
|
+
{If interactive:}
|
|
98
|
+
INTERACTIVE MODE: Conduct a focused interview with the user.
|
|
99
|
+
- Group questions into batches of 3-4 at a time
|
|
100
|
+
- Confirm understanding after each batch before proceeding
|
|
101
|
+
- Focus on observable behavior, not implementation
|
|
102
|
+
</mode>
|
|
103
|
+
|
|
104
|
+
<project_instructions>
|
|
105
|
+
Read ./CLAUDE.md if exists — follow project-specific guidelines.
|
|
106
|
+
Check .claude/skills/ or .agents/skills/ — apply skill rules to requirements scope.
|
|
107
|
+
</project_instructions>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Task(
|
|
112
|
+
prompt=requirements_prompt,
|
|
113
|
+
subagent_type="ez-requirements-agent",
|
|
114
|
+
model="{planner_model from init}"
|
|
115
|
+
)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 6. Handle Agent Return
|
|
119
|
+
|
|
120
|
+
**`## REQUIREMENTS GATHERED`:**
|
|
121
|
+
|
|
122
|
+
Display:
|
|
123
|
+
```
|
|
124
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
125
|
+
EZ ► REQUIREMENTS COMPLETE ✓
|
|
126
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
|
+
|
|
128
|
+
{agent summary}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Continue to step 7.
|
|
132
|
+
|
|
133
|
+
**`## REQUIREMENTS BLOCKED`:**
|
|
134
|
+
|
|
135
|
+
Display blocker details. Offer:
|
|
136
|
+
1. "Provide more context about the phase goal"
|
|
137
|
+
2. "Use --auto mode to derive from existing context"
|
|
138
|
+
3. "Skip requirements for this phase"
|
|
139
|
+
|
|
140
|
+
## 7. Validate BDD Output
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Check .feature files were created
|
|
144
|
+
FEATURE_COUNT=$(find specs/features/ -name "*.feature" 2>/dev/null | wc -l)
|
|
145
|
+
|
|
146
|
+
# Validate structure
|
|
147
|
+
node "$HOME/.claude/ez-agents/bin/ez-tools.cjs" bdd validate specs/features/ 2>/dev/null || true
|
|
148
|
+
|
|
149
|
+
# Check ACCEPTANCE-CRITERIA.md exists
|
|
150
|
+
ls .planning/phases/${PHASE_DIR}/*-ACCEPTANCE-CRITERIA.md 2>/dev/null
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Report findings:
|
|
154
|
+
```
|
|
155
|
+
Validation:
|
|
156
|
+
✓ {N} .feature file(s) created
|
|
157
|
+
✓ INVEST: {score}/6 dimensions pass
|
|
158
|
+
✓ MoSCoW: {must} must / {should} should / {could} could / {wont} wont
|
|
159
|
+
✓ ACCEPTANCE-CRITERIA.md created
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
If INVEST score < 5, warn: "User stories may need refinement before planning — run `/ez:gather-requirements {phase}` again."
|
|
163
|
+
|
|
164
|
+
## 8. Present Final Status
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
168
|
+
EZ ► PHASE {X} REQUIREMENTS ✓
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
|
|
171
|
+
**Phase {X}: {Name}**
|
|
172
|
+
Feature files: {N}
|
|
173
|
+
Scenarios: {M} total ({must} @must / {should} @should / {could} @could)
|
|
174
|
+
INVEST: {score}/6
|
|
175
|
+
|
|
176
|
+
───────────────────────────────────────────────────────────────
|
|
177
|
+
|
|
178
|
+
## ▶ Next Up
|
|
179
|
+
|
|
180
|
+
**Plan Phase {X}** — create implementation plans cross-checked against BDD specs
|
|
181
|
+
|
|
182
|
+
/ez:plan-phase {X}
|
|
183
|
+
|
|
184
|
+
<sub>/clear first → fresh context window</sub>
|
|
185
|
+
|
|
186
|
+
───────────────────────────────────────────────────────────────
|
|
187
|
+
|
|
188
|
+
**Also available:**
|
|
189
|
+
- cat specs/features/{domain}/*.feature — review scenarios
|
|
190
|
+
- cat .planning/phases/{phase-dir}/{phase}-ACCEPTANCE-CRITERIA.md — review acceptance criteria
|
|
191
|
+
- /ez:discuss-phase {X} — capture design decisions first (if not done)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
</process>
|
|
195
|
+
|
|
196
|
+
<success_criteria>
|
|
197
|
+
- [ ] Phase validated against roadmap
|
|
198
|
+
- [ ] Existing .feature files checked
|
|
199
|
+
- [ ] ez-requirements-agent spawned with correct mode and file paths
|
|
200
|
+
- [ ] .feature files created in specs/features/
|
|
201
|
+
- [ ] Every scenario has MoSCoW + tier tags
|
|
202
|
+
- [ ] INVEST validation run
|
|
203
|
+
- [ ] ACCEPTANCE-CRITERIA.md exists in phase directory
|
|
204
|
+
- [ ] REQUIREMENTS-BDD.md updated
|
|
205
|
+
- [ ] User sees summary with scenario counts and next steps
|
|
206
|
+
</success_criteria>
|
|
@@ -221,6 +221,54 @@ Create context handoff when pausing work mid-phase.
|
|
|
221
221
|
|
|
222
222
|
Usage: `/ez:pause-work`
|
|
223
223
|
|
|
224
|
+
**`/ez:resume`**
|
|
225
|
+
Resume from last session or navigate session chain (Phase 18+).
|
|
226
|
+
|
|
227
|
+
- Loads most recent session from `.planning/sessions/`
|
|
228
|
+
- Shows formatted summary with model, phase, plan, duration
|
|
229
|
+
- Displays incomplete items, decisions, file changes
|
|
230
|
+
- Offers options: Continue, Show transcript, Export, Navigate chain, Start fresh
|
|
231
|
+
- Supports navigation: `--previous`, `--next`, `--chain`
|
|
232
|
+
|
|
233
|
+
Usage: `/ez:resume`
|
|
234
|
+
Usage: `/ez:resume session-20260319-143052`
|
|
235
|
+
Usage: `/ez:resume --previous`
|
|
236
|
+
|
|
237
|
+
**`/ez:export-session`**
|
|
238
|
+
Export session for model handoff or archival.
|
|
239
|
+
|
|
240
|
+
- Exports last session by default (or specified session)
|
|
241
|
+
- Supports markdown (human-readable) and JSON formats
|
|
242
|
+
- Includes: summary, tasks, decisions, file changes, open questions, blockers
|
|
243
|
+
- Output to `.planning/sessions/export-{session_id}.{ext}`
|
|
244
|
+
|
|
245
|
+
Usage: `/ez:export-session`
|
|
246
|
+
Usage: `/ez:export-session session-20260319-143052 --format json`
|
|
247
|
+
Usage: `/ez:export-session --output /path/to/file.md`
|
|
248
|
+
|
|
249
|
+
**`/ez:import-session`**
|
|
250
|
+
Import session from exported file.
|
|
251
|
+
|
|
252
|
+
- Validates session structure and chain integrity
|
|
253
|
+
- Supports model-specific adapters (claude, qwen, openai, kimi)
|
|
254
|
+
- Creates new session with imported context
|
|
255
|
+
- Offers to resume imported session
|
|
256
|
+
|
|
257
|
+
Usage: `/ez:import-session /path/to/session.json`
|
|
258
|
+
Usage: `/ez:import-session session.json --source-model claude`
|
|
259
|
+
|
|
260
|
+
**`/ez:list-sessions`**
|
|
261
|
+
List all sessions with metadata and disk usage.
|
|
262
|
+
|
|
263
|
+
- Shows: session_id, started_at, ended_at, model, phase, plan, status
|
|
264
|
+
- Sorted by date (newest first)
|
|
265
|
+
- Displays disk usage summary
|
|
266
|
+
- Supports `--limit N` and `--json` flags
|
|
267
|
+
|
|
268
|
+
Usage: `/ez:list-sessions`
|
|
269
|
+
Usage: `/ez:list-sessions --limit 10`
|
|
270
|
+
Usage: `/ez:list-sessions --json`
|
|
271
|
+
|
|
224
272
|
### Debugging
|
|
225
273
|
|
|
226
274
|
**`/ez:debug [issue description]`**
|
|
@@ -483,6 +531,50 @@ Example config:
|
|
|
483
531
|
/ez:debug # Resume from where you left off
|
|
484
532
|
```
|
|
485
533
|
|
|
534
|
+
## Global Flags
|
|
535
|
+
|
|
536
|
+
Flags below apply to all core commands (`execute-phase`, `plan-phase`, `release`, `progress`):
|
|
537
|
+
|
|
538
|
+
| Flag | Effect |
|
|
539
|
+
|---|---|
|
|
540
|
+
| `--no-auto` | Disable all auto-invocations. Expert mode. |
|
|
541
|
+
| `--verbose` | Show detail for every auto-invocation step. |
|
|
542
|
+
| `--skip-discussion` | Skip discuss-phase only (more granular than --no-auto). |
|
|
543
|
+
|
|
544
|
+
## Smart Orchestration
|
|
545
|
+
|
|
546
|
+
Core commands automatically invoke helper commands based on context:
|
|
547
|
+
|
|
548
|
+
- `/ez:execute-phase N` → auto: health check (pre), verify-work (post)
|
|
549
|
+
- `/ez:plan-phase N` → auto: discuss-phase if phase touches a sensitive area (auth, DB, payment, etc.)
|
|
550
|
+
- `/ez:release tier ver` → auto: verify-work (medium+), audit-milestone + arch-review (enterprise)
|
|
551
|
+
- `/ez:progress` → auto: health check (silent on pass)
|
|
552
|
+
|
|
553
|
+
All auto-invocations appear with `[auto]` prefix in output.
|
|
554
|
+
|
|
555
|
+
Disable globally: set `"smart_orchestration": { "enabled": false }` in `.planning/config.json`.
|
|
556
|
+
Disable per-command: append `--no-auto` flag.
|
|
557
|
+
|
|
558
|
+
## Flags
|
|
559
|
+
|
|
560
|
+
### --skip-discussion
|
|
561
|
+
Skips the DISCUSSION.md pre-flight check and proceeds directly to execution.
|
|
562
|
+
|
|
563
|
+
Usage: ez execute-phase <phase> --skip-discussion
|
|
564
|
+
|
|
565
|
+
⚠️ Warning: Pre-flight discussion skipped via --skip-discussion
|
|
566
|
+
|
|
567
|
+
### Migration Guide (v2.x → v3.0)
|
|
568
|
+
If upgrading from v2.x:
|
|
569
|
+
- `agent_discussion` is now enabled by default (was disabled)
|
|
570
|
+
- Use `--skip-discussion` to preserve v2.x behavior during transition
|
|
571
|
+
- Set `"agent_discussion": { "enabled": false }` in config.json to permanently disable
|
|
572
|
+
|
|
573
|
+
### Migration Note (v3.x → Smart Orchestration)
|
|
574
|
+
If upgrading from v3.x without smart orchestration and the new behavior is not desired, two options:
|
|
575
|
+
1. Add `--no-auto` to frequently used commands
|
|
576
|
+
2. Set `"smart_orchestration": { "enabled": false }` in `.planning/config.json`
|
|
577
|
+
|
|
486
578
|
## Getting Help
|
|
487
579
|
|
|
488
580
|
- Read `.planning/PROJECT.md` for project vision
|