@gravirei/reis 2.1.1 → 2.3.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 +262 -0
- package/README.md +127 -0
- package/bin/reis.js +67 -1
- package/docs/CYCLE_COMMAND.md +576 -0
- package/docs/CYCLE_WORKFLOW.md +399 -0
- package/docs/DECISION_TREES.md +527 -0
- package/docs/DECISION_TREES_API.md +832 -0
- package/examples/decision-trees/basic-tree.md +25 -0
- package/examples/decision-trees/complex-tree.md +90 -0
- package/examples/decision-trees/conditional-tree.md +76 -0
- package/examples/decision-trees/metadata-tree.md +104 -0
- package/examples/decision-trees/multi-tree.md +148 -0
- package/examples/decision-trees/real-world-architecture.md +135 -0
- package/examples/decision-trees/real-world-auth.md +112 -0
- package/lib/commands/cycle.js +304 -0
- package/lib/commands/decisions.js +348 -0
- package/lib/commands/execute-plan.js +39 -0
- package/lib/commands/help.js +1 -1
- package/lib/commands/plan.js +77 -2
- package/lib/commands/tree.js +556 -0
- package/lib/install.js +5 -5
- package/lib/utils/accessibility-config.js +327 -0
- package/lib/utils/cycle-orchestrator.js +607 -0
- package/lib/utils/cycle-state-manager.js +288 -0
- package/lib/utils/cycle-ui.js +402 -0
- package/lib/utils/decision-tracker.js +347 -0
- package/lib/utils/decision-tree-differ.js +398 -0
- package/lib/utils/decision-tree-exporter.js +531 -0
- package/lib/utils/decision-tree-interactive.js +376 -0
- package/lib/utils/decision-tree-linter.js +514 -0
- package/lib/utils/decision-tree-parser.js +620 -0
- package/lib/utils/visualizer.js +308 -1
- package/package.json +1 -1
- package/templates/decision-trees/api-design.md +190 -0
- package/templates/decision-trees/auth.md +102 -0
- package/templates/decision-trees/database.md +157 -0
- package/templates/decision-trees/deployment.md +176 -0
- package/templates/decision-trees/state-management.md +217 -0
- package/templates/decision-trees/styling.md +279 -0
- package/templates/decision-trees/testing.md +145 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,268 @@ All notable changes to REIS will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.3.0] - 2026-01-22
|
|
9
|
+
|
|
10
|
+
### Added - Decision Trees Support 🌳
|
|
11
|
+
|
|
12
|
+
**New Feature: Comprehensive Decision Tree System**
|
|
13
|
+
|
|
14
|
+
Complete decision-making support with interactive features, templates, exports, and tracking.
|
|
15
|
+
|
|
16
|
+
#### Core Features
|
|
17
|
+
|
|
18
|
+
- **Decision Tree Syntax** (`docs/DECISION_TREES.md`)
|
|
19
|
+
- Markdown-based tree structure with indentation
|
|
20
|
+
- Branch characters: `├─`, `└─`, `│`, `→`
|
|
21
|
+
- Metadata annotations: `[weight: N]`, `[priority: high|medium|low]`, `[risk: high|medium|low]`, `[recommended]`
|
|
22
|
+
- Conditional branches: `[IF: condition]`, `[ELSE]`
|
|
23
|
+
- Support for nested trees (unlimited depth)
|
|
24
|
+
- Multiple trees per document
|
|
25
|
+
|
|
26
|
+
- **Parser & Renderer** (`lib/utils/decision-tree-parser.js`, `lib/utils/visualizer.js`)
|
|
27
|
+
- Parse trees from markdown with full validation
|
|
28
|
+
- Render trees with colors, metadata badges, and outcomes
|
|
29
|
+
- Detect cycles, orphaned branches, and inconsistencies
|
|
30
|
+
- Evaluate conditional branches based on project context
|
|
31
|
+
- Collapsible display with depth limits
|
|
32
|
+
|
|
33
|
+
#### Interactive Features
|
|
34
|
+
|
|
35
|
+
- **Interactive Selection** (`lib/utils/decision-tree-interactive.js`)
|
|
36
|
+
- Arrow key navigation through decision trees
|
|
37
|
+
- Real-time metadata display during selection
|
|
38
|
+
- Breadcrumb navigation showing current path
|
|
39
|
+
- Multi-tree selection support
|
|
40
|
+
- Decision recording with full context
|
|
41
|
+
|
|
42
|
+
- **Decision Tracking**
|
|
43
|
+
- Record decisions with timestamp, context, and metadata
|
|
44
|
+
- Query decisions by tree, phase, or date
|
|
45
|
+
- Revert decisions with reason tracking
|
|
46
|
+
- Decision statistics and analytics
|
|
47
|
+
- Export decision history (JSON, CSV)
|
|
48
|
+
|
|
49
|
+
#### Export & Templates
|
|
50
|
+
|
|
51
|
+
- **Export Capabilities** (`lib/utils/decision-tree-exporter.js`)
|
|
52
|
+
- HTML: Standalone files with collapsible sections and CSS
|
|
53
|
+
- SVG: Vector graphics with proper namespaces
|
|
54
|
+
- Mermaid: Flowchart syntax for documentation
|
|
55
|
+
- JSON: Structured data for programmatic use
|
|
56
|
+
- Export all formats at once
|
|
57
|
+
|
|
58
|
+
- **Built-in Templates** (`templates/decision-trees/`)
|
|
59
|
+
- Authentication strategy (auth.md)
|
|
60
|
+
- Database selection (database.md)
|
|
61
|
+
- Testing approach (testing.md)
|
|
62
|
+
- Deployment platform (deployment.md)
|
|
63
|
+
- API design (api-design.md)
|
|
64
|
+
- State management (state-management.md)
|
|
65
|
+
- Styling approach (styling.md)
|
|
66
|
+
|
|
67
|
+
#### Advanced Features
|
|
68
|
+
|
|
69
|
+
- **Tree Diffing** (`lib/utils/decision-tree-differ.js`)
|
|
70
|
+
- Compare two versions of decision trees
|
|
71
|
+
- Detect added, removed, modified branches
|
|
72
|
+
- Show structural changes and metadata differences
|
|
73
|
+
- Color-coded diff output
|
|
74
|
+
|
|
75
|
+
- **Semantic Validation**
|
|
76
|
+
- Detect unbalanced trees
|
|
77
|
+
- Validate metadata values
|
|
78
|
+
- Check conditional syntax
|
|
79
|
+
- Suggest improvements
|
|
80
|
+
- Lint mode with strict checking
|
|
81
|
+
|
|
82
|
+
- **Accessibility Support** (`lib/utils/accessibility-config.js`)
|
|
83
|
+
- `--no-color`: Disable colors for screen readers
|
|
84
|
+
- `--high-contrast`: High contrast color scheme
|
|
85
|
+
- `--ascii-only`: ASCII characters instead of Unicode
|
|
86
|
+
- Environment variable support: `REIS_NO_COLOR`, `REIS_HIGH_CONTRAST`, `REIS_ASCII_ONLY`
|
|
87
|
+
- WCAG 2.1 Level AA compliance
|
|
88
|
+
|
|
89
|
+
#### Commands
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Tree Command
|
|
93
|
+
reis tree show <file> # Display decision tree
|
|
94
|
+
reis tree new <template> # Create from template
|
|
95
|
+
reis tree list # List available templates
|
|
96
|
+
reis tree validate <file> # Validate tree syntax
|
|
97
|
+
reis tree export <file> # Export to various formats
|
|
98
|
+
reis tree diff <file1> <file2> # Compare two trees
|
|
99
|
+
|
|
100
|
+
# Decisions Command
|
|
101
|
+
reis decisions list # List all decisions
|
|
102
|
+
reis decisions show <id> # Show decision details
|
|
103
|
+
reis decisions revert <id> # Revert a decision
|
|
104
|
+
reis decisions export # Export decision history
|
|
105
|
+
reis decisions stats # Show decision statistics
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Command Options
|
|
109
|
+
|
|
110
|
+
**Tree Command:**
|
|
111
|
+
- `--depth <n>`: Limit display depth
|
|
112
|
+
- `--no-metadata`: Hide metadata badges
|
|
113
|
+
- `--interactive`: Interactive selection mode
|
|
114
|
+
- `--context <json>`: Context for condition evaluation
|
|
115
|
+
- `--no-color`: Disable colors (accessibility)
|
|
116
|
+
- `--high-contrast`: High contrast mode (accessibility)
|
|
117
|
+
- `--ascii-only`: ASCII characters only (accessibility)
|
|
118
|
+
- `--format <format>`: Export format (html, svg, mermaid, json, all)
|
|
119
|
+
- `--output <path>`: Output file path
|
|
120
|
+
- `--verbose`: Detailed validation output
|
|
121
|
+
|
|
122
|
+
**Decisions Command:**
|
|
123
|
+
- `--tree <treeId>`: Filter by tree ID
|
|
124
|
+
- `--phase <phase>`: Filter by phase
|
|
125
|
+
- `--limit <n>`: Limit number of results
|
|
126
|
+
- `--format <format>`: Export format (json, csv)
|
|
127
|
+
- `--output <path>`: Output file path
|
|
128
|
+
- `--reason <reason>`: Reason for revert
|
|
129
|
+
- `--no-color`: Disable colors (accessibility)
|
|
130
|
+
|
|
131
|
+
#### Documentation & Examples
|
|
132
|
+
|
|
133
|
+
- **Documentation**
|
|
134
|
+
- `docs/DECISION_TREES.md`: Complete syntax and feature guide
|
|
135
|
+
- `docs/DECISION_TREES_API.md`: API reference for programmatic use
|
|
136
|
+
- Updated `README.md` with Decision Trees section
|
|
137
|
+
|
|
138
|
+
- **Example Files** (`examples/decision-trees/`)
|
|
139
|
+
- `basic-tree.md`: Simple 2-level tree for beginners
|
|
140
|
+
- `complex-tree.md`: Deep nesting with all features (4 levels)
|
|
141
|
+
- `conditional-tree.md`: Conditional branches demonstration
|
|
142
|
+
- `metadata-tree.md`: All metadata types with explanations
|
|
143
|
+
- `real-world-auth.md`: Practical authentication strategy
|
|
144
|
+
- `real-world-architecture.md`: Software architecture patterns
|
|
145
|
+
- `multi-tree.md`: Multiple trees in one document
|
|
146
|
+
|
|
147
|
+
#### Testing
|
|
148
|
+
|
|
149
|
+
- **Comprehensive Test Suite** (`test/utils/decision-tree.test.js`)
|
|
150
|
+
- 59 test cases covering all functionality
|
|
151
|
+
- Parser tests: simple, nested, metadata, conditionals (15 cases)
|
|
152
|
+
- Validation tests: cycles, orphans, metadata (8 cases)
|
|
153
|
+
- Condition evaluation tests: AND, OR, NOT (5 cases)
|
|
154
|
+
- Renderer tests: colors, accessibility, depth (10 cases)
|
|
155
|
+
- Export tests: HTML, SVG, Mermaid (8 cases)
|
|
156
|
+
- Tracking tests: record, query, revert (5 cases)
|
|
157
|
+
- Integration tests: command support (4 cases)
|
|
158
|
+
- Mock file system for isolated testing
|
|
159
|
+
- Target: 80%+ code coverage
|
|
160
|
+
|
|
161
|
+
#### Use Cases
|
|
162
|
+
|
|
163
|
+
1. **Architecture Decisions**: Choose frameworks, databases, deployment platforms
|
|
164
|
+
2. **Implementation Strategies**: Select authentication, testing, or state management approaches
|
|
165
|
+
3. **Trade-off Analysis**: Compare options with metadata (weight, priority, risk)
|
|
166
|
+
4. **Context-Aware Recommendations**: Show relevant options based on project setup
|
|
167
|
+
5. **Decision History**: Track and audit all technical decisions
|
|
168
|
+
6. **Documentation**: Export decisions to HTML/SVG for project docs
|
|
169
|
+
|
|
170
|
+
#### Benefits
|
|
171
|
+
|
|
172
|
+
- 📊 **Structured Decision-Making**: Clear options with outcomes
|
|
173
|
+
- 🎯 **Interactive Navigation**: Explore options with arrow keys
|
|
174
|
+
- 📝 **Decision Tracking**: Audit trail for all decisions
|
|
175
|
+
- 📤 **Multiple Export Formats**: Use in docs, wikis, presentations
|
|
176
|
+
- 🔄 **Reusable Templates**: Quick start with common decisions
|
|
177
|
+
- ♿ **Accessible**: Screen reader friendly, high contrast, ASCII mode
|
|
178
|
+
- 🧪 **Well-Tested**: 59 tests, 80%+ coverage
|
|
179
|
+
|
|
180
|
+
### Technical Details
|
|
181
|
+
|
|
182
|
+
- **Lines of Code**: 2,500+ lines across 7 new modules
|
|
183
|
+
- **Test Coverage**: 890 lines of tests (59 test cases)
|
|
184
|
+
- **Documentation**: 690+ lines of examples, comprehensive guides
|
|
185
|
+
- **Templates**: 7 built-in decision tree templates
|
|
186
|
+
- **Accessibility**: Full WCAG 2.1 Level AA compliance
|
|
187
|
+
|
|
188
|
+
### Migration
|
|
189
|
+
|
|
190
|
+
No migration needed. New optional feature that extends REIS capabilities.
|
|
191
|
+
|
|
192
|
+
### Breaking Changes
|
|
193
|
+
|
|
194
|
+
None - Fully backward compatible with existing REIS projects.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## [2.2.0] - 2026-01-21
|
|
199
|
+
|
|
200
|
+
### Added - Complete Cycle Command 🔄
|
|
201
|
+
|
|
202
|
+
**New Feature: Automated PLAN → EXECUTE → VERIFY → DEBUG Workflow**
|
|
203
|
+
|
|
204
|
+
- **Cycle Command** (`lib/commands/cycle.js`)
|
|
205
|
+
- Complete workflow automation: PLAN → EXECUTE → VERIFY → DEBUG → FIX
|
|
206
|
+
- Smart orchestration with state machine management
|
|
207
|
+
- Automatic debug/fix loop with configurable max attempts (default: 3)
|
|
208
|
+
- Visual progress indicators and clear feedback
|
|
209
|
+
- Support for phase numbers or custom plan paths
|
|
210
|
+
|
|
211
|
+
- **Cycle Orchestrator** (`lib/utils/cycle-orchestrator.js`)
|
|
212
|
+
- State-driven workflow execution
|
|
213
|
+
- Automatic error recovery and retry logic
|
|
214
|
+
- Integration with existing REIS commands (execute, verify, debug)
|
|
215
|
+
- Graceful interruption handling (Ctrl+C)
|
|
216
|
+
- Comprehensive error handling with helpful messages
|
|
217
|
+
|
|
218
|
+
- **Cycle State Manager** (`lib/utils/cycle-state-manager.js`)
|
|
219
|
+
- Persistent state storage in `.reis/cycle-state.json`
|
|
220
|
+
- Resume capability for interrupted cycles
|
|
221
|
+
- State transitions tracking and history
|
|
222
|
+
- Attempt counter and completeness tracking
|
|
223
|
+
- Automatic state cleanup on completion
|
|
224
|
+
|
|
225
|
+
- **Cycle UI Components** (`lib/utils/cycle-ui.js`)
|
|
226
|
+
- Spinner animations for long operations
|
|
227
|
+
- Progress bars for task completion
|
|
228
|
+
- Step-by-step visual feedback
|
|
229
|
+
- Color-coded status indicators
|
|
230
|
+
- Formatted time display and summaries
|
|
231
|
+
|
|
232
|
+
- **Documentation**
|
|
233
|
+
- `docs/CYCLE_WORKFLOW.md` - State machine design and workflow
|
|
234
|
+
- `docs/CYCLE_COMMAND.md` - Complete user guide with examples
|
|
235
|
+
- Updated README.md with cycle command section
|
|
236
|
+
- 20+ test cases in `test/commands/cycle.test.js`
|
|
237
|
+
|
|
238
|
+
### Command Options
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
reis cycle [phase-or-plan] [options]
|
|
242
|
+
|
|
243
|
+
Options:
|
|
244
|
+
--max-attempts <n> Maximum debug/fix attempts (default: 3)
|
|
245
|
+
--auto-fix Apply fixes without confirmation
|
|
246
|
+
--resume Resume interrupted cycle
|
|
247
|
+
--continue-on-fail Continue even if verification fails
|
|
248
|
+
-v, --verbose Detailed output
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Features
|
|
252
|
+
|
|
253
|
+
- 🔄 **Automatic Recovery**: Debug and fix issues automatically
|
|
254
|
+
- 💾 **State Persistence**: Survives interruptions (Ctrl+C, crashes)
|
|
255
|
+
- ⏸️ **Resume Capability**: Pick up where you left off
|
|
256
|
+
- 🎯 **Smart Limiting**: Prevents infinite loops with max attempts
|
|
257
|
+
- 📊 **Visual Feedback**: Clear progress at every step
|
|
258
|
+
- ⚡ **Efficient**: Handles 90% of development scenarios
|
|
259
|
+
|
|
260
|
+
### Breaking Changes
|
|
261
|
+
|
|
262
|
+
None - Fully backward compatible
|
|
263
|
+
|
|
264
|
+
### Migration
|
|
265
|
+
|
|
266
|
+
No migration needed. New optional command.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
8
270
|
## [2.0.0-beta.1] - 2024-01-XX
|
|
9
271
|
|
|
10
272
|
### Added - REIS Verifier 🔍
|
package/README.md
CHANGED
|
@@ -252,6 +252,81 @@ Ready to proceed to Phase 3
|
|
|
252
252
|
|
|
253
253
|
**See also:** `docs/VERIFICATION.md` for detailed verification guide.
|
|
254
254
|
|
|
255
|
+
### Complete Cycle Automation
|
|
256
|
+
|
|
257
|
+
Run the entire workflow with a single command:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
reis cycle 1
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
This automatically:
|
|
264
|
+
1. **Plans** the phase (if needed)
|
|
265
|
+
2. **Executes** the plan
|
|
266
|
+
3. **Verifies** completion
|
|
267
|
+
4. **Debugs** issues (if any)
|
|
268
|
+
5. **Applies** fixes
|
|
269
|
+
6. **Re-verifies** until passing
|
|
270
|
+
|
|
271
|
+
**Features:**
|
|
272
|
+
- 🔄 Automatic debug/fix loop
|
|
273
|
+
- 💾 State persistence (survives interruptions)
|
|
274
|
+
- ⏸️ Resume capability (`reis cycle --resume`)
|
|
275
|
+
- 🎯 Smart attempt limiting (default: 3 attempts)
|
|
276
|
+
- 📊 Visual progress indicators
|
|
277
|
+
|
|
278
|
+
**Example:**
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
$ reis cycle 1
|
|
282
|
+
|
|
283
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
284
|
+
║ 🔄 REIS Complete Cycle - Phase 1 ║
|
|
285
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
286
|
+
|
|
287
|
+
⏳ Step 1/4: Planning
|
|
288
|
+
✓ Plan validated
|
|
289
|
+
|
|
290
|
+
⚙️ Step 2/4: Executing
|
|
291
|
+
✓ Plan executed (5 tasks)
|
|
292
|
+
|
|
293
|
+
✓ Step 3/4: Verifying
|
|
294
|
+
❌ Verification failed (80% complete)
|
|
295
|
+
|
|
296
|
+
Issues found:
|
|
297
|
+
- Missing: test/todo.test.js
|
|
298
|
+
- Feature completeness: 4/5
|
|
299
|
+
|
|
300
|
+
🔍 Step 4/4: Debugging
|
|
301
|
+
✓ Debug report generated
|
|
302
|
+
✓ Fix plan generated
|
|
303
|
+
|
|
304
|
+
Apply fix? (Y/n): y
|
|
305
|
+
✓ Fix applied
|
|
306
|
+
|
|
307
|
+
Re-verifying...
|
|
308
|
+
✓ Verification passed (100% complete)
|
|
309
|
+
|
|
310
|
+
╔═══════════════════════════════════════════════════════════╗
|
|
311
|
+
║ ✅ Cycle Complete! ║
|
|
312
|
+
╚═══════════════════════════════════════════════════════════╝
|
|
313
|
+
|
|
314
|
+
Duration: 12m 15s
|
|
315
|
+
Attempts: 2
|
|
316
|
+
Next: reis cycle 2
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Options:**
|
|
320
|
+
```bash
|
|
321
|
+
--max-attempts <n> # Maximum debug/fix attempts (default: 3)
|
|
322
|
+
--auto-fix # Apply fixes without confirmation
|
|
323
|
+
--resume # Resume interrupted cycle
|
|
324
|
+
--continue-on-fail # Continue even if verification fails
|
|
325
|
+
-v, --verbose # Detailed output
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Learn more:** [Complete Cycle Guide](docs/CYCLE_COMMAND.md)
|
|
329
|
+
|
|
255
330
|
### Checkpoints & Resume (v2.0)
|
|
256
331
|
```bash
|
|
257
332
|
reis checkpoint [msg] # Create checkpoint
|
|
@@ -260,6 +335,56 @@ reis resume # Smart resume from last checkpoint
|
|
|
260
335
|
reis resume --from [cp] # Resume from specific checkpoint
|
|
261
336
|
```
|
|
262
337
|
|
|
338
|
+
### Decision Trees (v2.3.0)
|
|
339
|
+
|
|
340
|
+
Make structured decisions with interactive decision trees:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# View decision tree from file
|
|
344
|
+
reis tree show examples/decision-trees/basic-tree.md
|
|
345
|
+
|
|
346
|
+
# Interactive selection with arrow keys
|
|
347
|
+
reis tree show examples/decision-trees/real-world-auth.md --interactive
|
|
348
|
+
|
|
349
|
+
# Create from template
|
|
350
|
+
reis tree new auth # Creates decision tree from auth template
|
|
351
|
+
|
|
352
|
+
# List available templates
|
|
353
|
+
reis tree list
|
|
354
|
+
|
|
355
|
+
# Export to different formats
|
|
356
|
+
reis tree export my-decision.md --format html
|
|
357
|
+
reis tree export my-decision.md --format svg
|
|
358
|
+
reis tree export my-decision.md --format mermaid
|
|
359
|
+
|
|
360
|
+
# Track decisions
|
|
361
|
+
reis decisions list # View all decisions
|
|
362
|
+
reis decisions show abc123 # Show specific decision
|
|
363
|
+
reis decisions stats # Decision statistics
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Features:**
|
|
367
|
+
- 📊 **Interactive Selection**: Navigate with arrow keys, see metadata
|
|
368
|
+
- 🎯 **Decision Tracking**: Record and query all decisions with context
|
|
369
|
+
- 📤 **Export Formats**: HTML, SVG, Mermaid, JSON
|
|
370
|
+
- 📝 **Templates**: 7 built-in templates (auth, database, testing, etc.)
|
|
371
|
+
- 🔀 **Conditional Branches**: Context-aware recommendations
|
|
372
|
+
- ♿ **Accessibility**: --no-color, --high-contrast, --ascii-only modes
|
|
373
|
+
|
|
374
|
+
**Quick Example:**
|
|
375
|
+
```markdown
|
|
376
|
+
## Decision Tree: Choose Database
|
|
377
|
+
|
|
378
|
+
\`\`\`
|
|
379
|
+
What database should we use?
|
|
380
|
+
├─ PostgreSQL [recommended] → Feature-rich, ACID compliant
|
|
381
|
+
├─ MongoDB → Flexible schema, document store
|
|
382
|
+
└─ SQLite → Embedded, zero-config
|
|
383
|
+
\`\`\`
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Learn more:** [Decision Trees Guide](docs/DECISION_TREES.md) | [Examples](examples/decision-trees/)
|
|
387
|
+
|
|
263
388
|
### Visualization (v2.0)
|
|
264
389
|
```bash
|
|
265
390
|
reis visualize --type progress # Progress visualization
|
|
@@ -323,6 +448,8 @@ Maps codebases with architecture analysis, dependency mapping, tech stack identi
|
|
|
323
448
|
- [QUICK_REFERENCE.md](docs/QUICK_REFERENCE.md) - Quick reference for daily use
|
|
324
449
|
- [WORKFLOW_EXAMPLES.md](docs/WORKFLOW_EXAMPLES.md) - Real-world workflows
|
|
325
450
|
- [INTEGRATION_GUIDE.md](docs/INTEGRATION_GUIDE.md) - Rovo Dev integration
|
|
451
|
+
- [Decision Trees](docs/DECISION_TREES.md) - Decision tree guide and syntax
|
|
452
|
+
- [Decision Trees API](docs/DECISION_TREES_API.md) - Programmatic usage
|
|
326
453
|
|
|
327
454
|
### v2.0 Documentation
|
|
328
455
|
|
package/bin/reis.js
CHANGED
|
@@ -9,7 +9,7 @@ const chalk = require('chalk');
|
|
|
9
9
|
|
|
10
10
|
// Show welcome banner (always, not just first run)
|
|
11
11
|
function showBanner() {
|
|
12
|
-
console.log(chalk.
|
|
12
|
+
console.log(chalk.white.bold(`
|
|
13
13
|
██████ ███████ ██ ███████
|
|
14
14
|
██ ██ ██ ██ ██
|
|
15
15
|
██████ █████ ██ ███████
|
|
@@ -75,6 +75,18 @@ const todoCmd = require('../lib/commands/todo.js');
|
|
|
75
75
|
const todosCmd = require('../lib/commands/todos.js');
|
|
76
76
|
const debugCmd = require('../lib/commands/debug.js');
|
|
77
77
|
const configCmd = require('../lib/commands/config.js');
|
|
78
|
+
const cycleCmd = require('../lib/commands/cycle.js');
|
|
79
|
+
const decisionsCmd = require('../lib/commands/decisions.js');
|
|
80
|
+
const treeCmd = require('../lib/commands/tree.js');
|
|
81
|
+
|
|
82
|
+
// Check for --help or -h flag before Commander parses
|
|
83
|
+
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
84
|
+
// If it's just "reis --help" or "reis -h" (no subcommand), show our custom help
|
|
85
|
+
if (process.argv.length === 3) {
|
|
86
|
+
helpCmd();
|
|
87
|
+
process.exit(0);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
78
90
|
|
|
79
91
|
// Set up commander
|
|
80
92
|
program
|
|
@@ -236,6 +248,18 @@ program
|
|
|
236
248
|
await debugCmd(target, options);
|
|
237
249
|
});
|
|
238
250
|
|
|
251
|
+
program
|
|
252
|
+
.command('cycle [phase-or-plan]')
|
|
253
|
+
.description('Complete PLAN → EXECUTE → VERIFY → DEBUG cycle')
|
|
254
|
+
.option('--max-attempts <n>', 'Maximum debug/fix attempts', '3')
|
|
255
|
+
.option('--auto-fix', 'Apply fixes without confirmation')
|
|
256
|
+
.option('--resume', 'Resume interrupted cycle')
|
|
257
|
+
.option('--continue-on-fail', 'Continue even if verification fails')
|
|
258
|
+
.option('-v, --verbose', 'Detailed output')
|
|
259
|
+
.action(async (phaseOrPlan, options) => {
|
|
260
|
+
await cycleCmd(phaseOrPlan, options);
|
|
261
|
+
});
|
|
262
|
+
|
|
239
263
|
program
|
|
240
264
|
.command('config [subcommand]')
|
|
241
265
|
.description('Manage REIS configuration (show, init, validate, docs)')
|
|
@@ -244,6 +268,48 @@ program
|
|
|
244
268
|
.option('--path <path>', 'Custom config path')
|
|
245
269
|
.action((subcommand, options) => configCmd({ subcommand, ...options }));
|
|
246
270
|
|
|
271
|
+
// Decision Tree Commands
|
|
272
|
+
program
|
|
273
|
+
.command('decisions [subcommand] [id]')
|
|
274
|
+
.description('Manage decision tracking (list, show, revert, export, stats)')
|
|
275
|
+
.option('--tree <treeId>', 'Filter by tree ID')
|
|
276
|
+
.option('--phase <phase>', 'Filter by phase')
|
|
277
|
+
.option('--limit <n>', 'Limit number of results')
|
|
278
|
+
.option('--format <format>', 'Export format (json, csv)')
|
|
279
|
+
.option('--output <path>', 'Output file path')
|
|
280
|
+
.option('--reason <reason>', 'Reason for revert')
|
|
281
|
+
.option('--no-color', 'Disable colors (screen reader friendly)')
|
|
282
|
+
.option('--high-contrast', 'High contrast color scheme')
|
|
283
|
+
.option('--ascii-only', 'Use ASCII characters only')
|
|
284
|
+
.action(async (subcommand, id, options) => {
|
|
285
|
+
const args = id ? [id] : [];
|
|
286
|
+
await decisionsCmd(subcommand, args, options);
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
program
|
|
290
|
+
.command('tree [subcommand]')
|
|
291
|
+
.description('Manage decision trees (show, new, list, validate, export, diff, lint)')
|
|
292
|
+
.argument('[file-or-template]', 'File path or template name')
|
|
293
|
+
.argument('[file2]', 'Second file path (for diff subcommand)')
|
|
294
|
+
.option('--depth <n>', 'Maximum depth to display')
|
|
295
|
+
.option('--no-metadata', 'Hide metadata badges')
|
|
296
|
+
.option('--interactive', 'Interactive selection mode')
|
|
297
|
+
.option('--context <json>', 'Context for condition evaluation (JSON string)')
|
|
298
|
+
.option('--no-color', 'Disable colors (screen reader friendly)')
|
|
299
|
+
.option('--high-contrast', 'High contrast color scheme')
|
|
300
|
+
.option('--ascii-only', 'Use ASCII characters only (├─└─ becomes |-- `--)')
|
|
301
|
+
.option('--format <format>', 'Export format (html, svg, mermaid, json, all)')
|
|
302
|
+
.option('--output <path>', 'Output file path')
|
|
303
|
+
.option('--verbose', 'Show detailed validation output')
|
|
304
|
+
.option('--fix', 'Auto-fix issues (validate subcommand)')
|
|
305
|
+
.option('--strict', 'Fail on warnings (lint subcommand)')
|
|
306
|
+
.action(async (subcommand, fileOrTemplate, file2, options) => {
|
|
307
|
+
const args = [];
|
|
308
|
+
if (fileOrTemplate) args.push(fileOrTemplate);
|
|
309
|
+
if (file2) args.push(file2);
|
|
310
|
+
await treeCmd(subcommand, args, options);
|
|
311
|
+
});
|
|
312
|
+
|
|
247
313
|
program
|
|
248
314
|
.command('update')
|
|
249
315
|
.description('Update REIS to latest version')
|