001-context-resolver

An engine that combines settings from several levels of a project, from the workspace down to a specific agent. Higher-level settings can be extended or overridden by more specific ones.

In plain words
What is it for?
It is for resolving workspace, project, plan, and agent context, comparing what each layer adds, and returning the result for people or other programs.
Why use it?
It removes the need to assemble inherited configuration manually and shows where each setting came from.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/paulbreuler/limps/001-context-resolver
Clone the repo
git clone --depth 1 https://github.com/paulbreuler/limps
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 500 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00500
Opus 5 $0.00000 $0.00250
Sonnet 5 $0.00000 $0.00100
Haiku 4.5 $0.00000 $0.00050

Measured 2d ago against content hash 65029bc585f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

001-context-resolver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plans/0047-limps-context-hierarchy/agents/001-context-resolver.md · 69 lines

What it actually says

Agent 001: Context Resolver

Objective

Build the context inheritance engine that resolves cascading context from workspace → project → plan → agent.

Tasks

  1. Context layer loading (src/context/resolver.ts)

    • Load workspace layer (priority 0)
    • Load project layer if exists (priority 10)
    • Load plan layer (priority 20)
    • Load agent layer (priority 30)
    • Track source file for each value
  2. Merge strategy (src/context/merge.ts)

    • Higher priority wins for scalar values
    • Lists concatenate (child adds to parent)
    • Objects deep merge
    • override: true replaces entirely
    • inherit: false opts out
  3. Resolve CLI (src/cli/commands/context/resolve.ts)

    • limps context resolve — workspace only
    • limps context resolve <plan> — with plan context
    • limps context resolve <plan> <agent> — full stack
    • --diff shows what each layer contributed
    • --json for machine consumption

Resolution Algorithm

async function resolveContext(planId?: string, agentId?: string): Promise<ResolvedContext> {
  const layers: ContextLayer[] = [];
  
  // Build layer stack
  layers.push(...await loadWorkspaceLayers());
  if (planId) {
    const projectId = await findProjectForPlan(planId);
    if (projectId) layers.push(await loadProjectLayer(projectId));
    layers.push(await loadPlanLayer(planId));
    if (agentId) layers.push(await loadAgentLayer(planId, agentId));
  }
  
  // Merge with priority resolution
  return mergeLayers(layers);
}

Acceptance Criteria

  • limps context resolve outputs workspace context
  • limps context resolve 0042 001 includes all layers
  • Higher priority values override lower
  • --diff shows contribution per layer
  • Resolution completes in < 100ms
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 69 lines · 0 tokens per session scan A 65029bc585f7

Subscribe to this mod's changes

001-context-resolver is an agent published in the GitHub repository paulbreuler/limps (10 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 500 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

monitor

Reviews code for correctness, standards, security, and testability (MAP).

azalio/map-framework · 17 tokens

reflector

Extracts structured lessons from successes and failures.

azalio/map-framework · 11 tokens

spirit-check

Fresh-context reviewer that checks whether a SPEC's interpretation matches the user's verbatim ask. Reads ONLY the user's literal words + the SPEC's Behavior section — nothing else. Flags interpretation drift (e.g., user said "function", SPEC describes "deployed service"). Dispatch it after writing a SPEC, before it…

Ashkaan/contextium · 89 tokens

ai-layer-reviewer

Fresh-context adversarial reviewer for a freshly-authored .claude/ artifact (skill, hook, or agent). Dispatched by /author's design-review gate after fill, before verify. Attacks the artifact's DESIGN — wrong step graph, missing gate, prose describing a deterministic step, a description that will never fire, unhandled…

Ashkaan/contextium · 88 tokens

rule-efficacy-reviewer

Fresh-context reviewer that checks whether compressing a rule dropped any behavior. Dispatched by /author's efficacy-gate step during rule compression. Receives the original rule text, the compressed rewrite, and the list of dropped clauses — blind to the author's rationale — and returns a per-clause verdict of…

Ashkaan/contextium · 87 tokens

discovery-analyst

Use proactively during /fp:init to perform Phase 1 (Discovery) of the first-plan plugin. Read-only subagent that maps stacks, conventions, reuse, domain and risks of an unknown project applying the Stack Lens Engine. Returns structured findings to be written to .first-plan/. Do NOT use for execution or modifications …

vynazevedo/first-plan · 73 tokens