diff --git a/README.md b/README.md index b60cb28..6a0fd6a 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ You do not need to approve every commit. You do need to own the decisions that c ![Where you step in.](docs/assets/people.svg) -After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. +After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf. A material scope change or an action outside existing authorization comes back to you with evidence and a proposal. diff --git a/README.zh-CN.md b/README.zh-CN.md index 69e06e6..29885ad 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -115,7 +115,7 @@ Do not merge. ![你在哪些地方参与?](docs/assets/people.zh-CN.svg) -设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。 +design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。 遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。 diff --git a/dist/claude-code/structured-coding/README.md b/dist/claude-code/structured-coding/README.md index e2a10f4..e08888d 100644 --- a/dist/claude-code/structured-coding/README.md +++ b/dist/claude-code/structured-coding/README.md @@ -75,7 +75,7 @@ A plan describes what you intend to build. It does not, on its own, tell an agen You do not need to approve every commit. You do need to own the decisions that change the agreement. -After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. +After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf. A material scope change or an action outside existing authorization comes back to you with evidence and a proposal. diff --git a/dist/claude-code/structured-coding/README.zh-CN.md b/dist/claude-code/structured-coding/README.zh-CN.md index 8441f2f..bc3430f 100644 --- a/dist/claude-code/structured-coding/README.zh-CN.md +++ b/dist/claude-code/structured-coding/README.zh-CN.md @@ -75,7 +75,7 @@ Do not merge. 不用每次 commit 都点头。但会改变约定的决定,得由你来做。 -设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。 +design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。 遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。 diff --git a/dist/claude-code/structured-coding/prompts/implementation-working-rules.md b/dist/claude-code/structured-coding/prompts/implementation-working-rules.md index d3560d6..b6f6026 100644 --- a/dist/claude-code/structured-coding/prompts/implementation-working-rules.md +++ b/dist/claude-code/structured-coding/prompts/implementation-working-rules.md @@ -85,6 +85,7 @@ PR CONTEXT INITIALIZATION: - working-tree fingerprint; - approved scope; - frozen invariants; + - endpoint authority, with each line's source; - implementation sequence; - validation budget; - current checkpoint; @@ -106,6 +107,14 @@ PR CONTEXT AUTHORITY ORDER: A lower item may never override a higher one. + An explicit operator instruction in the CURRENT session outranks a recorded + restriction, including one carried in the handoff. Quote the instruction, + update ENDPOINT AUTHORITY with it as the source, and say plainly that it + replaces the earlier line. Do not silently drop either side. + + Merge authority is outside this: it is never inherited, never widened, and + always requires the operator's explicit authorization for this merge. + PR CONTEXT CONTINUITY: During THIS PR: @@ -165,6 +174,31 @@ PR CONTEXT CLOSEOUT: The NEXT PR starts from a fresh filled Implementation Working Rules contract and a freshly initialized context. +ENDPOINT AUTHORITY: + Each endpoint is a separate decision. Record the decision and its SOURCE: + an explicit operator instruction, an applicable repository restriction, or + `unresolved`. Caution is not a source: an endpoint you narrowed yourself is + `unresolved`, not the operator's decision, and is settled before freeze. + + - implementation + local validation: + source: <...> + - semantic commits: + source: <...> + - branch push: + source: <...> + - PR creation / update: + source: <...> + - CI repair to review readiness: + source: <...> + - merge: explicit operator authorization only; + section 22. No source value changes + this line. + + A planning-only or explicitly local-only request restricts publication, and + that restriction has a source: the operator's instruction. The absence of any + instruction does not. + NORMAL STOP CONDITION: @@ -182,7 +216,17 @@ MERGE AUTHORITY: If a field is not applicable, mark it `N/A` rather than inventing a value. The project-specific contract overrides generic defaults below where it is -more restrictive. +more restrictive **and the restriction records a source**: an explicit operator +instruction or an applicable repository restriction. + +A restriction with no source is not a project decision and does not override +anything. Resolve it with the operator before freeze instead of acting on it. +Without this, choosing caution and writing the result into the contract presents +an agent's decision as the operator's — and every later session that reads the +contract correctly then inherits it as a frozen operator boundary. + +This does not work in reverse. An unsourced line is resolved, not widened past +the shipped defaults, and merge authority is never widened at all. # 1. Inspect before asking, guessing, or changing the design diff --git a/dist/claude-code/structured-coding/references/agent-workflow.md b/dist/claude-code/structured-coding/references/agent-workflow.md index e2b992d..07d2f4c 100644 --- a/dist/claude-code/structured-coding/references/agent-workflow.md +++ b/dist/claude-code/structured-coding/references/agent-workflow.md @@ -86,6 +86,8 @@ Iterate the PR design with the operator. Prepare a filled implementation contrac The contract must distinguish the per-Gate limit from the total runtime/cost envelope and identify whether commit, branch publication, PR updates, and validation are authorized. Reuse existing session authorization; do not ask again for a decision already made. +Before freezing, reconcile that endpoint block against what the operator actually said. A block that stops at local documentation and tests, in an effort whose agreed workflow runs to PR review readiness, is a mismatch to raise — not a cautious default to freeze. The converse is equally a mismatch: a planning-only or explicitly local-only request does not acquire publication permission because the shipped default has one. Every narrowing needs a source the operator would recognize, and a line without one is unresolved rather than decided. + When the operator approves the concrete design for implementation, record a visible header such as: ```markdown @@ -112,7 +114,7 @@ Before implementation edits, the new session must: 1. Inspect branch, HEAD, status, recent history, and relevant running jobs. 2. Read the PR design in full, its filled contract, and the needed binding parents. -3. Verify approved design identity, implementation authorization, base, and merged prerequisites. +3. Verify approved design identity, implementation authorization, base, and merged prerequisites. Read the contract's endpoint authority and work to it; a line whose source is unresolved is raised with the operator, not narrowed further. 4. Read both execution prompt files completely and inspect the source/tests for the first milestone. 5. Initialize the handoff for this PR with the fields required by the original contract. @@ -156,7 +158,7 @@ Preserve measurement evidence and frozen parity references. Store durable eviden Compaction does not reset progress or initialize a new PR. Recover the active PR from the handoff, verify it against repository identity and branch/base, and follow the source authority order: repository/git/process truth → primary design → binding parents → handoff → emergency snapshot → conversational memory. -Re-read the current PR design in full, the filled contract, and both execution prompts. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing. +Re-read the current PR design in full, the filled contract, and both execution prompts. A restriction found only in the handoff, with no source and no support in the contract, is reported rather than obeyed; a newer explicit instruction from the operator supersedes it. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing. For planned manual compaction, synchronize the design, handoff, HEAD, and working-tree fingerprint first. For unavoidable automatic compaction, a stale semantic handoff should produce a mechanical rescue snapshot and recovery warning, not a compaction deadlock. The hook must not invent a semantic summary. diff --git a/dist/claude-code/structured-coding/references/agent-workflow.zh-CN.md b/dist/claude-code/structured-coding/references/agent-workflow.zh-CN.md index 4753437..abde5c2 100644 --- a/dist/claude-code/structured-coding/references/agent-workflow.zh-CN.md +++ b/dist/claude-code/structured-coding/references/agent-workflow.zh-CN.md @@ -86,6 +86,8 @@ Validation 为指定 claim 提供确定性或实证 execution evidence。Review contract 必须区分每次 Gate 的限制和总 runtime/cost 范围,并明确 commit、branch 发布、PR 更新和 validation 是否已授权。沿用已有 session 授权,不要重复询问已经作出的决定。 +freeze 之前,把这个 endpoint 块跟 operator 实际说过的话对一遍。整件事约定的流程是做到 PR review-ready,而块里却停在本地文档和测试——这是需要提出来的不一致,不是一个可以直接 freeze 的保守默认值。反过来同样是不一致:planning-only 或明确只在本地做的请求,不会因为出厂默认值有发布权限就获得发布权限。每一处收紧都需要一个 operator 认得出来的 source;没有 source 的那一行是 unresolved,不是已决定。 + operator 批准具体 design 进入 implementation 后,记录清晰的 header,例如: ```markdown @@ -112,7 +114,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整 1. 检查 branch、HEAD、status、近期历史和相关运行中的 job。 2. 完整读取 PR design、填写好的 contract,以及所需的 binding parent 文档。 -3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。 +3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。读 contract 里的 endpoint authority 并照它执行;source 是 unresolved 的那一行要提给 operator,不要自己再收紧。 4. 完整读取两个 execution prompt 文件,并检查第一个 milestone 的 source/test。 5. 按原始 contract 要求的字段,为当前 PR 初始化 handoff。 @@ -156,7 +158,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整 Compaction 不重置进度,也不初始化新 PR。通过 handoff 恢复 active PR,对照 repository 身份和 branch/base 核验,并按来源权威顺序处理:repository/git/process 事实 → primary design → binding parent 文档 → handoff → emergency snapshot → 对话记忆。 -重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。 +重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。只出现在 handoff 里、没有 source、contract 里也找不到依据的限制,要报告而不是遵守;operator 新的明确指示优先于它。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。 计划中的 manual compaction 应先同步 design、handoff、HEAD 和 working-tree fingerprint。不可避免的 automatic compaction 遇到过时的语义 handoff 时,应产生机械恢复 snapshot 和警告,不能造成 compaction deadlock。hook 不得编造 semantic summary。 diff --git a/dist/codex/structured-coding/README.md b/dist/codex/structured-coding/README.md index e2a10f4..e08888d 100644 --- a/dist/codex/structured-coding/README.md +++ b/dist/codex/structured-coding/README.md @@ -75,7 +75,7 @@ A plan describes what you intend to build. It does not, on its own, tell an agen You do not need to approve every commit. You do need to own the decisions that change the agreement. -After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. +After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf. A material scope change or an action outside existing authorization comes back to you with evidence and a proposal. diff --git a/dist/codex/structured-coding/README.zh-CN.md b/dist/codex/structured-coding/README.zh-CN.md index 8441f2f..bc3430f 100644 --- a/dist/codex/structured-coding/README.zh-CN.md +++ b/dist/codex/structured-coding/README.zh-CN.md @@ -75,7 +75,7 @@ Do not merge. 不用每次 commit 都点头。但会改变约定的决定,得由你来做。 -设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。 +design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。 遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。 diff --git a/dist/codex/structured-coding/prompts/implementation-working-rules.md b/dist/codex/structured-coding/prompts/implementation-working-rules.md index d3560d6..b6f6026 100644 --- a/dist/codex/structured-coding/prompts/implementation-working-rules.md +++ b/dist/codex/structured-coding/prompts/implementation-working-rules.md @@ -85,6 +85,7 @@ PR CONTEXT INITIALIZATION: - working-tree fingerprint; - approved scope; - frozen invariants; + - endpoint authority, with each line's source; - implementation sequence; - validation budget; - current checkpoint; @@ -106,6 +107,14 @@ PR CONTEXT AUTHORITY ORDER: A lower item may never override a higher one. + An explicit operator instruction in the CURRENT session outranks a recorded + restriction, including one carried in the handoff. Quote the instruction, + update ENDPOINT AUTHORITY with it as the source, and say plainly that it + replaces the earlier line. Do not silently drop either side. + + Merge authority is outside this: it is never inherited, never widened, and + always requires the operator's explicit authorization for this merge. + PR CONTEXT CONTINUITY: During THIS PR: @@ -165,6 +174,31 @@ PR CONTEXT CLOSEOUT: The NEXT PR starts from a fresh filled Implementation Working Rules contract and a freshly initialized context. +ENDPOINT AUTHORITY: + Each endpoint is a separate decision. Record the decision and its SOURCE: + an explicit operator instruction, an applicable repository restriction, or + `unresolved`. Caution is not a source: an endpoint you narrowed yourself is + `unresolved`, not the operator's decision, and is settled before freeze. + + - implementation + local validation: + source: <...> + - semantic commits: + source: <...> + - branch push: + source: <...> + - PR creation / update: + source: <...> + - CI repair to review readiness: + source: <...> + - merge: explicit operator authorization only; + section 22. No source value changes + this line. + + A planning-only or explicitly local-only request restricts publication, and + that restriction has a source: the operator's instruction. The absence of any + instruction does not. + NORMAL STOP CONDITION: @@ -182,7 +216,17 @@ MERGE AUTHORITY: If a field is not applicable, mark it `N/A` rather than inventing a value. The project-specific contract overrides generic defaults below where it is -more restrictive. +more restrictive **and the restriction records a source**: an explicit operator +instruction or an applicable repository restriction. + +A restriction with no source is not a project decision and does not override +anything. Resolve it with the operator before freeze instead of acting on it. +Without this, choosing caution and writing the result into the contract presents +an agent's decision as the operator's — and every later session that reads the +contract correctly then inherits it as a frozen operator boundary. + +This does not work in reverse. An unsourced line is resolved, not widened past +the shipped defaults, and merge authority is never widened at all. # 1. Inspect before asking, guessing, or changing the design diff --git a/dist/codex/structured-coding/references/agent-workflow.md b/dist/codex/structured-coding/references/agent-workflow.md index e2b992d..07d2f4c 100644 --- a/dist/codex/structured-coding/references/agent-workflow.md +++ b/dist/codex/structured-coding/references/agent-workflow.md @@ -86,6 +86,8 @@ Iterate the PR design with the operator. Prepare a filled implementation contrac The contract must distinguish the per-Gate limit from the total runtime/cost envelope and identify whether commit, branch publication, PR updates, and validation are authorized. Reuse existing session authorization; do not ask again for a decision already made. +Before freezing, reconcile that endpoint block against what the operator actually said. A block that stops at local documentation and tests, in an effort whose agreed workflow runs to PR review readiness, is a mismatch to raise — not a cautious default to freeze. The converse is equally a mismatch: a planning-only or explicitly local-only request does not acquire publication permission because the shipped default has one. Every narrowing needs a source the operator would recognize, and a line without one is unresolved rather than decided. + When the operator approves the concrete design for implementation, record a visible header such as: ```markdown @@ -112,7 +114,7 @@ Before implementation edits, the new session must: 1. Inspect branch, HEAD, status, recent history, and relevant running jobs. 2. Read the PR design in full, its filled contract, and the needed binding parents. -3. Verify approved design identity, implementation authorization, base, and merged prerequisites. +3. Verify approved design identity, implementation authorization, base, and merged prerequisites. Read the contract's endpoint authority and work to it; a line whose source is unresolved is raised with the operator, not narrowed further. 4. Read both execution prompt files completely and inspect the source/tests for the first milestone. 5. Initialize the handoff for this PR with the fields required by the original contract. @@ -156,7 +158,7 @@ Preserve measurement evidence and frozen parity references. Store durable eviden Compaction does not reset progress or initialize a new PR. Recover the active PR from the handoff, verify it against repository identity and branch/base, and follow the source authority order: repository/git/process truth → primary design → binding parents → handoff → emergency snapshot → conversational memory. -Re-read the current PR design in full, the filled contract, and both execution prompts. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing. +Re-read the current PR design in full, the filled contract, and both execution prompts. A restriction found only in the handoff, with no source and no support in the contract, is reported rather than obeyed; a newer explicit instruction from the operator supersedes it. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing. For planned manual compaction, synchronize the design, handoff, HEAD, and working-tree fingerprint first. For unavoidable automatic compaction, a stale semantic handoff should produce a mechanical rescue snapshot and recovery warning, not a compaction deadlock. The hook must not invent a semantic summary. diff --git a/dist/codex/structured-coding/references/agent-workflow.zh-CN.md b/dist/codex/structured-coding/references/agent-workflow.zh-CN.md index 4753437..abde5c2 100644 --- a/dist/codex/structured-coding/references/agent-workflow.zh-CN.md +++ b/dist/codex/structured-coding/references/agent-workflow.zh-CN.md @@ -86,6 +86,8 @@ Validation 为指定 claim 提供确定性或实证 execution evidence。Review contract 必须区分每次 Gate 的限制和总 runtime/cost 范围,并明确 commit、branch 发布、PR 更新和 validation 是否已授权。沿用已有 session 授权,不要重复询问已经作出的决定。 +freeze 之前,把这个 endpoint 块跟 operator 实际说过的话对一遍。整件事约定的流程是做到 PR review-ready,而块里却停在本地文档和测试——这是需要提出来的不一致,不是一个可以直接 freeze 的保守默认值。反过来同样是不一致:planning-only 或明确只在本地做的请求,不会因为出厂默认值有发布权限就获得发布权限。每一处收紧都需要一个 operator 认得出来的 source;没有 source 的那一行是 unresolved,不是已决定。 + operator 批准具体 design 进入 implementation 后,记录清晰的 header,例如: ```markdown @@ -112,7 +114,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整 1. 检查 branch、HEAD、status、近期历史和相关运行中的 job。 2. 完整读取 PR design、填写好的 contract,以及所需的 binding parent 文档。 -3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。 +3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。读 contract 里的 endpoint authority 并照它执行;source 是 unresolved 的那一行要提给 operator,不要自己再收紧。 4. 完整读取两个 execution prompt 文件,并检查第一个 milestone 的 source/test。 5. 按原始 contract 要求的字段,为当前 PR 初始化 handoff。 @@ -156,7 +158,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整 Compaction 不重置进度,也不初始化新 PR。通过 handoff 恢复 active PR,对照 repository 身份和 branch/base 核验,并按来源权威顺序处理:repository/git/process 事实 → primary design → binding parent 文档 → handoff → emergency snapshot → 对话记忆。 -重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。 +重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。只出现在 handoff 里、没有 source、contract 里也找不到依据的限制,要报告而不是遵守;operator 新的明确指示优先于它。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。 计划中的 manual compaction 应先同步 design、handoff、HEAD 和 working-tree fingerprint。不可避免的 automatic compaction 遇到过时的语义 handoff 时,应产生机械恢复 snapshot 和警告,不能造成 compaction deadlock。hook 不得编造 semantic summary。 diff --git a/dist/structured-coding-claude-code.zip b/dist/structured-coding-claude-code.zip index 2f9ee66..a46013d 100644 Binary files a/dist/structured-coding-claude-code.zip and b/dist/structured-coding-claude-code.zip differ diff --git a/dist/structured-coding-codex.zip b/dist/structured-coding-codex.zip index eac4323..f2292d0 100644 Binary files a/dist/structured-coding-codex.zip and b/dist/structured-coding-codex.zip differ diff --git a/docs/content.en.json b/docs/content.en.json index ccb5675..3e150f4 100644 --- a/docs/content.en.json +++ b/docs/content.en.json @@ -267,7 +267,7 @@ "You review evidence before merge." ] ], - "autonomy": "After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step.", + "autonomy": "After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf.", "escalation": "A material scope change or an action outside existing authorization comes back to you with evidence and a proposal.", "technicalTitle": "The details, when you need them.", "technicalLead": "Open the part relevant to your current question. Use the resource links above for the complete specifications.", diff --git a/docs/content.zh-CN.json b/docs/content.zh-CN.json index 5ca8631..e1cfdef 100644 --- a/docs/content.zh-CN.json +++ b/docs/content.zh-CN.json @@ -134,7 +134,7 @@ "你检查证据,再决定 merge。" ] ], - "autonomy": "设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。", + "autonomy": "design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。", "escalation": "遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。", "technicalTitle": "细节,用到时再展开。", "technicalLead": "按你现在的问题往下看。完整 specification 可以从上面的资源链接打开。", diff --git a/docs/index.html b/docs/index.html index 4bf78b4..939a270 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ TEST / CI / GATE in full. Reconcile actual state, and begin. Continue autonomously to READY FOR OPERATOR REVIEW under the contract. Do not merge.
Before you move on

