-
Notifications
You must be signed in to change notification settings - Fork 60
Workflow and State Machine
MageByte edited this page Jul 22, 2026
·
1 revision
spec-superflow 将流程建模为 8 个明确状态:exploring、specifying、bridging、approved-for-build、executing、debugging、closing 与 abandoned。
stateDiagram-v2
[*] --> exploring
exploring --> specifying: full
exploring --> bridging: hotfix
exploring --> approved_for_build: tweak
specifying --> bridging
bridging --> approved_for_build
approved_for_build --> executing
executing --> debugging: bug/test failure
debugging --> executing
executing --> closing
state "approved-for-build" as approved_for_build
exploring → specifying → bridging → approved-for-build → executing → closing
- exploring:澄清问题、比较方案并确认范围。
- specifying:编写与验证规划工件。
- bridging:将规划压缩为 execution contract,并请求批准。
- approved-for-build:full/hotfix 还必须有已确认的 execution plan。
- executing:按 TDD、执行计划和 review gate 实现。
- closing:完成验证、规范同步与审计后的成功终态。
-
hotfix:适用于至多两个文件、没有新模块的修复;走
exploring → bridging → approved-for-build → executing,但仍需最小执行契约与 DP-3 批准。 -
tweak:适用于至多四个文件的配置/文档微调;可从
exploring直接到approved-for-build,不需要 execution plan 或 review receipt。
出现新范围、关键接口变化、错误设计假设或契约意图锁与 proposal 不一致时,必须回到 specifying 或 bridging。测试失败、bug 或异常行为必须进入 debugging,由 bug-investigator 做根因分析;三次以上修复失败时应升级给用户,而非随机继续试改。
closing 和 abandoned 都是终态。完成后的新范围应新建一个 change。