zf-refactor-generalization-audit
ZaoFu refactor portability audit for Claude or Codex. Use before starting or restarting a Hermes/xx-agent/project refactor, or when asked whether recent…
от uisee-ai★ 36 звёзд на GitHub
Установить zf-refactor-generalization-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
ZaoFu Refactor Generalization Audit
Objective
Decide whether fixes learned from a recent refactor are generic ZaoFu harness capabilities or one-off project patches, then produce a concrete preflight checklist for the next target agent/project refactor.
Default repository-facing output is Chinese unless the user asks otherwise.
Ground Rules
- Read
AGENTS.mdfirst and follow ZaoFu repository rules. - Treat
zf.yamlas the only control-plane config. Respectproject.state_dir; do not assume.zf. - Use committed evidence as the source of truth:
tasks/done, commit hashes, tests, and runtime events. Dirty worktree files are context, not proof. - Do not mutate runtime truth:
events.jsonl,kanban.json,feature_list.json,session.yaml, androle_sessions.yamlare kernel managed. - This skill is read-only unless the user explicitly approves creating or updating skills, docs, backlogs, or code.
- If a deterministic checker or runtime change is needed, create a proposed backlog first. Do not implement it in the same pass unless approved.
Inputs
Use only the inputs relevant to the request:
- bounded time window, such as "最近两天";
- target project path and target
zf.yaml; - recent
tasks/done/*.mdand relatedbacklogs/*.md; git log,git show --stat, and targeted diffs for referenced commits;- focused tests named in done tasks;
- runtime evidence under the configured state dir when diagnosing a live run.
Audit Workflow
Bound the scope.
- If the user gives no window, inspect recent commits plus the current requested target.
- Record target repo path, target config path, branch, state dir, and backend assumptions.
Audit completed backlog evidence.
- Read only relevant
tasks/doneitems. - For each item, capture bug class, fix commit, verification command, and whether the fix touched harness code or target project code.
- Prefer done tasks with explicit implementation commit and focused tests.
- Read only relevant
Review the associated commits.
- Use
git show --stat <commit>first. - Open targeted diffs only when the stat cannot answer ownership or genericity.
- Classify touched files:
- generic harness:
src/zf/core,src/zf/runtime,src/zf/cli,src/zf/autoresearch,src/zf/web, shared tests and docs; - config/project adapter: examples,
zf.yaml, provider setup, skills; - project-specific: target application code, one-off branches, manual state repair, private provider history.
- generic harness:
- Use
Check portability criteria.
- Generic when the behavior is config-driven, covered by non-project-only tests, and does not hard-code target ids, branch names, paths, or event payloads.
- Needs adaptation when event names, dirty-file policy, provider backend,
stage names, artifact paths, or LLM validation commands differ by target.
注意:writer/impl slice 的完工事件可能是
dev.build.done或impl.child.completed(controller/profile flow 发后者,kernel 视为等价——dispatch_routing_queries.py_requires_task_ref_for_progress_event、terminal_ledger.pyTERMINAL_SUCCESS_EVENTS、topology.py); 只认单一dev.build.done会误判 controller/profile 拓扑不可移植。 - Project-specific when it depends on one repo's source layout, manual local state, or a non-repeatable prompt/session condition.
Inspect the target
zf.yaml.- Verify workflow stages, role backends, event contracts, affinity lanes, rework routing, repair policy, trigger budget, state dir, and skills.
- Confirm scan/plan/artifact/task-map outputs are durable files, not only chat text or pane history.
- Confirm resume/recover paths can infer the next action from events.
Produce the decision.
GO: no P0 gap blocks reuse; config and smoke checks pass.GO_WITH_ADAPTATION: reusable harness exists, but target config or skills need explicit changes before launch.STOP: missing contract, hard-coded assumption, broken smoke, or no recovery path for a known critical failure.
Output Format
Lead with a concise decision, then include this table:
| Bug/fix class | Evidence | Genericity | Target adaptation needed | Next action |
|---|---|---|---|---|
Then include:
- target preflight checklist;
- known residual risks;
- proposed backlog/skill/doc assets, if any;
- exact commands already run and commands still recommended.
Preflight Checklist
Before starting a long refactor on a new target project:
zf validate --cold-startpasses for the target config.- Target
project.state_diris isolated and not stale from another run. - 根脚手架 ownership:仅当本轮 delivery 必须修改或验证根级脚手架/entrypoint
时,task_map 才声明
workspace_root_owner_required=true(顶层或refactor_contract内)并分配对应根路径。局部/存量项目默认省略该字段(等同 false),不应虚构 assembly 或根文件所有权。该开关不放松 task schema/path/evidence 或并行 bundle assembly 校验;审计时确认其与 source inventory 一致。 - workflow stages have explicit completion events and next-stage dispat
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- agents/openai.yaml
FAQ
Что делает скилл zf-refactor-generalization-audit?
ZaoFu refactor portability audit for Claude or Codex. Use before starting or restarting a Hermes/xx-agent/project refactor, or when asked whether recent refactor bugs, fixes, backlogs, or commits are generic enough to reuse in another agent/project refactor. Reviews completed backlogs, commits, tests, zf.yaml, and target project constraints to decide reusable harness capabilities and required preflight adaptations.
Как установить скилл zf-refactor-generalization-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл zf-refactor-generalization-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…