跳到正文
cccskills
免费在 GitHub 公开

builder-refresh

Refresh a builder's own context at a protocol boundary — save working state, verify it, clear, and re-orient. Use when porch emits a context-refresh task, or the builder is told to "refresh your context" / "run a self-refresh". A builder does not invoke this autonomously mid-task; porch chooses the moment. Counterpart to the architect's /arch-save.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev星标 290(GitHub 290 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md6.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

/builder-refresh — save, clear, and come back knowing where you are

You are a builder that has reached a protocol boundary. Your context can be discarded here safely, because everything that matters is already on disk: the spec, the plan, status.yaml, your thread narrative, and git history. A fresh context re-orients from those artifacts rather than from memory.

The enforcement is in the command, not in this document. afx self-refresh refuses to clear on an unverified save, refuses when the re-entry cannot be scheduled, and refuses when your worktree has uncommitted tracked changes. This skill sequences the steps and explains the judgement calls; it cannot and does not decide whether the clear is safe.

When NOT to run this

Porch chooses the moment. You do not. Run this when porch's refresh task tells you to, or when the architect directs it. Do not invoke it mid-task on your own judgement — a boundary is a point a fresh context can resume from, and a mid-task snapshot resumes into confusion.

If you are not at a boundary and think you need a refresh anyway, say so to the architect rather than doing it: afx send architect "...".

The procedure

1. Use the commands porch gave you

Porch's refresh task contains the exact two commands for this boundary, including the --boundary flag. Run those, verbatim.

Do not retype them from memory and do not omit the flag. --boundary binds the challenge to the boundary it was issued at, so a challenge left behind by an aborted refresh cannot be used to clear you at a later boundary, against a save describing work that has since moved on. That guard has been silently disabled twice by an instruction that dropped the flag, which is why this document deliberately does not restate the commands.

If you arrived here without a porch task — an architect-directed refresh, say — there is no boundary to bind, and the flagless form is correct. Run afx self-refresh --help for the exact spelling rather than guessing it.

2. Write your working state

The first command prints a save request naming a file and a marker line. Write that file.

The marker must be the FIRST LINE, reproduced exactly. A save whose nonce appears further down is refused — that check exists because echoing the request back into the file otherwise passed every gate, and echoing instructions is something agents do by accident.

Write for a cold reader — a competent agent that wakes up with your worktree, your branch, and no memory of this conversation. Most of your state is already on disk, so do not restate the spec or the plan. Carry only what the artifacts do not contain:

  • receipts — what is done and verified, with paths and commit hashes, distinguishing "written" from "verified";
  • deviations from the plan, and why;
  • flaky or skipped tests, and what you did about them;
  • deferred work, and the reason;
  • standing orders from the architect you are still bound by, including anything you were told NOT to do;
  • the next concrete action.

Pointers, not prose. The save has a minimum size, and it is not a word count to pad — a file below it is indistinguishable from a stub. If you genuinely have less than that to say, you are probably omitting receipts or standing orders.

3. Run the execute command, then stop

The second command verifies your save, writes a re-orientation to disk, schedules your re-entry, and clears you — in that order, and only if every step succeeds.

Then end your turn. Do not start new work. The clear takes effect when the turn ends.

If it refuses

Most refusals happen before anything destructive, and those leave your context untouched. One does not. Read which you got.

Pre-clear refusals — your context is intact

RefusalWhat it means
state file missing / too small / wrong nonceYour save did not satisfy the gate — check the marker is on line 1
worktree has uncommitted tracked changesCommit first; a refreshed context re-orients from git, so uncommitted work is invisible to it
Tower is not running, or did not schedule the re-entryClearing would strand you, so it refused
challenge missing / already consumed / for a different boundaryRun the begin step again
invalid parametersA flag is out of range — nothing was read or written
challenge could not be marked consumedNothing was cleared, but a re-entry is already queued and will arrive; ignore it. Retrying queues a second one

For any of these: report it and carry on.

afx send architect "Context refresh refused at <boundary>: <the reason it printed>"

Then run porch next for your normal tasks. The refresh never blocks your work — the boundary is recorded as consumed either way, so a failed refresh costs you some context and nothing else.

clear-failed — you cannot assume anything

If the command reports that the clear was attempted but may still have landed, do not treat that as a pre-clear refusal. Sending /clear can succeed on the wire and still report an error, so from inside this turn it is genuinely unknown whether your context survives.

  • A re-entry message is already queued and will arrive shortly. If your context was cleared, that message is your re-orientation. If it was not, the message is harmless and can be ignored.
  • Do not start new work in this state.
  • Tell the architect explicitly that the outcome is ambiguous:
afx send architect "Self-refresh clear-failed at <boundary> — clear may or may not have landed; re-entry is queued"

After the clear

A re-entry message arrives shortly, identifying itself as an automatic context refresh. It carries your identity, protocol, project, worktree and branch, and points at .builder-reorient.md — the full spawn-quality frame, on disk.

It will tell you to run porch next. Do that; porch's state is untouched by the clear and its next task emission is your re-orientation.

If the re-entry never arrives, nothing is lost. .builder-reorient.md is on disk and the architect can send you back with one message. Say so if you notice.

What this does not do

  • It does not write status.yaml. Only porch does, and the boundary is already recorded there before you are asked to refresh.
  • It does not decide whether to refresh. Porch decided that.
  • It does not retry. A boundary is refreshed at most once, so a refusal means this boundary simply does not get a refresh.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

afx

免费

Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks. ALWAYS consult this skill BEFORE running any `afx` command to get the exact syntax. This prevents wasting time guessing flags that don't exist. Use this whenever you need to spawn a builder, check status, send messages, clean up worktrees, manage Tower, or run cron tasks. If you're about to type `afx` followed by anything, check here first.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

arch-init

免费

Adopt an architect identity and recover its state from codev/state/<name>.md. Use when an architect terminal needs to (re)establish which architect it is — after a restart, context loss, or session handoff — or when the user says "/arch-init", "you are the X architect", or "recover your architect state". Identity resolves via `afx whoami` (an explicit name argument overrides); if neither resolves, ask the human — never guess.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

arch-save

免费

Save an architect's state, clear its context, and re-init automatically — the packaged save→clear→re-init refresh cycle. Use when the owner directs a context refresh, or says "/arch-save", "save and clear", "refresh your context". Runs on the owner's direction; an architect does not invoke it autonomously mid-task. Counterpart to /arch-init, which recovers the state this writes.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

codev

免费

Codev project management CLI — init, adopt, bootstrap-docs, update, and doctor commands. Check this skill before running any `codev` command (except `consult`, `porch`, or `afx` which have their own skills). Use when setting up new projects, adding codev to existing repos, updating framework files, or diagnosing missing dependencies.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

consult

免费

AI consultation CLI — query Gemini, Codex, or Claude for reviews and analysis. ALWAYS check this skill before running any `consult` command. Use when reviewing specs, plans, implementations, or PRs with external models, running parallel 3-way reviews (cmap), or checking consultation stats. The `-m` model flag is always required except for `consult stats`.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

AI image generation via Gemini with optional async providers. Use when the user wants to generate, create, or make an image, or when you need to create visual assets like logos, diagrams, or illustrations. Requires the API key for the selected provider.

中文简介正在准备中。当前显示原文说明。

cluesmith/codev2902026年10月24日 更新

查看 cluesmith 的全部技能

报告此技能的问题