Confirm that the agent is working on the intended PR and has loaded the approved paths. The kickoff delegates execution within the contract; it does not grant extra host permissions or enable hooks.

5. Let the agent complete the agreed implementation loop.

The agent implements a coherent piece, runs relevant checks, reviews the logic and callers, records what happened, and commits. A Unit test failure or an extra caller inside the agreed scope normally means investigate, fix, and continue. It should not ask you to approve every commit. If branch publication and PR/CI work are authorized, it continues through those steps too.

You step in when the proposed solution changes a frozen requirement, public interface, material scope, or approved budget. The agent should bring evidence and a concrete choice, not merely say it is blocked. Review that choice before the dependent work proceeds.

If the conversation reaches compact, you are still working on the same PR. Before manual compact, the agent updates its design and handoff. After compact or resume, it rereads the full rules and checks actual Git and process state. A running test must be checked before launching a duplicate. Continuity helps with mechanical checks and recovery instructions; it does not write a correct semantic handoff for the agent.

Before you move on

You should be able to ask for the current milestone, evidence, and next action and get an answer grounded in saved records. A hook notice is not proof that the agent performed a review or completed a test.

6. Review the finished PR, then decide whether to merge.

For an authorized PR workflow, READY FOR OPERATOR REVIEW means the agreed implementation, validation, and logic review are complete, the PR is published or updated, and required CI passes on its exact final HEAD. HEAD identifies the current commit. A green result for an earlier commit does not prove a later edit passed.

