agentleFS
parisnetoparisneto/anticharon/.agents/skills/linting/SKILL.md

linting

Skill2 starsChanged 49 days agoMITView on GitHub

Unless lint remediation is an explicit goal of the current plan: 1. Safe Ruff fixes may be applied automatically with ruff check --fix. 2. Unsafe fixes, and any fix touching a behavioral rule (a rule whose fix can change runtime behavior, not just formatting/imports/typing annotations), MUST NOT be applied automatically. Behavioral autofixes require the same narrowly-scoped human approval as a manual fix (point 6 below). 3. Remaining Ruff findings are out of scope and MUST NOT be individually investigated, fixed,…

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. langwatch/langwatch★ 5ksame name
    2. int2t05/engineering-skills★ 3same name
    3. jarosser06/drift★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    MUST NOT be applied automatically.

    line 8
  2. Distinctive:

    When lint remediation is itself an explicit goal of the plan, the plan defines the applicable scope, rules, tests, and acceptance criteria.

    line 25
  3. Very specific:

    Run safe fixes: ruff check src tests --fix.

    line 29
  4. Distinctive:

    Auto-Ratcheting: If a CI run fails because a legacy finding was organically fixed (count reduced) or a structurally edited line caused a …

    line 60
  5. Very specific:

    If the Test Agent proves via Git Diff that no *new* violations were introduced, it is authorized to auto-regenerate (ratchet) …

    line 61

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Lint Remediation Policy

Unless lint remediation is an explicit goal of the current plan:

  1. Safe Ruff fixes may be applied automatically with ruff check --fix.
  2. Unsafe fixes, and any fix touching a behavioral rule (a rule whose fix can change runtime behavior, not just formatting/imports/typing annotations), MUST NOT be applied automatically. Behavioral autofixes require the same narrowly-scoped human approval as a manual fix (point 6 below).
  3. Remaining Ruff findings are out of scope and MUST NOT be individually investigated, fixed, or documented.
  4. Remaining findings are recorded in Deferred using:
    • the output of ruff check src tests --statistics
    • the affected files, with finding count and rule codes
  5. A finding introduced by the current work on a changed line still blocks the lint gate unless explicitly accepted by the human (point 6).
  6. Human-approved manual fixes are allowed when narrowly scoped and verified by the relevant tests. When a human explicitly approves deferring specific pre-existing findings instead of fixing them, the approval MUST be recorded as an exact-fingerprint baseline (<rule> <file>:<line> per finding), never as a blanket exemption by rule code alone. A blanket rule-code exemption would silently pass a brand-new, unrelated finding of the same code anywhere in the codebase; a fingerprint baseline cannot.

When lint remediation is itself an explicit goal of the plan, the plan defines the applicable scope, rules, tests, and acceptance criteria.

Lint Gate

  • Run safe fixes: ruff check src tests --fix.
  • Current-work files MUST introduce no unresolved Ruff findings on lines that work modified or added, unless explicitly accepted by the human as an exact-fingerprint baseline entry (see point 6 above).
  • Pre-existing findings on lines the current work did not touch are out of scope and MUST NOT block this release.
  • Record remaining repository lint debt under Deferred as:
    1. ruff check src tests --statistics
    2. affected-file summary: file → count → rule codes (suggested sample script for inventory: scripts/summarize_lint.sh)

Deterministic changed-line/baseline gate

scripts/lint_gate.py [base_ref] (default base_ref: main) enforces this policy mechanically:

  1. Computes the set of lines added/modified between base_ref and HEAD in src/ and tests/.
  2. Runs ruff check src tests --output-format=json.
  3. A finding fails the gate only if both (a) its line falls inside that changed-line set, and (b) its exact <rule> <file>:<line> fingerprint is not present in an approved-baseline file.
  4. Findings on untouched lines never fail the gate, regardless of rule code (pre-existing/out-of-scope legacy debt, point 3 above).
  5. Findings on touched lines whose fingerprint is not baselined always fail the gate, including a new finding of an already-baselined rule code at a different location — this is what makes the exemption per-location rather than per-rule-code.

Auto-Ratcheting & The SSOT Ledger

The current active exemptions and their counts are dynamically tracked in the Single Source of Truth ledger: docs/standards/lint_baseline_legacy.txt.

  • Auto-Ratcheting: If a CI run fails because a legacy finding was organically fixed (count reduced) or a structurally edited line caused a legacy finding to shift line numbers, the Test/QA Agent must intervene.
  • If the Test Agent proves via Git Diff that no new violations were introduced, it is authorized to auto-regenerate (ratchet) lint_baseline_legacy.txt to match the new line numbers and reduced debt count without human sign-off.
  • Human sign-off is only required when adding new exemptions.

base_ref defaults to main for ordinary future PR usage (a small diff against the merge base). For verifying one remediation pass within an already-long-lived feature branch (this branch is 38+ commits ahead of main and predates the gate itself), pass the immediately-preceding evaluated commit instead of main — diffing the whole branch against main would re-surface every prior pass's already-reviewed lines as "changed," which is not what this gate is for.

CI status (documented, not aspirational)

.github/workflows/ci.yml currently runs uv run pytest and uv run anticharon test only. It does not run scripts/lint_gate.py or a blanket ruff check step. This is a deliberate, documented decision (not a gap): main does not yet contain the pricing-engine-v2 initiative, so a gate diffing against main today would conflate the entire initiative's accumulated history with a genuinely new regression. Once this branch merges, future PRs' diffs against main become small and the gate becomes accurate for CI use — add the scripts/lint_gate.py step to CI at that point, scoped to whichever baseline file(s) are then in force.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.