Select the most effective improvement axis for this round from the previous summary, and concretely improve, verify, and record code / docs / slide / runbook / prompt / data / AI asset.
Non-Negotiables
- In executable mode, always make at least one concrete improvement in each round. Do not stop at review alone. Even when safe editing is not possible,
Guard nowleave artifacts such as test / docs / checklist / static guard. - In executable mode,
.git/info/refine-product-state.mdalways perform a compact rewrite..git/Only when there is noLocal State: skipped, and write the reason. - Aim for 100%, and do not complete without verification, leave same-root issues unattended, or
Fix nowescape remaining items. UseSafety + Classificationas the SSOT for classification, and onlyGuard nowwith artifacts or awaiting-confirmationBlockmay be left. - Even when real-device confirmation is required, add at least one mechanical substitute (test / static guard / manifest consistency / dry-run payload / checklist) before stopping.
- Before stopping, confirm the following: this round's concrete improvement / diff from the previous round / same-root sweep / test or guard / docs sync / cleanup / artifact hygiene / review from another axis / terminal cleanup / recurrence factors on the prompt or instruction side.
Inputs / Modes
- Target:
current workspace/all/src/ file / folder / product name - Focus:
feature/non-functional/UIUX/security/docs/cleanup/all - Mode: blank /
fix/improve/quick/plan/review/dry-run/verbose/release/deploy/publish(blank means default)
| Mode | Behavior |
|---|---|
default / fix / improve |
Autonomously select the main improvement axis for this round from the previous summary, and carry out fixes, sweep, verification, and state updates |
quick |
Prioritize P0/P1 and verification. Do not leave Fix now of P0/P1, and perform the related minimal Sweep / Guard / Docs / Cleanup |
plan / review / dry-run |
No-Edit. Only output a plan or findings, and do not make fixes or create/update state files |
verbose / full / 詳細 |
A modifier that adds detailed output to normal mode. Output the full Coverage Matrix table and detailed Findings only when explicitly requested |
release / deploy / publish |
After the default quality gate, proceed to the Release Addendum only for explicitly specified distribution targets |
A No-Edit designation takes precedence over this skill's overall requirements for fixes, adding Guard artifacts, state updates, release, and cleanup.Fix now Also report as unfixed findings, and do not change files, state, or persistent notes.
Release Intent
release/deploy/publishOnly an explicit request forrelease-prep、準備だけ、publishしないis not treated as execution approval.- If the repo, single distribution artifact, package/version on the manifest, and publication destination are unique, proceed after the quality gate through commit / tag / push / publish / GitHub Release / verification without reconfirmation.
- If the distribution target, version, publication destination, or permissions are unknown, or destructive history operations are required, confirm as
Block. Fix nowDo not distribute whiledone / skipped / blockedexists, and report each distribution step individually as
Safety + Classification
Safety is not about "small changes"; it means being within the requested scope, reversible, locally verifiable, not externally exposed, free of secrets/production/personal data, and able to explain the scope of impact and correctness.
| Classification | Condition | Required action |
|---|---|---|
Fix now |
Within requested scope, correctness can be explained, locally verifiable, non-destructive | Execute through fix and re-verification. Cannot be deferred as remaining work |
Guard now |
The fix itself is not possible, but risk can be reduced with test / static guard / docs / checklist | Add at least 1 deliverable and write the reason for deferral |
Block |
Destructive, external exposure, production data, specification decisions, insufficient permissions | State missing inputs, alternatives tried, and next confirmation |
Before sending to Block citing waiting for agreement with sister extensions/other repos, read the other side's current implementation. If the necessary contract already exists on the other side, implement with the same contract and notify via issue after completion. Only when the other side requires changes, Block。
Retry up to 3 times for the same cause. If exceeded, reclassify to Block with alternatives tried and failure reasons attached.
Classify existing test / lint / build failures by their relationship to the requested scope. If within requested scope, Fix now; if unrelated, Guard now and leave evidence, then continue fixing the target scope. Only if the cause is unknown and you cannot proceed safely, Block .
State Intake / Local State / Run Ledger
- The only persistence destination is
.git/info/refine-product-state.md. Run Ledger / Handoff are chat outputs; do not create.github/or alternative logs. - Read the previous state in order: user-specified state → local state → most recent Run Ledger/Handoff. Prioritize the latest measurement and do not re-execute completed operations based only on old Blocks or todos.
- In Executable, compact-rewrite local state at each confirmation point. Do not create it in No-Edit or when there is no
.git/, and recordLocal State: skippedand the reason. - Limit the structure to
Current Snapshot / Last Run Detail / Open Items / Recent Runs / Do Not Repeat / Next Focus Candidates / Guard or Block. - Limits: Last Run 25 lines, Recent Runs 5 items, Open/Do Not Repeat/Guard 10 items each, Next Focus 3 items, overall 160 lines or 16KB. Compress old runs to one line before exceeding.
- Upsert unresolved items with
OPEN|GUARD|BLOCK-YYYYMMDD-NNbefore compression, and do not reuse closed IDs. - Do not write raw logs, full Findings, terminal output, diffs, long Handoffs, secrets, personal data, absolute paths, or unverified speculation.
- Move previous items to
Closed / Still Open / Reclassified / Newand leave only progress in state and Ledger without copying the body.
Autonomous Improvement Planning
This skill is not for mechanically working through a checklist from top to bottom; it is for the AI to plan, implement, and verify the most effective improvement for this occasion.
- Pick up
closed / still open / next hypothesis / do-not-repeatfrom the previous summary. - This time, choose one main improvement axis different from last time. Choose the same axis as last time only when there is new evidence, unresolved P0/P1, or insufficient verification of the previous fix.
- Use the Coverage Matrix as a candidate map. Do not mechanically fill every minor viewpoint; choose high-leverage axes based on the target and previous history.
- In executable mode, complete at least 1 concrete improvement from the selected primary improvement axis. Examples: bug fix, UX copy fix, input validation, adding tests, docs sync, cleanup, adding guards.
- Before saying "no room for improvement," review once from a different persona (user / operator / maintainer / auditor / the AI that takes over next).
- Only if it still cannot be edited safely, set it to
Blockand explicitly state theGuard nowdeliverable that the AI added as a substitute.
Coverage Matrix
Classify each axis as Covered / N/A / Open .N/A For those, write the reason for exclusion, and classify them asOpen は Fix now / Guard now / Block . However, this table is a candidate map of perspectives and is not an upper bound that restricts the AI's autonomous problem discovery. If you find a problem not covered by the minor perspectives, place it under the closest axis and fix it.
| Axis | Main perspectives |
|---|---|
| Purpose / fit | Target users, main jobs, functional requirements, acceptance criteria, success criteria, non-goals, priorities, gaps from the current state |
| Function / state | Feature names, terminology, use cases, boundary values, failure paths, state transitions, concurrency, idempotency, backward compatibility |
| Input / data | Schema, types, required/optional, empty values, duplicates, character encoding, locale, time, files/URLs, external data quality |
| Output / surfaces read | Final surface, format, wording, links, citations, notifications, email, chat, CLI, PDF/slide/export, viewing environment |
| UI/UX / accessibility | Visibility, navigation flow, affordance, feedback, recovery, keyboard, screen reader, responsive |
| Non-functional / operations | Performance, reliability, availability, compatibility, maintainability, configuration, logs, monitoring, rollback, cost, rate limit |
| Security / safety | Authentication/authorization, secrets, personal information, permissions, input validation, injection, dependencies, exposure scope, destructive operations |
| Integration / contracts | API contracts, SDK/version, external services, feature flags, migration, error contract, timeout/retry |
| Verification / quality gate | Unit/integration/e2e, lint/typecheck/build, snapshot, dry-run, eval, fixture, artifact/state/exit code verification |
| Docs / learning flow | README, Quick Start, help, runbook, error messages, CHANGELOG, feature name/terminology consistency, syncing design/operations docs |
| AI / automation assets | Prompt injection, hallucination prevention, evidence, prohibitions, output format, when unclear, handoff/state, tool scope, converting deterministic processing into scripts |
| Cleanup / artifact hygiene | Dead code, duplication, old materials, temporary files, unnecessary terminals, generated artifacts mixed in, absolute paths, local dependencies |
In additional exploration, ユーザー / 運用者 / 保守者 / 監査者 / 次のAI ask once who among them is troubled and where, and evaluate notifications and CLI output at the final surface.
Priority: P0 = major feature breakage / data loss / information exposure / P1 = navigation confusion / missing tests / README mismatch / P2 = quality improvement / wording / dead code.
Fix Cycle
- Context/Health: Read the entry point, instructions, previous state, and verification means, and separate baseline failures from failures caused by this change. For flaky tests, run the same execution multiple times before and after the change, and isolate by which tests fail disproportionately (if a different test fails each time, suspect time dependency, and use a full pass on the final tree as evidence).
- Review: Classify Coverage and split Open into
Fix now / Guard now / Block. - Implement/Sweep: Make minimal fixes following existing patterns, search for gaps with the same root cause, and fix them together. When adding new external API calls, self-review the number of calls in loops and batches, and share results that can be shared (rate limit).
- Test/Verify: Add regression tests or guards, and verify diagnostics → lint → typecheck → test → build down to artifact/state/exit code.
- Docs/Cleanup: Sync README, help, CHANGELOG, and terminology, and clean up temporary materials, dead code, and terminals.
- Close:
Fix nowto 0, and reclassify remaining items intoGuard now / Blockthat satisfy the conditions.
If unresolved items remain, re-evaluate the safety conditions,Guard now / Block reclassify them into Fix now , and then close the current run. If
remains that cannot be reclassified, state it explicitly as incomplete and do not declare completion.
Meta Improvement Scope
Use subagents only for read-only investigation in large repos / multi-perspective sweeps / long log analysis. If not used, leave the reason in the final report.
Release Addendum
release Only apply to software distributions where the mode applies and the distribution target is explicitly specified. Skip documents, etc.
- Check whether the version has already been published; if it exists, raise it by at least a patch, and sync metadata, lockfile, display, CHANGELOG, and release notes.
- After typecheck, lint, test, and audit, build/pack and verify the artifact's existence, size, timestamp, and tarball contents. After stash/checkout/bulk edits, check line endings with
git ls-files --eol -mand restore the working copy's line-ending conventions before the final build/pack. - Proceed to commit → push → publish → GitHub Release only when there is explicit release intent.
- Verify the version, tag, Release, and attachments on the registry/API and the listing page, and distinguish between successful submission and public reflection. Do not re-publish based on stale display alone.
- Report each step individually; for authentication, review, or insufficient permissions, set to
Block. After the required gates are met, only sync state and clean up; do not add new audits.
Prompt-only Handoff
This skill is assumed to work standalone.handoffs: Do not add frontmatter or descriptions that assume a custom agent. Instead, output a context-based handoff that can be resumed in the chat context.
Run Ledger is always shown, but limited to a compact form of up to 10 lines.Handoff Packet と Handoff Options / Next Action Suggestions は、Block, awaiting user judgment, has important context in Guard now, or only when there is a non-trivial resumption path such as an interruption, partial fix, or environment change. If it is just a normal AI can continue now , omit it.
Handoff option は Plan first / Rerun refine / AI can continue now / User decision as the basis, and include the purpose, when to choose it, and a ready-to-use request text.
Coverage output should normally be delta-based: output only Covered / N/A / Open total count, all Open axes, and classification changes from the previous state (including regressions inCovered -> Open ). Output the Full Coverage Matrix only when the user explicitly specifies verbose / full / 詳細 .
Output Contract
Output in the following order. Omit empty optional sections, and do not repeat long work logs or previous output.
| Mode | Required sections |
|---|---|
| No-Edit | Plan or Findings / Gate / Coverage Matrix Summary / Safe-to-Fix 判定 / Recommendation / Run Ledger |
| Executable | Done / Improvement Focus / Sweep / Check / Findings / Safe-to-Fix 判定 / Coverage Sweep / 100% Pass 判定 / Next Steps / Run Ledger |
| release | Executable に Release Status , and indicate version, artifact, commit, tag, push, publish, GitHub Release, and publication confirmation individually with done / skipped / blocked indicated by |
- No-Edit must state that no edits were made, all
Openaxes, classification changes, and unfixedFix now / Guard now / Block. - Executable must show the changes made and verification commands, same-root sweep,
Fix now = 0, workarounds for remainingGuard now / Block, and next confirmation. - Coverage should normally include only
Covered / N/A / Opencount, allOpenaxes, and classification changes from the previous time. Output the full table only when verbose. Documentation / CleanupとMeta Improvementsis shown only when applicable.
Run Ledger
Always output the following compact form in up to 10 lines. In No-Edit, Local State: skipped (no-edit mode)、Concrete Improvement is the next target, andClosed This Run は none .
Run Type: baseline|continuation|rerun|release-prep
Prior State Used: local state|user state file|previous Handoff Packet|previous Run Ledger|none
Local State: used|updated|skipped ({path or reason})
Primary Axis This Run: {前回と重複しない主改善軸}
Concrete Improvement: {完了した改善、またはNo-Editで次回改善する最小対象}
Closed This Run: {閉じた項目と検証結果、またはnone}
Still Open: {No-EditのFix now、またはGuard now / Block / Next Steps}
Reclassified: {分類変更と理由、またはnone}
New Axis Covered: {今回追加で見た別軸}
Next Run Focus: {次に見る1〜3項目}
Handoff (only when applicable)
Block, awaiting user judgment, important Guard now, or when there is a non-trivial resumption path, output the following.
Goal: {次に達成すること}
Current State: {未編集のFindings、または完了済み変更・検証・成果物}
Open Items: {Fix now / Guard now / Block / Next Steps。ExecutableではFix now不可}
Prior State Used: {使用したstate}
Recommended Path: {Plan first / Rerun refine / AI can continue now / User decision}
Resume Prompt: {次ターンでそのまま使える依頼文}
Do Not: {触らない範囲 / 未確認前提 / 公開・削除禁止}
Only when choosing among multiple routes is necessary, add it as a table ofHandoff Options / Next Action Suggestions を 候補 / 目的 / いつ選ぶか / 依頼文 .
Final Self-Check
- Moved the previous state to
Closed / Still Open / Reclassified / New, and showed the main improvement axis and specific improvements for this time. - Coverage を
Covered / N/A / Open、gap をFix now / Guard now / Block. - Executable completed the specific improvement or Guard artifact and re-verified up to
Fix now = 0. No-Edit stated that no fixes were made. Guard now / Blockhas attempts, workarounds, and next confirmation, and the Run Ledger includes, in up to 10 lines, the use, update, and omission reasons for the state.- state file は
.git/info/refine-product-state.mdonly, and complied with history compression, stable IDs, and limits. - Handoff was output only when the required conditions were met, and the previous body was not reproduced.
- Cleaned up temporary materials, dev servers, and task terminals, and wrote the reason for anything left in place.
Run Boundary
- No-Edit mode (plan / review / dry-run) specified.
Fix nowis 0 items, andGuard now/Blockworkarounds and next confirmation are recorded.- Retries for the same cause exceeded 3 times.
- User confirmation is required for safety, and a non-destructive Guard now was attempted.