scene-capability-engine 3.0.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 +2513 -0
- package/LICENSE +21 -0
- package/README.md +765 -0
- package/README.zh.md +630 -0
- package/bin/kiro-spec-engine.js +796 -0
- package/bin/kse.js +3 -0
- package/bin/sce.js +3 -0
- package/bin/sco.js +3 -0
- package/docs/331-poc-adaptation-roadmap.md +156 -0
- package/docs/331-poc-dual-track-integration-guide.md +120 -0
- package/docs/331-poc-weekly-delivery-checklist.md +52 -0
- package/docs/OFFLINE_INSTALL.md +96 -0
- package/docs/README.md +279 -0
- package/docs/adopt-migration-guide.md +599 -0
- package/docs/adoption-guide.md +616 -0
- package/docs/agent-hooks-analysis.md +815 -0
- package/docs/architecture.md +733 -0
- package/docs/articles/ai-driven-development-philosophy-and-practice-review.md +208 -0
- package/docs/articles/ai-driven-development-philosophy-and-practice.en.md +459 -0
- package/docs/articles/ai-driven-development-philosophy-and-practice.md +492 -0
- package/docs/autonomous-control-guide.md +851 -0
- package/docs/command-reference.md +1368 -0
- package/docs/community.md +115 -0
- package/docs/cross-tool-guide.md +555 -0
- package/docs/developer-guide.md +619 -0
- package/docs/document-governance.md +865 -0
- package/docs/environment-management-guide.md +526 -0
- package/docs/examples/add-export-command/design.md +194 -0
- package/docs/examples/add-export-command/requirements.md +110 -0
- package/docs/examples/add-export-command/tasks.md +88 -0
- package/docs/examples/add-rest-api/design.md +855 -0
- package/docs/examples/add-rest-api/requirements.md +323 -0
- package/docs/examples/add-rest-api/tasks.md +355 -0
- package/docs/examples/add-user-dashboard/design.md +192 -0
- package/docs/examples/add-user-dashboard/requirements.md +143 -0
- package/docs/examples/add-user-dashboard/tasks.md +91 -0
- package/docs/faq.md +697 -0
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.json +156 -0
- package/docs/handoffs/evidence/ontology/moqui-template-baseline-2026-02-17-232922.md +24 -0
- package/docs/images/wechat-qr.png +0 -0
- package/docs/integration-modes.md +529 -0
- package/docs/integration-philosophy.md +313 -0
- package/docs/knowledge-management-guide.md +263 -0
- package/docs/manual-workflows-guide.md +418 -0
- package/docs/moqui-capability-matrix.md +73 -0
- package/docs/moqui-template-core-library-playbook.md +109 -0
- package/docs/multi-agent-coordination-guide.md +553 -0
- package/docs/multi-repo-management-guide.md +1344 -0
- package/docs/quick-start-with-ai-tools.md +375 -0
- package/docs/quick-start.md +146 -0
- package/docs/release-checklist.md +121 -0
- package/docs/releases/README.md +13 -0
- package/docs/releases/v1.46.2-validation.md +45 -0
- package/docs/releases/v1.46.2.md +50 -0
- package/docs/scene-runtime-guide.md +347 -0
- package/docs/spec-collaboration-guide.md +369 -0
- package/docs/spec-locking-guide.md +225 -0
- package/docs/spec-numbering-guide.md +348 -0
- package/docs/spec-workflow.md +519 -0
- package/docs/steering-strategy-guide.md +196 -0
- package/docs/team-collaboration-guide.md +465 -0
- package/docs/testing-strategy.md +272 -0
- package/docs/tools/claude-guide.md +654 -0
- package/docs/tools/cursor-guide.md +706 -0
- package/docs/tools/generic-guide.md +446 -0
- package/docs/tools/kiro-guide.md +308 -0
- package/docs/tools/vscode-guide.md +445 -0
- package/docs/tools/windsurf-guide.md +391 -0
- package/docs/troubleshooting.md +1135 -0
- package/docs/upgrade-guide.md +639 -0
- package/docs/value-observability-guide.md +127 -0
- package/docs/zh/README.md +341 -0
- package/docs/zh/quick-start.md +764 -0
- package/docs/zh/release-checklist.md +121 -0
- package/docs/zh/releases/README.md +13 -0
- package/docs/zh/releases/v1.46.2-validation.md +45 -0
- package/docs/zh/releases/v1.46.2.md +50 -0
- package/docs/zh/spec-numbering-guide.md +348 -0
- package/docs/zh/tools/claude-guide.md +349 -0
- package/docs/zh/tools/cursor-guide.md +281 -0
- package/docs/zh/tools/generic-guide.md +499 -0
- package/docs/zh/tools/kiro-guide.md +342 -0
- package/docs/zh/tools/vscode-guide.md +449 -0
- package/docs/zh/tools/windsurf-guide.md +378 -0
- package/docs/zh/value-observability-guide.md +127 -0
- package/docs//344/272/244/344/273/230/346/270/205/345/215/225.md +75 -0
- package/lib/adoption/adoption-logger.js +487 -0
- package/lib/adoption/adoption-strategy.js +538 -0
- package/lib/adoption/backup-manager.js +420 -0
- package/lib/adoption/conflict-resolver.js +410 -0
- package/lib/adoption/detection-engine.js +275 -0
- package/lib/adoption/diff-viewer.js +226 -0
- package/lib/adoption/error-formatter.js +509 -0
- package/lib/adoption/file-classifier.js +385 -0
- package/lib/adoption/progress-reporter.js +534 -0
- package/lib/adoption/smart-orchestrator.js +470 -0
- package/lib/adoption/strategy-selector.js +218 -0
- package/lib/adoption/summary-generator.js +493 -0
- package/lib/adoption/template-sync.js +605 -0
- package/lib/auto/autonomous-engine.js +485 -0
- package/lib/auto/checkpoint-manager.js +300 -0
- package/lib/auto/close-loop-runner.js +2476 -0
- package/lib/auto/config-schema.js +176 -0
- package/lib/auto/decision-engine.js +344 -0
- package/lib/auto/error-recovery-manager.js +580 -0
- package/lib/auto/goal-decomposer.js +278 -0
- package/lib/auto/progress-tracker.js +502 -0
- package/lib/auto/safety-manager.js +186 -0
- package/lib/auto/semantic-decomposer.js +137 -0
- package/lib/auto/state-manager.js +126 -0
- package/lib/auto/task-queue-manager.js +340 -0
- package/lib/backup/backup-system.js +372 -0
- package/lib/backup/selective-backup.js +207 -0
- package/lib/collab/agent-registry.js +240 -0
- package/lib/collab/collab-manager.js +285 -0
- package/lib/collab/contract-manager.js +320 -0
- package/lib/collab/coordinator.js +370 -0
- package/lib/collab/dependency-manager.js +280 -0
- package/lib/collab/index.js +20 -0
- package/lib/collab/integration-manager.js +202 -0
- package/lib/collab/merge-coordinator.js +252 -0
- package/lib/collab/metadata-manager.js +233 -0
- package/lib/collab/multi-agent-config.js +120 -0
- package/lib/collab/spec-lifecycle-manager.js +304 -0
- package/lib/collab/sync-barrier.js +88 -0
- package/lib/collab/visualizer.js +208 -0
- package/lib/commands/adopt.js +749 -0
- package/lib/commands/auto.js +19559 -0
- package/lib/commands/collab.js +275 -0
- package/lib/commands/context.js +99 -0
- package/lib/commands/docs.js +808 -0
- package/lib/commands/doctor.js +273 -0
- package/lib/commands/env.js +420 -0
- package/lib/commands/knowledge.js +309 -0
- package/lib/commands/lock.js +235 -0
- package/lib/commands/ops.js +409 -0
- package/lib/commands/orchestrate.js +446 -0
- package/lib/commands/prompt.js +105 -0
- package/lib/commands/repo.js +118 -0
- package/lib/commands/rollback.js +219 -0
- package/lib/commands/scene.js +15549 -0
- package/lib/commands/spec-bootstrap.js +147 -0
- package/lib/commands/spec-gate.js +157 -0
- package/lib/commands/spec-pipeline.js +205 -0
- package/lib/commands/status.js +321 -0
- package/lib/commands/task.js +199 -0
- package/lib/commands/templates.js +654 -0
- package/lib/commands/upgrade.js +231 -0
- package/lib/commands/value.js +569 -0
- package/lib/commands/watch.js +684 -0
- package/lib/commands/workflows.js +240 -0
- package/lib/commands/workspace-multi.js +325 -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/data/moqui-capability-lexicon.json +45 -0
- package/lib/environment/backup-system.js +189 -0
- package/lib/environment/environment-manager.js +379 -0
- package/lib/environment/environment-registry.js +168 -0
- package/lib/gitignore/gitignore-backup.js +229 -0
- package/lib/gitignore/gitignore-detector.js +239 -0
- package/lib/gitignore/gitignore-integration.js +267 -0
- package/lib/gitignore/gitignore-transformer.js +193 -0
- package/lib/gitignore/layered-rules-template.js +42 -0
- package/lib/governance/archive-tool.js +284 -0
- package/lib/governance/cleanup-tool.js +237 -0
- package/lib/governance/config-manager.js +186 -0
- package/lib/governance/diagnostic-engine.js +271 -0
- package/lib/governance/doc-reference-checker.js +200 -0
- package/lib/governance/execution-logger.js +243 -0
- package/lib/governance/file-scanner.js +285 -0
- package/lib/governance/hooks-manager.js +333 -0
- package/lib/governance/reporter.js +337 -0
- package/lib/governance/validation-engine.js +181 -0
- package/lib/i18n.js +79 -0
- package/lib/knowledge/entry-manager.js +208 -0
- package/lib/knowledge/index-manager.js +261 -0
- package/lib/knowledge/knowledge-manager.js +273 -0
- package/lib/knowledge/template-manager.js +191 -0
- package/lib/lock/index.js +21 -0
- package/lib/lock/lock-file.js +192 -0
- package/lib/lock/lock-manager.js +321 -0
- package/lib/lock/machine-identifier.js +135 -0
- package/lib/lock/steering-file-lock.js +207 -0
- package/lib/lock/task-lock-manager.js +345 -0
- package/lib/operations/audit-logger.js +293 -0
- package/lib/operations/feedback-manager.js +1147 -0
- package/lib/operations/index.js +23 -0
- package/lib/operations/models/index.js +170 -0
- package/lib/operations/operations-manager.js +151 -0
- package/lib/operations/operations-validator.js +280 -0
- package/lib/operations/permission-manager.js +354 -0
- package/lib/operations/template-loader.js +143 -0
- package/lib/orchestrator/agent-spawner.js +629 -0
- package/lib/orchestrator/bootstrap-prompt-builder.js +236 -0
- package/lib/orchestrator/index.js +19 -0
- package/lib/orchestrator/orchestration-engine.js +1270 -0
- package/lib/orchestrator/orchestrator-config.js +173 -0
- package/lib/orchestrator/status-monitor.js +591 -0
- package/lib/python-checker.js +209 -0
- package/lib/repo/config-manager.js +580 -0
- package/lib/repo/errors/config-error.js +13 -0
- package/lib/repo/errors/git-error.js +15 -0
- package/lib/repo/errors/repo-error.js +14 -0
- package/lib/repo/git-operations.js +181 -0
- package/lib/repo/handlers/.gitkeep +1 -0
- package/lib/repo/handlers/exec-handler.js +155 -0
- package/lib/repo/handlers/health-handler.js +169 -0
- package/lib/repo/handlers/init-handler.js +197 -0
- package/lib/repo/handlers/status-handler.js +176 -0
- package/lib/repo/output-formatter.js +184 -0
- package/lib/repo/path-resolver.js +178 -0
- package/lib/repo/repo-manager.js +514 -0
- package/lib/scene-runtime/audit-emitter.js +59 -0
- package/lib/scene-runtime/binding-plugin-loader.js +351 -0
- package/lib/scene-runtime/binding-registry.js +349 -0
- package/lib/scene-runtime/eval-bridge.js +44 -0
- package/lib/scene-runtime/index.js +19 -0
- package/lib/scene-runtime/moqui-adapter.js +620 -0
- package/lib/scene-runtime/moqui-client.js +606 -0
- package/lib/scene-runtime/moqui-extractor.js +2029 -0
- package/lib/scene-runtime/plan-compiler.js +208 -0
- package/lib/scene-runtime/policy-gate.js +58 -0
- package/lib/scene-runtime/runtime-executor.js +358 -0
- package/lib/scene-runtime/scene-loader.js +96 -0
- package/lib/scene-runtime/scene-ontology.js +959 -0
- package/lib/scene-runtime/scene-template-linter.js +852 -0
- package/lib/scene-runtime/templates/scene-template-erp-query-v0.1.yaml +28 -0
- package/lib/scene-runtime/templates/scene-template-hybrid-shadow-v0.1.yaml +34 -0
- package/lib/spec/bootstrap/context-collector.js +48 -0
- package/lib/spec/bootstrap/draft-generator.js +158 -0
- package/lib/spec/bootstrap/questionnaire-engine.js +70 -0
- package/lib/spec/bootstrap/trace-emitter.js +59 -0
- package/lib/spec/multi-spec-orchestrate.js +93 -0
- package/lib/spec/pipeline/constants.js +6 -0
- package/lib/spec/pipeline/stage-adapters.js +118 -0
- package/lib/spec/pipeline/stage-runner.js +146 -0
- package/lib/spec/pipeline/state-store.js +119 -0
- package/lib/spec-gate/engine/gate-engine.js +165 -0
- package/lib/spec-gate/policy/default-policy.js +22 -0
- package/lib/spec-gate/policy/policy-loader.js +103 -0
- package/lib/spec-gate/result-emitter.js +81 -0
- package/lib/spec-gate/rules/default-rules.js +156 -0
- package/lib/spec-gate/rules/rule-registry.js +51 -0
- package/lib/steering/adoption-config.js +164 -0
- package/lib/steering/compliance-auto-fixer.js +204 -0
- package/lib/steering/compliance-cache.js +99 -0
- package/lib/steering/compliance-error-reporter.js +70 -0
- package/lib/steering/context-sync-manager.js +273 -0
- package/lib/steering/index.js +92 -0
- package/lib/steering/spec-steering.js +230 -0
- package/lib/steering/steering-compliance-checker.js +73 -0
- package/lib/steering/steering-loader.js +144 -0
- package/lib/steering/steering-manager.js +289 -0
- package/lib/task/index.js +12 -0
- package/lib/task/task-claimer.js +489 -0
- package/lib/task/task-status-store.js +418 -0
- package/lib/templates/cache-manager.js +440 -0
- package/lib/templates/content-generalizer.js +247 -0
- package/lib/templates/frontmatter-generator.js +128 -0
- package/lib/templates/git-handler.js +471 -0
- package/lib/templates/metadata-collector.js +328 -0
- package/lib/templates/path-utils.js +144 -0
- package/lib/templates/registry-parser.js +505 -0
- package/lib/templates/spec-reader.js +216 -0
- package/lib/templates/template-applicator.js +249 -0
- package/lib/templates/template-creator.js +256 -0
- package/lib/templates/template-error.js +143 -0
- package/lib/templates/template-exporter.js +502 -0
- package/lib/templates/template-manager.js +782 -0
- package/lib/templates/template-validator.js +361 -0
- package/lib/upgrade/migration-engine.js +382 -0
- package/lib/upgrade/migrations/.gitkeep +52 -0
- package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +78 -0
- package/lib/utils/file-diff.js +177 -0
- package/lib/utils/fs-utils.js +274 -0
- package/lib/utils/tool-detector.js +383 -0
- package/lib/utils/validation.js +324 -0
- package/lib/value/gate-summary-emitter.js +99 -0
- package/lib/value/metric-contract-loader.js +210 -0
- package/lib/value/risk-evaluator.js +117 -0
- package/lib/value/weekly-snapshot-builder.js +61 -0
- package/lib/version/version-checker.js +156 -0
- package/lib/version/version-manager.js +327 -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/multi/global-config.js +150 -0
- package/lib/workspace/multi/index.js +22 -0
- package/lib/workspace/multi/path-utils.js +173 -0
- package/lib/workspace/multi/workspace-context-resolver.js +244 -0
- package/lib/workspace/multi/workspace-registry.js +196 -0
- package/lib/workspace/multi/workspace-state-manager.js +537 -0
- package/lib/workspace/multi/workspace.js +90 -0
- package/lib/workspace/workspace-manager.js +370 -0
- package/lib/workspace/workspace-sync.js +356 -0
- package/locales/en.json +114 -0
- package/locales/zh.json +114 -0
- package/package.json +102 -0
- package/template/.kiro/README.md +247 -0
- package/template/.kiro/hooks/check-spec-on-create.kiro.hook +17 -0
- package/template/.kiro/hooks/run-tests-on-save.kiro.hook +13 -0
- package/template/.kiro/hooks/sync-tasks-on-edit.kiro.hook +16 -0
- package/template/.kiro/specs/SPEC_WORKFLOW_GUIDE.md +134 -0
- package/template/.kiro/steering/CORE_PRINCIPLES.md +133 -0
- package/template/.kiro/steering/CURRENT_CONTEXT.md +30 -0
- package/template/.kiro/steering/ENVIRONMENT.md +35 -0
- package/template/.kiro/steering/RULES_GUIDE.md +46 -0
- package/template/.kiro/templates/operations/default/change-impact.md +112 -0
- package/template/.kiro/templates/operations/default/deployment.md +91 -0
- package/template/.kiro/templates/operations/default/feedback-response.md +269 -0
- package/template/.kiro/templates/operations/default/migration-plan.md +172 -0
- package/template/.kiro/templates/operations/default/monitoring.md +135 -0
- package/template/.kiro/templates/operations/default/operations.md +135 -0
- package/template/.kiro/templates/operations/default/rollback.md +143 -0
- package/template/.kiro/templates/operations/default/tools.yaml +364 -0
- package/template/.kiro/templates/operations/default/troubleshooting.md +123 -0
- 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.py +676 -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/template/README.md +111 -0
|
@@ -0,0 +1,1368 @@
|
|
|
1
|
+
# Command Reference
|
|
2
|
+
|
|
3
|
+
> Quick reference for all `sce` commands
|
|
4
|
+
|
|
5
|
+
**Version**: 2.0.0
|
|
6
|
+
**Last Updated**: 2026-02-18
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Command Naming
|
|
11
|
+
|
|
12
|
+
The CLI provides three command aliases:
|
|
13
|
+
- `sce` - **Recommended primary command** (use this in all documentation)
|
|
14
|
+
- `kse` - Legacy short alias (compatible)
|
|
15
|
+
- `kiro-spec-engine` - Legacy full alias (compatible)
|
|
16
|
+
|
|
17
|
+
**Always use `sce` in new examples and documentation.**
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g scene-capability-engine
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This creates the `sce` command globally. Legacy aliases `kse` and `kiro-spec-engine` are still available.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Core Commands
|
|
32
|
+
|
|
33
|
+
### Project Setup
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Initialize new project
|
|
37
|
+
sce init [project-name]
|
|
38
|
+
|
|
39
|
+
# Adopt existing project
|
|
40
|
+
sce adopt
|
|
41
|
+
|
|
42
|
+
# Check project status
|
|
43
|
+
sce status
|
|
44
|
+
|
|
45
|
+
# Run system diagnostics
|
|
46
|
+
sce doctor
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Spec Management
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Legacy low-level: create spec directory only
|
|
53
|
+
sce create-spec 01-00-feature-name
|
|
54
|
+
|
|
55
|
+
# Bootstrap full Spec draft (requirements/design/tasks)
|
|
56
|
+
sce spec bootstrap --name 01-00-feature-name --non-interactive
|
|
57
|
+
|
|
58
|
+
# Run pipeline for one Spec
|
|
59
|
+
sce spec pipeline run --spec 01-00-feature-name
|
|
60
|
+
|
|
61
|
+
# Run gate for one Spec
|
|
62
|
+
sce spec gate run --spec 01-00-feature-name --json
|
|
63
|
+
|
|
64
|
+
# Multi-Spec mode defaults to orchestrate routing
|
|
65
|
+
sce spec bootstrap --specs "spec-a,spec-b" --max-parallel 3
|
|
66
|
+
sce spec pipeline run --specs "spec-a,spec-b" --max-parallel 3
|
|
67
|
+
sce spec gate run --specs "spec-a,spec-b" --max-parallel 3
|
|
68
|
+
|
|
69
|
+
# Show Spec progress
|
|
70
|
+
sce status --verbose
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Value Metrics
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Generate sample KPI input JSON
|
|
77
|
+
sce value metrics sample --out ./kpi-input.json --period 2026-W10 --json
|
|
78
|
+
|
|
79
|
+
# Generate weekly KPI snapshot + gate summary
|
|
80
|
+
sce value metrics snapshot \
|
|
81
|
+
--input .kiro/specs/112-00-spec-value-realization-program/custom/weekly-metrics/2026-W09.sample.json \
|
|
82
|
+
--period 2026-W09 \
|
|
83
|
+
--checkpoint day-60 \
|
|
84
|
+
--json
|
|
85
|
+
|
|
86
|
+
# Use custom metric contract and output paths
|
|
87
|
+
sce value metrics snapshot \
|
|
88
|
+
--input ./metrics-input.json \
|
|
89
|
+
--definitions .kiro/specs/112-00-spec-value-realization-program/custom/metric-definition.yaml \
|
|
90
|
+
--history-dir .kiro/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics \
|
|
91
|
+
--out .kiro/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics/2026-W10.json
|
|
92
|
+
|
|
93
|
+
# Generate baseline from earliest 3 history snapshots
|
|
94
|
+
sce value metrics baseline \
|
|
95
|
+
--definitions .kiro/specs/112-00-spec-value-realization-program/custom/metric-definition.yaml \
|
|
96
|
+
--history-dir .kiro/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics \
|
|
97
|
+
--from-history 3 \
|
|
98
|
+
--period 2026-W10 \
|
|
99
|
+
--json
|
|
100
|
+
|
|
101
|
+
# Generate trend report from latest 6 snapshots
|
|
102
|
+
sce value metrics trend \
|
|
103
|
+
--definitions .kiro/specs/112-00-spec-value-realization-program/custom/metric-definition.yaml \
|
|
104
|
+
--history-dir .kiro/specs/114-00-kpi-automation-and-observability/custom/weekly-metrics \
|
|
105
|
+
--window 6 \
|
|
106
|
+
--json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Task Management
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Claim a task
|
|
113
|
+
sce task claim <spec-name> <task-id>
|
|
114
|
+
|
|
115
|
+
# Unclaim a task
|
|
116
|
+
sce task unclaim <spec-name> <task-id>
|
|
117
|
+
|
|
118
|
+
# Show task status
|
|
119
|
+
sce task status <spec-name>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Context & Prompts
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Export spec context
|
|
126
|
+
sce context export <spec-name>
|
|
127
|
+
|
|
128
|
+
# Export with steering rules
|
|
129
|
+
sce context export <spec-name> --steering
|
|
130
|
+
|
|
131
|
+
# Generate task prompt
|
|
132
|
+
sce prompt generate <spec-name> <task-id>
|
|
133
|
+
|
|
134
|
+
# Generate for specific tool
|
|
135
|
+
sce prompt generate <spec-name> <task-id> --tool=claude-code
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Watch Mode
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Initialize watch configuration
|
|
142
|
+
sce watch init
|
|
143
|
+
|
|
144
|
+
# Start watch mode
|
|
145
|
+
sce watch start
|
|
146
|
+
|
|
147
|
+
# Stop watch mode
|
|
148
|
+
sce watch stop
|
|
149
|
+
|
|
150
|
+
# Check watch status
|
|
151
|
+
sce watch status
|
|
152
|
+
|
|
153
|
+
# View watch logs
|
|
154
|
+
sce watch logs
|
|
155
|
+
|
|
156
|
+
# Follow log stream in real time (tail -f behavior)
|
|
157
|
+
sce watch logs --follow
|
|
158
|
+
|
|
159
|
+
# Show last 100 entries, then continue following
|
|
160
|
+
sce watch logs --tail 100 --follow
|
|
161
|
+
|
|
162
|
+
# Show automation metrics
|
|
163
|
+
sce watch metrics
|
|
164
|
+
|
|
165
|
+
# List available presets
|
|
166
|
+
sce watch presets
|
|
167
|
+
|
|
168
|
+
# Install a preset
|
|
169
|
+
sce watch install <preset-name>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Workflows
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# List available workflows
|
|
176
|
+
sce workflows
|
|
177
|
+
|
|
178
|
+
# Show workflow details
|
|
179
|
+
sce workflows show <workflow-name>
|
|
180
|
+
|
|
181
|
+
# Open workflow guide
|
|
182
|
+
sce workflows guide
|
|
183
|
+
|
|
184
|
+
# Mark workflow as complete
|
|
185
|
+
sce workflows complete <workflow-name>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Workspace Management
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Create a new workspace
|
|
192
|
+
sce workspace create <name> [path]
|
|
193
|
+
|
|
194
|
+
# List all workspaces
|
|
195
|
+
sce workspace list
|
|
196
|
+
|
|
197
|
+
# Switch active workspace
|
|
198
|
+
sce workspace switch <name>
|
|
199
|
+
|
|
200
|
+
# Show workspace info
|
|
201
|
+
sce workspace info [name]
|
|
202
|
+
|
|
203
|
+
# Remove a workspace
|
|
204
|
+
sce workspace remove <name> [--force]
|
|
205
|
+
|
|
206
|
+
# Legacy commands (still supported)
|
|
207
|
+
sce workspace sync
|
|
208
|
+
sce workspace team
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Environment Management
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# List all environments
|
|
215
|
+
sce env list
|
|
216
|
+
|
|
217
|
+
# Switch to environment (with automatic backup)
|
|
218
|
+
sce env switch <name>
|
|
219
|
+
|
|
220
|
+
# Show active environment details
|
|
221
|
+
sce env info
|
|
222
|
+
|
|
223
|
+
# Register new environment from config file
|
|
224
|
+
sce env register <config-file>
|
|
225
|
+
|
|
226
|
+
# Remove environment (requires --force)
|
|
227
|
+
sce env unregister <name> --force
|
|
228
|
+
|
|
229
|
+
# Rollback to previous environment
|
|
230
|
+
sce env rollback
|
|
231
|
+
|
|
232
|
+
# Verify current environment (optional)
|
|
233
|
+
sce env verify
|
|
234
|
+
|
|
235
|
+
# Run command in environment context (optional)
|
|
236
|
+
sce env run "<command>"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Multi-Repository Management
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# Initialize repository configuration
|
|
243
|
+
sce repo init [--force] [--depth <n>]
|
|
244
|
+
|
|
245
|
+
# Show status of all repositories
|
|
246
|
+
sce repo status [--verbose] [--json]
|
|
247
|
+
|
|
248
|
+
# Execute command in all repositories
|
|
249
|
+
sce repo exec "<command>" [--dry-run]
|
|
250
|
+
|
|
251
|
+
# Check repository health
|
|
252
|
+
sce repo health [--json]
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Agent Orchestration (Codex)
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Start orchestration for multiple specs
|
|
259
|
+
sce orchestrate run --specs "spec-a,spec-b,spec-c" --max-parallel 3
|
|
260
|
+
|
|
261
|
+
# Show orchestration status
|
|
262
|
+
sce orchestrate status [--json]
|
|
263
|
+
|
|
264
|
+
# Stop all running sub-agents
|
|
265
|
+
sce orchestrate stop
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
When you pass `--specs` to `sce spec bootstrap|pipeline run|gate run`, sce now defaults to this orchestrate mode automatically.
|
|
269
|
+
|
|
270
|
+
### Autonomous Close-Loop Program
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# One-command close-loop execution:
|
|
274
|
+
# goal -> auto master/sub decomposition -> collab metadata -> orchestration -> terminal result
|
|
275
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration"
|
|
276
|
+
# default sub-spec count is auto-selected by goal complexity (typically 3-5)
|
|
277
|
+
|
|
278
|
+
# Preview decomposition only
|
|
279
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" --dry-run --json
|
|
280
|
+
|
|
281
|
+
# Generate plan but skip orchestration run
|
|
282
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" --no-run
|
|
283
|
+
|
|
284
|
+
# Run without live status stream output
|
|
285
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" --no-stream
|
|
286
|
+
|
|
287
|
+
# Add Definition-of-Done (DoD) test gate
|
|
288
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
289
|
+
--dod-tests "npm run test:smoke"
|
|
290
|
+
|
|
291
|
+
# Strict DoD: require all tasks.md checklists are closed
|
|
292
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
293
|
+
--dod-tasks-closed
|
|
294
|
+
|
|
295
|
+
# Write DoD evidence to custom report path
|
|
296
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
297
|
+
--dod-report ".kiro/reports/close-loop-dod.json"
|
|
298
|
+
|
|
299
|
+
# Resume from the latest close-loop session snapshot
|
|
300
|
+
sce auto close-loop --resume latest
|
|
301
|
+
|
|
302
|
+
# Resume from the latest interrupted close-loop session snapshot
|
|
303
|
+
sce auto close-loop --resume interrupted
|
|
304
|
+
|
|
305
|
+
# Quick continue shorthand (maps to --resume interrupted)
|
|
306
|
+
sce auto close-loop continue
|
|
307
|
+
sce auto close-loop 继续
|
|
308
|
+
sce auto continue
|
|
309
|
+
|
|
310
|
+
# Resume from a specific session id
|
|
311
|
+
sce auto close-loop --resume 117-20260214230000
|
|
312
|
+
|
|
313
|
+
# Apply session retention automatically after close-loop execution
|
|
314
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
315
|
+
--session-keep 50 \
|
|
316
|
+
--session-older-than-days 14
|
|
317
|
+
|
|
318
|
+
# Allow up to 2 automatic replan cycles on orchestration failures
|
|
319
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
320
|
+
--replan-attempts 2
|
|
321
|
+
|
|
322
|
+
# Use adaptive replan budget strategy (default) or fixed
|
|
323
|
+
sce auto close-loop "build autonomous close-loop and master/sub orchestration" \
|
|
324
|
+
--replan-strategy adaptive
|
|
325
|
+
|
|
326
|
+
# Run multiple goals in one autonomous batch (one master/sub portfolio per goal)
|
|
327
|
+
sce auto close-loop-batch .kiro/goals.txt
|
|
328
|
+
sce auto close-loop-batch .kiro/goals.json --dry-run --json
|
|
329
|
+
|
|
330
|
+
# Generate batch goals from one broad program goal (no goals file needed)
|
|
331
|
+
sce auto close-loop-batch \
|
|
332
|
+
--decompose-goal "build autonomous close-loop, master/sub decomposition, orchestration and quality rollout" \
|
|
333
|
+
--program-goals 4 \
|
|
334
|
+
--program-min-quality-score 85 \
|
|
335
|
+
--json
|
|
336
|
+
|
|
337
|
+
# Program command: broad goal -> auto split -> autonomous batch closed-loop execution
|
|
338
|
+
sce auto close-loop-program \
|
|
339
|
+
"build autonomous close-loop, master/sub decomposition, orchestration and quality rollout" \
|
|
340
|
+
--program-goals 4 \
|
|
341
|
+
--program-quality-gate \
|
|
342
|
+
--program-recover-max-rounds 6 \
|
|
343
|
+
--program-recover-max-minutes 30 \
|
|
344
|
+
--program-gate-profile staging \
|
|
345
|
+
--program-gate-fallback-chain staging,prod \
|
|
346
|
+
--program-gate-fallback-profile prod \
|
|
347
|
+
--program-min-success-rate 95 \
|
|
348
|
+
--program-max-risk-level medium \
|
|
349
|
+
--program-govern-until-stable \
|
|
350
|
+
--program-govern-max-rounds 3 \
|
|
351
|
+
--program-govern-use-action 1 \
|
|
352
|
+
--program-kpi-out .kiro/reports/close-loop-program-kpi.json \
|
|
353
|
+
--program-audit-out .kiro/reports/close-loop-program-audit.json \
|
|
354
|
+
--json
|
|
355
|
+
|
|
356
|
+
# Controller command: drain queued broad goals with close-loop-program runtime
|
|
357
|
+
sce auto close-loop-controller .kiro/auto/program-queue.lines \
|
|
358
|
+
--dequeue-limit 2 \
|
|
359
|
+
--max-cycles 20 \
|
|
360
|
+
--controller-done-file .kiro/auto/program-done.lines \
|
|
361
|
+
--controller-failed-file .kiro/auto/program-failed.lines \
|
|
362
|
+
--json
|
|
363
|
+
|
|
364
|
+
# Persistent controller mode: keep polling queue and execute new goals automatically
|
|
365
|
+
sce auto close-loop-controller .kiro/auto/program-queue.lines \
|
|
366
|
+
--wait-on-empty \
|
|
367
|
+
--poll-seconds 30 \
|
|
368
|
+
--max-cycles 1000 \
|
|
369
|
+
--max-minutes 240
|
|
370
|
+
|
|
371
|
+
# Resume from latest persisted controller session
|
|
372
|
+
sce auto close-loop-controller --controller-resume latest --json
|
|
373
|
+
|
|
374
|
+
# Recovery command: replay unresolved goals from summary using remediation action strategy
|
|
375
|
+
sce auto close-loop-recover latest --json
|
|
376
|
+
sce auto close-loop-recover .kiro/auto/close-loop-batch-summaries/batch-20260215090000.json \
|
|
377
|
+
--use-action 2 \
|
|
378
|
+
--recover-until-complete \
|
|
379
|
+
--recover-max-rounds 3 \
|
|
380
|
+
--recover-max-minutes 20 \
|
|
381
|
+
--recovery-memory-ttl-days 30 \
|
|
382
|
+
--recovery-memory-scope release-main \
|
|
383
|
+
--program-audit-out .kiro/reports/close-loop-recover-audit.json \
|
|
384
|
+
--dry-run --json
|
|
385
|
+
|
|
386
|
+
# Default autonomous batch run (continue-on-error + adaptive scheduling + retry-until-complete)
|
|
387
|
+
sce auto close-loop-batch .kiro/goals.json --json
|
|
388
|
+
|
|
389
|
+
# Run batch goals with concurrent close-loop workers
|
|
390
|
+
sce auto close-loop-batch .kiro/goals.json --batch-parallel 3 --json
|
|
391
|
+
|
|
392
|
+
# Apply global agent budget across all concurrent goals
|
|
393
|
+
sce auto close-loop-batch .kiro/goals.json \
|
|
394
|
+
--batch-parallel 3 \
|
|
395
|
+
--batch-agent-budget 6 \
|
|
396
|
+
--json
|
|
397
|
+
|
|
398
|
+
# Prioritize complex goals first and enable anti-starvation aging
|
|
399
|
+
sce auto close-loop-batch .kiro/goals.json \
|
|
400
|
+
--batch-priority critical-first \
|
|
401
|
+
--batch-aging-factor 3 \
|
|
402
|
+
--json
|
|
403
|
+
|
|
404
|
+
# Automatically retry failed/stopped goals for one extra round
|
|
405
|
+
sce auto close-loop-batch .kiro/goals.json \
|
|
406
|
+
--batch-retry-rounds 1 \
|
|
407
|
+
--batch-retry-strategy adaptive \
|
|
408
|
+
--json
|
|
409
|
+
|
|
410
|
+
# Retry until all goals complete (bounded by max rounds)
|
|
411
|
+
sce auto close-loop-batch .kiro/goals.json \
|
|
412
|
+
--batch-retry-until-complete \
|
|
413
|
+
--batch-retry-max-rounds 10 \
|
|
414
|
+
--json
|
|
415
|
+
|
|
416
|
+
# Disable autonomous batch policy explicitly (only when you need legacy/manual tuning)
|
|
417
|
+
sce auto close-loop-batch .kiro/goals.json \
|
|
418
|
+
--no-batch-autonomous \
|
|
419
|
+
--json
|
|
420
|
+
|
|
421
|
+
# Resume only pending goals from a previous batch summary
|
|
422
|
+
sce auto close-loop-batch --resume-from-summary .kiro/reports/close-loop-batch.json --json
|
|
423
|
+
|
|
424
|
+
# Resume pending goals from latest persisted batch session summary
|
|
425
|
+
sce auto close-loop-batch --resume-from-summary latest --json
|
|
426
|
+
|
|
427
|
+
# Resume only failed/error goals from summary (ignore unprocessed goals)
|
|
428
|
+
sce auto close-loop-batch --resume-from-summary .kiro/reports/close-loop-batch.json \
|
|
429
|
+
--resume-strategy failed-only --json
|
|
430
|
+
|
|
431
|
+
# List persisted close-loop sessions
|
|
432
|
+
sce auto session list
|
|
433
|
+
sce auto session list --status completed,partial-failed
|
|
434
|
+
sce auto session list --limit 50 --json
|
|
435
|
+
|
|
436
|
+
# Aggregate close-loop session telemetry
|
|
437
|
+
sce auto session stats
|
|
438
|
+
sce auto session stats --days 14 --status completed --json
|
|
439
|
+
|
|
440
|
+
# Prune old close-loop sessions
|
|
441
|
+
sce auto session prune --keep 50
|
|
442
|
+
sce auto session prune --keep 20 --older-than-days 14 --dry-run
|
|
443
|
+
|
|
444
|
+
# List persisted spec directories
|
|
445
|
+
sce auto spec-session list
|
|
446
|
+
sce auto spec-session list --limit 100 --json
|
|
447
|
+
|
|
448
|
+
# Prune old spec directories
|
|
449
|
+
sce auto spec-session prune --keep 200
|
|
450
|
+
sce auto spec-session prune --keep 100 --older-than-days 30 --dry-run --json
|
|
451
|
+
sce auto spec-session prune --keep 100 --older-than-days 30 --show-protection-reasons --json
|
|
452
|
+
|
|
453
|
+
# List persisted close-loop-batch summary sessions
|
|
454
|
+
sce auto batch-session list
|
|
455
|
+
sce auto batch-session list --status failed
|
|
456
|
+
sce auto batch-session list --limit 50 --json
|
|
457
|
+
|
|
458
|
+
# Aggregate close-loop-batch summary telemetry
|
|
459
|
+
sce auto batch-session stats
|
|
460
|
+
sce auto batch-session stats --days 14 --status failed --json
|
|
461
|
+
|
|
462
|
+
# Prune old close-loop-batch summary sessions
|
|
463
|
+
sce auto batch-session prune --keep 50
|
|
464
|
+
sce auto batch-session prune --keep 20 --older-than-days 14 --dry-run
|
|
465
|
+
|
|
466
|
+
# List persisted close-loop-controller summary sessions
|
|
467
|
+
sce auto controller-session list
|
|
468
|
+
sce auto controller-session list --status partial-failed
|
|
469
|
+
sce auto controller-session list --limit 50 --json
|
|
470
|
+
|
|
471
|
+
# Aggregate close-loop-controller summary session telemetry
|
|
472
|
+
sce auto controller-session stats
|
|
473
|
+
sce auto controller-session stats --days 14 --status partial-failed --json
|
|
474
|
+
|
|
475
|
+
# Prune old close-loop-controller summary sessions
|
|
476
|
+
sce auto controller-session prune --keep 50
|
|
477
|
+
sce auto controller-session prune --keep 20 --older-than-days 14 --dry-run
|
|
478
|
+
|
|
479
|
+
# Aggregate cross-archive autonomous governance telemetry
|
|
480
|
+
sce auto governance stats
|
|
481
|
+
sce auto governance stats --days 14 --status completed,partial-failed --json
|
|
482
|
+
sce auto governance maintain --session-keep 50 --batch-session-keep 50 --controller-session-keep 50 --json
|
|
483
|
+
sce auto governance maintain --apply --session-keep 20 --batch-session-keep 20 --controller-session-keep 20 --recovery-memory-older-than-days 90 --json
|
|
484
|
+
sce auto governance close-loop --plan-only --max-rounds 3 --target-risk low --json
|
|
485
|
+
sce auto governance close-loop --max-rounds 3 --target-risk low --session-keep 20 --batch-session-keep 20 --controller-session-keep 20 --json
|
|
486
|
+
sce auto governance close-loop --max-rounds 3 --governance-session-keep 50 --governance-session-older-than-days 30 --json
|
|
487
|
+
sce auto governance close-loop --max-rounds 3 --target-risk low --execute-advisory --advisory-recover-max-rounds 3 --advisory-controller-max-cycles 20 --dry-run --json
|
|
488
|
+
sce auto governance close-loop --governance-resume latest --max-rounds 5 --json
|
|
489
|
+
sce auto governance close-loop --governance-resume latest --target-risk high --governance-resume-allow-drift --json
|
|
490
|
+
sce auto governance session list --limit 20 --status completed,failed --json
|
|
491
|
+
sce auto governance session list --resume-only --json
|
|
492
|
+
sce auto governance session stats --days 30 --json
|
|
493
|
+
sce auto governance session stats --resume-only --json
|
|
494
|
+
sce auto governance session prune --keep 50 --older-than-days 30 --dry-run --json
|
|
495
|
+
|
|
496
|
+
# Recovery memory maintenance
|
|
497
|
+
sce auto recovery-memory show --json
|
|
498
|
+
sce auto recovery-memory scopes --json
|
|
499
|
+
sce auto recovery-memory prune --older-than-days 30 --dry-run --json
|
|
500
|
+
sce auto recovery-memory clear --json
|
|
501
|
+
|
|
502
|
+
# Autonomous KPI trend (weekly/daily buckets + CSV export)
|
|
503
|
+
sce auto kpi trend --weeks 12 --period week --mode all --json
|
|
504
|
+
sce auto kpi trend --weeks 8 --period day --mode program --csv --out ./auto-kpi-trend.csv
|
|
505
|
+
|
|
506
|
+
# Unified observability snapshot (sessions + governance + KPI trend)
|
|
507
|
+
sce auto observability snapshot --days 14 --status completed,failed --json
|
|
508
|
+
sce auto observability snapshot --out .kiro/reports/auto-observability.json --json
|
|
509
|
+
|
|
510
|
+
# Agent-facing spec interfaces
|
|
511
|
+
sce auto spec status 121-00-master --json
|
|
512
|
+
sce auto spec instructions 121-02-sub-track --json
|
|
513
|
+
|
|
514
|
+
# Autonomous archive schema compatibility
|
|
515
|
+
sce auto schema check --json
|
|
516
|
+
sce auto schema migrate --json # dry-run by default
|
|
517
|
+
sce auto schema migrate --apply --json # apply schema_version migration
|
|
518
|
+
sce auto schema migrate --only close-loop-session,batch-session --apply --json
|
|
519
|
+
|
|
520
|
+
# Dual-track handoff integration (generic external project -> sce)
|
|
521
|
+
sce auto handoff plan --manifest docs/handoffs/handoff-manifest.json --json
|
|
522
|
+
sce auto handoff plan --manifest docs/handoffs/handoff-manifest.json --strict --out .kiro/reports/handoff-plan.json --json
|
|
523
|
+
sce auto handoff queue --manifest docs/handoffs/handoff-manifest.json --out .kiro/auto/handoff-goals.lines --json
|
|
524
|
+
sce auto handoff template-diff --manifest docs/handoffs/handoff-manifest.json --json
|
|
525
|
+
sce auto handoff capability-matrix --manifest docs/handoffs/handoff-manifest.json --json
|
|
526
|
+
sce auto handoff capability-matrix --manifest docs/handoffs/handoff-manifest.json --format markdown --out .kiro/reports/handoff-capability-matrix.md --fail-on-gap --json
|
|
527
|
+
sce auto handoff run --manifest docs/handoffs/handoff-manifest.json --json
|
|
528
|
+
sce auto handoff run --manifest docs/handoffs/handoff-manifest.json --min-spec-success-rate 95 --max-risk-level medium --json
|
|
529
|
+
sce auto handoff run --manifest docs/handoffs/handoff-manifest.json --continue-from latest --continue-strategy auto --json
|
|
530
|
+
sce auto handoff regression --session-id latest --json
|
|
531
|
+
sce auto handoff regression --session-id latest --window 5 --json
|
|
532
|
+
sce auto handoff regression --session-id latest --format markdown --out .kiro/reports/handoff-regression.md --json
|
|
533
|
+
sce auto handoff regression --session-id latest --window 5 --out .kiro/reports/handoff-regression.json --json
|
|
534
|
+
sce auto close-loop-batch .kiro/auto/handoff-goals.lines --format lines --json
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
DoD-related options:
|
|
538
|
+
- `--dod-tests <command>`: run a final shell command as a completion gate
|
|
539
|
+
- `--dod-tests-timeout <ms>`: timeout for `--dod-tests` (default `600000`)
|
|
540
|
+
- `--dod-max-risk-level <low|medium|high>`: fail DoD when derived run risk is above threshold
|
|
541
|
+
- `--dod-kpi-min-completion-rate <n>`: minimum close-loop completion rate percent (`0-100`)
|
|
542
|
+
- `--dod-max-success-rate-drop <n>`: max allowed completion-rate drop vs recent baseline (`0-100`)
|
|
543
|
+
- `--dod-baseline-window <n>`: number of recent sessions used for baseline comparison (`1-50`, default `5`)
|
|
544
|
+
- `--dod-tasks-closed`: require no unchecked `- [ ]` items in generated `tasks.md`
|
|
545
|
+
- `--no-dod-docs`: skip doc completeness gate
|
|
546
|
+
- `--no-dod-collab`: skip collaboration completion gate
|
|
547
|
+
- `--no-dod`: disable all DoD gates
|
|
548
|
+
- `--dod-report <path>`: write DoD evidence report JSON to custom path
|
|
549
|
+
- `--no-dod-report`: disable automatic DoD report archive
|
|
550
|
+
- `--resume <session-or-file>`: resume from prior session id, `latest`, `interrupted` (latest non-completed session), or JSON path
|
|
551
|
+
- Shorthand: `sce auto close-loop continue` / `sce auto close-loop 继续` equals `--resume interrupted`.
|
|
552
|
+
- `sce auto continue`: shortcut command that resumes latest interrupted close-loop session.
|
|
553
|
+
- `--session-id <id>`: set explicit session id for persistence
|
|
554
|
+
- `--no-session`: disable close-loop session persistence
|
|
555
|
+
- `--session-keep <n>`: prune sessions after run and keep newest `n` snapshots
|
|
556
|
+
- `--session-older-than-days <n>`: when pruning, only delete sessions older than `n` days
|
|
557
|
+
- `--subs <n>`: override automatic decomposition count (`2-5`)
|
|
558
|
+
- `--replan-strategy <strategy>`: `adaptive` or `fixed` replan budget strategy
|
|
559
|
+
- `--replan-attempts <n>`: max automatic replan cycles after failed orchestration (`0-5`, default `1`)
|
|
560
|
+
- `--replan-no-progress-window <n>`: stop replan when no progress repeats for `n` failed cycles (`1-10`, default `3`)
|
|
561
|
+
- `--no-replan`: disable automatic replan cycle
|
|
562
|
+
- `--no-conflict-governance`: disable lease-conflict prediction and scheduling guard
|
|
563
|
+
- `--no-ontology-guidance`: disable scene ontology `agent_hints` scheduling guidance
|
|
564
|
+
|
|
565
|
+
Close-loop batch (`sce auto close-loop-batch <goals-file>`) options:
|
|
566
|
+
- supports shared close-loop execution options (for example: `--subs`, `--max-parallel`, `--dod*`, `--replan*`, `--dry-run`, `--json`)
|
|
567
|
+
- `--format <format>`: parse goals file as `auto`, `json`, or `lines` (default `auto`)
|
|
568
|
+
- `--decompose-goal <goal>`: auto-split one broad goal into multiple batch goals using semantic clauses/categories
|
|
569
|
+
- `--program-goals <n>`: target generated-goal count for `--decompose-goal` (`2-12`, default adaptive)
|
|
570
|
+
- `--program-min-quality-score <n>`: minimum decomposition quality score before auto-refinement (`0-100`, default `70`)
|
|
571
|
+
- `--program-quality-gate`: fail fast if final decomposition quality is still below `--program-min-quality-score`
|
|
572
|
+
- `--resume-from-summary <path>`: derive pending goals from an existing batch summary (reruns failed/error and previously unprocessed goals)
|
|
573
|
+
- `--resume-from-summary latest`: load the most recent persisted batch session summary automatically
|
|
574
|
+
- `--resume-strategy <strategy>`: `pending` (default) or `failed-only` for summary resume scope
|
|
575
|
+
- `--batch-parallel <n>`: run up to `n` goals concurrently (`1-20`, default adaptive under autonomous policy)
|
|
576
|
+
- `--batch-agent-budget <n>`: global agent parallel budget shared by all running goals (`1-500`)
|
|
577
|
+
- `--batch-priority <strategy>`: scheduling strategy `fifo`, `complex-first`, `complex-last`, or `critical-first` (default `complex-first` under autonomous policy)
|
|
578
|
+
- `--batch-aging-factor <n>`: waiting-goal aging boost per scheduling cycle (`0-100`, default `2` under autonomous policy)
|
|
579
|
+
- `--batch-retry-rounds <n>`: retry failed/stopped goals for `n` additional rounds (`0-5`, default `0`, or until-complete under autonomous policy)
|
|
580
|
+
- `--batch-retry-strategy <strategy>`: retry strategy `adaptive` (default) or `strict`
|
|
581
|
+
- `--batch-retry-until-complete`: keep retrying until no failed/stopped goals remain or max rounds reached
|
|
582
|
+
- `--batch-retry-max-rounds <n>`: max extra rounds for `--batch-retry-until-complete` (`1-20`, default `10`)
|
|
583
|
+
- `--no-batch-autonomous`: disable autonomous closed-loop defaults and rely on explicit batch flags
|
|
584
|
+
- `--batch-session-id <id>`: set explicit persisted batch session id
|
|
585
|
+
- `--batch-session-keep <n>`: keep newest `n` persisted batch summaries after each run (`0-1000`)
|
|
586
|
+
- `--batch-session-older-than-days <n>`: when pruning persisted batch summaries, only delete sessions older than `n` days (`0-36500`)
|
|
587
|
+
- `--spec-session-keep <n>`: keep newest `n` spec directories under `.kiro/specs` after run (`0-5000`)
|
|
588
|
+
- `--spec-session-older-than-days <n>`: when pruning specs, only delete directories older than `n` days (`0-36500`)
|
|
589
|
+
- `--no-spec-session-protect-active`: allow pruning active/recently referenced spec directories
|
|
590
|
+
- `--spec-session-protect-window-days <n>`: protection window (days) for recent session references during spec pruning (`0-36500`, default `7`)
|
|
591
|
+
- `--spec-session-max-total <n>`: spec directory budget ceiling under `.kiro/specs` (`1-500000`)
|
|
592
|
+
- `--spec-session-max-created <n>`: spec growth guard for maximum estimated created directories per run (`0-500000`)
|
|
593
|
+
- `--spec-session-max-created-per-goal <n>`: spec growth guard for estimated created directories per processed goal (`0-1000`)
|
|
594
|
+
- `--spec-session-max-duplicate-goals <n>`: goal-input duplicate guard for batch runs (`0-500000`)
|
|
595
|
+
- `--spec-session-budget-hard-fail`: fail run when spec count exceeds `--spec-session-max-total` before/after execution
|
|
596
|
+
- `--no-batch-session`: disable automatic persisted batch summary session archive
|
|
597
|
+
- `--continue-on-error`: continue remaining goals after a failed/error goal (enabled by default under autonomous policy)
|
|
598
|
+
- `--out <path>`: write batch summary JSON output file
|
|
599
|
+
- `--resume` and `--session-id` are not supported in batch mode (sessions are per-goal)
|
|
600
|
+
- `--program-goals` requires `--decompose-goal`
|
|
601
|
+
- `<goals-file>`, `--resume-from-summary`, and `--decompose-goal` are mutually exclusive goal sources
|
|
602
|
+
- Batch summary includes `resource_plan` (budget/effective parallel/per-goal maxParallel/scheduling strategy/aging/starvation wait metrics/criticality summary) and `metrics` (`success_rate_percent`, `status_breakdown`, `average_sub_specs_per_goal`, `average_replan_cycles_per_goal`, `total_rate_limit_signals`, `average_rate_limit_signals_per_goal`, `total_rate_limit_backoff_ms`)
|
|
603
|
+
- Under budget mode, scheduler is complexity-weighted (`goal_weight`/`scheduling_weight`) so higher-complexity goals consume more shared slots and can reduce same-batch concurrency.
|
|
604
|
+
- Batch summary includes `batch_retry` telemetry (strategy, until-complete mode, configured/max/performed rounds, exhausted flag, per-round history).
|
|
605
|
+
- Under `--batch-retry-strategy adaptive`, retry history includes rate-limit pressure and next-round backpressure decisions (`applied_batch_parallel`, `next_batch_parallel`, `adaptive_backpressure_applied`).
|
|
606
|
+
- Batch summary includes `batch_session` metadata when persisted (session id + file path).
|
|
607
|
+
- When using `--decompose-goal`, summary includes `generated_from_goal` metadata (strategy, target count, produced count, clause/category diagnostics, decomposition `quality`, and refinement telemetry).
|
|
608
|
+
|
|
609
|
+
Close-loop program (`sce auto close-loop-program "<goal>"`) options:
|
|
610
|
+
- Automatically enables autonomous batch policy (hands-off closed-loop defaults) and uses semantic decomposition from one broad goal.
|
|
611
|
+
- `--program-goals <n>`: target generated-goal count (`2-12`, default adaptive)
|
|
612
|
+
- Supports batch execution controls (`--batch-parallel`, `--batch-agent-budget`, `--batch-priority`, `--batch-aging-factor`, `--batch-retry*`)
|
|
613
|
+
- Supports batch summary persistence controls (`--batch-session-id`, `--batch-session-keep`, `--batch-session-older-than-days`, `--no-batch-session`)
|
|
614
|
+
- Supports spec retention controls (`--spec-session-keep`, `--spec-session-older-than-days`, `--no-spec-session-protect-active`)
|
|
615
|
+
- Includes `--spec-session-protect-window-days` to tune recent-reference protection window.
|
|
616
|
+
- Includes `--spec-session-max-total` and optional `--spec-session-budget-hard-fail` for spec-count budget governance.
|
|
617
|
+
- `--no-program-auto-recover`: disable built-in recovery loop after non-completed program runs
|
|
618
|
+
- `--program-recover-use-action <n>`: pin remediation action for auto recovery (otherwise KSE uses learned memory or default action `1`)
|
|
619
|
+
- `--program-recover-resume-strategy <pending|failed-only>`: resume scope for built-in program recovery (default `pending`)
|
|
620
|
+
- `--program-recover-max-rounds <n>`: bounded recovery rounds for built-in program recovery (`1-20`, default `5`)
|
|
621
|
+
- `--program-recover-max-minutes <n>`: elapsed-time budget for built-in program recovery loop (minutes, default unlimited)
|
|
622
|
+
- `--program-gate-profile <profile>`: convergence gate profile (`default|dev|staging|prod`) to set baseline success/risk policy
|
|
623
|
+
- `--program-gate-fallback-profile <profile>`: fallback gate profile (`none|default|dev|staging|prod`, default `none`) used only when primary gate fails
|
|
624
|
+
- `--program-gate-fallback-chain <profiles>`: ordered fallback profiles (comma-separated) evaluated after primary gate failure
|
|
625
|
+
- `--program-min-success-rate <n>`: convergence gate minimum success rate percent (`0-100`, default `100`)
|
|
626
|
+
- `--program-max-risk-level <low|medium|high>`: convergence gate risk ceiling (default `high`)
|
|
627
|
+
- `--program-max-elapsed-minutes <n>`: convergence gate elapsed-time budget in minutes (`1-10080`, default unlimited)
|
|
628
|
+
- `--program-max-agent-budget <n>`: convergence gate max allowed agent budget/effective parallel budget (`1-500`)
|
|
629
|
+
- `--program-max-total-sub-specs <n>`: convergence gate max total sub-specs across program goals (`1-500000`)
|
|
630
|
+
- `--no-program-gate-auto-remediate`: disable automatic remediation hints/prune attempts after gate failure
|
|
631
|
+
- `--program-govern-until-stable`: enable post-run governance loop that keeps replaying/recovering until gate/anomaly stability
|
|
632
|
+
- `--program-govern-max-rounds <n>`: max governance rounds (`1-20`, default `3`)
|
|
633
|
+
- `--program-govern-max-minutes <n>`: elapsed-time budget for governance loop (`1-10080`, default `60`)
|
|
634
|
+
- `--program-govern-anomaly-weeks <n>`: KPI lookback weeks for anomaly-triggered governance (`1-260`, default `8`)
|
|
635
|
+
- `--program-govern-anomaly-period <week|day>`: KPI bucket period for anomaly governance checks (default `week`)
|
|
636
|
+
- `--no-program-govern-anomaly`: disable anomaly-triggered governance and only govern by gate/budget failures
|
|
637
|
+
- `--program-govern-use-action <n>`: pin remediation action index (`1-20`) used in governance rounds
|
|
638
|
+
- `--no-program-govern-auto-action`: disable automatic remediation action selection/execution in governance rounds
|
|
639
|
+
- `--program-min-quality-score <n>`: minimum semantic decomposition quality score before automatic refinement (`0-100`, default `70`)
|
|
640
|
+
- `--program-quality-gate`: fail run when final decomposition quality remains below `--program-min-quality-score`
|
|
641
|
+
- `--recovery-memory-scope <scope>`: scope key for recovery memory isolation (default auto: project + git branch)
|
|
642
|
+
- Supports shared close-loop options (`--subs`, `--max-parallel`, `--dod*`, `--replan*`, `--dry-run`, `--json`, `--out`)
|
|
643
|
+
- `--program-kpi-out <path>`: write a standalone program KPI snapshot JSON (`convergence_state`, `risk_level`, retry recovery, complexity ratio, wait profile)
|
|
644
|
+
- `--program-audit-out <path>`: write a program audit JSON (`program_coordination`, `recovery_cycle`, `program_gate`, and selected strategy metadata)
|
|
645
|
+
- Program summary includes `program_kpi`, `program_gate`, `program_gate_fallbacks`, `program_gate_effective`, and optional `program_kpi_file` / `program_audit_file` for portfolio-level observability pipelines.
|
|
646
|
+
- `program_gate` now supports unified budget checks (success/risk + elapsed time + agent budget + total sub-spec ceiling).
|
|
647
|
+
- On gate/budget failure, summary can include `program_gate_auto_remediation` with auto patch/prune actions.
|
|
648
|
+
- With `--program-govern-until-stable`, summary additionally includes:
|
|
649
|
+
- `program_governance` (round history, stop reason, exhausted/converged state)
|
|
650
|
+
- `program_governance` includes action-selection metadata (`auto_action_enabled`, `action_selection_enabled`, `pinned_action_index`, per-round `selected_action*`).
|
|
651
|
+
- `program_kpi_trend` and `program_kpi_anomalies` (anomaly-aware governance context, including `rate-limit-spike` pressure that can auto-reduce `batchParallel`/`batchAgentBudget`).
|
|
652
|
+
- Program summary includes `program_diagnostics` with `failure_clusters` and `remediation_actions` (prioritized follow-up commands for convergence).
|
|
653
|
+
- Program summary includes `program_coordination` (master/sub topology, unresolved goal indexes, scheduler snapshot) and `auto_recovery` metadata.
|
|
654
|
+
|
|
655
|
+
Close-loop controller (`sce auto close-loop-controller [queue-file]`) options:
|
|
656
|
+
- `queue-file`: optional queue file path (default `.kiro/auto/close-loop-controller-goals.lines`)
|
|
657
|
+
- `--controller-resume <session-or-file>`: resume from persisted controller session (`latest`, session id, or file path)
|
|
658
|
+
- `--queue-format <auto|json|lines>`: queue parser mode (default `auto`)
|
|
659
|
+
- `--no-controller-dedupe`: disable duplicate broad-goal deduplication (default dedupe enabled)
|
|
660
|
+
- `--dequeue-limit <n>`: consume up to `n` goals per controller cycle (`1-100`, default `all` pending goals)
|
|
661
|
+
- `--wait-on-empty`: keep polling when queue is empty instead of stopping
|
|
662
|
+
- `--poll-seconds <n>`: polling interval for `--wait-on-empty` (`1-3600`, default `30`)
|
|
663
|
+
- `--max-cycles <n>`: max controller cycles (`1-100000`, default `1000`)
|
|
664
|
+
- `--max-minutes <n>`: elapsed-time budget in minutes (`1-10080`, default `120`)
|
|
665
|
+
- `--controller-lock-file <path>`: explicit lease lock file (default `<queue-file>.lock`)
|
|
666
|
+
- `--controller-lock-ttl-seconds <n>`: stale lock takeover threshold (`10-86400`, default `1800`)
|
|
667
|
+
- `--no-controller-lock`: disable controller lease lock (unsafe for concurrent controllers)
|
|
668
|
+
- `--stop-on-goal-failure`: stop immediately when one dequeued goal fails
|
|
669
|
+
- `--controller-session-id <id>`: set explicit persisted controller session id
|
|
670
|
+
- `--controller-session-keep <n>` / `--controller-session-older-than-days <n>`: retention policy for persisted controller sessions
|
|
671
|
+
- `--no-controller-session`: disable controller session persistence
|
|
672
|
+
- `--controller-out <path>`: write controller summary JSON
|
|
673
|
+
- `--controller-done-file <path>` / `--controller-failed-file <path>`: append completed/failed goals into line archives
|
|
674
|
+
- `--controller-print-program-summary`: print each nested `close-loop-program` summary during controller execution
|
|
675
|
+
- Supports program execution controls (`--program-*`, `--batch-*`, `--continue-on-error`, `--recovery-memory-scope`, `--dry-run`, `--json`) and runs each dequeued queue goal through full autonomous program flow.
|
|
676
|
+
- Summary includes controller telemetry (`history`, `results`, final `pending_goals`, `stop_reason`, `exhausted`, dedupe/lock/session metadata) plus optional done/failed archive file paths.
|
|
677
|
+
|
|
678
|
+
Close-loop recovery (`sce auto close-loop-recover [summary]`) options:
|
|
679
|
+
- `summary`: optional summary file path; defaults to `latest` persisted batch summary
|
|
680
|
+
- `--use-action <n>`: choose remediation action index from diagnostics (`1` by default)
|
|
681
|
+
- `--resume-strategy <pending|failed-only>`: control recovery goal scope from source summary
|
|
682
|
+
- `--recover-until-complete`: keep running recovery rounds until converged or max rounds reached
|
|
683
|
+
- `--recover-max-rounds <n>`: max recovery rounds for until-complete mode (`1-20`, default `5`)
|
|
684
|
+
- `--recover-max-minutes <n>`: elapsed-time budget for recovery loop (minutes, default unlimited)
|
|
685
|
+
- `--recovery-memory-ttl-days <n>`: prune stale recovery memory entries before auto action selection (`0-36500`)
|
|
686
|
+
- `--recovery-memory-scope <scope>`: scope key for recovery memory isolation (default auto: project + git branch)
|
|
687
|
+
- Supports batch controls (`--batch-parallel`, `--batch-agent-budget`, `--batch-priority`, `--batch-aging-factor`, `--batch-retry*`, `--no-batch-autonomous`)
|
|
688
|
+
- Supports spec retention controls (`--spec-session-keep`, `--spec-session-older-than-days`, `--no-spec-session-protect-active`)
|
|
689
|
+
- Includes `--spec-session-protect-window-days` to tune recent-reference protection window.
|
|
690
|
+
- Includes `--spec-session-max-total` and optional `--spec-session-budget-hard-fail` for spec-count budget governance.
|
|
691
|
+
- Supports program gate controls (`--program-gate-profile`, `--program-gate-fallback-*`, `--program-min-success-rate`, `--program-max-risk-level`, `--program-max-elapsed-minutes`, `--program-max-agent-budget`, `--program-max-total-sub-specs`)
|
|
692
|
+
- Includes `--no-program-gate-auto-remediate` to disable automatic remediation hints/prune attempts.
|
|
693
|
+
- Supports quality/session controls (`--dod*`, `--replan*`, `--batch-session*`, `--program-kpi-out`, `--program-audit-out`, `--out`, `--dry-run`, `--json`)
|
|
694
|
+
- If `--use-action` is omitted, KSE automatically selects remediation action from learned recovery memory when available.
|
|
695
|
+
- Output includes `recovered_from_summary`, `recovery_plan` (`applied_patch`, available remediation actions, `selection_source`, `selection_explain`), `recovery_cycle` (round history, convergence/exhausted state, elapsed/budget metadata), and `recovery_memory` (signature, scope, action stats, selection explanation).
|
|
696
|
+
|
|
697
|
+
Close-loop session maintenance:
|
|
698
|
+
- `sce auto session list [--limit <n>] [--status <csv>] [--json]`: list persisted close-loop sessions (`--status` supports comma-separated, case-insensitive filters)
|
|
699
|
+
- `sce auto session stats [--days <n>] [--status <csv>] [--json]`: aggregate persisted close-loop session telemetry within an optional recent-day window
|
|
700
|
+
- `sce auto session prune [--keep <n>] [--older-than-days <n>] [--dry-run] [--json]`: prune old session snapshots
|
|
701
|
+
- List JSON output includes `status_filter` and `status_counts` over filtered sessions.
|
|
702
|
+
- Stats JSON output includes `criteria`, completion/failure rates, `sub_spec_count_sum`, `master_spec_counts`, and `latest_sessions`.
|
|
703
|
+
|
|
704
|
+
Spec directory maintenance:
|
|
705
|
+
- `sce auto spec-session list [--limit <n>] [--json]`: list persisted spec directories under `.kiro/specs`
|
|
706
|
+
- `sce auto spec-session prune [--keep <n>] [--older-than-days <n>] [--no-protect-active] [--protect-window-days <n>] [--show-protection-reasons] [--dry-run] [--json]`: prune old spec directories by retention policy (default protects active/recent specs)
|
|
707
|
+
- Protection sources include collaboration state, close-loop sessions, batch summaries, and controller sessions (via nested batch summary references).
|
|
708
|
+
- JSON output always includes `protection_ranking_top` (top protected specs by reason count); `--show-protection-reasons` additionally includes per-spec `reasons` and full `protection_ranking`.
|
|
709
|
+
- Batch/program/recover summaries can include `spec_session_budget` telemetry when `--spec-session-max-total` is configured.
|
|
710
|
+
|
|
711
|
+
Close-loop batch session maintenance:
|
|
712
|
+
- `sce auto batch-session list [--limit <n>] [--status <csv>] [--json]`: list persisted close-loop-batch summary sessions (`--status` supports comma-separated, case-insensitive filters)
|
|
713
|
+
- `sce auto batch-session stats [--days <n>] [--status <csv>] [--json]`: aggregate persisted close-loop-batch summary telemetry within an optional recent-day window
|
|
714
|
+
- `sce auto batch-session prune [--keep <n>] [--older-than-days <n>] [--dry-run] [--json]`: prune old persisted batch summaries
|
|
715
|
+
- List JSON output includes `status_filter` and `status_counts` over filtered sessions.
|
|
716
|
+
- Stats JSON output includes `criteria`, completion/failure rates, goal-volume sums, processed ratio, and `latest_sessions`.
|
|
717
|
+
|
|
718
|
+
Close-loop controller session maintenance:
|
|
719
|
+
- `sce auto controller-session list [--limit <n>] [--status <csv>] [--json]`: list persisted close-loop-controller summary sessions (`--status` supports comma-separated, case-insensitive filters)
|
|
720
|
+
- `sce auto controller-session stats [--days <n>] [--status <csv>] [--json]`: aggregate persisted close-loop-controller status/throughput telemetry within an optional recent-day window
|
|
721
|
+
- `sce auto controller-session prune [--keep <n>] [--older-than-days <n>] [--dry-run] [--json]`: prune old persisted controller summaries
|
|
722
|
+
- List JSON output includes `status_filter` and `status_counts` over filtered sessions.
|
|
723
|
+
- Stats JSON output includes `criteria`, `status_counts`, `queue_format_counts`, completion/failure rates, goal-volume sums, and `latest_sessions`.
|
|
724
|
+
|
|
725
|
+
Cross-archive autonomous governance maintenance:
|
|
726
|
+
- `sce auto governance stats [--days <n>] [--status <csv>] [--json]`: aggregate a unified governance snapshot from session/batch-session/controller-session archives plus recovery memory state.
|
|
727
|
+
- JSON output includes `totals`, `throughput`, `health` (`risk_level`, `concerns`, `recommendations`, `release_gate`), `top_master_specs`, `recovery_memory`, and full per-archive stats under `archives`.
|
|
728
|
+
- `sce auto governance maintain [--days <n>] [--status <csv>] [--session-keep <n>] [--batch-session-keep <n>] [--controller-session-keep <n>] [--recovery-memory-older-than-days <n>] [--apply] [--dry-run] [--json]`: run governance-maintenance planning and optional execution in one command.
|
|
729
|
+
- Plan-only mode is default; add `--apply` to execute maintenance actions (`session prune`, `batch-session prune`, `controller-session prune`, `recovery-memory prune`).
|
|
730
|
+
- When release gate is blocked, plan output prioritizes release remediation advisories (`release-gate-evidence-review`, `release-gate-scene-batch-remediate`) before routine cleanup actions.
|
|
731
|
+
- JSON output includes `assessment` (pre-maintenance governance snapshot), `plan`, `executed_actions`, `summary`, and `after_assessment` (only when `--apply` without `--dry-run`).
|
|
732
|
+
- `sce auto governance close-loop [--days <n>] [--status <csv>] [--session-keep <n>] [--batch-session-keep <n>] [--controller-session-keep <n>] [--recovery-memory-older-than-days <n>] [--max-rounds <n>] [--target-risk <low|medium|high>] [--governance-resume <session|latest|file>] [--governance-resume-allow-drift] [--governance-session-id <id>] [--no-governance-session] [--governance-session-keep <n>] [--governance-session-older-than-days <n>] [--execute-advisory] [--advisory-recover-max-rounds <n>] [--advisory-controller-max-cycles <n>] [--plan-only] [--dry-run] [--json]`: run governance rounds until stop condition (target risk reached, release gate blocked, no actionable maintenance/advisory, non-mutating mode, maintenance/advisory failures, or max rounds).
|
|
733
|
+
- `--plan-only` runs a single non-mutating planning round.
|
|
734
|
+
- Governance close-loop sessions are persisted by default at `.kiro/auto/governance-close-loop-sessions/*.json`; use `--governance-resume` to continue interrupted governance loops.
|
|
735
|
+
- On resume, KSE reuses persisted policy defaults (`target_risk`, `execute_advisory`, `advisory_policy`) unless explicitly overridden. Explicit policy drift is blocked by default; add `--governance-resume-allow-drift` to force override.
|
|
736
|
+
- `--governance-session-keep` (with optional `--governance-session-older-than-days`) enables post-run governance session retention pruning while protecting the current session snapshot.
|
|
737
|
+
- `--execute-advisory` enables automatic advisory action execution (`recover-latest`, `controller-resume-latest`) when governance assessment detects failed sessions or controller pending goals; KSE auto-selects the latest actionable advisory source and reports `skipped` (not `failed`) when no actionable source exists.
|
|
738
|
+
- JSON output includes round-by-round risk/action telemetry (`rounds`, with `risk_before/risk_after` and `release_gate_before/release_gate_after`), advisory telemetry (`execute_advisory`, `advisory_policy`, `advisory_summary`, `rounds[*].advisory_actions`), `stop_detail` + `recommendations` for explicit blocking reasons, plus `initial_assessment`, `final_assessment`, and convergence metadata.
|
|
739
|
+
- `sce auto governance session list [--limit <n>] [--status <csv>] [--resume-only] [--json]`: list persisted governance close-loop sessions (`--resume-only` filters to resumed-chain sessions only).
|
|
740
|
+
- `sce auto governance session stats [--days <n>] [--status <csv>] [--resume-only] [--json]`: aggregate governance close-loop session telemetry (completion/failure/convergence, rounds, risk/stop composition, resumed-chain ratios/source counts, and aggregated `release_gate` round telemetry trends).
|
|
741
|
+
- `sce auto governance session prune [--keep <n>] [--older-than-days <n>] [--dry-run] [--json]`: prune governance close-loop session archive by retention policy.
|
|
742
|
+
|
|
743
|
+
Close-loop recovery memory maintenance:
|
|
744
|
+
- `sce auto recovery-memory show [--scope <scope>] [--json]`: inspect persisted recovery signatures/actions and aggregate stats (optionally scoped)
|
|
745
|
+
- `sce auto recovery-memory scopes [--json]`: inspect aggregated recovery-memory statistics grouped by scope
|
|
746
|
+
- `sce auto recovery-memory prune [--older-than-days <n>] [--scope <scope>] [--dry-run] [--json]`: prune stale recovery memory entries (optionally scoped)
|
|
747
|
+
- `sce auto recovery-memory clear [--json]`: clear persisted recovery memory state
|
|
748
|
+
|
|
749
|
+
Autonomous KPI trend:
|
|
750
|
+
- `sce auto kpi trend [--weeks <n>] [--mode <all|batch|program|recover|controller>] [--period <week|day>] [--csv] [--out <path>] [--json]`: aggregate periodic KPI trend from persisted autonomous summary sessions.
|
|
751
|
+
- `--period <week|day>` selects weekly (default) or daily buckets.
|
|
752
|
+
- `--csv` prints CSV rows to stdout and writes CSV when used with `--out` (JSON remains default).
|
|
753
|
+
- JSON output includes `mode_breakdown` (batch/program/recover/controller/other run distribution), `anomaly_detection`, and flattened `anomalies` (latest-period regression checks against historical baseline, including rate-limit pressure via `average_rate_limit_signals` / `average_rate_limit_backoff_ms`).
|
|
754
|
+
|
|
755
|
+
Unified observability snapshot:
|
|
756
|
+
- `sce auto observability snapshot [--days <n>] [--status <csv>] [--weeks <n>] [--trend-mode <mode>] [--trend-period <period>] [--out <path>] [--json]`: generate one unified observability snapshot that combines close-loop session stats, batch stats, controller stats, governance session stats, governance health, and KPI trend.
|
|
757
|
+
- JSON output includes top-level `highlights` plus detailed archive/trend payloads under `snapshots`.
|
|
758
|
+
|
|
759
|
+
Agent-facing spec interfaces:
|
|
760
|
+
- `sce auto spec status <spec-name> [--json]`: structured status for one spec (`docs`, `task_progress`, `collaboration`, `health`).
|
|
761
|
+
- `sce auto spec instructions <spec-name> [--json]`: machine-readable execution instructions for one spec (`next_actions`, `priority_open_tasks`, recommended commands, document excerpts).
|
|
762
|
+
|
|
763
|
+
Autonomous archive schema compatibility:
|
|
764
|
+
- `sce auto schema check [--only <scopes>] [--json]`: scan archive schema compatibility (`schema_version`) for `close-loop-session`, `batch-session`, `controller-session`, and `governance-session`.
|
|
765
|
+
- `sce auto schema migrate [--only <scopes>] [--target-version <version>] [--apply] [--json]`: migrate/backfill `schema_version` across autonomous archives.
|
|
766
|
+
- Default mode is dry-run; use `--apply` to persist changes.
|
|
767
|
+
|
|
768
|
+
Dual-track handoff integration:
|
|
769
|
+
- `sce auto handoff plan --manifest <path> [--out <path>] [--strict] [--strict-warnings] [--json]`: parse handoff manifest (source project, specs, templates, known gaps) and generate an executable KSE integration phase plan.
|
|
770
|
+
- `sce auto handoff queue --manifest <path> [--out <path>] [--append] [--no-include-known-gaps] [--dry-run] [--json]`: generate close-loop batch goal queue from handoff manifest and optionally persist line-based queue file (default `.kiro/auto/handoff-goals.lines`).
|
|
771
|
+
- `sce auto handoff template-diff --manifest <path> [--json]`: compare manifest templates against local template exports/registry and report `missing_in_local` and `extra_in_local`.
|
|
772
|
+
- `sce auto handoff capability-matrix --manifest <path> [--strict] [--strict-warnings] [--min-capability-coverage <n>] [--min-capability-semantic <n>] [--no-require-capability-semantic] [--format <json|markdown>] [--out <path>] [--remediation-queue-out <path>] [--fail-on-gap] [--json]`: generate a fast Moqui capability matrix (`template-diff + baseline + capability coverage + semantic completeness`) and optionally fail fast on gaps.
|
|
773
|
+
- `sce auto handoff run --manifest <path> [--out <path>] [--queue-out <path>] [--append] [--no-include-known-gaps] [--continue-from <session|latest|file>] [--continue-strategy <auto|pending|failed-only>] [--dry-run] [--strict] [--strict-warnings] [--no-dependency-batching] [--min-spec-success-rate <n>] [--max-risk-level <level>] [--no-require-ontology-validation] [--no-require-moqui-baseline] [--min-capability-coverage <n>] [--no-require-capability-coverage] [--require-release-gate-preflight] [--release-evidence-window <n>] [--json]`: execute handoff end-to-end (`plan -> queue -> close-loop-batch -> observability`) with automatic report archive to `.kiro/reports/handoff-runs/<session>.json`.
|
|
774
|
+
- Default mode is dependency-aware: spec integration goals are grouped into dependency batches and executed in topological order.
|
|
775
|
+
- `--continue-from` resumes pending goals from an existing handoff run report (`latest`, session id, or JSON file path). For safety, KSE enforces manifest-path consistency between the previous report and current run.
|
|
776
|
+
- `--continue-strategy auto|pending|failed-only` controls resumed scope. `auto` (default) derives the best strategy from prior run state (`pending` when unprocessed/planned goals exist, otherwise `failed-only` for pure failure replay).
|
|
777
|
+
- Non-dry runs auto-merge release evidence into `.kiro/reports/release-evidence/handoff-runs.json` with session-level gate/ontology/regression/moqui-baseline/capability-coverage snapshots. Merge failures are recorded as warnings without aborting the run.
|
|
778
|
+
- `--release-evidence-window` controls trend snapshot window size (2-50, default `5`) used in merged release evidence (`latest_trend_window` and per-session `trend_window`).
|
|
779
|
+
- Run output includes `moqui_baseline` snapshot by default, with artifacts at `.kiro/reports/release-evidence/moqui-template-baseline.json` and `.kiro/reports/release-evidence/moqui-template-baseline.md`.
|
|
780
|
+
- Run output includes `moqui_capability_coverage` snapshot by default (when manifest `capabilities` is declared), with artifacts at `.kiro/reports/release-evidence/moqui-capability-coverage.json` and `.kiro/reports/release-evidence/moqui-capability-coverage.md`.
|
|
781
|
+
- Run output includes `release_gate_preflight` (latest release gate history signal snapshot + blocked reasons) and carries this context into `warnings`.
|
|
782
|
+
- `release_gate_preflight` is advisory by default; use `--require-release-gate-preflight` to hard-fail when preflight is unavailable/blocked.
|
|
783
|
+
- When Moqui baseline/capability gates fail, KSE auto-generates remediation queue lines at `.kiro/auto/moqui-remediation.lines`.
|
|
784
|
+
- Run result includes `failure_summary` (failed phase/gate/release-gate preflight highlights) and `recommendations` with executable follow-up commands (for example, auto-generated `--continue-from <session>` on failed/incomplete batches).
|
|
785
|
+
- Gate defaults: `--min-spec-success-rate` defaults to `100`, `--max-risk-level` defaults to `high`, ontology validation requirement is enabled by default, Moqui baseline requirement is enabled by default, and capability coverage minimum defaults to `100` when manifest `capabilities` is declared.
|
|
786
|
+
- Use `--no-require-ontology-validation`, `--no-require-moqui-baseline`, or `--no-require-capability-coverage` only for emergency bypass.
|
|
787
|
+
- `sce auto handoff regression [--session-id <id|latest>] [--window <n>] [--format <json|markdown>] [--out <path>] [--json]`: compare one handoff run report with its previous run and output trend deltas (success-rate/risk/failed-goals/elapsed time).
|
|
788
|
+
- `--window` (2-50, default `2`) returns multi-run `series`, `window_trend`, and `aggregates` for broader regression visibility.
|
|
789
|
+
- Regression JSON now includes `risk_layers` (low/medium/high/unknown buckets with per-layer session list and quality aggregates).
|
|
790
|
+
- `--format` supports `json` (default) and `markdown` for human-readable report rendering.
|
|
791
|
+
- Markdown report includes `Trend Series` (ASCII success/ontology bars per session) and `Risk Layer View`.
|
|
792
|
+
- `--out` writes the generated regression report using the selected format.
|
|
793
|
+
- Output includes `recommendations` to guide next action when trend degrades or risk escalates.
|
|
794
|
+
- `sce auto handoff evidence [--file <path>] [--session-id <id|latest>] [--window <n>] [--format <json|markdown>] [--out <path>] [--json]`: quick-review merged release evidence and render current-batch gate/ontology/regression/moqui-baseline/capability-coverage/risk-layer overview.
|
|
795
|
+
- Default evidence file is `.kiro/reports/release-evidence/handoff-runs.json`.
|
|
796
|
+
- `--window` (1-50, default `5`) controls how many recent sessions are aggregated in review.
|
|
797
|
+
- JSON output includes `current_overview` (with `release_gate_preflight`, `failure_summary`, and preflight policy flags), `aggregates.status_counts`, `aggregates.gate_pass_rate_percent`, and `risk_layers`.
|
|
798
|
+
- Markdown output includes `Current Gate`, `Current Release Gate Preflight`, `Current Failure Summary`, `Current Ontology`, `Current Regression`, `Current Moqui Baseline`, `Current Capability Coverage`, `Trend Series`, and `Risk Layer View`.
|
|
799
|
+
- Add `--release-draft <path>` to auto-generate a release notes draft and evidence review markdown in one run.
|
|
800
|
+
- `--release-version` sets draft version tag (defaults to `v<package.json version>`), and `--release-date` accepts `YYYY-MM-DD` (default: current UTC date).
|
|
801
|
+
- Use `--review-out <path>` to override the generated evidence review markdown path (default `.kiro/reports/release-evidence/handoff-evidence-review.md`).
|
|
802
|
+
- `sce auto handoff gate-index [--dir <path>] [--history-file <path>] [--keep <n>] [--out <path>] [--json]`: aggregate `release-gate-*.json` audits into a cross-version history index.
|
|
803
|
+
- Default scan dir is `.kiro/reports/release-evidence`, default output file is `.kiro/reports/release-evidence/release-gate-history.json`.
|
|
804
|
+
- `--history-file` merges an existing index (for example, previous release asset) before dedup/refresh.
|
|
805
|
+
- `--keep` retains latest N entries (`1-5000`, default `200`).
|
|
806
|
+
- Aggregates include scene package batch, drift, and release-preflight/hard-gate signals (`scene_package_batch_*`, `drift_alert_*`, `drift_block_*`, `release_gate_preflight_*`) when present in gate reports.
|
|
807
|
+
- `--markdown-out <path>` writes a human-readable trend card markdown for PR/Issue handoff.
|
|
808
|
+
|
|
809
|
+
Recommended `.kiro/config/orchestrator.json`:
|
|
810
|
+
|
|
811
|
+
```json
|
|
812
|
+
{
|
|
813
|
+
"agentBackend": "codex",
|
|
814
|
+
"maxParallel": 3,
|
|
815
|
+
"timeoutSeconds": 900,
|
|
816
|
+
"maxRetries": 2,
|
|
817
|
+
"rateLimitMaxRetries": 6,
|
|
818
|
+
"rateLimitBackoffBaseMs": 1000,
|
|
819
|
+
"rateLimitBackoffMaxMs": 30000,
|
|
820
|
+
"rateLimitAdaptiveParallel": true,
|
|
821
|
+
"rateLimitParallelFloor": 1,
|
|
822
|
+
"rateLimitCooldownMs": 30000,
|
|
823
|
+
"apiKeyEnvVar": "CODEX_API_KEY",
|
|
824
|
+
"codexArgs": ["--skip-git-repo-check"],
|
|
825
|
+
"codexCommand": "npx @openai/codex"
|
|
826
|
+
}
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
`rateLimit*` settings provide dedicated retry/backoff and adaptive parallel throttling when providers return 429 / too-many-requests errors. Engine retry now also honors `Retry-After` / `try again in ...` hints from provider error messages when present, and pauses launching new pending specs during the active backoff window to reduce request bursts (launch hold remains active even if adaptive parallel throttling is disabled).
|
|
830
|
+
|
|
831
|
+
### Scene Template Engine
|
|
832
|
+
|
|
833
|
+
```bash
|
|
834
|
+
# Validate template variable schema in a scene package
|
|
835
|
+
sce scene template-validate --package <path>
|
|
836
|
+
sce scene template-validate --package ./my-package --json
|
|
837
|
+
|
|
838
|
+
# Resolve inheritance chain and display merged variable schema
|
|
839
|
+
sce scene template-resolve --package <name>
|
|
840
|
+
sce scene template-resolve --package scene-erp-inventory --json
|
|
841
|
+
|
|
842
|
+
# Render template package with variable substitution
|
|
843
|
+
sce scene template-render --package <name> --values <json-or-path> --out <dir>
|
|
844
|
+
sce scene template-render --package scene-erp --values '{"entity_name":"Order"}' --out ./output --json
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
### Scene Package Batch Publish
|
|
848
|
+
|
|
849
|
+
```bash
|
|
850
|
+
# Publish scene package templates from a handoff manifest
|
|
851
|
+
# Defaults: completed specs only + ontology validation required + ontology batch gate (avg>=70, valid-rate>=100%)
|
|
852
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --json
|
|
853
|
+
|
|
854
|
+
# Optional convenience preset for 331-style path conventions (manifest/docs fallback paths)
|
|
855
|
+
sce scene package-publish-batch --from-331 --json
|
|
856
|
+
|
|
857
|
+
# Preview batch publish plan without writing template files
|
|
858
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --dry-run --json
|
|
859
|
+
|
|
860
|
+
# Publish selected specs only
|
|
861
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --include 62-00-moqui-full-capability-closure-program,62-01-moqui-capability-itemized-parity-matrix --json
|
|
862
|
+
|
|
863
|
+
# Disable status filter and use docs/* fallback paths for manifest entries missing scene paths
|
|
864
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --status all --fallback-spec-package docs/scene-package.json --fallback-scene-manifest docs/scene.yaml --force --json
|
|
865
|
+
|
|
866
|
+
# Read specs from non-standard manifest path
|
|
867
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --manifest-spec-path handoff.spec_items --json
|
|
868
|
+
|
|
869
|
+
# Tighten per-spec ontology semantic quality threshold before publish
|
|
870
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --ontology-min-score 70 --json
|
|
871
|
+
|
|
872
|
+
# Persist ontology/publish batch report for governance tracking
|
|
873
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --dry-run --ontology-report-out .kiro/reports/scene-package-ontology-batch.json --json
|
|
874
|
+
|
|
875
|
+
# Enforce batch-level ontology portfolio gate (average score + valid-rate)
|
|
876
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --dry-run --ontology-min-average-score 60 --ontology-min-valid-rate 90 --json
|
|
877
|
+
|
|
878
|
+
# Emergency bypass (not recommended): disable ontology validation requirement
|
|
879
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --no-require-ontology-validation --json
|
|
880
|
+
|
|
881
|
+
# Export ontology remediation task draft markdown
|
|
882
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --dry-run --ontology-task-out .kiro/reports/scene-package-ontology-task-draft.md --json
|
|
883
|
+
|
|
884
|
+
# Export ontology remediation queue lines (directly consumable by close-loop-batch)
|
|
885
|
+
sce scene package-publish-batch --manifest docs/handoffs/handoff-manifest.json --dry-run --ontology-task-queue-out .kiro/auto/ontology-remediation.lines --json
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
### Scene Package Ontology Backfill Batch
|
|
889
|
+
|
|
890
|
+
```bash
|
|
891
|
+
# Backfill ontology_model from a handoff manifest (commit mode)
|
|
892
|
+
sce scene package-ontology-backfill-batch --manifest docs/handoffs/handoff-manifest.json --spec-package-path docs/scene-package.json --json
|
|
893
|
+
|
|
894
|
+
# Use 331-poc preset defaults in dry-run mode
|
|
895
|
+
sce scene package-ontology-backfill-batch --from-331 --dry-run --json
|
|
896
|
+
|
|
897
|
+
# Backfill selected specs only
|
|
898
|
+
sce scene package-ontology-backfill-batch --from-331 --include 62-00-moqui-full-capability-closure-program,62-01-moqui-capability-itemized-parity-matrix --dry-run --json
|
|
899
|
+
|
|
900
|
+
# Export detailed backfill report for governance review
|
|
901
|
+
sce scene package-ontology-backfill-batch --from-331 --dry-run --out-report .kiro/reports/scene-package-ontology-backfill-report.json --json
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
### Moqui Template Baseline Scorecard
|
|
905
|
+
|
|
906
|
+
```bash
|
|
907
|
+
# Preferred CLI entry: score Moqui/ERP templates in the local template library (default filter: moqui|erp)
|
|
908
|
+
sce scene moqui-baseline --json
|
|
909
|
+
|
|
910
|
+
# Script alias (same behavior)
|
|
911
|
+
npm run report:moqui-baseline
|
|
912
|
+
|
|
913
|
+
# Score all scene templates instead of Moqui/ERP subset
|
|
914
|
+
sce scene moqui-baseline --include-all --json
|
|
915
|
+
|
|
916
|
+
# Customize score thresholds and output paths
|
|
917
|
+
sce scene moqui-baseline \
|
|
918
|
+
--min-score 75 \
|
|
919
|
+
--min-valid-rate 100 \
|
|
920
|
+
--out .kiro/reports/moqui-template-baseline.json \
|
|
921
|
+
--markdown-out .kiro/reports/moqui-template-baseline.md \
|
|
922
|
+
--json
|
|
923
|
+
|
|
924
|
+
# Compare with a previous baseline and fail CI on portfolio gate fail
|
|
925
|
+
sce scene moqui-baseline \
|
|
926
|
+
--compare-with .kiro/reports/release-evidence/moqui-template-baseline-prev.json \
|
|
927
|
+
--fail-on-portfolio-fail \
|
|
928
|
+
--json
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
Release workflow default:
|
|
932
|
+
- Publishes `moqui-template-baseline.json` + `moqui-template-baseline.md` as release assets.
|
|
933
|
+
- Enforces baseline portfolio gate by default (`KSE_MOQUI_BASELINE_ENFORCE` defaults to `true` when unset).
|
|
934
|
+
|
|
935
|
+
### Moqui ERP Integration
|
|
936
|
+
|
|
937
|
+
```bash
|
|
938
|
+
# Test connectivity and authentication to Moqui ERP instance
|
|
939
|
+
sce scene connect --config <path>
|
|
940
|
+
sce scene connect --config ./moqui-config.json --json
|
|
941
|
+
|
|
942
|
+
# Discover available entities, services, and screens from Moqui ERP
|
|
943
|
+
sce scene discover --config <path>
|
|
944
|
+
sce scene discover --config ./moqui-config.json --type entities --json
|
|
945
|
+
|
|
946
|
+
# Extract scene templates from Moqui ERP instance
|
|
947
|
+
sce scene extract --config <path> --out <dir>
|
|
948
|
+
sce scene extract --config ./moqui-config.json --type entities --pattern crud --out ./templates --json
|
|
949
|
+
sce scene extract --config ./moqui-config.json --dry-run --json
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### Scene Template Quality Pipeline
|
|
953
|
+
|
|
954
|
+
```bash
|
|
955
|
+
# Lint scene package for quality issues (10-category checks)
|
|
956
|
+
sce scene lint --package <path>
|
|
957
|
+
sce scene lint --package ./my-scene-package --json
|
|
958
|
+
sce scene lint --package ./my-scene-package --strict
|
|
959
|
+
|
|
960
|
+
# Calculate quality score (0-100, 5-dimension scoring with agent_readiness)
|
|
961
|
+
sce scene score --package <path>
|
|
962
|
+
sce scene score --package ./my-scene-package --json
|
|
963
|
+
sce scene score --package ./my-scene-package --strict
|
|
964
|
+
|
|
965
|
+
# One-stop contribute pipeline: validate → lint → score → preview → publish
|
|
966
|
+
sce scene contribute --package <path>
|
|
967
|
+
sce scene contribute --package ./my-scene-package --registry ./registry --json
|
|
968
|
+
sce scene contribute --package ./my-scene-package --dry-run
|
|
969
|
+
sce scene contribute --package ./my-scene-package --skip-lint --json
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
### Scene Ontology Enhancement
|
|
973
|
+
|
|
974
|
+
```bash
|
|
975
|
+
# Show ontology graph (nodes and edges) from scene manifest
|
|
976
|
+
sce scene ontology show --package <path>
|
|
977
|
+
sce scene ontology show --package ./my-scene-package --json
|
|
978
|
+
|
|
979
|
+
# Query dependency chain for a specific node reference
|
|
980
|
+
sce scene ontology deps --package <path> --ref <node-ref>
|
|
981
|
+
sce scene ontology deps --package ./my-scene-package --ref entity:Order --json
|
|
982
|
+
|
|
983
|
+
# Analyze reverse dependency impact radius (what will be affected)
|
|
984
|
+
sce scene ontology impact --package <path> --ref <node-ref>
|
|
985
|
+
sce scene ontology impact --package ./my-scene-package --ref service:createOrder --relation depends_on,composes --max-depth 2 --json
|
|
986
|
+
|
|
987
|
+
# Find shortest ontology relation path between two refs
|
|
988
|
+
sce scene ontology path --package <path> --from <source-ref> --to <target-ref>
|
|
989
|
+
sce scene ontology path --package ./my-scene-package --from service:createOrder --to entity:Order --undirected --json
|
|
990
|
+
|
|
991
|
+
# Validate ontology graph (detect dangling edges, cycles)
|
|
992
|
+
sce scene ontology validate --package <path>
|
|
993
|
+
sce scene ontology validate --package ./my-scene-package --json
|
|
994
|
+
|
|
995
|
+
# Show action abstraction info (inputs, outputs, side-effects)
|
|
996
|
+
sce scene ontology actions --package <path>
|
|
997
|
+
sce scene ontology actions --package ./my-scene-package --ref service:createOrder --json
|
|
998
|
+
|
|
999
|
+
# Parse and display data lineage (source → transform → sink)
|
|
1000
|
+
sce scene ontology lineage --package <path>
|
|
1001
|
+
sce scene ontology lineage --package ./my-scene-package --ref entity:Order --json
|
|
1002
|
+
|
|
1003
|
+
# Show agent hints (autonomous operation guidance)
|
|
1004
|
+
sce scene ontology agent-info --package <path>
|
|
1005
|
+
sce scene ontology agent-info --package ./my-scene-package --json
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
### Version & Upgrade
|
|
1009
|
+
|
|
1010
|
+
```bash
|
|
1011
|
+
# Show version info
|
|
1012
|
+
sce version-info
|
|
1013
|
+
|
|
1014
|
+
# Check for upgrades
|
|
1015
|
+
sce upgrade check
|
|
1016
|
+
|
|
1017
|
+
# Perform upgrade
|
|
1018
|
+
sce upgrade
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
---
|
|
1022
|
+
|
|
1023
|
+
## Global Options
|
|
1024
|
+
|
|
1025
|
+
```bash
|
|
1026
|
+
# Set language
|
|
1027
|
+
sce --lang zh <command>
|
|
1028
|
+
sce --lang en <command>
|
|
1029
|
+
|
|
1030
|
+
# Show help
|
|
1031
|
+
sce --help
|
|
1032
|
+
sce <command> --help
|
|
1033
|
+
|
|
1034
|
+
# Show version
|
|
1035
|
+
sce --version
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
## Common Workflows
|
|
1041
|
+
|
|
1042
|
+
### Starting a New Feature
|
|
1043
|
+
|
|
1044
|
+
```bash
|
|
1045
|
+
# 1. Bootstrap spec draft
|
|
1046
|
+
sce spec bootstrap --name 01-00-my-feature --non-interactive
|
|
1047
|
+
|
|
1048
|
+
# 2. Run spec pipeline
|
|
1049
|
+
sce spec pipeline run --spec 01-00-my-feature
|
|
1050
|
+
|
|
1051
|
+
# 3. Export context
|
|
1052
|
+
sce context export 01-00-my-feature
|
|
1053
|
+
|
|
1054
|
+
# 4. Work on tasks...
|
|
1055
|
+
|
|
1056
|
+
# 5. Sync progress
|
|
1057
|
+
sce workspace sync
|
|
1058
|
+
```
|
|
1059
|
+
|
|
1060
|
+
### Managing Multiple Projects
|
|
1061
|
+
|
|
1062
|
+
```bash
|
|
1063
|
+
# 1. Register your projects as workspaces
|
|
1064
|
+
sce workspace create project-a ~/projects/project-a
|
|
1065
|
+
sce workspace create project-b ~/projects/project-b
|
|
1066
|
+
|
|
1067
|
+
# 2. List all workspaces
|
|
1068
|
+
sce workspace list
|
|
1069
|
+
|
|
1070
|
+
# 3. Switch between projects
|
|
1071
|
+
sce workspace switch project-a
|
|
1072
|
+
|
|
1073
|
+
# 4. Check current workspace
|
|
1074
|
+
sce workspace info
|
|
1075
|
+
|
|
1076
|
+
# 5. Work on the active project...
|
|
1077
|
+
|
|
1078
|
+
# 6. Switch to another project
|
|
1079
|
+
sce workspace switch project-b
|
|
1080
|
+
```
|
|
1081
|
+
|
|
1082
|
+
### Setting Up Automation
|
|
1083
|
+
|
|
1084
|
+
```bash
|
|
1085
|
+
# 1. Initialize watch mode
|
|
1086
|
+
sce watch init
|
|
1087
|
+
|
|
1088
|
+
# 2. Install presets
|
|
1089
|
+
sce watch install auto-sync
|
|
1090
|
+
sce watch install test-runner
|
|
1091
|
+
|
|
1092
|
+
# 3. Start watching
|
|
1093
|
+
sce watch start
|
|
1094
|
+
|
|
1095
|
+
# 4. Check status
|
|
1096
|
+
sce watch status
|
|
1097
|
+
```
|
|
1098
|
+
|
|
1099
|
+
### Working with Team
|
|
1100
|
+
|
|
1101
|
+
```bash
|
|
1102
|
+
# 1. Check team status
|
|
1103
|
+
sce workspace team
|
|
1104
|
+
|
|
1105
|
+
# 2. Claim a task
|
|
1106
|
+
sce task claim 01-00-feature 1.1
|
|
1107
|
+
|
|
1108
|
+
# 3. Work on task...
|
|
1109
|
+
|
|
1110
|
+
# 4. Sync when done
|
|
1111
|
+
sce workspace sync
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
### Managing Multiple Environments
|
|
1115
|
+
|
|
1116
|
+
```bash
|
|
1117
|
+
# 1. Register your environments
|
|
1118
|
+
sce env register config/dev.json
|
|
1119
|
+
sce env register config/staging.json
|
|
1120
|
+
sce env register config/prod.json
|
|
1121
|
+
|
|
1122
|
+
# 2. List all environments
|
|
1123
|
+
sce env list
|
|
1124
|
+
|
|
1125
|
+
# 3. Switch to development environment
|
|
1126
|
+
sce env switch development
|
|
1127
|
+
|
|
1128
|
+
# 4. Check current environment
|
|
1129
|
+
sce env info
|
|
1130
|
+
|
|
1131
|
+
# 5. Verify environment is configured correctly
|
|
1132
|
+
sce env verify
|
|
1133
|
+
|
|
1134
|
+
# 6. Run commands in environment context
|
|
1135
|
+
sce env run "npm test"
|
|
1136
|
+
|
|
1137
|
+
# 7. Switch to staging for testing
|
|
1138
|
+
sce env switch staging
|
|
1139
|
+
|
|
1140
|
+
# 8. Rollback if something goes wrong
|
|
1141
|
+
sce env rollback
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
---
|
|
1145
|
+
|
|
1146
|
+
## Tips
|
|
1147
|
+
|
|
1148
|
+
1. **Use `sce` not compatibility aliases** (`sco` / `kse` / `kiro-spec-engine`) - Shorter and easier to type
|
|
1149
|
+
2. **Add `--help` to any command** - Get detailed usage information
|
|
1150
|
+
3. **Use tab completion** - Most shells support command completion
|
|
1151
|
+
4. **Check `sce doctor`** - Diagnose issues quickly
|
|
1152
|
+
5. **Use watch mode** - Automate repetitive tasks
|
|
1153
|
+
6. **Use workspace management** - Easily switch between multiple sce projects
|
|
1154
|
+
7. **Use environment management** - Manage dev, test, staging, prod configurations with automatic backup
|
|
1155
|
+
8. **Use multi-repo management** - Coordinate operations across multiple Git repositories
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
1159
|
+
## Detailed Command Documentation
|
|
1160
|
+
|
|
1161
|
+
### Multi-Repository Management Commands
|
|
1162
|
+
|
|
1163
|
+
#### `sce repo init`
|
|
1164
|
+
|
|
1165
|
+
Initialize repository configuration by scanning the project directory for Git repositories.
|
|
1166
|
+
|
|
1167
|
+
**Usage:**
|
|
1168
|
+
```bash
|
|
1169
|
+
sce repo init [options]
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
**Options:**
|
|
1173
|
+
- `--force` - Overwrite existing configuration without confirmation
|
|
1174
|
+
- `--depth <n>` - Maximum directory depth to scan (default: 3)
|
|
1175
|
+
|
|
1176
|
+
**Behavior:**
|
|
1177
|
+
- Scans project directory recursively for Git repositories
|
|
1178
|
+
- Excludes `.kiro` directory from scanning
|
|
1179
|
+
- Extracts remote URL from `origin` remote (or first available remote)
|
|
1180
|
+
- Detects current branch for each repository
|
|
1181
|
+
- Prompts for confirmation if configuration already exists (unless `--force`)
|
|
1182
|
+
- Creates `.kiro/project-repos.json` configuration file
|
|
1183
|
+
|
|
1184
|
+
**Example:**
|
|
1185
|
+
```bash
|
|
1186
|
+
# Initialize with default settings
|
|
1187
|
+
sce repo init
|
|
1188
|
+
|
|
1189
|
+
# Force overwrite without confirmation
|
|
1190
|
+
sce repo init --force
|
|
1191
|
+
|
|
1192
|
+
# Scan deeper directory structure
|
|
1193
|
+
sce repo init --depth 5
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
**Output:**
|
|
1197
|
+
```
|
|
1198
|
+
Scanning for Git repositories...
|
|
1199
|
+
Found 3 repositories:
|
|
1200
|
+
✓ frontend (main) - https://github.com/user/frontend.git
|
|
1201
|
+
✓ backend (develop) - https://github.com/user/backend.git
|
|
1202
|
+
✓ shared (main) - https://github.com/user/shared.git
|
|
1203
|
+
|
|
1204
|
+
Configuration saved to .kiro/project-repos.json
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
---
|
|
1208
|
+
|
|
1209
|
+
#### `sce repo status`
|
|
1210
|
+
|
|
1211
|
+
Display the Git status of all configured repositories.
|
|
1212
|
+
|
|
1213
|
+
**Usage:**
|
|
1214
|
+
```bash
|
|
1215
|
+
sce repo status [options]
|
|
1216
|
+
```
|
|
1217
|
+
|
|
1218
|
+
**Options:**
|
|
1219
|
+
- `--verbose` - Show detailed file-level changes
|
|
1220
|
+
- `--json` - Output in JSON format for scripting
|
|
1221
|
+
|
|
1222
|
+
**Output includes:**
|
|
1223
|
+
- Current branch name
|
|
1224
|
+
- Number of modified, added, and deleted files
|
|
1225
|
+
- Commits ahead/behind remote
|
|
1226
|
+
- Clean/dirty status indicator
|
|
1227
|
+
- Error status for inaccessible repositories
|
|
1228
|
+
|
|
1229
|
+
**Example:**
|
|
1230
|
+
```bash
|
|
1231
|
+
# Basic status
|
|
1232
|
+
sce repo status
|
|
1233
|
+
|
|
1234
|
+
# Detailed status with file changes
|
|
1235
|
+
sce repo status --verbose
|
|
1236
|
+
|
|
1237
|
+
# JSON output for automation
|
|
1238
|
+
sce repo status --json
|
|
1239
|
+
```
|
|
1240
|
+
|
|
1241
|
+
**Output:**
|
|
1242
|
+
```
|
|
1243
|
+
┌──────────┬─────────┬────────┬──────────┬───────┬────────┐
|
|
1244
|
+
│ Name │ Branch │ Status │ Modified │ Ahead │ Behind │
|
|
1245
|
+
├──────────┼─────────┼────────┼──────────┼───────┼────────┤
|
|
1246
|
+
│ frontend │ main │ Clean │ 0 │ 0 │ 0 │
|
|
1247
|
+
│ backend │ develop │ Dirty │ 3 │ 2 │ 0 │
|
|
1248
|
+
│ shared │ main │ Clean │ 0 │ 0 │ 1 │
|
|
1249
|
+
└──────────┴─────────┴────────┴──────────┴───────┴────────┘
|
|
1250
|
+
```
|
|
1251
|
+
|
|
1252
|
+
---
|
|
1253
|
+
|
|
1254
|
+
#### `sce repo exec`
|
|
1255
|
+
|
|
1256
|
+
Execute a Git command in all configured repositories.
|
|
1257
|
+
|
|
1258
|
+
**Usage:**
|
|
1259
|
+
```bash
|
|
1260
|
+
sce repo exec "<command>" [options]
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
**Options:**
|
|
1264
|
+
- `--dry-run` - Show commands without executing them
|
|
1265
|
+
- `--continue-on-error` - Continue even if commands fail (default: true)
|
|
1266
|
+
|
|
1267
|
+
**Behavior:**
|
|
1268
|
+
- Executes command sequentially in each repository
|
|
1269
|
+
- Displays output for each repository with clear separators
|
|
1270
|
+
- Continues with remaining repositories if one fails
|
|
1271
|
+
- Shows summary of successes and failures at the end
|
|
1272
|
+
|
|
1273
|
+
**Example:**
|
|
1274
|
+
```bash
|
|
1275
|
+
# Pull latest changes
|
|
1276
|
+
sce repo exec "git pull"
|
|
1277
|
+
|
|
1278
|
+
# Create and checkout new branch
|
|
1279
|
+
sce repo exec "git checkout -b feature/new-feature"
|
|
1280
|
+
|
|
1281
|
+
# Preview without executing
|
|
1282
|
+
sce repo exec "git push" --dry-run
|
|
1283
|
+
|
|
1284
|
+
# Fetch all remotes
|
|
1285
|
+
sce repo exec "git fetch --all"
|
|
1286
|
+
|
|
1287
|
+
# Show commit history
|
|
1288
|
+
sce repo exec "git log --oneline -5"
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
**Output:**
|
|
1292
|
+
```
|
|
1293
|
+
=== frontend ===
|
|
1294
|
+
Already up to date.
|
|
1295
|
+
|
|
1296
|
+
=== backend ===
|
|
1297
|
+
Updating abc123..def456
|
|
1298
|
+
Fast-forward
|
|
1299
|
+
src/api.js | 10 +++++-----
|
|
1300
|
+
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
1301
|
+
|
|
1302
|
+
=== shared ===
|
|
1303
|
+
Already up to date.
|
|
1304
|
+
|
|
1305
|
+
Summary: 3 succeeded, 0 failed
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
---
|
|
1309
|
+
|
|
1310
|
+
#### `sce repo health`
|
|
1311
|
+
|
|
1312
|
+
Perform health checks on all configured repositories.
|
|
1313
|
+
|
|
1314
|
+
**Usage:**
|
|
1315
|
+
```bash
|
|
1316
|
+
sce repo health [options]
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
**Options:**
|
|
1320
|
+
- `--json` - Output in JSON format for automation
|
|
1321
|
+
|
|
1322
|
+
**Checks performed:**
|
|
1323
|
+
- Path exists and is accessible
|
|
1324
|
+
- Directory is a valid Git repository
|
|
1325
|
+
- Remote URL is reachable (network check)
|
|
1326
|
+
- Default branch exists
|
|
1327
|
+
|
|
1328
|
+
**Example:**
|
|
1329
|
+
```bash
|
|
1330
|
+
# Run health check
|
|
1331
|
+
sce repo health
|
|
1332
|
+
|
|
1333
|
+
# JSON output for CI/CD
|
|
1334
|
+
sce repo health --json
|
|
1335
|
+
```
|
|
1336
|
+
|
|
1337
|
+
**Output:**
|
|
1338
|
+
```
|
|
1339
|
+
┌──────────┬──────────────┬────────────┬──────────────────┬───────────────┐
|
|
1340
|
+
│ Name │ Path Exists │ Git Repo │ Remote Reachable │ Branch Exists │
|
|
1341
|
+
├──────────┼──────────────┼────────────┼──────────────────┼───────────────┤
|
|
1342
|
+
│ frontend │ ✓ │ ✓ │ ✓ │ ✓ │
|
|
1343
|
+
│ backend │ ✓ │ ✓ │ ✓ │ ✓ │
|
|
1344
|
+
│ shared │ ✓ │ ✓ │ ✗ │ ✓ │
|
|
1345
|
+
└──────────┴──────────────┴────────────┴──────────────────┴───────────────┘
|
|
1346
|
+
|
|
1347
|
+
Overall Health: 2 healthy, 1 unhealthy
|
|
1348
|
+
```
|
|
1349
|
+
|
|
1350
|
+
---
|
|
1351
|
+
|
|
1352
|
+
## See Also
|
|
1353
|
+
|
|
1354
|
+
- [Multi-Repository Management Guide](./multi-repo-management-guide.md)
|
|
1355
|
+
- [Environment Management Guide](./environment-management-guide.md)
|
|
1356
|
+
- [Manual Workflows Guide](./manual-workflows-guide.md)
|
|
1357
|
+
- [Cross-Tool Guide](./cross-tool-guide.md)
|
|
1358
|
+
- [Adoption Guide](./adoption-guide.md)
|
|
1359
|
+
- [Developer Guide](./developer-guide.md)
|
|
1360
|
+
|
|
1361
|
+
---
|
|
1362
|
+
|
|
1363
|
+
**Need Help?**
|
|
1364
|
+
- Run `sce --help` for command reference
|
|
1365
|
+
- Check [GitHub Issues](https://github.com/heguangyong/scene-capability-engine/issues)
|
|
1366
|
+
- Review [Documentation](../README.md)
|
|
1367
|
+
|
|
1368
|
+
|