Read the diff alongside the promised behavior, deviations, test evidence, and remaining limits. If something is wrong, request repairs in the same implementation conversation. The agent should update the evidence and final-head CI before handing it back. You can use a separate reviewer agent, but the workflow does not require another conversation for review.

When satisfied, explicitly authorize merging the specific PR and reviewed candidate. Without that approval, the agent stops at review readiness. The shipped presets do not provide a merge guard, so this boundary remains an instruction and any separately configured host/repository protection. A local-only contract has a local endpoint; the agent must not pretend it created or validated a remote PR.

Before you move on

After an authorized merge, require confirmation of the actual remote result and merge commit. A merge command being requested is not the same as a completed merge.

7. Update the plans before starting the next PR.

After merge is confirmed, ask the agent to mark the current PR merged, update its parent step, and update the overall plan. The updates should record both completed work and discoveries that change what comes next. Hooks do not currently verify this post-merge planning work.

For example, the alphabetical-order implementation may reveal that resume stores only a filename. A later PR may need a clearer way to identify the next occurrence of a repeated filename. Bring that discovery into the next PR's design instead of continuing from an old assumption.

Return to your planning conversation, or open a new planning conversation that reads the updated files. Detail and approve the next PR, then start another fresh implementation conversation. The previous PR's agent may finish its records and prepare a handoff; it must not quietly begin implementing the next PR in the old context.

