feat: spec 漂移自动修复(autofix)#2
Merged
Merged
Conversation
added 6 commits
June 8, 2026 12:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
原 spec-driftcheck 的漂移机制只"提醒/亮红灯",不更新 spec。本 PR 把它升级为自动起草修复 PR:漂移发现后由 Codex 改 anchors + spec.md,经确定性护栏与质量门后向主仓库提幂等 PR,合并权仍在人(Dependabot 模式)。
改动(5 commits)
feat(check):check新增--format json,输出结构化 findings 供下游消费(空 findings 输出[],exit code 语义不变)feat(scaffold): 新增 GHA workflow 模板spec-drift-autofix.yaml——每日 check → Codex 修复 → 护栏(只许改 spec/、禁改 drift-check.yaml)→ check 重跑质量门 →peter-evans/create-pull-request幂等 PR;为含${{ }}的 workflow 模板启用[[ ]]Go 模板定界符fix(scaffold): 护栏改用git status --porcelain,覆盖 agent 新建的未追踪文件feat(scaffold): 新增autofix-prompt.md修复任务书模板——消失 CRD 保留 REQ + 标记(不自动删)、新 CRD 起草 P2 草稿态(不标 planned)docs: playbook 第 6/7 步与已知坑、README 增补接入与试点判据设计要点
check是确定性验证器;PR 只在机器可判定层全绿时出现,人审只关注语义。设计与计划文档:
docs/superpowers/specs/2026-06-07-spec-drift-autofix-design.md、docs/superpowers/plans/2026-06-07-spec-drift-autofix.mdTest Plan
make test全绿(新增reportJSON 测试、scaffold workflow/prompt 渲染测试)${{ }}完好、零残留占位符OPENAI_API_KEY):按 playbook 第 7 步第 4 项验证四判据🤖 Generated with Claude Code