feat: shell discipline in dag block contracts - #432
Merged
Conversation
A delivery-freshness session ran `pnpm exec vitest … | tail -15`: the pipe buffers everything, pnpm/vitest cold start stayed silent past 15s, the operator interrupted twice, and the abort label "User aborted the command" sent the postmortem chasing a phantom manual cancel. - BLOCK_CONTRACTS gains a shared SHELL_DISCIPLINE sentence appended to the four command-heavy kinds (explore/debug/coding/verify) so both curated templates and ad-hoc drafts inherit it from one source of truth - shell.ts and session/prompt.ts now share one exported SHELL_ABORT_NOTE; its wording names the two possible interrupt origins instead of blaming the user, and repeats the bounding advice at the moment it matters - test assertions updated to the shared wording
LeXwDeX
marked this pull request as ready for review
August 24, 2026 08:18
…rness alignment) # Conflicts: # .specgit.yaml
# Conflicts: # .specgit.yaml
# Conflicts: # .specgit.yaml
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 freeto 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.
Closes#431
Why
check-freshness-delivery 会话中的事故链:ad-hoc 组装的 DAG 里,agent 执行 `pnpm exec vitest … | tail -15`——管道全缓冲导致命令全程零输出,pnpm/vitest 冷启动 15s+ 无声,操作者两度 ESC 中断(日志 cancel session.id ×2),agent 收到 abort 后又换参重试。归因结论:无任何一层约束长耗时/静默命令的 shell 纪律;且该路径是 ad-hoc draft,配置模板层覆盖不到。本交付把纪律做成共享常量植入块契约(explore/debug/coding/verify 四类执行必经点),单点覆盖模板与 ad-hoc 全部路径。
What changed
Evidence
Checklist
specgit finishexits 0.Follow-up