Before you move on

One PR is finished when its result and implications are recorded, not merely when a merge notification appears. You now repeat the same cycle with a smaller amount of uncertainty.

-
07

Where you step in.

You do not need to approve every commit. You do need to own the decisions that change the agreement.

  1. 01

    Set the goal

    You explain the goal and limits.

  2. 02

    Approve the design

    You approve this PR's boundaries.

  3. 03

    Review the result

    You review evidence before merge.

After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step.

A material scope change or an action outside existing authorization comes back to you with evidence and a proposal.

+
07

Where you step in.

You do not need to approve every commit. You do need to own the decisions that change the agreement.

  1. 01

    Set the goal

    You explain the goal and limits.

  2. 02

    Approve the design

    You approve this PR's boundaries.

  3. 03

    Review the result

    You review evidence before merge.

After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf.

A material scope change or an action outside existing authorization comes back to you with evidence and a proposal.

08

The details, when you need them.

Open the part relevant to your current question. Use the resource links above for the complete specifications.

What documents does the agent maintain?
OverallIt records the overall goal, requirements, and main steps so each PR has a clear purpose.
StepIt explains which PRs complete this step, their dependencies, and how to observe their integration.
PR designIt records audited code and the commit plan, then keeps decisions, progress, and evidence current during implementation.
Execution contractIt records this PR's approved scope, permitted actions, budget, and stopping conditions.
HandoffIt identifies the current PR, branch and HEAD, running jobs, logs, and the exact next action after recovery.

