implement
Implement a bounded change through behavior proof and the contract's S1/S2 owner rules.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- implement
- description
- Implement a bounded change through behavior proof and the contract's S1/S2 owner rules.
02 资源文件 1
- 参考文档agents/openai.yaml42 B
03 SKILL.md 正文
Implement
Read the contract, .loopzero/task.md, repository guidance
and affected interfaces. Confirm the task worktree and branch. Follow
credential conventions and
delegation guidance.
As an unattended worker, never use an ask-the-user or request-input tool. Send one message with a blocker or question to the parent (or owner named in the brief), then end the turn.
Before the first code edit, record observable criteria in task Acceptance and freeze them. Change Acceptance only with a recorded reason in Notes, before implementing the change. For changes touching guards, auth, permissions, sessions, secrets or trust boundaries, record a short design pass in Notes before the first code edit: threats, invariants and chosen approach.
Implement that bounded acceptance with behavior proof; use write-tests for test design. For a bug fix, watch the regression test fail on pre-fix code and record where in Notes; a test that passes without the fix proves nothing. For migrations, authorization, locking/concurrency or policy logic, list edge cases in Acceptance and map each to a test or recorded evidence. Observe required UI/runtime behavior within actual permissions. Required acceptance that remains unobserved stays open with a next-action owner. Record tested revisions, observations, commands, results, trade-offs and limits in Notes or human Validation; evidence from an earlier head cannot establish a current gate verdict. Apply local gate receipt reuse.
Run a command expected to take more than about two minutes (builds, browser
runs, full checks) detached, so a harness that ends your turn cannot kill it:
setsid nohup bash -c 'echo $$ >LOG.pid; <cmd> >LOG 2>&1; echo $? >LOG.exit' </dev/null >/dev/null 2>&1 &,
then block on until test -f LOG.exit; do sleep 30; done.
For builds, tests, CI, review, ready and merge, Codex exec/write_stdin yields
=120 s (>=30 s otherwise); Claude uses a background completion notification or
t3_background_wait. Read the completed result once; never uset3_thread_readortask_statusfor liveness. Cap returned output at the producer:gh api --jqselected fields, shell| head -c 2000, thread reads limit <=2, maxCharsPerItem <=600 and runLimit 1. Do not end the turn, settle or report done while a job you started has noLOG.exit; if the turn must end, first schedule a one-shot wakeup (T3schedule:{type:once,runAt:<ISO time>}) that readsLOG.exitand resumes the delivery step it feeds. To cancel, checkLOG.exitfirst, then runkill -- -$(cat LOG.pid); neverpkill -f, which also matches your own shell ($!is not the job:setsidmay fork). Codex 0.165 sends SIGTERM (exit 143) to such children (openai/codex#46702); drop this once a fixed release is verified.
Treat /tmp as disposable: only running-command logs, build output and browser
runs belong there. Keep receipts, evidence, review artifacts and handoffs on the
PR or issue, or in the durable scratch your repository's instructions name. Make
task checkouts as worktrees of an existing clone, not new clones. At task finish,
hand leftover worktrees and generated files to the periodic retention job named
in host or repository instructions (such as scratch-retention), without waiting
or scheduling wakeups. The job must confirm a pushed branch, merged or closed PR,
verified archive handoff of required review evidence, clean tracked/untracked
Git state, an empty shared stash, inactivity, no unarchived T3 thread binding
where T3 is used, and its host age/size policy with a 24-hour mtime/ctime idle
floor. Honor host execution approval rules; use dry run until execution is
authorized. If no job is named or any condition is unproved, preserve the leftovers
and report cleanup to the owner. Successful loopzero merge already performs its
own cleanup under the delivery contract.
Follow the contract's delivery steps and review budget. Check the clean committed head before pushing; publish and review every pushed head within that budget. Batch all substantive and mechanical repairs into one delta head. Preserve an approved head unless necessary changes require renewed checks and review. Suggestions must not expand scope. Follow the contract's S1 owner route and S2 merge authority. Never merge main into a reviewed branch. Rebase your own commits onto origin/main BEFORE review. If a conflict appears AFTER review: rebase (drop any merge), check, then one fresh whole-PR primary; that is the PR's one fresh lineage.
Do not bypass the sandbox, change the check list or enable [checks].network
to pass checks. Report base failures rather than work around them. Only you
commit, never checks, hooks or scripts. If acceptance requires unlisted paths,
update task and PR first; request scope decisions for expanded proof seams or
ownership. If interrupted, preserve an adoptable diff and report remaining
acceptance, checks and findings under the contract's handoff rules.
A host or runner change that alters what jobs see (ports, env vars, paths, services, labels) goes live only after the repository change consuming it is on main, or stays compatible with current main; prove it with one green run of the affected job on the changed host before enabling it for every runner. Before parking a PR behind another, confirm that one does not wait on yours; never hold two PRs on each other. A failure outside the contract's S1 owner route goes with its last-green comparison to diagnose at once; recording it is not handing it over.
To requeue, unless an S2 hold applies, post @mergifyio queue as the
whole PR comment from the same login; loopzero merge --wait never requeues
by itself.
04 同仓库更多 Skills
typesafe-ai
Design or implement TypeSafe judgments for routing, ranking, extraction, and verification when application behavior needs semantic understanding; use as a supporting method within the current planning or delivery task.
write-tests
Add or improve behavior-focused coverage when testing is the task; use diagnose for observed failures.
write-design-doc
Create or refine a durable design contract: exploration, ADR, initiative, blueprint or guide.
work-issue
Deliver one live GitHub issue through verified merge and closure or an explicit partial-delivery boundary; use only for work anchored to an issue.
security-review
Add security review to diffs changing auth, sessions, permissions, secrets, endpoints, external calls, config, file or shell primitives, serialization, or dependencies.
review
Assess a non-diff artifact, system, architecture, workflow, agent configuration, or idea without changing it.