Accessibility I18n
devcodex-labs/devcodex
无障碍与国际化专家 Owner — 当任务涉及可访问性、键盘操作、焦点、屏幕阅读器、ARIA、语言地区、本地化、RTL、翻译资源、用户可见文案或多语言文档时使用;要求把包容性体验和本地化验证绑定到真实用户路径。
执行契约规范 — 为长流程、多文件、Auto 或控制面任务生成/校验 ExecutionContract,约束范围、路径、产物、验证路线、偏离分级与恢复策略
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install devcodex-labs/devcodex execution-contract --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/content/skills/execution-contract .claude/skills/execution-contract && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .claude/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contractType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install devcodex-labs/devcodex execution-contract --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .agents/skills && cp -r skills-src/content/skills/execution-contract .agents/skills/execution-contract && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .agents/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install devcodex-labs/devcodex execution-contract --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/content/skills/execution-contract .cursor/skills/execution-contract && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .cursor/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/devcodex-labs/devcodex.git --path content/skills/execution-contract--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install devcodex-labs/devcodex execution-contract --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/content/skills/execution-contract .gemini/skills/execution-contract && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .gemini/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install devcodex-labs/devcodex execution-contractInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .github/skills && cp -r skills-src/content/skills/execution-contract .github/skills/execution-contract && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .github/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add devcodex-labs/devcodex --skill execution-contract -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install devcodex-labs/devcodex execution-contract --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/devcodex-labs/devcodex.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/content/skills/execution-contract .opencode/skills/execution-contract && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "execution-contract" agent skill from https://github.com/devcodex-labs/devcodex/tree/main/content/skills/execution-contract into .opencode/skills/execution-contract/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "execution-contract", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
execution-contract执行契约规范 — 为长流程、多文件、Auto 或控制面任务生成/校验 ExecutionContract,约束范围、路径、产物、验证路线、偏离分级与恢复策略
Execution Contract is an agent skill from devcodex-labs/devcodex. 执行契约规范 — 为长流程、多文件、Auto 或控制面任务生成/校验 ExecutionContract,约束范围、路径、产物、验证路线、偏离分级与恢复策略
Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `git-execution-context.v1.schema.json`, `intent.json` and `worktree-diagnostics.v1.schema.json`).
The repository describes itself as: Intent-driven AI coding workflow runtime for consistent context, skills, approvals, validation, and handoffs across six AI coding hosts. The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit 1dd4525. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Execution Contract loads about 4.2k tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 1,038 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from devcodex-labs/devcodex at commit 1dd4525, republished under its AGPL-3.0 licence (© devcodex-labs). 1,038 words, ~4,214 tokens.
.claude/skills/execution-contract/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.在任务进入执行前,为需要强边界的工作生成或校验 ExecutionContract。它不是新的工作流子类型,而是 dev/fix/auto/release 等流程可调用的支撑型 Skill。
| 场景 | 是否触发 |
|---|---|
| Auto 执行模式 | 🔴 必须 |
| 控制面 / 规范源 / 模板 / validate / 部署副本变更 | 🔴 必须 |
| 预计修改 ≥10 文件或多批次执行 | 🔴 必须 |
| 涉及发布、tag、publish、registry 后验收 | 🔴 必须 |
| 普通单文件文档小修 | N/A |
| 字段 | 必填 | 说明 |
|---|---|---|
scope | ✅ | 本次任务目标、排除范围和禁止事项 |
allowedFirstBatch | 条件 | dev/fix 执行前必填;本批允许立即修改的功能、文件、公开面和验证动作 |
blockedScope | 条件 | dev/fix 执行前必填;明确排除的后续阶段能力、非目标文件、禁止扩散面和 No-Go |
allowedPaths | ✅ | 允许修改的路径集合;Auto 不得仅依赖静态白名单 |
parallelLaunchCards | 条件 | 多需求/子 Agent/worktree 执行前必填;引用 requirement-parallel-orchestration 的 RequirementIndependenceDecisionV1、ParallelLaunchCardV1、SharedSurfaceLockMapV1 和 IntegrationMergeProtocolV1;实际派发还必须绑定 HostSubagentDispatchPlanV1、每项 AgentWorkLeaseV1、当前宿主 direct capability identity、取消围栏与同 work graph 串行回退,缺任一项时不得派发 |
requiredArtifacts | ✅ | 必须产出的需求、方案、计划、进度、报告、测试、changelog 等 |
consumerScope | 条件 | 控制面 / 模板-示例-校验链任务必填;列出 sourceOfTruth、currentConsumers、historicalMirrors、validateProbes、deployCopies |
backlogTruthReview | 条件 | 当任务/批次直接来源于 data/*.md open/partial 项时必填;列出 candidateIds、classification、evidence、scopeDelta |
validationRoute | ✅ | 引用 test-router、audit-release、release-verification 或当前 CP3 验证矩阵 |
regressionMatrix | 条件 | 高风险控制面 / 多批次修复必填;列出“历史能力 → 受影响批次 → 必跑验证 → 失败回滚点” |
verificationEvidence | 条件 | 宿主验证或控制面任务必填;记录 validate、targeted tests、fixture/direct replay、部署同步、VisibleEnvelope/UserFacingArtifactSet/LinkCapability、MCP fallback 等证据计划 |
ledgerWriteback | 条件 | 当本轮会改变 VL/PF/PI/ISSUE/GAP 的状态时必填;列出 targetLedgers、requiredFields、writebackEvidence、rescanResult |
deviationPolicy | ✅ | 绿色/黄色/红色偏离分级与处理方式 |
driftTriggers | 条件 | DevelopmentDriftGate 触发器:范围扩张、包/API/配置/文档消费者变化、新依赖、验证路线改变、dirty 污染或用户新确认 |
deviationLog | 条件 | 多批次或发生绿色/黄色偏离时,记录实际新增消费者、探针、同步副本与理由 |
rollbackPlan | ✅ | 失败恢复路径、回滚锚点或结构化意图重算条件 |
progressArtifact | 条件 | 多批次、预计 ≥10 文件、跨轮次或用户要求持续跟踪时必须写 05-实施进度.md |
safetyInterruptionRecovery | 条件 | 授权本地安全审查出现宿主安全提示/内容不可见时,引用 AuthorizedLocalSecurityAuditPresentationGate 的 SafetyInterruptionCard、last checkpoint 与 resume evidence |
publisherCredentialTopology | 条件 | 首次发布或发布身份/仓库/package/registry/auth topology 变化时,引用 PublisherCredentialTopologyGate;只记录身份、scope/access/permission/ownership/成功证据,不含 secret value |
currentBatchScopeDiff | 条件 | 多阶段/多批次 dev/fix 必填;比较 total phase scope、allowedFirstBatch、当前 batch、blockedScope 与本次 diff |
validationConsumerRebind | 条件 | 新增 root script、CI job、validator、deploy copy 或 consumer 时必填;把 allowedPaths、TestRoute、rollback 与 consumerScope 重新绑定 |
derivedArtifactFreshness | 条件 | 派生资产受 tracked/staged consumer、模板、索引或生成顺序影响时必填;绑定 Owner Gate、生成输入 identity、post-stage candidate check 与 post-commit replay |
turnLivenessContract | 条件 | 长任务、工具完成后无续接、宿主停滞或跨轮次恢复时必填;引用 ai-agent-system-architecture 的状态/lease/ACK/terminal/checkpoint、CheckpointValidation 与 LocalTaskTrace 契约及能力边界 |
executionBudget | 条件 | Auto、多批次、预计 ≥10 文件、C08 恢复、用户反馈「太慢/卡/文件太多」、或 resume 长任务时必填;见 ExecutionBudgetGate |
executionAttemptLedger | 条件 | formal command、失败重试、取消/中断或 restart 时必填;作为既有 TurnLiveness state 的 ExecutionAttemptLedgerV1 子状态,不得新建平行状态机 |
longTaskAuthorization | 条件 | 与 executionBudget 同触发;记录授权证据与 cycle 身份,见 LongTaskAuthorizationGate |
externalWaitAccounting | 条件 | 存在 CP 等待、CI/鉴权/人工审批/外部系统等待时必填;见 ExternalWaitAccountingGate |
instructionAuthority | 条件 | 命中 host-capability-routing、Auto、跨轮或多批次时,引用 instructionRefId / decisionId / authority / digestStrength / freshness / fallback;不复制原文 |
gitExecutionContext | 条件 | 任何 branch/worktree/commit/merge/cherry-pick/push 规划或执行前必填;引用 GitExecutionContextV1,逐项披露并分离授权 |
worktreeLifecycleReceipt | 条件 | DevCodex 引导创建 worktree 或诊断残留 worktree 时必填;引用 WorktreeLifecycleReceiptV1,外部对象保持只读 |
Git 共享状态动作由 GitExecutionContextV1 约束;schema 位于 git-execution-context.v1.schema.json,纯读取/校验实现位于 scripts/lib/git-execution-context.js。该能力不是 Git bot,也不能把宿主 UI 或用户绕过 DevCodex 的原生动作宣称为已拦截。
默认决策:
| 场景 | integrationPolicy | 规则 |
|---|---|---|
| 当前分支开发并交付当前分支 | none | 不创建/切换功能分支,不 merge、不 cherry-pick;需要时只单独确认 commit |
| detached/worktree/dev → 目标分支的选择性提交 | ordered-cherry-pick | 先形成有序且去重的 sourceCommitIds,验证目标基线,再显式 switch 与按序 cherry-pick;目标 commit ID 会变化 |
| 完整线性历史且需要保留原 commit IDs | ff-only-explicit | 仅在用户明确选择后使用 merge --ff-only;merge commit 仍非默认 |
| 功能分支或 merge commit | 非默认例外 | 先说明 reason/impact/alternative/target/recovery 并获得该动作授权 |
collaborationMode 未被 Profile/项目事实证明时必须为 unverified,仍采用 no-auto-branch。solo 项目默认 keep-current。branch-create / switch / commit / cherry-pick / merge-ff-only / push 每项都必须有独立 disclosure、authorization、authorizationEvidenceRefs 与 executionEvidenceRefs;pending 禁止携带证据,明确确认必须有本动作授权证据,completed 还必须有本动作执行证据。一个动作的确认不能传递给另一个动作,push 始终独立确认。branch create 必须先于 switch,且 branch/switch/integration disclosure 的 target 必须与 targetBranch 完全一致。读取已保存 context 时必须重算 validation,不得信任序列化的 valid/executable;conflictStatus=unverified 只能先核实,不能执行 Git 写动作。
cherry-pick 前必须满足:repo/HEAD/目标基线已验证,工作树与 index 没有未保护变更,source IDs 有序且不重复;只读 dirty 探针必须同时计入 tracked、untracked 与 ignored 内容,dirtySummary.untracked 包含 Git !! 条目。不得自动 stash、pull、reset、continue 或 abort。冲突时 conflictStatus=detected、validation.executable=false,停止并报告冲突文件与可选恢复动作;post-action 必须记录 targetAfter 和 postIntegrationValidationRefs,不能只凭命令退出码宣称完成。
DevCodex 引导创建的 worktree 必须记录 worktreePath / gitCommonDir / headRef / headCommit / owner / ownershipEvidenceRefs / dirtyState / lockState / activeJobState / createdByRunId / teardownPlan / cleanupAuthorization / cleanupAuthorizationEvidenceRefs。safeDirectoryMutationAllowed 永远为 false。单项 schema 为 worktree-lifecycle-receipt.v1.schema.json,聚合诊断 schema 为 worktree-diagnostics.v1.schema.json。
devcodex-guided 只有完整 receipt 经字段、派生 validation、gitCommonDir 与当前 HEAD/ref 重新校验,且 owner、clean、unlocked、无 active job、teardown plan、本次显式清理授权及独立授权证据全部具备时才可能 cleanupEligible;clean 探针必须同时计入 tracked、untracked 与 ignored 内容,避免删除被 .gitignore 隐藏的本地数据。HEAD/ref 已变化时保留创建归属,但立即退休旧清理授权并把 active job 降为 unverified。部分字段、冲突 receipt 或自报 validation.valid=true 一律不能取得清理资格。host-owned / external-unowned / unverified 只读诊断;dirty/owner/lock 任一未知时保持 UNVERIFIED,绝不 prune/remove。status/doctor 的 WorktreeDiagnosticsV1 同时受 1.5 秒单命令上限和 8 秒总预算约束;prunable 路径不进入,外部未归属路径默认不做 dirty 探测,当前 worktree 与有 DevCodex receipt 的对象才进入有界只读探测。发现 dirty、locked、prunable、external-unowned 或未核实状态时聚合为 WARN,并保留逐项 typed issue。长任务不得只依赖事后 SessionTimingCard 或 C08 轮次阈值。命中 Auto、多批次、预计 ≥10 文件、C08 恢复、用户反馈「太慢/卡/文件太多」、跨会话 resume 同一长任务时,必须冻结 墙钟预算 + 外部等待会计 + 长任务授权。
| 字段 | 要求 |
|---|---|
cycleId | 当前恢复周期唯一 ID;禁止与已关闭 cycle 复用 |
startedAt | ISO 墙钟起点 |
maxWallClock | 本 cycle 最大执行墙钟(不含 external wait) |
maxWorkUnits | 本 cycle 最大 WorkUnit 数 |
maxDirtyDelta | 允许新增的源码/配置 status 条目上限(或等价 diff 预算) |
maxMaterialFindings | 新增实质性 finding 上限 |
maxFullRuns / maxBuildRuns | full test / build 次数上限;默认只在里程碑 closure 执行 |
compactionBudget | 允许的 compact/resume 次数 |
stopActions | 预算触顶后允许的动作(handoff/report/memory only 等) |
resetPolicy | 仅允许 close-cycle-and-open-new;禁止静默清零同一 cycle |
任一预算先到:立即停止新 source mutation,写 StopSnapshot(elapsed、completed、remaining、dirty delta、findings、validation runs、blocker、nextAction),并进入用户确认/新 cycle 路径。
| 等待类型 | 计入 |
|---|---|
| AI 读/写/验证/构建 | executionMs(消耗 wallClock 预算) |
| 等用户 CP/确认/授权 | waitingUserMs(不消耗执行预算) |
| 等 CI / registry 鉴权 / 人工审批 / 外部系统 | waitingExternalMs(不消耗执行预算) |
报告与 TimingCard 必须分列 执行 / 等人 / 外部等待;禁止把隔夜等人或 CI 排队算成「AI 执行了一整夜」。maxWallClock 只约束 executionMs。
| 规则 | 要求 |
|---|---|
| 进入长任务 | 必须有可审计 authorizationEvidence:用户明确继续、合法 Auto、或 CP 确认;不得伪造 |
| 预算未冻结 | 禁止无人值守 source mutation |
| 用户再次「继续」 | 不得静默清零同一 cycleId 的已消耗预算 |
| 续跑 | 关闭旧 cycle → 新 cycleId + 新预算 + 更新 allowedPaths + 新授权证据 |
| 第二次 compact/resume 且旧 cycle 未关 | 强制 StopSnapshot 并要求新 cycle |
permission-core 等业务任务级 baseline 只能作样板,不得替代 DevCodex 通用 Contract 字段。
命中 host-capability-routing 时,ExecutionContract 只绑定 compact identity,不保存完整用户原文或 catalog row。compat/none、conversation-visible、readback 未验证或 digest mismatch 不能单独支持跨轮 mutation;应优先回绑 digest-bound CP/task artifact,失败则进入 StopSnapshot 并返回结构化意图重算,仍无法唯一化才请求重述。portable decision 不改变 allowedPaths、CP、Auto 或安全确认,Phase 1 也不得新增 native/MCP/CLI/Hook recovery action。
| 门禁 | 规则 |
|---|---|
OwnIntroducedRegressionSelfFixGate | 本会话/本批次自己改出的 CI 红、targeted 失败或 validate 回归:完成根因分析后必须主动修本地并复证,不得停在「是否要修」确认;用户面只汇报证据与残余风险 |
SharedStateMutationGate | git commit / git push / tag / publish / 远端共享态:默认禁止;仅当用户当前消息明确授权(如「提交并推送」「发布」)才可执行;「发版一次」≠ 后续补丁无限 push;一次审批不是空白支票 |
| 与 Auto 关系 | @rocky / Auto 可自动通过 CP,不豁免 SharedStateMutationGate;发布类自然语言(如「版本发布」)仅授权本轮收口发布动作,仍须 R6 清单与成功证据 |
| 级别 | 判定 | 处理 |
|---|---|---|
| 🟢 绿色 | 不改变目标、范围、接口、路径边界的局部实现微调 | 记录原因后继续 |
| 🟡 黄色 | 新增当前消费者、验证动作或部署副本,但不改变需求范围,且仍在 yellowDeviationBoundary 内 | 更新计划/进度/报告与 deviationLog 后继续 |
| 🔴 红色 | 新增依赖、改 Hook runtime 权限模型、改 CLI 语义、改发布动作、扩大需求边界、触达 blockedScope 或改变验证路线 | 停止执行,回 CP2 或 CP1 |
进入每个实施批次前必须反向比较 phaseTotalScope / allowedFirstBatch / actualTargetSet / blockedScope / dirtyBoundary。allowedFirstBatch 只允许当前批次,不得因总路线图已确认而一次放开后续模块。
当计划或实现新增 root package script、CI job、validator、fixture runner、部署副本或外部 consumer 时,执行 ValidationConsumerRebindMatrix,同步 allowedPaths / consumerScope / TestRoute / regressionMatrix / rollbackAuthorization / deployCopies。合同禁止修改某消费者但验收又依赖该消费者时必须在编码前阻断;回滚包含未纳入当前任务与精确目标集的删除、清空或其他动作时不得通过,实际操作权限仍由宿主决定。
execution-contract 只提供可复审契约,不豁免 S01~S07、C01、C10、C18。allowedPaths。allowedPaths、requiredArtifacts 或 validationRoute 时,不得进入无人值守执行。命中长任务或宿主停滞时,ExecutionContract 只引用 ai-agent-system-architecture#TurnLivenessRecoveryGate,并补充本任务的 allowedRecoveryActions / forbiddenRecoveryActions / checkpointOwner / idempotencyEvidence / hostCapability / sidecarLifecycle / recoveryValidation。默认允许状态观察、恢复卡和用户可见诊断;默认禁止自动重放 mutation、修改宿主私有 thread store、终止未知/用户进程或把 Hook-only 检测描述为无事件 watchdog。sidecar 若未积累前瞻证据必须保持 gray,并写 trial/rollback 条件。
CheckpointValidationResultV1 必须分别记录 response-time 与 post-execution 的 status/evidence/deadline/errorCode;缺失宿主终态证据不得写 pass。启用 LocalTaskTraceV1 时还必须冻结 traceOwner / eventTypes / terminalSource / replayBoundary / retentionScope:只允许当前 turn 的只读数据投影,禁止 payload 执行、operation replay、state mutation、host wakeup 与 process control。
ExecutionAttemptLedgerV1 直接嵌入现有 TurnLiveness state,记录 candidateId / phase / commandSignature / qualificationEvidence / attemptNo / failureSignature / sourceDelta / evidenceDelta / FirstPassYield / commandWallMs / externalWaitMs / waitingUserMs / modelReasoningMs / terminal。有可用 qualification probe 时,formal run 前必须先有同 candidate/phase/command 的 pass;否则返回 qualification-required。
相同 candidate + phase + command + failureSignature 的连续两次 formal failure,且两次 sourceDelta=0 / evidenceDelta=0 时,第二次即生成 StopSnapshotV1,第三次正式运行前返回 stop-before-third 并停止新 mutation。相同 eventId 的相同语义重复交付幂等忽略,语义冲突必须报错。用户取消/中断必须写 cancelled/aborted terminal、释放 AI-owned lease,并记录 cancel finalizer 与 ServiceLifecycleCleanup;restart 只恢复原 ledger,不得把旧 inProgress 自动提升 completed。
当 AI 根据问题锚点和预期行为判断任务目标是修复 Bug、缺陷、回归、安全问题、规范缺口、审查 finding 或其他已确认不正确行为时,必须建立双层修复协作契约。该触发与模型名称、是否切换模型/Agent、宿主 UI 或工作流标签无关;纯新增能力、纯分析/审计发现阶段或只讨论模型选择不触发。
| 字段 | 要求 |
|---|---|
repairClass | lightweight / full |
contractState | draft / approved / executing / verification-pending / accepted / rejected / blocked |
authorizationEvidence | CP、合法 Auto、验证预算、发布或其他可审计的工作流授权;Auto 使用 mode=auto,不得伪造人工确认。文件/命令的操作级 permission 由宿主决定,不得记录成 DevCodex 自有授权 |
roleAssignments | 显式记录决策/验收与执行/验证逻辑角色;允许同一主体,但高风险通过结论不能只有补丁产出者自证 |
允许状态转换为 draft→approved/blocked、approved→executing/blocked、executing→verification-pending/blocked、verification-pending→accepted/rejected/blocked、rejected→executing/blocked。禁止 executing→accepted;单个测试通过、代码写完或开始验证不能替代 accepted。
适用于低风险、预计不超过 2 文件,且无公共 API/Schema/config、控制面、发布、多批次或角色交接的 repair task。允许在问题确认、报告或记忆中内联,不强制完整任务目录。
| 层 | 必填字段 |
|---|---|
| 决策/验收层 | problemAnchor、expectedBehavior、acceptanceEvidence、decisionAcceptanceOwner |
| 执行/验证层 | allowedPaths、validationRoute、rollbackTrigger、executionVerificationOwner |
P0/P1、安全、控制面、公共 API/Schema/config、预计 ≥5 文件、多批次、角色交接、发布或其他高风险场景必须升级完整契约。
| 层 | 必填字段 |
|---|---|
| 决策/验收层 | auditSnapshot、approvedFindingIds、evidencePacket、roleAssignments、acceptanceMatrix、authorizationEvidence、条件 humanApproval |
| 执行/验证层 | allowedPaths、blockedScope、batchPlan、findingToPatchMap、regressionMatrix、handoffIntegrity、independentReReview、rollbackPlan |
findingToPatchMap 必须形成 problemAnchor/findingId → patchPaths → verificationEvidence → acceptanceStatus;每个 finding 至少映射一个 patch 或 no-code-change + evidence,每个 patch 必须反向对应已批准问题。
handoffIntegrity 复用 ContextHandoffCard,并追加 status / missingFields / checkedBy / checkedAt。independentReReview 至少记录 owner / independenceMode / evidence / result / runId;independenceMode 可为 isolated-session / different-agent / different-model / human / black-box-evidence,不强制第二模型或第二 Agent。
repair-prevention-assessment#RepairPreventionAssessmentGate 已返回有效 RepairPreventionAssessmentV1;当前修复证据与 prospective prevention evidence 分列,no-new-control 具有标准 reason/evidence,高风险或 repeat escape 使用 full。## ExecutionContract
| 字段 | 内容 |
|------|------|
| scope | |
| allowedFirstBatch | |
| blockedScope | |
| allowedPaths | |
| requiredArtifacts | |
| consumerScope | |
| backlogTruthReview | |
| validationRoute | |
| ledgerWriteback | |
| verificationEvidence | |
| deviationPolicy | |
| driftTriggers | |
| deviationLog | |
| rollbackPlan | |
| progressArtifact | |
| safetyInterruptionRecovery | |
| publisherCredentialTopology | |
| instructionAuthority | instructionRefId / decisionId / authority / digestStrength / freshness / fallback |
| turnLivenessContract | state/lease/ACK/terminal + checkpointValidation + LocalTaskTrace/replayBoundary |
| executionBudget | cycleId / maxWallClock / maxWorkUnits / maxDirtyDelta / maxFullRuns / stopActions / resetPolicy |
| executionAttemptLedger | qualification / attemptNo / failureSignature / source+evidence delta / timing split / terminal / StopSnapshot |
| externalWaitAccounting | executionMs vs waitingUserMs vs waitingExternalMs |
| longTaskAuthorization | authorizationEvidence / cycle lifecycle / continue=new-cycle |
| repairPreventionAssessment | RepairPreventionAssessmentV1 / immediateClosure / prospectiveStatus / rollbackOrSunset |DevelopmentDriftGate 核对 allowedFirstBatch / blockedScope / driftTriggers / validationRoute / consumerSync / dirty boundary。executionBudget + longTaskAuthorization;有等待面时存在 externalWaitAccounting;缺预算或未授权不得进入无人值守 mutation。allowedPaths、requiredArtifacts、consumerScope、backlogTruthReview、regressionMatrix、ledgerWriteback 与 deviationLog;消耗逼近预算时提前提示,触顶写 StopSnapshot。verificationEvidence、历史能力回归结果、backlog 真相复核结果与最终偏离记录;命中派生资产时引用 PostStageDerivedArtifactFreshnessGate 的 staged candidate receipt 和 post-commit replay,不能用生成时的 working-tree check 代替;命中 turn liveness 时同时引用双阶段 checkpoint 与 trace zero-write/replay 证据;长任务 ECR 必须引用 budget 消耗与等待分列。© devcodex-labs, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files in content/skills/execution-contract of devcodex-labs/devcodex.
Open the folder on GitHubat commit 1dd4525
devcodex-labs/devcodex
无障碍与国际化专家 Owner — 当任务涉及可访问性、键盘操作、焦点、屏幕阅读器、ARIA、语言地区、本地化、RTL、翻译资源、用户可见文案或多语言文档时使用;要求把包容性体验和本地化验证绑定到真实用户路径。
devcodex-labs/devcodex
AI Agent 系统架构专家 Owner — 当任务涉及 Agent 路由、工具调用、上下文管理、记忆、状态机、权限、人机协作、可观测性、回放验证或模型辅助治理时使用;要求把 Agent 行为设计成可解释、可恢复、可审计。
devcodex-labs/devcodex
API 契约架构专家 Owner — 当任务涉及 public API、HTTP/SDK/CLI 契约、版本兼容、错误模型、分页过滤、幂等、Schema、类型、迁移或消费者影响时使用;要求先冻结消费者契约,再设计实现与验证。
devcodex-labs/devcodex
架构设计文档编排 Owner — 当用户要求架构设计、系统设计、技术架构或可指导开发、Review 与任务拆分的完整方案时使用;要求从业务流程反推节点、状态、数据、一致性、异常补偿、ADR 与实施任务。
devcodex-labs/devcodex
审查公共维度 G0~G5 + Profile Freshness Check — 所有 audit 子类型必先执行的基础维度层
devcodex-labs/devcodex
审计工作流的跨会话状态机 — 在 <audit-root/.audit-state/<session-id.json 持久化轮次/发现项/收敛状态,支持 Token 中断后精准恢复
执行契约规范 — 为长流程、多文件、Auto 或控制面任务生成/校验 ExecutionContract,约束范围、路径、产物、验证路线、偏离分级与恢复策略. Execution Contract is an agent skill from devcodex-labs/devcodex.
Run `npx skills add devcodex-labs/devcodex --skill execution-contract -a claude-code`. Or copy the skill folder (content/skills/execution-contract in devcodex-labs/devcodex) into .claude/skills/execution-contract in your project. Claude Code loads it when a task matches its description.
Run `npx skills add devcodex-labs/devcodex --skill execution-contract -a codex`. Or copy the skill folder (content/skills/execution-contract in devcodex-labs/devcodex) into .agents/skills/execution-contract in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add devcodex-labs/devcodex --skill execution-contract -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/execution-contract, .gemini/skills/execution-contract, .github/skills/execution-contract and .opencode/skills/execution-contract in your project.
Going by SKILL.md and its folder, Execution Contract needs the command-line tools its instructions call (git).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Execution Contract is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
devcodex-labs (a GitHub organization) maintains it in devcodex-labs/devcodex, which has 439 GitHub stars. The repository holds 70 skills in this directory. The repository was last updated on September 17, 2026.
Source: devcodex-labs/devcodex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.