agentleFS
willianbswillianbs/skills/context-loader/SKILL.md

context-loader

Skill0 starsChanged 4 months agoMITView on GitHub

Discovers and loads only the project context needed for the current task. Use before planning, implementation, review, or debugging to avoid token waste and missing architecture. Emits CONTEXT_PACK. Never makes architectural decisions or loads the entire repo by default.

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    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:

    Prefer ADRs, interfaces, and entrypoints over trivia.

    line 44
  2. Distinctive:

    Never invent missing context.

    line 45
  3. Distinctive:

    Stop early when Blocked/Incomplete for risky work.

    line 46
  4. Distinctive:

    Never dump the whole repository.

    line 114
  5. Distinctive:

    Never resolve architecture conflicts by picking a side silently.

    line 115
  6. Distinctive:

    Never invent ADRs, APIs, or business rules.

    line 116
  7. Very specific:

    Never load secrets from .env into the pack.

    line 117

“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

Purpose

Build a minimal, sufficient CONTEXT_PACK so downstream skills decide with real project knowledge—not guesses.

When to Use / When NOT to Use

Use when: starting any non-trivial engineering task; user mentions “load context”, “what’s the architecture”, or engineering-os begins a path.

Do not use when: user already provided a Complete CONTEXT_PACK; or the task is a pure wording edit with zero code impact.

Preconditions

  • A concrete task or question exists.
  • Repo (or relevant paths) are accessible.

Inputs / Outputs

Inputs: task statement, optional hints (paths, ticket).

Outputs: CONTEXT_PACK

Upstream / Downstream

Upstream: engineering-os, model-router (optional).

Downstream: nearly all skills; especially spec-validator, adr-enforcer, delivery-planner, feature-implementer, defect-analyst.

Core Principles

  1. Sufficiency over completeness.
  2. Authoritative sources beat stale docs when they conflict—and conflicts must be reported.
  3. Token budget is a hard constraint.
  4. Prefer ADRs, interfaces, and entrypoints over trivia.
  5. Never invent missing context.
  6. Stop early when Blocked/Incomplete for risky work.
  7. Emit a portable artifact others can consume.

Process

Lite vs full

Task riskMode
Typo, comment, tiny chorelite: target files + nearest README only
Feature / bug / reviewfull discovery

Full discovery

  1. Source priority (load in order, stop when sufficient):
    1. Task-named paths / ticket links
    2. Engineering guardrails (docs/ENGINEERING_GUARDRAILS.md, then AGENTS.md / .cursor/rules/ summaries)
    3. ADRs / architecture docs (docs/adr/, adr/, ARCHITECTURE.md)
    4. Package/workspace manifests
    5. Entry points and public APIs for touched areas
    6. Existing tests for those areas
    7. README / CONTRIBUTING for commands only
  2. Dependency discovery — only immediate neighbors of touched modules.
  3. Conflict detection — code vs docs vs ADR; list explicitly.
  4. Budget — default caps: ≤25 files or ~40k tokens of loaded content (whichever first). Summarize beyond that; cite paths instead of pasting.
  5. Completeness gate — Complete / MostlyComplete / Incomplete / Blocked.

Evidence Requirements

List every path actually read. Do not claim to have read files you skipped.

Stop Conditions / Failure Modes

ConditionAction
Critical ADR/docs conflict for the taskBlocked
Cannot find any relevant code for named featureIncomplete + questions
Budget exceeded before sufficiencySummarize + MostlyComplete with gaps
No ADRs existNote NoADRs; do not invent architecture
No guardrails file on non-trivial workNote NoGuardrails; suggest guardrails-configurator

Severity + Confidence

N/A for most runs. Conflicts that could cause wrong implementation → treat as High risk in CONTEXT_PACK.

Output Contract

## CONTEXT_PACK
Completeness: Complete | MostlyComplete | Incomplete | Blocked
Summary: ...
Sources: [paths]
ADR IDs: ...
Conflicts: ...
Budget: files=N tokens≈M (caps ...)
Commands discovered: test/lint/build if found
Gaps / questions: ...
Decision: Proceed | ProceedWithConditions | Revise | Block

Handoffs

  • adr-enforcer — on conflicts or NoADRs needing bootstrap
  • spec-validator — if requirements unclear
  • engineering-os — return pack and continue path

Never

  • Never dump the whole repository.
  • Never resolve architecture conflicts by picking a side silently.
  • Never invent ADRs, APIs, or business rules.
  • Never load secrets from .env into the pack; cite path only if needed and redact values.

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.

Reviews can't be read right now.

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.