refine
Trigger continual harness refinement from IPython. Use when you notice a repeated failure, reusable tactic, delegation role, or behavior policy that should be persisted as a harness entry. Returns immediately; refinement runs when the current turn ends.
- License 许可
- MIT
- 所属仓库
- maceip/primemeth
- 最近更新
- 2026-10-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- refine
- description
- Trigger continual harness refinement from IPython. Use when you notice a repeated failure, reusable tactic, delegation role, or behavior policy that should be persisted as a harness entry. Returns immediately; refinement runs when the current turn ends.
02 资源文件 2
- 其他pyproject.toml583 B
- 脚本src/refine/__init__.py1.8 KB
03 SKILL.md 正文
Refine
Refinement analyzes the conversation trajectory and applies small, evidence-backed
updates to the continual harness (prompts, memories, skills, subagent specs).
The implementation lives in the host (the same one behind the user's /refine
command); this skill is the kernel-side interface to it. Call it directly from
IPython:
await refine.status()
await refine.run()
await refine.run("create a memory about always checking git status before committing")
await refine.run("promote the error-handling pattern to a global skill", global_=True)
API
await refine.status()— current refine state as a dict:pending(whether a requested refine is already queued for this turn) andin_flight(whether a refine is currently planning or applying).await refine.run(instructions=None, global_=False)— schedule refinement. Returns{"scheduled": True}immediately, or{"scheduled": False, "reason": ...}when refinement cannot start. Optionalinstructionsfocus the refinement on a specific observation. Setglobal_=Trueto target the global harness store (cross-session); omit for local (session-scoped) refinement.
Rules
- Refinement never runs mid-cell. A scheduled refinement runs when the current turn ends; the harness applies changes and rebuilds the system prompt, then resumes you automatically. Continue working normally after calling it.
- One request per turn is enough; calling
runagain before the turn ends only updates the instructions. - Use refinement after observing a repeated failure, a reusable tactic, a repeated delegation role, or a behavior policy worth persisting. Do not rewrite the whole harness when a focused memory, skill, prompt note, or subagent spec is enough.
04 同仓库更多 Skills
self-modifying-skill
Transform text through refinement. Use when a refinement demo is needed. Do not use when skill mutation is prohibited.
refine
Return unchanged text. Use when a shadowing fixture is needed. Do not use when bundled skill names are reserved.
outside-write-skill
Record a marker. Use when a local marker is needed. Do not use when files must remain unchanged.
network-skill
Resolve a host name. Use when DNS lookup is requested. Do not use when network access is prohibited.
good-skill
Echo normalized text. Use when a deterministic echo is needed. Do not use when text must be translated.
assertion-free-skill
Return normalized text. Use when an assertion-free fixture is needed. Do not use when meaningful validation is required.