agentleFS
XucroYuriXucroYuri/how-to-make-script/skills/context-governor/SKILL.md

context-governor

Skill17 starsChanged 8 months agoMITView on GitHub

任务需要在生成前制定受限的上下文加载计划,或当前加载策略有上下文腐蚀风险时使用。

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks about agent-skill design, loading strategy, context balance, reference breadth, or when the route is at …

    line 8
  2. Distinctive:

    If the request is broad and theory-facing, pick one declared research bundle before expanding.

    line 13
  3. Very specific:

    If continuity pressure is the real bottleneck, test whether a story_memory_checkpoint should replace broader reload.

    line 14
  4. Distinctive:

    If voice is the real bottleneck, prefer one bounded expression lens over a broad style survey.

    line 18
  5. Distinctive:

    Do not confuse "more related material" with "better generation conditions."

    line 22
  6. Distinctive:

    If the real problem is resumable continuity, prefer a checkpoint artifact over a wider bundle.

    line 25
  7. Distinctive:

    Treat expression guidance as an adjunct bundle, not as a reason to pre-load every nearby style example.

    line 26
  8. Very specific:

    Use compare_pack mode: lock the primary route, then load one rival route or one contrastive boundary layer.

    line 34
  9. Very specific:

    Use focus_pack or route_kernel.

    line 37

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

Context Governor

Use this skill when the user asks about agent-skill design, loading strategy, context balance, reference breadth, or when the route is at risk of being drowned by too much adjacent material.

Workflow

  1. Lock the primary route first.
  2. Choose one loading mode from route_kernel, focus_pack, compare_pack, teaching_pack, or survey_pack.
  3. If the request is broad and theory-facing, pick one declared research bundle before expanding.
  4. If continuity pressure is the real bottleneck, test whether a story_memory_checkpoint should replace broader reload.
  5. Define the mandatory bundle.
  6. Define the optional expansion queue and triggers.
  7. Define stop conditions and corrosion signals.
  8. If voice is the real bottleneck, prefer one bounded expression lens over a broad style survey.

Output Contract

  • context_loading_plan: primary route, loading mode, mandatory bundle, optional expansion queue, stop rules, and context-corrosion warnings.
  • Do not confuse "more related material" with "better generation conditions."
  • Expand only when the next asset can plausibly change route quality, answer quality, or creative extension quality.
  • For broad theory/background requests, mandatory bundle should include one declared background bundle rather than a grab bag of neighboring docs.
  • If the real problem is resumable continuity, prefer a checkpoint artifact over a wider bundle.
  • Treat expression guidance as an adjunct bundle, not as a reason to pre-load every nearby style example.

Posture-Adaptive Guidance

When certainty = lost: Skip the loading plan. Ask: "What is the one thing you actually need to know or produce right now?" Route to the narrowest possible answer first. A loading plan is only useful once the destination is clear.

When certainty = exploring: Use compare_pack mode: lock the primary route, then load one rival route or one contrastive boundary layer. Do not expand to survey_pack unless the user explicitly asks for breadth.

When certainty = certain: Use focus_pack or route_kernel. Stop expansion as soon as the next asset would not change the answer quality.

When source = discover: Prioritise possibility-expanding assets. Suppress loading of hard constraints and evaluation rubrics until the route is stable.

When source = construct: Apply full loading discipline: lock route → choose mode → define mandatory bundle → define expansion queue → state stop conditions.

References

  • wp.context-loading-plan
  • references/background-bundles.json
  • rb.context-loading-plan
  • ka.bounded-context-loading
  • ka.context-corrosion-signals
  • ka.cross-protocol-referral-edges
  • ka.reference-expansion-balance
  • ka.scenario-factorization
  • ka.story-memory-checkpoint

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.