Skip to content

epic: make skilllint repository architecture agent-legible #280

Description

@Jamie-BitFlight

Outcome

Make the skilllint repository substantially easier for coding agents to navigate, reason about, modify, and verify without changing the product's established validation semantics.

The repository already has useful domain seams — rules/, adapters/, boundary/, schemas/, scan_runtime.py, reporting, and provenance — but those seams are obscured by:

  • a very large packages/skilllint/plugin_validator.py compatibility/implementation surface;
  • host-specific orchestration policy living in the universal AGENTS.md;
  • a large checked-in agent/workflow/runtime surface that competes with product source during retrieval;
  • duplicated volatile CLI/rule facts across README, usage docs, and the bundled skill;
  • a slow default test loop that makes repeated agent verification expensive.

This epic coordinates changes that improve change-location inference, context efficiency, documentation authority, and verification latency for agents while preserving the public skilllint behavior.

Design principles

  1. Make the correct change seam obvious before an agent reads implementation detail.
  2. Keep host-neutral repository rules separate from host-specific orchestration behavior.
  3. Treat non-product agent/runtime/planning trees as intentionally classified context, not implicit product architecture.
  4. Query volatile product facts from the runtime/registry rather than duplicating them in prose.
  5. Decompose the legacy central module incrementally behind compatibility exports.
  6. Keep the fast deterministic linter role fast; richer analysis remains opt-in.

Work breakdown

Current-main reconciliation — 2026-09-29

Recommended implementation order

Phase 1 — make the repository legible before moving code

  1. refactor(agent-context): separate universal repository rules from Claude orchestration #281 — instruction ownership + change routing.
  2. docs(agent-context): classify product, tooling, runtime, vendor, and historical repository surfaces #282 — repository-surface classification.

These are low-behavior-risk changes and establish the context rules later agents should follow.

Phase 2 — remove architectural gravity and duplicated knowledge

  1. refactor(core): decompose plugin_validator.py behind stable compatibility exports #283 Slice A/B — inventory plugin_validator.py consumers and extract shared models/contracts first.
  2. docs(agent-skill): make agentskills-skilllint procedural and runtime-driven #284 — simplify the agent skill/docs once the authoritative runtime seams are explicit.
  3. Continue refactor(core): decompose plugin_validator.py behind stable compatibility exports #283 through policy, fixing, validation orchestration, and CLI extraction in small reviewable slices.

#284 can overlap with later #283 slices, but should not invent target module names before the corresponding seam exists.

Phase 3 — improve iteration cost

  1. Complete the measurement work in perf(tests): suite spends ~two thirds of its wall clock on subprocess startup #148.
  2. Implement test(agent-ux): define a fast inner verification loop and retain the full completion gate #285 using those measurements.

Performance work should preserve the distinction between a fast affected-boundary check and repository-wide completion proof.

Phase 4 — add richer analysis on the clean boundary

  1. Re-evaluate Add opt-in instruction-context static analysis backed by shared host semantics #279 against the architecture produced by refactor(agent-context): separate universal repository rules from Claude orchestration #281–test(agent-ux): define a fast inner verification loop and retain the full completion gate #285.
  2. Add instruction-context analysis as an explicit opt-in subsystem rather than another responsibility of the legacy validator module.

Existing related work

Non-goals

  • Moving packages/skilllint to src/skilllint purely for aesthetics.
  • Rewriting the rule/adapters/schema architecture that already provides useful extension seams.
  • Removing development tooling merely because it is large.
  • A big-bang compatibility-breaking rewrite of plugin_validator.py.
  • Enabling instruction-context analysis by default.

The repository currently contains one Python package beneath packages/; document the root pyproject.toml ownership clearly, but do not churn paths merely to make the layout look like a conventional single-package src/ project.

Completion criteria

  • An unfamiliar coding agent can identify the intended edit location for common change types from the root instructions without repository-wide searching.
  • Host-specific agent behavior is not imposed as a universal repository contract.
  • Repository tooling/runtime/planning/vendor trees are explicitly distinguishable from product architecture.
  • plugin_validator.py is no longer the default owner for unrelated concerns, with compatibility preserved during migration.
  • Agent-facing guidance does not duplicate rule catalogs, fixability, command inventories, thresholds, or release/version facts that can be queried from skilllint itself.
  • A documented fast verification path exists for iterative work, with the full repository gate remaining authoritative before completion.
  • Add opt-in instruction-context static analysis backed by shared host semantics #279 integrates through an explicit analysis subsystem rather than growing the legacy central module.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions