AGENT SKILL

fix-quality

Diagnose and repair a failing quality gate at its root instead of suppressing the finding.

License 许可
Apache-2.0
最近更新
2026-11-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
fix-quality
description
Diagnose and repair a failing quality gate at its root instead of suppressing the finding.

03 SKILL.md 正文

Fix a failing gate

  1. Read AGENTS.md, then reproduce with the narrowest recipe rather than the whole gate. just check names the recipe that failed; run that one alone.
  2. Dispatch on which gate failed:
    • check-toolchain — cargo is not rustup's proxy, or rustup is missing. Put ~/.cargo/bin first on PATH; the pin in rust-toolchain.toml is honoured only through that proxy. If it says the active toolchain must be the pin, RUSTUP_TOOLCHAIN or a rustup override outranks the file, or the pin is missing: unset the variable or run rustup override unset, then just install-toolchain.
    • lock-check — run just lock, which reaches the network and so needs explicit authorization, and read the lockfile diff before accepting it.
    • lint — a pre-commit hook failed. A hook named after a gate (fmt-check, toml-check, deps-unused, validate-docs for check-docs, validate-agents for check-agents, check-specs, analyse-specs) goes to that gate's line below. For the rest (Markdown, typos, links, shell, workflows, secrets, whitespace), run just fix for what a fixer can repair, then fix the remainder by hand; a secret found by ripsecrets is removed, never allowlisted.
    • fmt-check or toml-check — run just fix; never hand-format to match.
    • clippy — fix the code. A lint that is wrong for one item gets #[expect(lint, reason = "...")] on that item; a lint that is wrong for the crate is changed in the workspace lint table in Cargo.toml with a comment saying why, never disabled at the call site with allow.
    • metrics — lower the complexity, cohesion or coupling rustqual reports. Never raise a threshold in rustqual.toml. A version mismatch means just install-tools, a network recipe that needs explicit authorization, has not run in this worktree.
    • effects — libpachinko reaches an effect directly. Put it behind a trait libpachinko defines, with a fake beside it, and its real implementation in pachinko. A failure on the fixture under tests/fixtures/effects-violation names its cause; read it before touching a ban list. When the fixture's // ban: tags and a ban list (scripts/check-effects.sh or crates/libpachinko/clippy.toml) disagree, or a ban stays silent or fires twice, add or remove the break and its // ban: tag with the ban, and never weaken a break to quiet the probe. When nothing fired, a lint cap or -A warnings in RUSTFLAGS, CARGO_ENCODED_RUSTFLAGS or a cargo config's rustflags is hiding every finding: remove it, not a ban. When the fixture did not compile, either a ban names an API unstable on the pinned toolchain or the fixture has an error. When a matcher missed a crate or a ban the probe saw, the defect is in scripts/check-effects.sh. A drift failure means the root clippy.toml changed without its mirror in crates/libpachinko/clippy.toml.
    • features — a feature that does not compile alone or in combination. Fix the cfg; a feature combination is never dropped from the powerset.
    • test-doc — a doctest fails. Fix the example or the item it documents; doc examples are tests.
    • coverage below the floor — add the missing test. Never lower coverage_floor in the Justfile.
    • doc — a missing doc comment or a broken intra-doc link; missing_docs is on and warnings are errors there.
    • deny or deps-unused — a licence, a ban or an unused dependency; a new dependency is a decision recorded per decision 0007, and just fix runs cargo shear --fix.
    • check-docs — a frontmatter list that disagrees with docs/manifest.yml is usually list order; the comparison is order-sensitive.
    • check-agents — a bridge under .claude/ or .codex/ has grown content, or a managed file is missing from the inventory.
    • check-specs or analyse-specs — hand to the spec-change skill; a diagnostic is a regression and a finding cannot be waived.
    • snapshots-check — a snapshot differs or a .snap file is unreferenced. Run just snapshots-review, accept only a change you can explain, and commit the diff.
  3. Distinguish an unreachable branch from an untested one. Defensive code no input can reach should be removed, not covered by a contrived test.
  4. Never disable a gate to make a run green. A suppression is a last resort: one rule, one line, with a stated reason.
  5. If a recipe changed the worktree, that is a defect in the recipe — checks are read-only. Fix the recipe.
  6. Run the narrow recipe, then just check to confirm nothing else moved.

04 同仓库更多 Skills

BiscuitBin
BiscuitBin/pachinko

witness

Independently witness that an Allium loop's convergence claim is true and was reached honestly. Use when the user wants to verify a loop's self-report, confirm tests really pass and no generated test was weakened, produce a convergence certificate or witness record, gate CI on a trustworthy signal, or check that an autonomous run did not cheat its way to green.

★ 0
BiscuitBin
BiscuitBin/pachinko

weed

Weed the Allium garden. Find where Allium specifications and implementation code have diverged, and help resolve the divergences. Use when the user wants to check spec-code alignment, compare specs against implementation, audit for spec drift or violations, sync specs with code or code with specs, or verify whether the implementation matches what the spec says.

★ 0
BiscuitBin
BiscuitBin/pachinko

tend

Tend the Allium garden. Use when the user wants to write, edit, update, add to, improve, clarify, refine, restructure, fix or migrate Allium specs. Covers adding entities, rules, triggers, surfaces and contracts, fixing syntax or validation errors, renaming or refactoring within specs, migrating specs to a new language version, and translating requirements into well-formed specifications. Pushes back on vague requirements.

★ 0
BiscuitBin
BiscuitBin/pachinko

spec-change

Change an Allium specification and carry the change through the tests and the implementation.

★ 0
BiscuitBin
BiscuitBin/pachinko

rust-change

Implement or review a change to either crate with the effects boundary, tests and documentation evidence the invariants require.

★ 0
BiscuitBin
BiscuitBin/pachinko

review-docs

Add or revise a handbook page so it satisfies the documentation contract and stays reachable.

★ 0