DESIGN FROZEN protects the requirements you approved, not the entire document. The agent still records discoveries and progress. Implementation, validation, and review stay separate; each item is checked only when that work has actually been completed. If one step needs one PR, expand the step document instead of keeping two copies.

What happens at compact or resume?

Compact is the host's process of shortening conversation history to free context; it does not create a new PR. A new PR starts in a fresh implementation session, while compact or resume continues the current PR. The optional continuity preset checks recorded mechanical freshness, attempts snapshots, and supplies recovery instructions. The agent still has to keep the design and handoff accurate and actually reconcile state after recovery.

MANUAL COMPACTCheck handoffStale? Sync firstThen compact
AUTOMATIC COMPACTSave snapshot / warningAllow compactRecover actual state

On resume, reload the current design, filled contract, and full execution rules; check the repo and existing jobs before editing. A snapshot cannot invent decisions or test results. Automatic compact must not get stuck waiting for a perfect handoff.

Optional hooks: installation, coverage, and limits

OPTIONAL CONTINUITY + CHECKPOINTS + STANDARDS · NO MERGE GUARD

Choose continuity for compact recovery, checkpoints for commit/review reminders, standards to run your declared checks after a commit, or any combination. Both are off by default. Checkpoints advises; it does not enforce commits or certify readiness. Protocol tests do not establish native event delivery or model compliance. The agent does not dynamically register its own hooks.

Choose your optional presets

./structured-coding/scripts/install codex --project /path/to/project --hooks checkpoints --dry-run
diff --git a/docs/index.zh-CN.html b/docs/index.zh-CN.html
index a81303d..9414f2b 100644
--- a/docs/index.zh-CN.html
+++ b/docs/index.zh-CN.html
@@ -37,7 +37,7 @@
 TEST / CI / GATE in full. Reconcile actual state, and begin.
 Continue autonomously to READY FOR OPERATOR REVIEW under the contract.
 Do not merge.
进入下一步前,确认这件事

确认 agent 找对了 PR,也读到了已批准的真实路径。Kickoff 让它在 contract 范围内执行,不会额外授予 host 权限,也不会替你启用 hook。

5. 让 agent 把约定范围内的实现循环做完。

Agent 做完一块有意义的修改,运行相关检查,review 逻辑和调用方,记录结果,然后 commit。Unit test 失败,或者在约定范围内发现漏掉的调用方,通常就是查原因、修复、继续。不该每个 commit 都来问你一次。发布 branch、创建 PR 和处理 CI 已经授权的话,它也应该接着做完。

需要你回来决定的是:解决办法要改变已冻结的要求、public interface、重要 scope,或者超出批准预算。Agent 应该带上证据和具体选择,而不是只说一句卡住了。你决定以后,它才能继续受影响的工作。

聊到需要 compact 时,做的还是同一个 PR。手动 compact 前,agent 更新 design 和 handoff。Compact 或 resume 后,它重新读完整规则,核对真实 Git 状态和 process 状态。原来有 test 在跑,就先检查它,别直接再开一份。Continuity 能帮助做机械检查、提供恢复指令,但不会替 agent 写出语义正确的 handoff。

进入下一步前,确认这件事

你问当前做到哪一步、有什么证据、接下来做什么,agent 应该能根据已保存的记录回答。收到 hook 提醒,不代表它已经 review,也不代表某个 test 已完成。

6. Review 做完的 PR,再决定是否 merge。

对于已授权的 PR 工作流,READY FOR OPERATOR REVIEW 表示约定的 implementation、validation 和逻辑 review 已完成,PR 已创建或更新,而且准确最终 HEAD 的必需 CI 已通过。HEAD 标识当前 commit。旧 commit 的 CI 绿了,不能证明后来又改的内容也通过了。

你把 diff 和原先答应交付的行为对起来,看偏离原因、test evidence 和剩余限制。有问题,就在原 implementation 会话里要求修复。Agent 要更新证据和最终 HEAD 的 CI,再交回来。你可以另找一个 reviewer agent,但工作流不要求必须为 review 多开一个会话。

满意后,明确授权 merge 这个 PR 和你 review 过的版本。没拿到这份授权,agent 就停在可 review 的状态。目前提供的 preset 没有 merge guard,所以这条边界仍靠指令,以及另外配置的 host 或 repo 保护来维持。Contract 如果只授权本地工作,就按本地终点交付,不能假装已经创建或验证了远程 PR。

进入下一步前,确认这件事

授权 merge 后,要确认远程确实完成了,并拿到 merge commit。发起了 merge 请求,不等于 merge 已经成功。

7. 更新计划,再开始下一个 PR。

确认 merge 后,让 agent 把当前 PR 标为已 merge,再更新所属 step,最后更新 overall plan。不光写完成了什么,还要写这次发现会怎样影响后面的工作。目前 hook 不会验证这些 merge 后的 planning 更新。

比如实现字母排序时,发现 resume 只保存一个文件名。后面的 PR 可能需要更明确地标识:同名文件重复出现时,下次到底从哪一次继续。把这个发现带进下一个 PR design,别沿着已经过时的假设接着做。

你可以回原 planning 会话,也可以新开一个,让它读更新后的文件。细化并批准下一个 PR,再开新的 implementation 会话。上一个 PR 的 agent 可以把记录补完、准备交接,但不能在旧 context 里悄悄开始实现下一个 PR。

进入下一步前,确认这件事

一个 PR 的收尾,不只是收到 merge 通知,还要把结果和对后续工作的影响写下来。接着重复这套流程时,你就比上次少了一些没弄清楚的问题。

