@gravirei/reis 2.4.1 → 2.6.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 +99 -0
- package/README.md +126 -3
- package/bin/reis.js +59 -2
- package/docs/CYCLE_WORKFLOW.md +143 -15
- package/docs/PARALLEL_EXECUTION.md +577 -0
- package/docs/PLAN_REVIEW.md +160 -0
- package/docs/QUALITY_GATES.md +378 -0
- package/lib/commands/cycle.js +5 -1
- package/lib/commands/execute.js +355 -7
- package/lib/commands/gate.js +399 -0
- package/lib/commands/help.js +60 -3
- package/lib/commands/review.js +103 -0
- package/lib/commands/verify.js +16 -0
- package/lib/commands/visualize.js +312 -2
- package/lib/utils/code-analyzer.js +615 -0
- package/lib/utils/config.js +161 -2
- package/lib/utils/conflict-resolver.js +534 -0
- package/lib/utils/cycle-orchestrator.js +204 -2
- package/lib/utils/cycle-state-manager.js +91 -3
- package/lib/utils/cycle-ui.js +99 -0
- package/lib/utils/dependency-parser.js +460 -0
- package/lib/utils/execution-coordinator.js +431 -0
- package/lib/utils/gate-reporter.js +343 -0
- package/lib/utils/gate-runner.js +474 -0
- package/lib/utils/gates/accessibility-gate.js +334 -0
- package/lib/utils/gates/index.js +16 -0
- package/lib/utils/gates/performance-gate.js +310 -0
- package/lib/utils/gates/quality-gate.js +514 -0
- package/lib/utils/gates/security-gate.js +442 -0
- package/lib/utils/kanban-renderer.js +308 -5
- package/lib/utils/parallel-state-tracker.js +735 -0
- package/lib/utils/parallel-wave-scheduler.js +462 -0
- package/lib/utils/plan-reviewer.js +1077 -0
- package/lib/utils/wave-conflict-detector.js +651 -0
- package/lib/utils/wave-dependency-graph.js +518 -0
- package/lib/utils/wave-executor.js +520 -1
- package/package.json +1 -1
- package/subagents/reis_debugger.md +237 -0
- package/subagents/reis_executor.md +220 -0
- package/subagents/reis_plan_reviewer.md +727 -0
- package/subagents/reis_verifier.md +90 -0
- package/templates/REVIEW_REPORT.md +48 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,104 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.0] - 2026-01-26
|
|
4
|
+
|
|
5
|
+
### 🎯 Major Features
|
|
6
|
+
|
|
7
|
+
#### Plan Reviewer Subagent (`reis_plan_reviewer`)
|
|
8
|
+
A new subagent that validates REIS plans against your codebase BEFORE execution, preventing wasted effort from:
|
|
9
|
+
- Tasks for things already implemented
|
|
10
|
+
- Wrong file paths
|
|
11
|
+
- Missing dependencies
|
|
12
|
+
- Function signature mismatches
|
|
13
|
+
|
|
14
|
+
**New REIS Cycle:**
|
|
15
|
+
```
|
|
16
|
+
PLAN → REVIEW → EXECUTE → VERIFY → GATE → DEBUG
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
#### Quality Gates Integration
|
|
20
|
+
Quality gates now run automatically in the REIS cycle after verification.
|
|
21
|
+
|
|
22
|
+
**Gate Categories:**
|
|
23
|
+
- 🔒 Security: Vulnerabilities, secrets detection, license compliance
|
|
24
|
+
- 📊 Quality: Code coverage, lint errors, complexity analysis
|
|
25
|
+
- ⚡ Performance: Bundle size, dependencies (optional)
|
|
26
|
+
- ♿ Accessibility: WCAG compliance (optional)
|
|
27
|
+
|
|
28
|
+
#### Parallel Wave Execution
|
|
29
|
+
Execute independent waves concurrently for faster phase completion.
|
|
30
|
+
|
|
31
|
+
### ✨ New Commands
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Plan Review
|
|
35
|
+
reis review # Review all plans in .planning/
|
|
36
|
+
reis review <plan-path> # Review specific plan
|
|
37
|
+
reis review --auto-fix # Auto-fix simple issues
|
|
38
|
+
reis review --strict # Fail on warnings
|
|
39
|
+
|
|
40
|
+
# Quality Gates
|
|
41
|
+
reis gate # Run all configured gates
|
|
42
|
+
reis gate security # Run security gates only
|
|
43
|
+
reis gate quality # Run quality gates only
|
|
44
|
+
reis gate status # Show gate configuration
|
|
45
|
+
|
|
46
|
+
# Parallel Execution
|
|
47
|
+
reis execute <phase> --parallel # Enable parallel waves
|
|
48
|
+
reis execute <phase> --max-concurrent 4 # Limit concurrent waves
|
|
49
|
+
reis visualize --dependencies # Show wave dependency graph
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 🔧 Cycle Command Updates
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
reis cycle <phase> # Full cycle with review + gates
|
|
56
|
+
reis cycle --skip-review # Skip plan review phase
|
|
57
|
+
reis cycle --skip-gates # Skip quality gates phase
|
|
58
|
+
reis cycle --auto-fix # Auto-fix plan issues during review
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 📁 New Files
|
|
62
|
+
|
|
63
|
+
**Plan Reviewer:**
|
|
64
|
+
- `lib/utils/code-analyzer.js` - Codebase analysis utilities
|
|
65
|
+
- `lib/utils/plan-reviewer.js` - Plan validation engine
|
|
66
|
+
- `lib/commands/review.js` - Review CLI command
|
|
67
|
+
- `subagents/reis_plan_reviewer.md` - Subagent definition
|
|
68
|
+
- `docs/PLAN_REVIEW.md` - Documentation
|
|
69
|
+
|
|
70
|
+
**Quality Gates:**
|
|
71
|
+
- `lib/utils/gate-runner.js` - Gate execution engine
|
|
72
|
+
- `lib/utils/gate-reporter.js` - Gate result reporting
|
|
73
|
+
- `lib/utils/gates/security-gate.js` - Security checks
|
|
74
|
+
- `lib/utils/gates/quality-gate.js` - Quality checks
|
|
75
|
+
- `lib/utils/gates/performance-gate.js` - Performance checks
|
|
76
|
+
- `lib/utils/gates/accessibility-gate.js` - Accessibility checks
|
|
77
|
+
- `lib/commands/gate.js` - Gate CLI command
|
|
78
|
+
- `docs/QUALITY_GATES.md` - Documentation
|
|
79
|
+
|
|
80
|
+
**Parallel Execution:**
|
|
81
|
+
- `lib/utils/wave-dependency-graph.js` - DAG for wave dependencies
|
|
82
|
+
- `lib/utils/dependency-parser.js` - Parse @dependencies from PLAN.md
|
|
83
|
+
- `lib/utils/parallel-wave-scheduler.js` - Batch scheduling
|
|
84
|
+
- `lib/utils/execution-coordinator.js` - Async orchestration
|
|
85
|
+
- `lib/utils/wave-conflict-detector.js` - File conflict detection
|
|
86
|
+
- `lib/utils/conflict-resolver.js` - Resolution strategies
|
|
87
|
+
- `docs/PARALLEL_EXECUTION.md` - Documentation
|
|
88
|
+
|
|
89
|
+
### 🔄 Updated Subagents
|
|
90
|
+
|
|
91
|
+
- **reis_verifier** - Now includes gate readiness assessment
|
|
92
|
+
- **reis_debugger** - Handles `[GATE:category]` prefixed issues
|
|
93
|
+
- **reis_executor** - Knows gate fix patterns
|
|
94
|
+
|
|
95
|
+
### 📊 Test Coverage
|
|
96
|
+
|
|
97
|
+
- 663 tests passing
|
|
98
|
+
- New test files for all features
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
3
102
|
All notable changes to REIS will be documented in this file.
|
|
4
103
|
|
|
5
104
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
package/README.md
CHANGED
|
@@ -23,9 +23,16 @@ Systematic development with parallel subagent execution for Atlassian Rovo Dev
|
|
|
23
23
|
|
|
24
24
|
**REIS (Roadmap Execution & Implementation System)** is a systematic development framework for building better software with AI. Designed for Atlassian Rovo Dev, REIS provides structured workflows, specialized subagents, and comprehensive documentation to take projects from idea to deployment.
|
|
25
25
|
|
|
26
|
-
### ✨ What's New in v2.
|
|
26
|
+
### ✨ What's New in v2.5
|
|
27
27
|
|
|
28
|
-
REIS v2.
|
|
28
|
+
REIS v2.5 introduces **parallel wave execution** for significantly faster phase completion:
|
|
29
|
+
|
|
30
|
+
- 🚀 **Parallel Waves** - Execute independent waves concurrently (up to 4x speedup)
|
|
31
|
+
- 🔗 **Dependency Graphs** - Define and visualize wave dependencies
|
|
32
|
+
- 🔍 **Conflict Detection** - Automatic file conflict detection and resolution
|
|
33
|
+
- 📊 **Enhanced Kanban** - Real-time parallel execution progress tracking
|
|
34
|
+
|
|
35
|
+
### Previous in v2.0
|
|
29
36
|
|
|
30
37
|
- 🌊 **Wave Execution** - Sequential waves with automatic checkpoints between phases
|
|
31
38
|
- 💾 **Smart Resume** - Resume from any checkpoint with deviation detection
|
|
@@ -139,11 +146,47 @@ reis assumptions # Document assumptions
|
|
|
139
146
|
reis plan # Create phase plan
|
|
140
147
|
reis discuss # Discuss phase approach
|
|
141
148
|
reis research # Research requirements
|
|
149
|
+
reis review # Review plan before execution
|
|
142
150
|
reis execute # Execute current phase
|
|
143
151
|
reis execute-plan [f] # Execute with wave-based flow (v2.0)
|
|
144
152
|
reis verify # Verify completion
|
|
145
153
|
```
|
|
146
154
|
|
|
155
|
+
### Plan Review
|
|
156
|
+
|
|
157
|
+
Review plans against your codebase before execution to catch issues early:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Review all plans
|
|
161
|
+
reis review
|
|
162
|
+
|
|
163
|
+
# Review specific plan
|
|
164
|
+
reis review .planning/phases/feature/PLAN.md
|
|
165
|
+
|
|
166
|
+
# Review with auto-fix
|
|
167
|
+
reis review --auto-fix
|
|
168
|
+
|
|
169
|
+
# Review with strict mode
|
|
170
|
+
reis review --strict
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**What Gets Checked:**
|
|
174
|
+
- File existence in codebase
|
|
175
|
+
- Functions already implemented
|
|
176
|
+
- Exports already in place
|
|
177
|
+
- Dependencies available
|
|
178
|
+
- Path correctness
|
|
179
|
+
|
|
180
|
+
**Status Codes:**
|
|
181
|
+
| Status | Icon | Meaning |
|
|
182
|
+
|--------|------|---------|
|
|
183
|
+
| `ok` | ✅ | Ready for execution |
|
|
184
|
+
| `already_complete` | ✅ | Already implemented |
|
|
185
|
+
| `path_error` | ⚠️ | Path incorrect |
|
|
186
|
+
| `missing_dependency` | ❌ | Dependency missing |
|
|
187
|
+
|
|
188
|
+
**Learn more:** [Plan Review Guide](docs/PLAN_REVIEW.md)
|
|
189
|
+
|
|
147
190
|
### Verification
|
|
148
191
|
|
|
149
192
|
Verify that executed plans meet all success criteria and feature completeness requirements.
|
|
@@ -322,9 +365,24 @@ Next: reis cycle 2
|
|
|
322
365
|
--auto-fix # Apply fixes without confirmation
|
|
323
366
|
--resume # Resume interrupted cycle
|
|
324
367
|
--continue-on-fail # Continue even if verification fails
|
|
368
|
+
--skip-gates # Skip quality gate checks
|
|
369
|
+
--gate-only <cat> # Run only specific gate category
|
|
325
370
|
-v, --verbose # Detailed output
|
|
326
371
|
```
|
|
327
372
|
|
|
373
|
+
### Quality Gates in Cycle
|
|
374
|
+
|
|
375
|
+
Gates automatically run after verification to ensure code quality:
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
reis cycle 3 # Includes gates
|
|
379
|
+
reis cycle 3 --skip-gates # Without gates
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
The gate phase checks security, quality, and optionally performance/accessibility before marking a phase complete. Gate failures trigger the debug phase with `[GATE:category]` prefixed issues.
|
|
383
|
+
|
|
384
|
+
See [Quality Gates](docs/QUALITY_GATES.md) for configuration.
|
|
385
|
+
|
|
328
386
|
**Learn more:** [Complete Cycle Guide](docs/CYCLE_COMMAND.md)
|
|
329
387
|
|
|
330
388
|
### Checkpoints & Resume (v2.0)
|
|
@@ -393,6 +451,67 @@ reis visualize --type metrics # Metrics dashboard
|
|
|
393
451
|
reis visualize --watch # Auto-refresh mode
|
|
394
452
|
```
|
|
395
453
|
|
|
454
|
+
### Parallel Wave Execution (New in v2.5)
|
|
455
|
+
|
|
456
|
+
Execute independent waves concurrently for faster phase completion:
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Enable parallel execution
|
|
460
|
+
reis execute 3 --parallel
|
|
461
|
+
|
|
462
|
+
# Limit concurrent waves
|
|
463
|
+
reis execute 3 --parallel --max-concurrent 2
|
|
464
|
+
|
|
465
|
+
# Preview execution plan
|
|
466
|
+
reis execute 3 --parallel --dry-run --show-graph
|
|
467
|
+
|
|
468
|
+
# Visualize dependencies
|
|
469
|
+
reis visualize --dependencies
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
Define wave dependencies in PLAN.md:
|
|
473
|
+
|
|
474
|
+
```markdown
|
|
475
|
+
## Wave 1: Setup
|
|
476
|
+
<!-- @dependencies: none -->
|
|
477
|
+
- Initialize project
|
|
478
|
+
|
|
479
|
+
## Wave 2: Backend
|
|
480
|
+
<!-- @dependencies: Wave 1 -->
|
|
481
|
+
- Create API endpoints
|
|
482
|
+
|
|
483
|
+
## Wave 3: Frontend
|
|
484
|
+
<!-- @dependencies: none -->
|
|
485
|
+
- Build UI components
|
|
486
|
+
|
|
487
|
+
## Wave 4: Integration
|
|
488
|
+
<!-- @dependencies: Wave 2, Wave 3 -->
|
|
489
|
+
- Connect frontend to backend
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
**Features:**
|
|
493
|
+
- 🚀 **Dependency-based scheduling** - Waves run as soon as dependencies complete
|
|
494
|
+
- ⚡ **Configurable concurrency** - Control max parallel waves (1-10)
|
|
495
|
+
- 🔍 **Conflict detection** - Detect file conflicts before execution
|
|
496
|
+
- 🛡️ **Resolution strategies** - fail, queue, branch, or merge conflicts
|
|
497
|
+
- 📊 **Visual progress** - Kanban board shows parallel execution
|
|
498
|
+
- 💾 **State persistence** - Resume interrupted parallel execution
|
|
499
|
+
|
|
500
|
+
**Configuration (reis.config.js):**
|
|
501
|
+
```javascript
|
|
502
|
+
module.exports = {
|
|
503
|
+
waves: {
|
|
504
|
+
parallel: {
|
|
505
|
+
enabled: true,
|
|
506
|
+
maxConcurrent: 4,
|
|
507
|
+
conflictStrategy: 'fail' // 'fail' | 'queue' | 'branch' | 'merge'
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**Learn more:** [Parallel Execution Guide](docs/PARALLEL_EXECUTION.md)
|
|
514
|
+
|
|
396
515
|
### Progress Management
|
|
397
516
|
```bash
|
|
398
517
|
reis progress # Show progress
|
|
@@ -426,7 +545,7 @@ reis uninstall # Uninstall
|
|
|
426
545
|
|
|
427
546
|
## Subagents
|
|
428
547
|
|
|
429
|
-
REIS includes
|
|
548
|
+
REIS includes 5 specialized subagents for Rovo Dev:
|
|
430
549
|
|
|
431
550
|
### 🎯 reis_planner
|
|
432
551
|
Creates executable phase plans with task breakdown, dependency analysis, resource requirements, and success criteria.
|
|
@@ -434,6 +553,9 @@ Creates executable phase plans with task breakdown, dependency analysis, resourc
|
|
|
434
553
|
### ⚡ reis_executor
|
|
435
554
|
Executes plans with atomic commits, deviation handling, checkpoints, state management, and auto-fix capabilities.
|
|
436
555
|
|
|
556
|
+
### 🔍 reis_plan_reviewer
|
|
557
|
+
Reviews plans against your codebase before execution, detecting already-implemented features, path errors, missing dependencies, and potential conflicts.
|
|
558
|
+
|
|
437
559
|
### ✅ reis_verifier
|
|
438
560
|
Verifies execution results against success criteria, runs test suites, validates code quality, detects missing features (FR4.1), and generates comprehensive verification reports.
|
|
439
561
|
|
|
@@ -458,6 +580,7 @@ Maps codebases with architecture analysis, dependency mapping, tech stack identi
|
|
|
458
580
|
- [WAVE_EXECUTION.md](docs/WAVE_EXECUTION.md) - Wave-based execution guide
|
|
459
581
|
- [CHECKPOINTS.md](docs/CHECKPOINTS.md) - Checkpoint system documentation
|
|
460
582
|
- [CONFIG_GUIDE.md](docs/CONFIG_GUIDE.md) - Configuration reference
|
|
583
|
+
- [PLAN_REVIEW.md](docs/PLAN_REVIEW.md) - Plan review before execution
|
|
461
584
|
|
|
462
585
|
### After Installation
|
|
463
586
|
|
package/bin/reis.js
CHANGED
|
@@ -79,6 +79,7 @@ const cycleCmd = require('../lib/commands/cycle.js');
|
|
|
79
79
|
const decisionsCmd = require('../lib/commands/decisions.js');
|
|
80
80
|
const treeCmd = require('../lib/commands/tree.js');
|
|
81
81
|
const kanbanCmd = require('../lib/commands/kanban.js');
|
|
82
|
+
const { reviewCommand } = require('../lib/commands/review.js');
|
|
82
83
|
|
|
83
84
|
// Check for --help or -h flag before Commander parses
|
|
84
85
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
@@ -157,7 +158,11 @@ program
|
|
|
157
158
|
program
|
|
158
159
|
.command('execute [phase]')
|
|
159
160
|
.description('Execute a phase')
|
|
160
|
-
.option('--
|
|
161
|
+
.option('--parallel', 'Enable parallel wave execution')
|
|
162
|
+
.option('--max-concurrent <n>', 'Maximum concurrent waves (default: 4)', '4')
|
|
163
|
+
.option('--conflict-strategy <strategy>', 'Conflict resolution: fail|queue|branch|merge (default: fail)', 'fail')
|
|
164
|
+
.option('--show-graph', 'Display dependency graph before execution')
|
|
165
|
+
.option('--dry-run', 'Show execution plan without running')
|
|
161
166
|
.option('-v, --verbose', 'Show detailed output')
|
|
162
167
|
.option('--no-commit', 'Skip auto-commit')
|
|
163
168
|
.option('--timeout <ms>', 'Execution timeout in milliseconds')
|
|
@@ -190,12 +195,26 @@ program
|
|
|
190
195
|
.option('--dry-run', 'Show prompt without executing')
|
|
191
196
|
.option('-v, --verbose', 'Show detailed verification output')
|
|
192
197
|
.option('-s, --strict', 'Fail on warnings')
|
|
198
|
+
.option('--with-gates', 'Run quality gates after verification')
|
|
199
|
+
.option('--skip-gates', 'Skip gates even if configured')
|
|
193
200
|
.option('--timeout <ms>', 'Verification timeout in milliseconds')
|
|
194
201
|
.action(async (target, options, command) => {
|
|
195
202
|
const globalOpts = command.parent?.opts() || {};
|
|
196
203
|
await verifyCmd(target, { ...options, noKanban: globalOpts.kanban === false });
|
|
197
204
|
});
|
|
198
205
|
|
|
206
|
+
// Review command
|
|
207
|
+
program
|
|
208
|
+
.command('review [target]')
|
|
209
|
+
.description('Review plans against codebase before execution')
|
|
210
|
+
.option('--auto-fix', 'Automatically fix simple issues')
|
|
211
|
+
.option('--strict', 'Fail on warnings')
|
|
212
|
+
.option('--report [file]', 'Save review report to file')
|
|
213
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
214
|
+
.action(async (target, options) => {
|
|
215
|
+
await reviewCommand(target, options);
|
|
216
|
+
});
|
|
217
|
+
|
|
199
218
|
// Progress Commands
|
|
200
219
|
program
|
|
201
220
|
.command('progress')
|
|
@@ -205,6 +224,41 @@ program
|
|
|
205
224
|
progressCmd({}, { noKanban: globalOpts.kanban === false });
|
|
206
225
|
});
|
|
207
226
|
|
|
227
|
+
program
|
|
228
|
+
.command('visualize')
|
|
229
|
+
.description('Visualize project data (progress, waves, roadmap, metrics, dependencies, timeline)')
|
|
230
|
+
.option('--type <type>', 'Visualization type: progress|waves|roadmap|metrics|dependencies|timeline', 'progress')
|
|
231
|
+
.option('--dependencies', 'Show wave dependency graph')
|
|
232
|
+
.option('--timeline', 'Show estimated execution timeline')
|
|
233
|
+
.option('--format <fmt>', 'Output format: ascii|mermaid (for dependencies)', 'ascii')
|
|
234
|
+
.option('--watch', 'Auto-refresh display')
|
|
235
|
+
.option('--compact', 'Compact output')
|
|
236
|
+
.option('--no-color', 'Disable colors')
|
|
237
|
+
.action(async (options) => {
|
|
238
|
+
const visualizeCmd = require('../lib/commands/visualize.js');
|
|
239
|
+
const args = [];
|
|
240
|
+
if (options.type) { args.push('--type', options.type); }
|
|
241
|
+
if (options.dependencies) { args.push('--dependencies'); }
|
|
242
|
+
if (options.timeline) { args.push('--timeline'); }
|
|
243
|
+
if (options.format) { args.push('--format', options.format); }
|
|
244
|
+
if (options.watch) { args.push('--watch'); }
|
|
245
|
+
if (options.compact) { args.push('--compact'); }
|
|
246
|
+
if (options.color === false) { args.push('--no-color'); }
|
|
247
|
+
await visualizeCmd(args);
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
// Quality Gates Commands
|
|
251
|
+
program
|
|
252
|
+
.command('gate [subcommand]')
|
|
253
|
+
.description('Run quality gates (security, quality, performance, accessibility)')
|
|
254
|
+
.option('-v, --verbose', 'Show detailed output')
|
|
255
|
+
.option('--format <format>', 'Output format: ascii|json|markdown', 'ascii')
|
|
256
|
+
.option('--output <file>', 'Output file for report command')
|
|
257
|
+
.action(async (subcommand, options) => {
|
|
258
|
+
const { gateCommand } = require('../lib/commands/gate.js');
|
|
259
|
+
await gateCommand(subcommand, options);
|
|
260
|
+
});
|
|
261
|
+
|
|
208
262
|
program
|
|
209
263
|
.command('pause')
|
|
210
264
|
.description('Pause current work and save state')
|
|
@@ -280,11 +334,14 @@ program
|
|
|
280
334
|
|
|
281
335
|
program
|
|
282
336
|
.command('cycle [phase-or-plan]')
|
|
283
|
-
.description('Complete PLAN → EXECUTE → VERIFY → DEBUG cycle')
|
|
337
|
+
.description('Complete PLAN → EXECUTE → VERIFY → GATE → DEBUG cycle')
|
|
284
338
|
.option('--max-attempts <n>', 'Maximum debug/fix attempts', '3')
|
|
285
339
|
.option('--auto-fix', 'Apply fixes without confirmation')
|
|
286
340
|
.option('--resume', 'Resume interrupted cycle')
|
|
287
341
|
.option('--continue-on-fail', 'Continue even if verification fails')
|
|
342
|
+
.option('--skip-review', 'Skip plan review phase')
|
|
343
|
+
.option('--skip-gates', 'Skip quality gates phase')
|
|
344
|
+
.option('--gate-only <category>', 'Run only specific gate category (security|quality|performance|accessibility)')
|
|
288
345
|
.option('-v, --verbose', 'Detailed output')
|
|
289
346
|
.action(async (phaseOrPlan, options, command) => {
|
|
290
347
|
const globalOpts = command.parent?.opts() || {};
|
package/docs/CYCLE_WORKFLOW.md
CHANGED
|
@@ -2,7 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
The REIS Cycle Command automates the complete development workflow:
|
|
5
|
+
The REIS Cycle Command automates the complete development workflow:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
PLAN → EXECUTE → VERIFY → GATE → DEBUG (if needed)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This document defines the state machine that orchestrates this workflow.
|
|
12
|
+
|
|
13
|
+
## Cycle Phases
|
|
14
|
+
|
|
15
|
+
### 1. PLAN
|
|
16
|
+
Create or update the execution plan using `reis_planner` subagent.
|
|
17
|
+
|
|
18
|
+
### 2. EXECUTE
|
|
19
|
+
Implement the plan using `reis_executor` subagent.
|
|
20
|
+
|
|
21
|
+
### 3. VERIFY
|
|
22
|
+
Verify implementation completeness using `reis_verifier` subagent.
|
|
23
|
+
|
|
24
|
+
### 4. GATE (New in v2.5)
|
|
25
|
+
Run quality gates to check:
|
|
26
|
+
- **Security**: Vulnerabilities, secrets, license compliance
|
|
27
|
+
- **Quality**: Test coverage, linting, code complexity
|
|
28
|
+
- **Performance**: Bundle size, dependencies (optional)
|
|
29
|
+
- **Accessibility**: WCAG compliance (optional)
|
|
30
|
+
|
|
31
|
+
### 5. DEBUG
|
|
32
|
+
If verification or gates fail, analyze issues using `reis_debugger` subagent.
|
|
33
|
+
|
|
34
|
+
## Gate Phase Details
|
|
35
|
+
|
|
36
|
+
### When Gates Run
|
|
37
|
+
- Automatically after successful verification in `reis cycle`
|
|
38
|
+
- Manually with `reis verify --with-gates`
|
|
39
|
+
- Controlled by `gates.runOn` in config
|
|
40
|
+
|
|
41
|
+
### Gate Behavior
|
|
42
|
+
- **blockOnFail: true** (default) - Gate failure triggers debug phase
|
|
43
|
+
- **blockOnFail: false** - Gate failure shows warning, cycle continues
|
|
44
|
+
- **blockOnWarning: true** - Treat warnings as failures
|
|
45
|
+
|
|
46
|
+
### Skipping Gates
|
|
47
|
+
```bash
|
|
48
|
+
reis cycle --skip-gates # Skip all gates
|
|
49
|
+
reis cycle --gate-only security # Run only security gates
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Configuration
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
// reis.config.js
|
|
56
|
+
module.exports = {
|
|
57
|
+
gates: {
|
|
58
|
+
enabled: true,
|
|
59
|
+
runOn: ['cycle'], // 'cycle', 'verify', or both
|
|
60
|
+
blockOnFail: true, // Block cycle on gate failure
|
|
61
|
+
blockOnWarning: false, // Block on warnings
|
|
62
|
+
timeout: 30000, // Gate timeout (ms)
|
|
63
|
+
|
|
64
|
+
security: { enabled: true },
|
|
65
|
+
quality: { enabled: true },
|
|
66
|
+
performance: { enabled: false },
|
|
67
|
+
accessibility: { enabled: false }
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## CLI Commands
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Full cycle with gates
|
|
76
|
+
reis cycle 3
|
|
77
|
+
|
|
78
|
+
# Cycle without gates
|
|
79
|
+
reis cycle 3 --skip-gates
|
|
80
|
+
|
|
81
|
+
# Cycle with specific gate category
|
|
82
|
+
reis cycle 3 --gate-only security
|
|
83
|
+
|
|
84
|
+
# Verification with gates
|
|
85
|
+
reis verify --with-gates
|
|
86
|
+
|
|
87
|
+
# Resume interrupted cycle
|
|
88
|
+
reis cycle --resume
|
|
89
|
+
```
|
|
6
90
|
|
|
7
91
|
## State Machine
|
|
8
92
|
|
|
@@ -13,7 +97,8 @@ The REIS Cycle Command automates the complete development workflow: PLAN → EXE
|
|
|
13
97
|
| **IDLE** | No cycle running | PLANNING |
|
|
14
98
|
| **PLANNING** | Generating or validating plan | EXECUTING, FAILED |
|
|
15
99
|
| **EXECUTING** | Running plan tasks | VERIFYING, FAILED |
|
|
16
|
-
| **VERIFYING** | Checking completion criteria |
|
|
100
|
+
| **VERIFYING** | Checking completion criteria | GATING, DEBUGGING, FAILED |
|
|
101
|
+
| **GATING** | Running quality gates | COMPLETE, DEBUGGING, FAILED |
|
|
17
102
|
| **DEBUGGING** | Analyzing failures | FIXING, FAILED |
|
|
18
103
|
| **FIXING** | Applying fix plan | VERIFYING, FAILED |
|
|
19
104
|
| **COMPLETE** | All tasks successful | IDLE |
|
|
@@ -56,10 +141,19 @@ The REIS Cycle Command automates the complete development workflow: PLAN → EXE
|
|
|
56
141
|
│ │
|
|
57
142
|
│ Pass (100%) │ Fail (<100%)
|
|
58
143
|
▼ ▼
|
|
144
|
+
┌─────────────────────────────────────────┐ ┌────────────────┐
|
|
145
|
+
│ GATING (v2.5) │ │ DEBUGGING │
|
|
146
|
+
│ - Run security gates │ │ (verification │
|
|
147
|
+
│ - Run quality gates │ │ failures) │
|
|
148
|
+
│ - Optional: performance, a11y │ └───────┬────────┘
|
|
149
|
+
└───┬──────────────────┬──────────────────┘ │
|
|
150
|
+
│ │ │
|
|
151
|
+
│ Gates pass │ Gates fail │
|
|
152
|
+
▼ ▼ │
|
|
59
153
|
┌──────────┐ ┌─────────────────────────────────────────────┐
|
|
60
154
|
│ COMPLETE │ │ DEBUGGING │
|
|
61
|
-
│ │ │ - Analyze verification failures
|
|
62
|
-
│ │ │ - Classify issues
|
|
155
|
+
│ │ │ - Analyze verification/gate failures │
|
|
156
|
+
│ │ │ - Classify issues [GATE:category] │
|
|
63
157
|
└──────────┘ │ - Generate fix plan │
|
|
64
158
|
└───┬──────────────────────┬───────────────────┘
|
|
65
159
|
│ │
|
|
@@ -83,13 +177,16 @@ The REIS Cycle Command automates the complete development workflow: PLAN → EXE
|
|
|
83
177
|
│ Pass │ Fail (< max attempts)
|
|
84
178
|
▼ │
|
|
85
179
|
┌──────────┐ │
|
|
86
|
-
│
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
180
|
+
│ GATING │ └─→ Back to DEBUGGING
|
|
181
|
+
└────┬─────┘
|
|
182
|
+
│
|
|
183
|
+
│ Gates pass
|
|
184
|
+
▼
|
|
185
|
+
┌──────────┐ │ Fail (≥ max attempts)
|
|
186
|
+
│ COMPLETE │ ▼
|
|
187
|
+
└──────────┘ ┌──────────┐
|
|
188
|
+
│ FAILED │
|
|
189
|
+
└──────────┘
|
|
93
190
|
```
|
|
94
191
|
|
|
95
192
|
## State Persistence
|
|
@@ -195,10 +292,41 @@ The REIS Cycle Command automates the complete development workflow: PLAN → EXE
|
|
|
195
292
|
4. Collect missing items
|
|
196
293
|
|
|
197
294
|
**Next State:**
|
|
198
|
-
- 100% complete →
|
|
295
|
+
- 100% complete → GATING
|
|
199
296
|
- <100% complete → DEBUGGING
|
|
200
297
|
- Error → FAILED
|
|
201
298
|
|
|
299
|
+
### VERIFYING → GATING
|
|
300
|
+
|
|
301
|
+
**Trigger:** Verification passes (completeness = 100%)
|
|
302
|
+
|
|
303
|
+
**Actions:**
|
|
304
|
+
1. Check if gates enabled (`gates.enabled` and `gates.runOn` includes 'cycle')
|
|
305
|
+
2. Skip if `--skip-gates` flag provided
|
|
306
|
+
3. Run only specified category if `--gate-only <category>` provided
|
|
307
|
+
4. Run all enabled gate categories
|
|
308
|
+
5. Collect gate results
|
|
309
|
+
|
|
310
|
+
**Next State:**
|
|
311
|
+
- All gates pass → COMPLETE
|
|
312
|
+
- Gates fail and `blockOnFail: true` → DEBUGGING
|
|
313
|
+
- Gates fail and `blockOnFail: false` → COMPLETE (with warnings)
|
|
314
|
+
- Error → FAILED
|
|
315
|
+
|
|
316
|
+
### GATING → DEBUGGING
|
|
317
|
+
|
|
318
|
+
**Trigger:** Gate failure with `blockOnFail: true`
|
|
319
|
+
|
|
320
|
+
**Actions:**
|
|
321
|
+
1. Collect failed gate results
|
|
322
|
+
2. Prefix issues with `[GATE:category]` (e.g., `[GATE:security]`)
|
|
323
|
+
3. Pass to debugger for analysis
|
|
324
|
+
4. Generate gate-specific fix recommendations
|
|
325
|
+
|
|
326
|
+
**Next State:**
|
|
327
|
+
- Fix plan generated → FIXING
|
|
328
|
+
- Cannot generate fix → FAILED
|
|
329
|
+
|
|
202
330
|
### VERIFYING → DEBUGGING
|
|
203
331
|
|
|
204
332
|
**Trigger:** Verification fails (completeness < 100%)
|
|
@@ -394,6 +522,6 @@ reis cycle <phase>
|
|
|
394
522
|
|
|
395
523
|
---
|
|
396
524
|
|
|
397
|
-
**Version:**
|
|
398
|
-
**Last Updated:** 2026-01-
|
|
399
|
-
**Status:** Design Complete
|
|
525
|
+
**Version:** 2.0.0
|
|
526
|
+
**Last Updated:** 2026-01-26
|
|
527
|
+
**Status:** Design Complete (Updated for Gate Integration)
|