agentleFS
aptitude-stackaptitude-stack/resolver/.agents/skills/aptitude-codegen/SKILL.md

aptitude-codegen

Skill1 starsChanged 7 months agoMITView on GitHub

Code generation rules and architectural constraints for the Aptitude Resolver repository.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever code, tests, or architecture-facing docs change in this repository.

    line 9
  2. Distinctive:

    Before any non-trivial implementation:

    line 11
  3. Distinctive:

    If the intended work changes the architecture or module boundaries, update the canonical architecture docs first or in the same change.

    line 17
  4. Distinctive:

    Do not introduce circular dependencies.

    line 48
  5. Distinctive:

    Must not own business logic.

    line 94
  6. Distinctive:

    all Aptitude Server communication

    line 115
  7. Distinctive:

    Use Pydantic where validation and serialization clarity matter:

    line 172
  8. Distinctive:

    Keep domain models independent of Pydantic where possible.

    line 178
  9. Distinctive:

    All new behavior should include tests.

    line 182
  10. Distinctive:

    When behavior or boundaries change, update the canonical docs in the same change:

    line 193
  11. Distinctive:

    Update supporting docs when needed:

    line 198
  12. Distinctive:

    put business logic in CLI handlers

    line 210
  13. Distinctive:

    treat server ordering as authoritative client choice

    line 214

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Aptitude Resolver Code Generation Skill

Use this skill whenever code, tests, or architecture-facing docs change in this repository.

Before any non-trivial implementation:

  1. read docs/architecture/system-overview.md
  2. read docs/architecture/decision-rules.md
  3. identify the owning module before editing code

If the intended work changes the architecture or module boundaries, update the canonical architecture docs first or in the same change. Do not silently drift from them.

Core Architecture Principles

The Aptitude Resolver uses a layered architecture with one explicit server boundary.

The server owns facts. The resolver owns decisions.

Current architectural direction

  • interfaces stay thin
  • application orchestrates
  • discovery interprets and reranks
  • registry owns transport
  • resolver owns deterministic solving
  • governance runs before locking
  • lockfile is the durable resolved artifact
  • execution consumes lock data only

Allowed Dependency Direction

  • interfaces -> application
  • application -> domain | discovery | execution | governance | lockfile | registry | resolver | shared
  • discovery -> domain | shared
  • governance -> domain
  • lockfile -> domain
  • execution -> domain | lockfile
  • registry -> domain | shared
  • resolver -> domain | shared

Do not introduce circular dependencies.

Module Responsibilities

domain

Owns:

  • entities
  • value objects
  • deterministic rule concepts
  • policy types
  • tracing models
  • resolver-owned errors

Must not own:

  • HTTP calls
  • CLI logic
  • filesystem orchestration

application

Owns:

  • use-case orchestration
  • workflow sequencing
  • DTO boundaries
  • coordination across discovery, resolver, governance, lockfile, and execution

Must not own:

  • solver internals
  • raw HTTP details
  • CLI formatting

interfaces

Owns:

  • input parsing
  • calling use cases
  • interactive prompting
  • output formatting
  • exit codes

Must not own business logic.

discovery

Owns:

  • intent interpretation
  • discovery query construction
  • candidate shaping
  • non-final reranking

Must not own:

  • final candidate selection
  • dependency solving
  • lock generation

registry

Owns:

  • all Aptitude Server communication
  • auth header injection
  • endpoint knowledge
  • request and response parsing
  • transport error translation
  • transport-to-domain mapping

resolver

Owns:

  • version selection
  • final candidate selection
  • dependency normalization
  • dependency expansion
  • graph building
  • conflict handling
  • validation

Resolver logic must be deterministic and explainable.

governance

Owns:

  • policy evaluation before lock generation

lockfile

Owns:

  • lock schema
  • deterministic serialization
  • parse and replay

execution

Owns:

  • execution-plan generation from lock data
  • artifact fetching
  • checksum verification
  • environment preparation
  • materialization

Execution must not depend on ResolutionGraph.

shared

Owns generic support code only:

  • config
  • logging
  • small reusable helpers

DTO Rules

Use Pydantic where validation and serialization clarity matter:

  • application DTOs
  • registry transport models
  • typed config objects

Keep domain models independent of Pydantic where possible.

Testing Rules

All new behavior should include tests.

Focus on:

  • happy path
  • failure path
  • determinism when ordering or selection matters
  • registry boundary verification against the live server when practical

Documentation Rules

When behavior or boundaries change, update the canonical docs in the same change:

  • docs/architecture/system-overview.md
  • docs/architecture/decision-rules.md

Update supporting docs when needed:

  • README.md
  • docs/README.md
  • .agents/agent.md
  • .agents/memory/meta.md
  • .agents/rules/repo.md

What Not To Do

Do not:

  • put business logic in CLI handlers
  • let discovery perform final selection
  • let execution re-resolve dependencies
  • let application become the solver
  • treat server ordering as authoritative client choice
  • hide feature logic in shared/

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.