-
07

你在哪些地方参与?

不用每次 commit 都点头。但会改变约定的决定,得由你来做。

  1. 01

    定目标

    你说清楚目标和限制。

  2. 02

    批准设计

    你确认这次允许改什么。

  3. 03

    review 结果

    你检查证据,再决定 merge。

设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。

遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。

+
07

你在哪些地方参与?

不用每次 commit 都点头。但会改变约定的决定,得由你来做。

  1. 01

    定目标

    你说清楚目标和限制。

  2. 02

    批准设计

    你确认这次允许改什么。

  3. 03

    review 结果

    你检查证据,再决定 merge。

design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。

遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。

08

细节,用到时再展开。

按你现在的问题往下看。完整 specification 可以从上面的资源链接打开。

agent 到底维护哪些文档?
Overall它记录整体目标、需求和主要步骤,让后面的 PR 知道在完成哪件事。
Step它说明当前步骤要拆成哪些 PR、谁依赖谁,以及怎样观察到它们配合起来了。
PR design它记录检查过的 code、commit plan,以及实施中持续更新的决定、进度和证据。
Execution contract它记录当前 PR 允许改什么、允许执行哪些操作、预算和停止条件是什么。
Handoff它记录当前 PR、branch 和 HEAD、仍在运行的 job、log 位置,以及恢复后具体接着做什么。

DESIGN FROZEN 固定的是你批准的要求,不是整份文档。Agent 仍要记录新发现和进度。Implementation、validation 和 review 分开记录,只有对应工作真的完成了才能打勾。如果一个 step 只有一个 PR,就展开原 step doc,不必复制成两份。

compact 或 resume 时,怎么接着干?

Compact 是 host 为腾出 context 而压缩聊天历史的过程,不是新建一个 PR。新 PR 要开新的 implementation 会话;compact 或 resume 则继续原来的 PR。可选 continuity preset 检查已记录的机械状态是否仍然匹配、尝试保存 snapshot,并提供恢复指令。Design 和 handoff 写得是否准确、恢复时有没有真正核对清楚,仍由 agent 负责。

手动 COMPACT检查 handoff过时?先同步再 compact
自动 COMPACT保存 snapshot / 警告允许 compact恢复真实状态

恢复时,重新读取当前 design、填好的 contract 和完整 execution rules;改 code 前核对 repo 和已有任务。snapshot 不能编决定或测试结果。自动 compact 不能因为 handoff 不完美就一直卡住。

可选 hook:安装、覆盖范围和限制

可选 CONTINUITY + CHECKPOINTS + STANDARDS · 无 MERGE GUARD

需要 compact 恢复可选 continuity,需要 commit/review 提醒可选 checkpoints,需要在 commit 后跑你声明的检查可选 standards,也可任意组合。默认都不开。Checkpoints 提供建议,不拦截 commit,也不证明已达到交付条件。Protocol 测试不能证明 native 事件送达或模型遵守了提示。agent 不会动态注册自己的 hook。

选择需要的 preset

./structured-coding/scripts/install codex --project /path/to/project --hooks checkpoints --dry-run
diff --git a/structured-coding/README.md b/structured-coding/README.md
index e2a10f4..e08888d 100644
--- a/structured-coding/README.md
+++ b/structured-coding/README.md
@@ -75,7 +75,7 @@ A plan describes what you intend to build. It does not, on its own, tell an agen
 
 You do not need to approve every commit. You do need to own the decisions that change the agreement.
 
-After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step.
+After design approval, the agent investigates, implements, validates, reviews, records, and commits. If PR and CI work are authorized, it completes those too without waiting for you to prompt each step. The contract records which endpoints you authorized — commit, push, opening the PR, CI repair — and merge is never one of them. The agent may not quietly narrow that list either: a stopping point you did not ask for is a question for you, not a cautious default it can adopt on your behalf.
 
 A material scope change or an action outside existing authorization comes back to you with evidence and a proposal.
 
diff --git a/structured-coding/README.zh-CN.md b/structured-coding/README.zh-CN.md
index 8441f2f..bc3430f 100644
--- a/structured-coding/README.zh-CN.md
+++ b/structured-coding/README.zh-CN.md
@@ -75,7 +75,7 @@ Do not merge.
 
 不用每次 commit 都点头。但会改变约定的决定,得由你来做。
 
-设计批准以后,agent 自己调查、实现、验证、review、记录并 commit。PR 和 CI 工作如果已经授权,它也会继续做完,不用你一步一步催。
+design 批准之后,agent 自己调查、实现、验证、review、记录并 commit。如果 PR 和 CI 工作已获授权,它也会一并做完,不需要你一步一步催。contract 里记着你授权到哪些 endpoint——commit、push、开 PR、修 CI——merge 永远不在其中。agent 也不许偷偷把这份清单收窄:一个你没要求过的停止点,是要拿来问你的,不是它可以替你采用的保守默认值。
 
 遇到实质性范围变化,或者现有授权以外的操作,agent 带着证据和方案回来找你。
 
diff --git a/structured-coding/prompts/implementation-working-rules.md b/structured-coding/prompts/implementation-working-rules.md
index d3560d6..b6f6026 100644
--- a/structured-coding/prompts/implementation-working-rules.md
+++ b/structured-coding/prompts/implementation-working-rules.md
@@ -85,6 +85,7 @@ PR CONTEXT INITIALIZATION:
     - working-tree fingerprint;  
     - approved scope;  
     - frozen invariants;  
+    - endpoint authority, with each line's source;  
     - implementation sequence;  
     - validation budget;  
     - current checkpoint;  
@@ -106,6 +107,14 @@ PR CONTEXT AUTHORITY ORDER:
 
   A lower item may never override a higher one.
 
+  An explicit operator instruction in the CURRENT session outranks a recorded  
+  restriction, including one carried in the handoff. Quote the instruction,  
+  update ENDPOINT AUTHORITY with it as the source, and say plainly that it  
+  replaces the earlier line. Do not silently drop either side.
+
+  Merge authority is outside this: it is never inherited, never widened, and  
+  always requires the operator's explicit authorization for this merge.
+
 PR CONTEXT CONTINUITY:  
   During THIS PR:
 
