repoagent-doc-generation
Skill1 starsChanged 16 days agoMITView on GitHub
Generates or refreshes per-symbol codebase documentation as Open Knowledge Format (OKF) markdown, in dependency order, using buddhi's code graph.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- a11ySkill
- agents-mdSkill
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- askSkill
- audit-agentsSkill
- audit-choicesSkill
- audit-performanceSkill
- audit-testsSkill
- auto-researchSkill
- close-specSkill
- code-reviewSkill
- compare-screenshotsSkill
- debugSkill
- design-mdSkill
- design-with-imagesSkill
- document-codebaseSkill
- eli5Skill
- eval-skillsSkill
- explore-unknownsSkill
- handoff-specSkill
- implementSkill
- learnSkill
- marketing-pagesSkill
- memorySkill
- okf-contextSkill
- preview-shotsSkill
- quick-planSkill
- ratchet-filesSkill
- refactor-cleanSkill
- rememberSkill
- retroSkill
- reviewSkill
- rtkSkill
- screenshot-critiqueSkill
- specifySkill
- spec-planSkill
- spec-tasksSkill
- statusSkill
- system-designSkill
- verifySkill
- write-docsSkill
- write-skillsSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Ensure the plan is current: run buddhi docs plan (or buddhi init if .agents/ or .buddhi/ don't exist yet) in the project root.
- Very specific: line 21
Read .buddhi/docs-plan.json.
- Very specific: line 31
If callees already have docs on disk (check doc_path of those entries), skim them for context — same as RepoAgent enriching a doc with what …
- Very specific: line 33
Write the OKF file at doc_path following the schema in the next section.
- Very specific: line 34
Do not invent behavior you can't see in snippet.
- Very specific: line 36
After processing all pending entries, update the OKF index for every directory that received a new or changed doc: create/refresh that …
- Very specific: line 70
Do not add OKF's Attested Computation fields (runtime, parameters, executor, attester) — those are for verified data-pipeline computations, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
RepoAgent-style OKF doc generation
This project's structural truth comes from buddhi (buddhi init / buddhi docs plan),
not from you re-deriving it. Your job is only to write the prose, in the order and with
the context buddhi already computed — mirroring RepoAgent's method: AST-derived call
graph -> bottom-up topological order -> per-symbol doc with caller/callee context.
Steps
- Ensure the plan is current: run
buddhi docs plan(orbuddhi initif.agents/or.buddhi/don't exist yet) in the project root. This writes/refreshes.buddhi/docs-plan.json. - Read
.buddhi/docs-plan.json. It is a JSON array, already in dependency order (everycalleesentry appears earlier in the array than its caller). Each entry has:node_id,kind(module/class/function/method),name,qualified_namefile_path,start_line,end_line,snippet— the source to documentcontent_hash— hash of the current snippetcallers/callees—node_ids of related symbolsdoc_path— where the OKF file for this node belongs (relative to repo root)needs_generation—falsemeans an up-to-date doc already exists; skip it
- Process entries in array order, skipping any with
needs_generation: false. For each one you process:- If
calleesalready have docs on disk (checkdoc_pathof those entries), skim them for context — same as RepoAgent enriching a doc with what it calls. - Write the OKF file at
doc_pathfollowing the schema in the next section. - Do not invent behavior you can't see in
snippet; if the snippet is truncated or the logic depends on something outside it, say so plainly rather than guessing.
- If
- After processing all pending entries, update the OKF index for every directory that
received a new or changed doc: create/refresh that directory's
index.md(see OKF index conventions below) and append an entry to the bundle root's.buddhi/docs/log.md.
OKF concept-doc schema
One file per doc_path. Frontmatter is YAML; keep the content_hash field exact —
that's how the next planning run knows this doc is current.
---
type: Function # or Class / Module — from the plan entry's "kind"
title: <qualified_name>
description: <one sentence, plain language>
tags: [<language>, <file_path>]
status: stable
generated: { by: antigravity/<your-model-id>, at: <ISO8601 timestamp> }
sources:
- id: src
resource: <file_path>#L<start_line>-L<end_line>
content_hash: <content_hash from the plan entry, unchanged>
---
# Summary
<what this symbol does and why it exists, in plain language>
# Signature
<the declared signature/interface>
# Relationships
Calls: <qualified names of callees, or "none">
Called by: <qualified names of callers, or "none">Do not add OKF's Attested Computation fields (runtime, parameters, executor,
attester) — those are for verified data-pipeline computations, not code docs.
Index files (index.md)
Each directory under .buddhi/docs/ that contains concept docs should have an
index.md (no frontmatter, except the bundle root's may carry okf_version: "0.2")
listing its concepts:
* [<title>](<relative-url>) - <description>Log file (.buddhi/docs/log.md)
Newest entries first, one heading per date:
## 2026-08-22
**Update**: refreshed docs for 3 changed symbols in src/buddhi/graph/builder.py.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
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.

