sw-ingest
Skill4 starsChanged 57 days agoMITView on GitHub
Use when the user adds or points to a source (article, paper, transcript, notes, meeting record, PDF, URL, data file) to be filed, processed or ingested into Superwiki, or invokes sw-ingest or sw:ingest.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- sw-boardSkill
- sw-configSkill
- sw-doctorSkill
- sw-doSkill
- sw-explainSkill
- sw-implementSkill
- sw-initSkill
- sw-lintSkill
- sw-migrateSkill
- sw-planSkill
- sw-runSkill
- sw-statsSkill
- sw-summarizeSkill
- sw-triageSkill
- sw-visualizeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
After this, never edit anything in raw/.
- Very specific: line 18
Read the source: Read docs/index.md (not the wiki pages) to see what already exists.
- Distinctive: line 37
Do steps 1 to 8 per source, in order.
≈ “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.
Files
sw-ingest
Turns one source into wiki knowledge. A source touches few files by default: its summary page, index.md and log.md. Wider cross-updates are recorded as follow-ups and done in sw-lint, so an ingest stays cheap.
Steps
Put the source in
docs/raw/as<yyyy-mm-dd>-<slug>.<ext>(date of the source if known, else today):- a file outside
docs/: copy it in under that name and leave the original where it is; - a file already in
docs/raw/: use it as it is; - a URL or pasted text: save it as markdown, with the URL on the first line.
After this, never edit anything in
raw/.- a file outside
- Read the source. Read
docs/index.md(not the wiki pages) to see what already exists. - Tell the user the three to five points worth keeping and which existing pages they bear on, judged from the index lines. Wait for their steer unless they asked for a batch or unattended ingest.
- Write the summary page
docs/wiki/<slug>.mdfromdocs/.sw/templates/page.md. The slug is lowercase words joined by hyphens, says what the source is, and is not used by any other file in the vault.- Frontmatter:
type: source, a one-linesummary:,sources: [<raw file name>],updated:today. - Body: the points, each traceable to the source; a normal markdown link to the raw file;
[[links]]to the existing pages it relates to.
- Frontmatter:
- Check at most three existing pages whose index line says they make a claim on the same subject. Open each, and edit it only if the source contradicts, corrects or dates what it says; add a
[[link]]to the summary page where you edit. Everything else you noticed goes to the follow-up line in step 7. If the source introduces a concept or entity that several of its points depend on and no page covers, create that page; one or two per source at most. - Add the page to
index.md:- [[slug]]: summary, under its type. Append to
docs/log.md, in the layout the log's last entries use (tail -5 docs/log.md):## [YYYY-MM-DD] ingest | <source title> Added [[slug]]. Updated [[page-a]]. Follow-up: [[page-b]] may need the new figures; no page yet for "<concept>".The
Follow-uppart is where everything you noticed but did not do goes. sw-lint reads it.- Run
node docs/.sw/sw.mjs lintand fix errors in the pages you wrote or edited.
Several sources at once
Do steps 1 to 8 per source, in order. Skip step 3's wait after the first source if the user said to continue. Do not read all sources before writing: each one is read, filed and left.
Common mistakes
- Reading wiki pages "for context" before writing. The index line is the context; step 5 is the only reading of existing pages.
- Rewriting many pages because the source mentions them. Mention is not change; log a follow-up.
- Copying the source into the wiki. The summary page holds what matters and links to the rest.
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.

