harden and streamline sm-flow protocol

This commit is contained in:
zhuyongxin
2026-05-25 11:44:20 +08:00
parent 54741dd6c0
commit 1f01e30c4e
20 changed files with 1102 additions and 88 deletions
@@ -0,0 +1,29 @@
## ADDED Requirements
### Requirement: Phase 1.5 checks cross-artifact alignment explicitly
SM Flow SHALL explicitly check alignment across requirement, design, specification, and execution artifacts during Phase 1.5.
#### Scenario: Alignment check runs
- **WHEN** Phase 1.5 reviews the current Draft OpenSpec
- **THEN** it checks that `brief/prd` aligns with `proposal`, `proposal` aligns with `design`, `design` aligns with `specs`, and `specs` align with `tasks`
#### Scenario: Alignment gap is found
- **WHEN** an expected behavior, term, field, constraint, or implementation slice appears in one artifact but not its downstream artifact
- **THEN** the flow marks the gap explicitly and repairs OpenSpec before entering the next phase
### Requirement: Phase 2.9 validates cross-artifact closure
SM Flow SHALL re-check cross-artifact closure during Phase 2.9 before implementation.
#### Scenario: Commit gate runs
- **WHEN** Phase 2.9 evaluates whether Draft OpenSpec can become Committed OpenSpec
- **THEN** it verifies that `evidence.md` and `decisions.md` findings that affect implementation are reflected in proposal, design, specs, or tasks
#### Scenario: User review would otherwise catch the gap
- **WHEN** a field, scope item, acceptance behavior, or design constraint is missing from the downstream OpenSpec artifacts
- **THEN** the flow SHALL fail the commit gate and return to the earlier phase that owns the missing update