@@ -165,6 +174,31 @@ PR CONTEXT CLOSEOUT:
   The NEXT PR starts from a fresh filled Implementation Working Rules contract  
   and a freshly initialized context.
 
+ENDPOINT AUTHORITY:  
+  Each endpoint is a separate decision. Record the decision and its SOURCE:  
+  an explicit operator instruction, an applicable repository restriction, or  
+  `unresolved`. Caution is not a source: an endpoint you narrowed yourself is  
+  `unresolved`, not the operator's decision, and is settled before freeze.
+
+  - implementation + local validation:    
+      source: <...>  
+  - semantic commits:                     
+      source: <...>  
+  - branch push:                          
+      source: <...>  
+  - PR creation / update:                 
+      source: <...>  
+  - CI repair to review readiness:        
+      source: <...>  
+  - merge:                              explicit operator authorization only;  
+                                         section 22. No source value changes  
+                                         this line.
+
+  A planning-only or explicitly local-only request restricts publication, and  
+  that restriction has a source: the operator's instruction. The absence of any  
+  instruction does not.
+
 NORMAL STOP CONDITION:  
   
 
@@ -182,7 +216,17 @@ MERGE AUTHORITY:
 If a field is not applicable, mark it `N/A` rather than inventing a value.
 
 The project-specific contract overrides generic defaults below where it is  
-more restrictive.
+more restrictive **and the restriction records a source**: an explicit operator  
+instruction or an applicable repository restriction.
+
+A restriction with no source is not a project decision and does not override  
+anything. Resolve it with the operator before freeze instead of acting on it.  
+Without this, choosing caution and writing the result into the contract presents  
+an agent's decision as the operator's — and every later session that reads the  
+contract correctly then inherits it as a frozen operator boundary.
+
+This does not work in reverse. An unsourced line is resolved, not widened past  
+the shipped defaults, and merge authority is never widened at all.
 
 # 1. Inspect before asking, guessing, or changing the design
 
diff --git a/structured-coding/references/agent-workflow.md b/structured-coding/references/agent-workflow.md
index e2b992d..07d2f4c 100644
--- a/structured-coding/references/agent-workflow.md
+++ b/structured-coding/references/agent-workflow.md
@@ -86,6 +86,8 @@ Iterate the PR design with the operator. Prepare a filled implementation contrac
 
 The contract must distinguish the per-Gate limit from the total runtime/cost envelope and identify whether commit, branch publication, PR updates, and validation are authorized. Reuse existing session authorization; do not ask again for a decision already made.
 
+Before freezing, reconcile that endpoint block against what the operator actually said. A block that stops at local documentation and tests, in an effort whose agreed workflow runs to PR review readiness, is a mismatch to raise — not a cautious default to freeze. The converse is equally a mismatch: a planning-only or explicitly local-only request does not acquire publication permission because the shipped default has one. Every narrowing needs a source the operator would recognize, and a line without one is unresolved rather than decided.
+
 When the operator approves the concrete design for implementation, record a visible header such as:
 
 ```markdown
@@ -112,7 +114,7 @@ Before implementation edits, the new session must:
 
 1. Inspect branch, HEAD, status, recent history, and relevant running jobs.
 2. Read the PR design in full, its filled contract, and the needed binding parents.
-3. Verify approved design identity, implementation authorization, base, and merged prerequisites.
+3. Verify approved design identity, implementation authorization, base, and merged prerequisites. Read the contract's endpoint authority and work to it; a line whose source is unresolved is raised with the operator, not narrowed further.
 4. Read both execution prompt files completely and inspect the source/tests for the first milestone.
 5. Initialize the handoff for this PR with the fields required by the original contract.
 
@@ -156,7 +158,7 @@ Preserve measurement evidence and frozen parity references. Store durable eviden
 
 Compaction does not reset progress or initialize a new PR. Recover the active PR from the handoff, verify it against repository identity and branch/base, and follow the source authority order: repository/git/process truth → primary design → binding parents → handoff → emergency snapshot → conversational memory.
 
-Re-read the current PR design in full, the filled contract, and both execution prompts. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing.
+Re-read the current PR design in full, the filled contract, and both execution prompts. A restriction found only in the handoff, with no source and no support in the contract, is reported rather than obeyed; a newer explicit instruction from the operator supersedes it. Inspect active processes and CI runs before launching replacements. Re-open the source seam for the exact next action and reconcile stale checkbox/evidence claims before editing.
 
 For planned manual compaction, synchronize the design, handoff, HEAD, and working-tree fingerprint first. For unavoidable automatic compaction, a stale semantic handoff should produce a mechanical rescue snapshot and recovery warning, not a compaction deadlock. The hook must not invent a semantic summary.
 
diff --git a/structured-coding/references/agent-workflow.zh-CN.md b/structured-coding/references/agent-workflow.zh-CN.md
index 4753437..abde5c2 100644
--- a/structured-coding/references/agent-workflow.zh-CN.md
+++ b/structured-coding/references/agent-workflow.zh-CN.md
@@ -86,6 +86,8 @@ Validation 为指定 claim 提供确定性或实证 execution evidence。Review
 
 contract 必须区分每次 Gate 的限制和总 runtime/cost 范围,并明确 commit、branch 发布、PR 更新和 validation 是否已授权。沿用已有 session 授权,不要重复询问已经作出的决定。
 
+freeze 之前,把这个 endpoint 块跟 operator 实际说过的话对一遍。整件事约定的流程是做到 PR review-ready,而块里却停在本地文档和测试——这是需要提出来的不一致,不是一个可以直接 freeze 的保守默认值。反过来同样是不一致:planning-only 或明确只在本地做的请求,不会因为出厂默认值有发布权限就获得发布权限。每一处收紧都需要一个 operator 认得出来的 source;没有 source 的那一行是 unresolved,不是已决定。
+
 operator 批准具体 design 进入 implementation 后,记录清晰的 header,例如:
 
 ```markdown
