agentleFS
joshuadavidthomasjoshuadavidthomas/django-language-server/.agents/skills/djls-domain-conventions/SKILL.md

djls-domain-conventions

Skill207 starsChanged yesterdayApache-2.0View on GitHub

Use when editing Django template parser tags, validation errors, diagnostics, environment scanning, inspector data, Python environment inventory, or DJLS domain model code. Handles project-specific semantic and parser conventions.

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this for changes to template parsing, semantic validation, environment scanning, diagnostics, and inspector-derived project data.

    line 8
  2. Very specific:

    When adding or removing ValidationError variants, update:

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

DJLS Domain Conventions

Use this for changes to template parsing, semantic validation, environment scanning, diagnostics, and inspector-derived project data.

Template parser

  • Node::Tag.bits excludes the tag name.
  • Example: {% load i18n %} becomes name: "load", bits: ["i18n"].
  • Functions processing bits work with tag arguments only.
  • Extracted text and its span are computed by the same parse, in the crate that owns the syntax. Do not re-derive quote/content spans in semantic or IDE consumers.

Environment scanning

  • External rule/model scan orchestration lives in crates/djls-db/src/scanning.rs.
  • Project context, inspector data, and module resolution live in crates/djls-semantic/src/project/:
    • project.rs defines Project.
    • symbols.rs defines TemplateLibraries, TemplateLibrary, TemplateSymbol, and inspector response types.
    • resolve.rs handles Python module and model-file discovery.
    • python.rs handles interpreter discovery.
  • Static Python extraction lives in crates/djls-semantic/src/python/.

Validation errors

Quick-fix edits are derived from typed ValidationError values against the current Salsa snapshot inside the request handler. Keep Diagnostic.data as None; do not serialize internal error or edit shapes into the LSP wire contract.

When adding or removing ValidationError variants, update:

  • errors.rs
  • djls-ide/src/diagnostics.rs S-code mapping
  • test helpers

Use:

rg "ValidationError" crates/ -g '*.rs'

Semantic model

  • Cross-file semantic queries depend on small per-file derived products (e.g. template_symbols), never on other files' full parses directly.
  • Code over config: tag-spec knowledge acquisition prefers static extraction from Python source; tagspec config is a last-resort escape hatch, never primary.
  • Semantic features bind to TagRole, never tag names.
  • Derived project facts carry explicit completeness/termination states (e.g. ChainEnd, TemplateDirStatus); consumers branch on them rather than inferring from emptiness.

Local runtime state

  • Server logs: ~/.cache/djls/djls.log.YYYY-MM-DD (newest seven kept)
  • Inspector cache: ~/.cache/djls/inspector/

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.