kiro-spec-engine 1.2.2 โ 1.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 +91 -0
- package/README.md +172 -0
- package/bin/kiro-spec-engine.js +62 -0
- package/docs/adoption-guide.md +506 -0
- package/docs/agent-hooks-analysis.md +815 -0
- package/docs/architecture.md +706 -0
- package/docs/cross-tool-guide.md +554 -0
- package/docs/developer-guide.md +615 -0
- package/docs/manual-workflows-guide.md +417 -0
- package/docs/steering-strategy-guide.md +196 -0
- package/docs/upgrade-guide.md +632 -0
- package/lib/adoption/detection-engine.js +14 -4
- package/lib/commands/adopt.js +117 -3
- package/lib/commands/context.js +99 -0
- package/lib/commands/prompt.js +105 -0
- package/lib/commands/status.js +225 -0
- package/lib/commands/task.js +199 -0
- package/lib/commands/watch.js +569 -0
- package/lib/commands/workflows.js +240 -0
- package/lib/commands/workspace.js +189 -0
- package/lib/context/context-exporter.js +378 -0
- package/lib/context/prompt-generator.js +482 -0
- package/lib/steering/adoption-config.js +164 -0
- package/lib/steering/steering-manager.js +289 -0
- package/lib/task/task-claimer.js +430 -0
- package/lib/utils/tool-detector.js +383 -0
- package/lib/watch/action-executor.js +458 -0
- package/lib/watch/event-debouncer.js +323 -0
- package/lib/watch/execution-logger.js +550 -0
- package/lib/watch/file-watcher.js +499 -0
- package/lib/watch/presets.js +266 -0
- package/lib/watch/watch-manager.js +533 -0
- package/lib/workspace/workspace-manager.js +370 -0
- package/lib/workspace/workspace-sync.js +356 -0
- package/package.json +4 -1
- package/template/.kiro/tools/backup_manager.py +295 -0
- package/template/.kiro/tools/configuration_manager.py +218 -0
- package/template/.kiro/tools/document_evaluator.py +550 -0
- package/template/.kiro/tools/enhancement_logger.py +168 -0
- package/template/.kiro/tools/error_handler.py +335 -0
- package/template/.kiro/tools/improvement_identifier.py +444 -0
- package/template/.kiro/tools/modification_applicator.py +737 -0
- package/template/.kiro/tools/quality_gate_enforcer.py +207 -0
- package/template/.kiro/tools/quality_scorer.py +305 -0
- package/template/.kiro/tools/report_generator.py +154 -0
- package/template/.kiro/tools/ultrawork_enhancer_refactored.py +0 -0
- package/template/.kiro/tools/ultrawork_enhancer_v2.py +463 -0
- package/template/.kiro/tools/ultrawork_enhancer_v3.py +606 -0
- package/template/.kiro/tools/workflow_quality_gate.py +100 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,97 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.0] - 2026-01-23
|
|
11
|
+
|
|
12
|
+
### Added - Watch Mode Automation System ๐ค
|
|
13
|
+
|
|
14
|
+
**Core Components** (2150+ lines of code, 172 tests):
|
|
15
|
+
- **FileWatcher**: Cross-platform file monitoring with chokidar
|
|
16
|
+
- Glob pattern matching with minimatch
|
|
17
|
+
- Configurable ignored patterns
|
|
18
|
+
- Event emission for file changes
|
|
19
|
+
- Error recovery and health monitoring
|
|
20
|
+
- **EventDebouncer**: Smart event management
|
|
21
|
+
- Debounce and throttle logic
|
|
22
|
+
- Event queue with duplicate prevention
|
|
23
|
+
- Configurable delays per pattern
|
|
24
|
+
- **ActionExecutor**: Command execution engine
|
|
25
|
+
- Shell command execution with context interpolation
|
|
26
|
+
- Retry logic with exponential/linear backoff
|
|
27
|
+
- Timeout handling and process management
|
|
28
|
+
- Command validation and security
|
|
29
|
+
- **ExecutionLogger**: Complete audit trail
|
|
30
|
+
- Log rotation by size
|
|
31
|
+
- Metrics tracking (executions, time saved, success rates)
|
|
32
|
+
- Export to JSON/CSV
|
|
33
|
+
- Configurable log levels
|
|
34
|
+
- **WatchManager**: Central coordinator
|
|
35
|
+
- Lifecycle management (start/stop/restart)
|
|
36
|
+
- Configuration loading and validation
|
|
37
|
+
- Status reporting and metrics
|
|
38
|
+
|
|
39
|
+
**CLI Commands** (7 commands):
|
|
40
|
+
- `kse watch init` - Initialize watch configuration
|
|
41
|
+
- `kse watch start/stop` - Control watch mode
|
|
42
|
+
- `kse watch status` - Show current status
|
|
43
|
+
- `kse watch logs` - View execution logs (with tail/follow)
|
|
44
|
+
- `kse watch metrics` - Display automation metrics
|
|
45
|
+
- `kse watch presets` - List available presets
|
|
46
|
+
- `kse watch install <preset>` - Install automation preset
|
|
47
|
+
|
|
48
|
+
**Automation Presets** (4 presets):
|
|
49
|
+
- `auto-sync` - Automatically sync workspace when tasks.md changes
|
|
50
|
+
- `prompt-regen` - Regenerate prompts when requirements/design change
|
|
51
|
+
- `context-export` - Export context when tasks complete
|
|
52
|
+
- `test-runner` - Run tests when source files change
|
|
53
|
+
|
|
54
|
+
**Tool Detection & Auto-Configuration**:
|
|
55
|
+
- Automatic IDE detection (Kiro IDE, VS Code, Cursor)
|
|
56
|
+
- Tool-specific automation recommendations
|
|
57
|
+
- Auto-configuration during project adoption
|
|
58
|
+
- Confidence-based suggestions
|
|
59
|
+
|
|
60
|
+
**Manual Workflows** (6 workflows):
|
|
61
|
+
- Complete workflow guide (300+ lines)
|
|
62
|
+
- `kse workflows` command for workflow management
|
|
63
|
+
- Step-by-step instructions with time estimates
|
|
64
|
+
- Interactive checklists for common tasks
|
|
65
|
+
- Workflows: task-sync, context-export, prompt-generation, daily, task-completion, spec-creation
|
|
66
|
+
|
|
67
|
+
### Enhanced
|
|
68
|
+
- **README.md**: Added comprehensive automation section
|
|
69
|
+
- **Project Adoption**: Integrated tool detection with automation setup
|
|
70
|
+
- **Documentation**: Complete manual workflows guide
|
|
71
|
+
|
|
72
|
+
### Testing
|
|
73
|
+
- 289 tests passing (100% pass rate)
|
|
74
|
+
- 279 unit tests
|
|
75
|
+
- 10 integration tests
|
|
76
|
+
- Full coverage of all watch mode components
|
|
77
|
+
|
|
78
|
+
### Performance
|
|
79
|
+
- Efficient file watching with debouncing
|
|
80
|
+
- Configurable retry logic
|
|
81
|
+
- Log rotation to prevent disk space issues
|
|
82
|
+
- Metrics tracking for optimization
|
|
83
|
+
|
|
84
|
+
## [1.2.3] - 2026-01-23
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
- **Developer Documentation**: Comprehensive guides for contributors and extenders
|
|
88
|
+
- `docs/developer-guide.md`: Complete developer guide with API documentation
|
|
89
|
+
- `docs/architecture.md`: Detailed architecture diagrams and data flow documentation
|
|
90
|
+
- Migration script interface documentation with examples
|
|
91
|
+
- Extension points for custom strategies and validators
|
|
92
|
+
- Testing guidelines for unit, property-based, and integration tests
|
|
93
|
+
- Contributing guidelines and development setup
|
|
94
|
+
|
|
95
|
+
### Enhanced
|
|
96
|
+
- Improved documentation structure for developers
|
|
97
|
+
- Added detailed API documentation for all core classes
|
|
98
|
+
- Added architecture diagrams for system understanding
|
|
99
|
+
- Added data flow diagrams for adoption, upgrade, and backup processes
|
|
100
|
+
|
|
10
101
|
## [1.2.2] - 2026-01-23
|
|
11
102
|
|
|
12
103
|
### Added
|
package/README.md
CHANGED
|
@@ -25,6 +25,11 @@ At its heart, KSE is a **rules engine** that operates on **specs**:
|
|
|
25
25
|
|
|
26
26
|
- โ
**Spec-Driven Development**: Structured Requirements โ Design โ Tasks workflow
|
|
27
27
|
- โ
**Steering Rules System**: Control AI behavior with project-specific rules
|
|
28
|
+
- โ
**Multi-User Collaboration**: Personal workspaces, task claiming, team coordination
|
|
29
|
+
- โ
**Cross-Tool Compatibility**: Export context for Claude Code, Cursor, Codex, etc.
|
|
30
|
+
- โ
**Watch Mode Automation**: Automatic file monitoring and workflow execution
|
|
31
|
+
- โ
**Manual Workflows**: Step-by-step guides for common tasks
|
|
32
|
+
- โ
**Tool Detection**: Auto-detect IDE and suggest appropriate automation
|
|
28
33
|
- โ
**Quality Assessment**: Automatic document quality scoring (0-10 scale)
|
|
29
34
|
- โ
**Intelligent Enhancement**: Auto-identify and apply improvements with Ultrawork
|
|
30
35
|
- โ
**Professional Standards**: Ensure production-ready documentation
|
|
@@ -114,6 +119,98 @@ kse --lang zh <command> # Chinese
|
|
|
114
119
|
kse --lang en <command> # English (default)
|
|
115
120
|
```
|
|
116
121
|
|
|
122
|
+
### Multi-User Collaboration
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Initialize personal workspace
|
|
126
|
+
kse workspace init
|
|
127
|
+
kse workspace init --user=alice
|
|
128
|
+
|
|
129
|
+
# Synchronize workspace with team
|
|
130
|
+
kse workspace sync
|
|
131
|
+
|
|
132
|
+
# List all workspaces
|
|
133
|
+
kse workspace list
|
|
134
|
+
|
|
135
|
+
# Claim a task
|
|
136
|
+
kse task claim <spec-name> <task-id>
|
|
137
|
+
kse task claim 01-00-user-auth 1.1 --force
|
|
138
|
+
|
|
139
|
+
# Unclaim a task
|
|
140
|
+
kse task unclaim <spec-name> <task-id>
|
|
141
|
+
|
|
142
|
+
# List claimed tasks
|
|
143
|
+
kse task list <spec-name>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Cross-Tool Support
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Export spec context for AI tools
|
|
150
|
+
kse context export <spec-name>
|
|
151
|
+
kse context export 01-00-user-auth --steering --steering-files=CORE_PRINCIPLES.md
|
|
152
|
+
|
|
153
|
+
# Generate task-specific prompt
|
|
154
|
+
kse prompt generate <spec-name> <task-id>
|
|
155
|
+
kse prompt generate 01-00-user-auth 1.1 --tool=claude-code
|
|
156
|
+
kse prompt generate 01-00-user-auth 1.2 --tool=cursor --max-length=5000
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Watch Mode (Automation)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Initialize watch configuration
|
|
163
|
+
kse watch init
|
|
164
|
+
kse watch init --force # Overwrite existing config
|
|
165
|
+
|
|
166
|
+
# Start watch mode
|
|
167
|
+
kse watch start
|
|
168
|
+
kse watch start --config custom-config.json
|
|
169
|
+
kse watch start --patterns "**/*.md,**/*.js"
|
|
170
|
+
|
|
171
|
+
# Stop watch mode
|
|
172
|
+
kse watch stop
|
|
173
|
+
|
|
174
|
+
# Check watch mode status
|
|
175
|
+
kse watch status
|
|
176
|
+
|
|
177
|
+
# View execution logs
|
|
178
|
+
kse watch logs
|
|
179
|
+
kse watch logs --tail 100
|
|
180
|
+
kse watch logs --follow
|
|
181
|
+
|
|
182
|
+
# View automation metrics
|
|
183
|
+
kse watch metrics
|
|
184
|
+
kse watch metrics --format json
|
|
185
|
+
|
|
186
|
+
# List available presets
|
|
187
|
+
kse watch presets
|
|
188
|
+
|
|
189
|
+
# Install a preset
|
|
190
|
+
kse watch install auto-sync
|
|
191
|
+
kse watch install prompt-regen
|
|
192
|
+
kse watch install context-export
|
|
193
|
+
kse watch install test-runner
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Manual Workflows
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# List available workflows
|
|
200
|
+
kse workflows
|
|
201
|
+
|
|
202
|
+
# Show workflow details
|
|
203
|
+
kse workflows show task-sync
|
|
204
|
+
kse workflows show context-export
|
|
205
|
+
kse workflows show prompt-generation
|
|
206
|
+
|
|
207
|
+
# Open full workflows guide
|
|
208
|
+
kse workflows guide
|
|
209
|
+
|
|
210
|
+
# Mark workflow as complete
|
|
211
|
+
kse workflows complete task-sync
|
|
212
|
+
```
|
|
213
|
+
|
|
117
214
|
### Document Enhancement
|
|
118
215
|
|
|
119
216
|
```bash
|
|
@@ -231,6 +328,81 @@ kse rollback
|
|
|
231
328
|
- โ
Easy rollback to previous states
|
|
232
329
|
- โ
Dry-run mode to preview changes
|
|
233
330
|
|
|
331
|
+
## ๐ค Automation and Workflows
|
|
332
|
+
|
|
333
|
+
### Watch Mode
|
|
334
|
+
|
|
335
|
+
Watch mode provides automatic file monitoring and workflow execution:
|
|
336
|
+
|
|
337
|
+
**Features**:
|
|
338
|
+
- ๐ **File Monitoring**: Automatically detect file changes
|
|
339
|
+
- โก **Debouncing**: Prevent duplicate executions
|
|
340
|
+
- ๐ **Retry Logic**: Automatic retry with exponential backoff
|
|
341
|
+
- ๐ **Metrics Tracking**: Track executions, time saved, success rates
|
|
342
|
+
- ๐ **Execution Logging**: Complete audit trail with log rotation
|
|
343
|
+
|
|
344
|
+
**Quick Start**:
|
|
345
|
+
```bash
|
|
346
|
+
# Initialize watch configuration
|
|
347
|
+
kse watch init
|
|
348
|
+
|
|
349
|
+
# Install a preset (auto-sync, prompt-regen, context-export, test-runner)
|
|
350
|
+
kse watch install auto-sync
|
|
351
|
+
|
|
352
|
+
# Start watching
|
|
353
|
+
kse watch start
|
|
354
|
+
|
|
355
|
+
# Check status
|
|
356
|
+
kse watch status
|
|
357
|
+
|
|
358
|
+
# View metrics
|
|
359
|
+
kse watch metrics
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Presets**:
|
|
363
|
+
- `auto-sync`: Automatically sync workspace when tasks.md changes
|
|
364
|
+
- `prompt-regen`: Regenerate prompts when requirements/design change
|
|
365
|
+
- `context-export`: Export context when tasks complete
|
|
366
|
+
- `test-runner`: Run tests when source files change
|
|
367
|
+
|
|
368
|
+
### Tool Detection
|
|
369
|
+
|
|
370
|
+
KSE automatically detects your development environment and suggests appropriate automation:
|
|
371
|
+
|
|
372
|
+
```bash
|
|
373
|
+
# During adoption, KSE detects:
|
|
374
|
+
kse adopt
|
|
375
|
+
|
|
376
|
+
# Detected: Kiro IDE โ Suggests native agent hooks
|
|
377
|
+
# Detected: VS Code/Cursor โ Suggests watch mode
|
|
378
|
+
# Detected: Other โ Suggests manual workflows
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Manual Workflows
|
|
382
|
+
|
|
383
|
+
For environments without automation, KSE provides step-by-step workflow guides:
|
|
384
|
+
|
|
385
|
+
```bash
|
|
386
|
+
# List available workflows
|
|
387
|
+
kse workflows
|
|
388
|
+
|
|
389
|
+
# View workflow details
|
|
390
|
+
kse workflows show task-sync # 30-60 seconds
|
|
391
|
+
kse workflows show context-export # 15-45 seconds
|
|
392
|
+
kse workflows show prompt-generation # 20-30 seconds
|
|
393
|
+
|
|
394
|
+
# Open complete guide
|
|
395
|
+
kse workflows guide
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Available Workflows**:
|
|
399
|
+
- **Task Sync**: Keep workspace synchronized with task progress
|
|
400
|
+
- **Context Export**: Export spec context for AI assistants
|
|
401
|
+
- **Prompt Generation**: Generate task-specific prompts
|
|
402
|
+
- **Daily Checklist**: Complete daily workflow routine
|
|
403
|
+
- **Task Completion**: Checklist for completing tasks
|
|
404
|
+
- **Spec Creation**: Checklist for creating new specs
|
|
405
|
+
|
|
234
406
|
## ๐ ๏ธ Project Structure
|
|
235
407
|
|
|
236
408
|
After initialization, your project will have:
|
package/bin/kiro-spec-engine.js
CHANGED
|
@@ -11,6 +11,8 @@ const doctorCommand = require('../lib/commands/doctor');
|
|
|
11
11
|
const adoptCommand = require('../lib/commands/adopt');
|
|
12
12
|
const upgradeCommand = require('../lib/commands/upgrade');
|
|
13
13
|
const rollbackCommand = require('../lib/commands/rollback');
|
|
14
|
+
const watchCommands = require('../lib/commands/watch');
|
|
15
|
+
const workflowsCommand = require('../lib/commands/workflows');
|
|
14
16
|
const VersionChecker = require('../lib/version/version-checker');
|
|
15
17
|
|
|
16
18
|
const i18n = getI18n();
|
|
@@ -264,6 +266,66 @@ program
|
|
|
264
266
|
await versionChecker.displayVersionInfo(projectPath);
|
|
265
267
|
});
|
|
266
268
|
|
|
269
|
+
// Watch mode commands
|
|
270
|
+
const watchCmd = program
|
|
271
|
+
.command('watch')
|
|
272
|
+
.description('Manage watch mode for automated file monitoring');
|
|
273
|
+
|
|
274
|
+
watchCmd
|
|
275
|
+
.command('start')
|
|
276
|
+
.description('Start watch mode')
|
|
277
|
+
.option('-c, --config <path>', 'Custom config file path')
|
|
278
|
+
.option('-p, --patterns <patterns>', 'Override patterns (comma-separated)')
|
|
279
|
+
.action(watchCommands.startWatch);
|
|
280
|
+
|
|
281
|
+
watchCmd
|
|
282
|
+
.command('stop')
|
|
283
|
+
.description('Stop watch mode')
|
|
284
|
+
.action(watchCommands.stopWatch);
|
|
285
|
+
|
|
286
|
+
watchCmd
|
|
287
|
+
.command('status')
|
|
288
|
+
.description('Show watch mode status')
|
|
289
|
+
.action(watchCommands.statusWatch);
|
|
290
|
+
|
|
291
|
+
watchCmd
|
|
292
|
+
.command('logs')
|
|
293
|
+
.description('Display execution logs')
|
|
294
|
+
.option('-t, --tail <lines>', 'Number of lines to show', '50')
|
|
295
|
+
.option('-f, --follow', 'Follow mode (tail -f)')
|
|
296
|
+
.action(watchCommands.logsWatch);
|
|
297
|
+
|
|
298
|
+
watchCmd
|
|
299
|
+
.command('metrics')
|
|
300
|
+
.description('Display automation metrics')
|
|
301
|
+
.option('--format <format>', 'Output format (text/json)', 'text')
|
|
302
|
+
.action(watchCommands.metricsWatch);
|
|
303
|
+
|
|
304
|
+
watchCmd
|
|
305
|
+
.command('init')
|
|
306
|
+
.description('Initialize watch configuration')
|
|
307
|
+
.option('-f, --force', 'Overwrite existing config')
|
|
308
|
+
.action(watchCommands.initWatch);
|
|
309
|
+
|
|
310
|
+
watchCmd
|
|
311
|
+
.command('presets')
|
|
312
|
+
.description('List available watch presets')
|
|
313
|
+
.action(watchCommands.listPresetsWatch);
|
|
314
|
+
|
|
315
|
+
watchCmd
|
|
316
|
+
.command('install <preset>')
|
|
317
|
+
.description('Install a watch preset')
|
|
318
|
+
.option('-f, --force', 'Overwrite existing actions')
|
|
319
|
+
.action(watchCommands.installPresetWatch);
|
|
320
|
+
|
|
321
|
+
// Workflows commands
|
|
322
|
+
const workflowsCmd = program
|
|
323
|
+
.command('workflows [action] [workflow-id]')
|
|
324
|
+
.description('Manage manual workflows and checklists')
|
|
325
|
+
.action(async (action, workflowId) => {
|
|
326
|
+
await workflowsCommand(action, workflowId);
|
|
327
|
+
});
|
|
328
|
+
|
|
267
329
|
// ๆดๆฐ้กน็ฎ้
็ฝฎ็่พ
ๅฉๅฝๆฐ
|
|
268
330
|
async function updateProjectConfig(projectName) {
|
|
269
331
|
const envPath = path.join(process.cwd(), '.kiro/steering/ENVIRONMENT.md');
|