@@ -112,7 +114,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整
 
 1. 检查 branch、HEAD、status、近期历史和相关运行中的 job。
 2. 完整读取 PR design、填写好的 contract,以及所需的 binding parent 文档。
-3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。
+3. 核对已批准的 design 身份、implementation 授权、base 和已 merge 的 prerequisites。读 contract 里的 endpoint authority 并照它执行;source 是 unresolved 的那一行要提给 operator,不要自己再收紧。
 4. 完整读取两个 execution prompt 文件,并检查第一个 milestone 的 source/test。
 5. 按原始 contract 要求的字段,为当前 PR 初始化 handoff。
 
@@ -156,7 +158,7 @@ Freeze 语义需求和 acceptance,同时允许 live ledger 持续写入。整
 
 Compaction 不重置进度,也不初始化新 PR。通过 handoff 恢复 active PR,对照 repository 身份和 branch/base 核验,并按来源权威顺序处理:repository/git/process 事实 → primary design → binding parent 文档 → handoff → emergency snapshot → 对话记忆。
 
-重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。
+重新完整读取当前 PR design、填写好的 contract 和两个 execution prompt。只出现在 handoff 里、没有 source、contract 里也找不到依据的限制,要报告而不是遵守;operator 新的明确指示优先于它。启动替代任务前先检查 active process 和 CI run。重新打开下一步所需的 source seam,在编辑前核对过时的 checkbox 或 evidence 声明。
 
 计划中的 manual compaction 应先同步 design、handoff、HEAD 和 working-tree fingerprint。不可避免的 automatic compaction 遇到过时的语义 handoff 时,应产生机械恢复 snapshot 和警告,不能造成 compaction deadlock。hook 不得编造 semantic summary。
 
diff --git a/translations.json b/translations.json
index 92a7423..6591774 100644
--- a/translations.json
+++ b/translations.json
@@ -3,15 +3,15 @@
   "presentation_source_pair": {
     "english": "docs/content.en.json",
     "chinese": "docs/content.zh-CN.json",
-    "english_sha256": "7a8d58ad68e56ad6f3ef10aac60df01dca2256fd237474544ceb313f7bb09440",
-    "chinese_sha256": "9a66f3193d5358db7c1fed532eed3ac0e05203e7ce46a7f4c61d6dbf93adbcfa"
+    "english_sha256": "a2bc3a9756629106426fb0fe2cd6b769b6b8453c576e8311f4dae2b56ad660d8",
+    "chinese_sha256": "2644dc6f143cd15de1247150011056b018cdd427157e8b2c7caf5cfc8765ff48"
   },
   "pairs": [
     {
       "english": "README.md",
       "chinese": "README.zh-CN.md",
-      "english_sha256": "1d07bec1eaec7cadb56aadb241d16c19310dd2fe6789108e3add477fb0679fbb",
-      "chinese_sha256": "54ec6dde48b5d04e404b54de0221ae3e07862f913534e45355bb35beb46d5cb8"
+      "english_sha256": "f835a245555081fe6b8cef930ce30e6d884af166342bb32b1f23cf8416cb7de1",
+      "chinese_sha256": "94818040582045da1939bd3276d17a1a087ba8c6f5a586c80b9d9754d186ed3b"
     },
     {
       "english": "TUTORIAL.md",
@@ -22,14 +22,14 @@
     {
       "english": "structured-coding/README.md",
       "chinese": "structured-coding/README.zh-CN.md",
-      "english_sha256": "37d48efbef1a3c8fb1d0d74608aae14e7c7e24c9651bd7dcc302b2579052a6c9",
-      "chinese_sha256": "64f4d8d32c41d0ee55407cdc90ae90e8b5e4c762a1d920c3449bc94de5c5fc67"
+      "english_sha256": "3a90c843c21087c8190cc23bd082454f9f0bcb2d5e1eba784f133bde67b3fa36",
+      "chinese_sha256": "b0287cf97eb6b84f62c2464b3bd88cdd8039a8ec988503982cc850dc6e521b6d"
     },
     {
       "english": "structured-coding/references/agent-workflow.md",
       "chinese": "structured-coding/references/agent-workflow.zh-CN.md",
-      "english_sha256": "17bec8c02873cd71eca246615c7577020be6685fa4b261bedc744c27d5bec5df",
-      "chinese_sha256": "7169c2467c62db1ec99e94b6ecdd1a46afa1458844bcc81ab16a71c12b07ada0"
+      "english_sha256": "a4b7d08b0016f358863cda8089b480bf049099b1786dfdc14b49bfbf39cb2127",
+      "chinese_sha256": "4a2495a38d0a525c79bfb3a3a6ba061160c7c0a153b198c77d200016e51c45e5"
     },
     {
       "english": "structured-coding/references/adaptation.md",
@@ -46,7 +46,7 @@
   ],
   "specification_sha256": {
     "structured-coding/SKILL.md": "bea7c82214ef6332ba587385b0d76a71c820e05f8d9a95796ba6d16efb40f0e0",
-    "structured-coding/prompts/implementation-working-rules.md": "7caa1d829fcdb0741b3b621918d6058352adcacf6c8bfee5267e37d2850debcf",
+    "structured-coding/prompts/implementation-working-rules.md": "e6c80df1f0f2af4eac4cf98d6fea13441362602c0ab02be021fa135078f02d6d",
     "structured-coding/prompts/pr-design-requirements.md": "dc5d654ee5e4e2d7a7558726823eb3452167f551d7841403ac8a98c862972baa",
     "structured-coding/prompts/test-ci-gate-rules.md": "ace549262e04880577248189f8ae460f18c13a6b2ecf6280d600566c2cd003e1",
     "structured-coding/references/hook-contract.md": "bb4aeec01af96ea42d0fb4248e9b9e3ccf54cae8f7266f523eed57031a68d81f"