zhuyongxin c9a6777340 sm-flow v4.2: add verifiable checkpoints and gate file mechanism
Based on real execution review (lookup-knowledge-integration), discovered
that constraints are "soft" - rules are clear but lack enforcement mechanism.

Core problem: Agent can skip stages despite explicit rules saying "must not skip"

Changes:
1. Commit phase: add verifiable checkpoint
   - File completeness check: proposal ≥50 words, design ≥1 data structure, specs ≥3 requirements, tasks ≥5 items
   - Consistency check: proposal concepts → design mapping, design decisions → tasks implementation
   - Gate file: create .committed after passing all checks

2. Apply phase: add pre-gate check
   - Hard constraint: check .committed file existence
   - If missing: report, list gaps, ask user to fix or explicitly skip
   - Block implementation based on incomplete OpenSpec

3. Archive phase: add mandatory execution order
   - 5-step checklist: devflow files → index → .archive-ready → report → archive
   - Self-check: verify Step 1-3 before Step 4
   - Prevent "handoff first, devflow forgotten" issue

New gate files:
- .committed: created by commit phase, checked by apply phase
- .archive-ready: created by archive Step 3

Expected impact:
- Commit skip rate: -100% (explicit checklist prevents fuzzy pass)
- Apply on incomplete OpenSpec: -100% (gate blocks)
- Archive devflow omission: -100% (mandatory order)

Design principles:
- Verifiability: "executable state" → "≥50 words + ≥1 structure + ≥3 requirements"
- Gate files: soft judgment → file existence check
- Mandatory order: advisory "should do" → 5-step checklist "must do"

Complexity: +80 lines (phase-contracts.md +40, archive-rules.md +40)
Approach: turn soft constraints into hard checks, no new stages

Relation to v4.1:
- v4.1: solve "insufficient research causes rework" (quality issue)
- v4.2: solve "lack of enforcement causes stage skipping" (process issue)

Docs:
- phase-contracts.md: enhanced commit + apply phases
- archive-rules.md: added mandatory execution order at top
- workflow.md: added v4.2 evolution chapter
- phase-contracts-v4.2-changelog.md: detailed change log
- sm-flow-optimization-suggestions.md: source review
2026-06-24 14:51:45 +08:00

github-learn

个人知识学习与 agent workflow 实验仓库。

当前核心内容

路径 作用
knowledge/entries/knowledge_YYYYMMDD_*/ 知识条目源文件与渲染 HTML
knowledge-index.html 知识索引页面,由 scripts/update-knowledge-index.sh 生成
scripts/ 本仓库维护脚本
openspec/ 当前 OpenSpec 变更工作区与归档
devflow/ 人类可读项目档案、glossary、复合知识
.agents/skills/ Codex/agent 使用的本地运行时 skills,当前重点是 sm-flow
.claude/skills/ Claude 版本 skills 与 OpenSpec skills
skill-workbench/ skill 创建、设计文档、历史文档与验证沙箱

上下文入口

  • 领域词汇表真理源:devflow/glossary/CONTEXT.md
  • 根目录 CONTEXT.md 仅保留兼容性重定向。

历史内容

  • skill-workbench/generated-skills/sm-flow/:本仓库新增的 sm-flow skill 源产物,只放可安装 skill 本体。
  • skill-workbench/generated-skills/skills/:早期 Explore Skill Family,只放 skill 本体。
  • skill-workbench/docs/sm-flow/workflow.md:sm-flow 的设计演进文档。
  • skill-workbench/docs/explore-essence-follow/latest-design.md:explore、essence、follow 三个学习型 skill 的最新设计总结。
  • .agents/skills/sm-flow/:sm-flow 的运行时安装副本,用于当前 Codex 会话加载。
  • skill-workbench/history/changelog/:早期 skill family 变更记录。
  • skill-workbench/history/docs/:早期设计、OpenSpec 与 agent 文档。
  • skill-workbench/validation/project/、skill-workbench/validation/tmp2/:验证 skill 时使用的第三方源码和临时报告。
  • skill-workbench/validation/skills-lock.json:验证安装 mattpocock skills 时生成的锁文件。
S
Description
No description provided
Readme
683 KiB
Languages
HTML 72.6%
Shell 13.9%
PowerShell 7%
Python 6.5%