Skip to content

feat: Auto-fix mode — apply safe rewrites for H1, H2, H3 findings #9

Description

@roli-lpci

Problem

lintlang identifies issues but always requires manual fixes. For well-defined, low-risk findings (vague tool descriptions, missing output format constraints, negative-to-positive rewrites), an auto-fix mode would dramatically improve adoption.

Proposed Solution

lintlang audit AGENTS.md --fix          # Apply safe fixes, show diff
lintlang audit AGENTS.md --fix --dry-run # Show what would be fixed, don't write

Safe auto-fixes (high confidence, low risk):

  • H1 (vague tool descriptions): Append Returns: <type> and When to use: <condition> to tool descriptions missing them
  • H2 (missing output format): Add output format hint when missing (Format: bullet list | JSON | plain text)
  • H3 (style negatives): Rewrite Don't be verbose → Be concise (positive form)
  • H3 (missing constraints): Add Scope: <inferred from context> to coding instructions missing scope

Manual-only (too risky to auto-fix):

  • Security negatives (keep as-is)
  • Priority ordering (requires semantic understanding of intent)
  • Cross-file conflicts (can't auto-resolve contradictions)

Implementation Notes

  • Always show diff before writing
  • --fix writes in place; --fix --backup saves .lintlang.bak first
  • Only apply fixes where confidence > 80%

Why This Matters

Auto-fix turns lintlang from a read-only linter into an active improvement tool. Directly competes with Cursor/Copilot for agent config improvement workflows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions