agentleFS
sayeediftekharsayeediftekhar/Keel/skills/doc-sync/SKILL.md

doc-sync

Skill0 starsChanged 26 days agoMITView on GitHub

Keep a project's living docs drained so they stay cheap to load. Use at the end of a task, at a natural chunk boundary in a long session (before the context window degrades, not after), before handing work to a new session, or when CONTEXT.md, LEARNINGS.md or the always-on CLAUDE.md has grown past its budget. Sorts every line with the lesson / history / state test, moves shipped records out verbatim, kills superseded warnings, checks numeric budgets, and writes a short next-session handoff.

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-endpoint, perf-budget and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • tadoEngSkill

    api-endpoint

    Add or change a backend API endpoint on this product, keeping Pydantic as the single contract authority and regenerating the TypeScript client. Use when asked to add an endpoint, expose data to the frontend, change a request or response shape, or wire a new backend capability into a page.

    Also in 4 projects that use this

  • vindreshsinghSkill

    perf-budget

    Optimizes performance by measuring first and fixing the real bottleneck. Use when something is slow, before optimizing, when setting latency or bundle targets, or reviewing changes for performance traps — not for speculative micro-tuning.

    Also in 3 projects that use this

  • AnasX7Skill

    improve

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.

    Also in 3 projects that use this

  • dillonluiSkill

    design-review

    Review a view or flow for UX and UI issues. Provides severity-ranked, actionable findings grounded in established design heuristics. Use when the user asks for design feedback, UX review, or UI critique.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    design

    Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Hoist live carry-forwards first: Before moving any block, sweep it for STILL OPEN, PARKED, CARRY FORWARD, DEFERRED, NEXT, MUST, TODO and …

    line 42
  2. Very specific:

    always-on context (CLAUDE.md + its @ imports) — budget.alwaysOnTokens in keel.policy.json.

    line 55
  3. Very specific:

    Update CONTEXT.md → *Current phase*, *What's next*, *Open questions* with a

    line 65
  4. Very specific:

    Every touched file is within its number, nothing settled is still in CONTEXT.md, each new lesson is a Trap → Rule → Why entry, the guards …

    line 74

“Common” is measured: kept by at least 6 in 10 of the 27 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

doc-sync — drain the living docs, hand off early

A one-time cleanup regrows. The migration is worth less than the rule that keeps it drained. This skill is that rule: run it at the end of a task and before the window rots, at a natural boundary, not after quality has already dropped. The end of a long session is the worst moment to trust an agent to write a clean handoff, so sync a beat early.

1. The three-way test (ask it of every line you touch)

Would a future task do something differently because of it? → it is a lesson. It goes to LEARNINGS.md as Trap → Rule → Why. Does it merely record that something happened? → it is history. It goes to the receipt ledger, docs/HISTORY.md. Is it still true and still constraining work? → it is state. It stays in CONTEXT.md.

Three files, three lifetimes. Most "context bloat" is history wearing state's clothing.

The receipt ledger (docs/HISTORY.md; create it on first use and add a row to docs/INDEX.md) is a table, not a narrative: task · date · PR · merge SHA · test count · spec path, one row per shipped thing, with the verbatim record beneath. It earns its place only by holding what git does not: which spec covers it, what a human verified in the real environment, what got deferred and where.

2. The drain (in this order)

  1. Hoist live carry-forwards first. Before moving any block, sweep it for STILL OPEN, PARKED, CARRY FORWARD, DEFERRED, NEXT, MUST, TODO and lift those lines into CONTEXT.md (Open questions / What's next).
  2. Move shipped records out. Merged, no live carry-forward → it is history: move it to docs/HISTORY.md verbatim.
  3. Kill superseded warnings. A resolved constraint that still reads as live is worse than clutter — it actively misleads. Delete it (git keeps it) or, if it carries a lesson, rewrite it as a LEARNINGS entry.
  4. Check the budget against a number. "Keep it tidy" is not a rule; a number is:
    • CONTEXT.md — its own header's limit (the Keel template says under 40 lines); never past ~250 lines, the point at which a drain is overdue.
    • LEARNINGS.md — ~250 lines; past that, merge duplicate rules.
    • always-on context (CLAUDE.md + its @ imports) — budget.alwaysOnTokens in keel.policy.json. Run node .keel/ci/keel-ci.mjs budget and quote its output; the number is a labeled estimate unless measured with a tokenizer.
  5. Run the guards. keel-ci.mjs budget and phantom (no doc names a path that doesn't exist), plus any project check that covers the docs.
  6. Never summarize a record to shrink it. This is re-filing, not rewriting: move verbatim. Unsure whether a line is live? Keep it and flag it.

3. The handoff (what the next session reads first)

Update CONTEXT.md → Current phase, What's next, Open questions with a summary: decisions made, current state, the one open question. Not a transcript dump. For a HEAVY feature, the ledger (.scratch/<feature>/00-status.md) is the resume file: make sure its phase, Blocked on and Open decisions lines are current. Then say in one line that the handoff is written and what the next session should open first.

Done when

Every touched file is within its number, nothing settled is still in CONTEXT.md, each new lesson is a Trap → Rule → Why entry, the guards ran (output quoted), and the handoff names the next step. A rule that blocks nothing is a preference: if a state file still holds a settled record, the sync is not done.

Keel's rules outrank this skill (keel-v2). Changing CLAUDE.md's Keel blocks is keel init's job, not this skill's; edit only the project's own lines.

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.