edwardzhang/sps-cli/wiki-update
Claude Code and agent skill by edwardzhang/sps-cli
- community
Checking that the SKILL.md file is still in the repository.
SPS Wiki maintenance — ingest source diffs into structured pages, cross-reference, and keep the knowledge base coherent. Single source of truth for the SOP that Worker follows when "wiki update" runs (per card completion or via `sps wiki update`). Triggers on: "ingest source", "wiki update", "update wiki", "process wiki sources", "add to wiki", "lesson from this card", "decision from this design". (🪸 Coral SPS) Attribution: ~70% of the SOP is adapted from claude-obsidian/skills/wiki-ingest (MIT, https://github.com/kepano/claude-obsidian). 30% is SPS-specific: the 4-question entry filter, the 5 page types, sources={card:N|commit:hash}, and the `sps wiki check` exit gate. See ATTRIBUTION.md.
Install
npx vskill@latest install edwardzhang/sps-cli/wiki-updateSKILL.md
The same SKILL.md was published earlier as edwardzhang/sps-cli/wiki-update.
wiki-update — SPS Knowledge Maintenance
You are a knowledge architect inside an SPS pipeline. The wiki is a persistent, cross-referenced artifact that compounds with every card the team finishes. You don't dump source content; you distill facts, decisions, and lessons into atomic, linkable pages.
This SKILL is the single source of truth for "what to write to the wiki." CLAUDE.md only points here. Don't duplicate rules between the two files.
When to invoke this skill
Two paths can trigger it:
- Manual — user runs
sps wiki update <project>and reads the diff. - Auto — at card completion, the StageEngine appends a wiki-update
prompt to the Worker's session (no new ACP call).
In both cases your job is the same: read what changed, decide what to write, keep the wiki coherent.
The 4-Question Entry Filter
Before writing anything, answer these for the trigger that brought you here:
- Did a module change? → write/update a
module/page. - Was a non-trivial decision recorded? → write a
decision/page. - Did a bug or gotcha surface? → write a
lesson/page. - Is there a recurring pattern worth naming? → write a
concept/page.
If none of the four hit: don't write. Empty wiki growth is worse than no growth — every page is a future read budget cost. Add to .hot.md only if context is recent and relevant; otherwise just append a .log.md entry.
What to read first (context discipline)
Token budget matters. Follow this order on every invocation:
wiki/.hot.md— ~500-char recent context. If this answers your question, stop.wiki/index.md— find existing pages before creating new ones.- Run
sps wiki update <project>— see the manifest diff (added/changed/removed). - Run
sps wiki list <project> --tag <skill>— find related pages by tag. - Read at most 3-5 existing pages per ingest. If you need 10+, you're scoping
too broadly. Split the work across cards.
- Use
sps wiki get <project> <pageId>for surgical reads.
Never read whole wiki dumps. Use Edit (not Write) for in-place updates.
Page Anatomy (mandatory)
Every page has YAML frontmatter + a body. The body must start with ## TL;DR followed by 1-3 sentences. The TL;DR is what sps wiki read injects into Worker prompts; the rest is read on demand.
Type-specific fields
- module:
module_path: "src/services/X.ts"(required) - concept:
complexity: basic|intermediate|advanced,domain: "...", optionalaliases: [...] - decision:
version: "v0.51.0"(the version this decision shipped in), optionalsuperseded_by: "[[decisions/...]]" - lesson:
severity: critical|major|minor(default major), optionalseen_in_cards: ["42", "67"] - source:
source_type: pdf|article|image|transcript|data|note|unknown,original_path: "wiki/.raw/..."
The CLI validates frontmatter with zod. If you write something invalid, sps wiki check will scream at you. Don't ship a card without running it.
Wikilinks
Use [[type/Title]] form everywhere — frontmatter related[] and body prose. Bare [[Title]] works (linter resolves by title) but typed form is safer when two pages share a title across types.
Forbidden: external markdown links to wiki files ([X](./modules/X.md)). Use wikilinks so renames don't break references.
SPS-specific sources field
The sources: field in frontmatter is how a page traces back to its origin. SPS pipelines have three kinds:
Rules:
- A
lesson/page from a card MUST include{ card: "<seq>" }. - A
module/page MUST include{ path: "<module_path>", hash: ... }. The
hash is read from wiki/.manifest.json (auto-managed by sps wiki update --finalize).
- A
decision/page SHOULD include the commit hash that shipped the decision. - A
source/page MUST point at its original file in.raw/.
You don't have to include every applicable source — just the strongest 1-3.
Writing a page (the 8 steps)
When the entry filter says "write":
- Search first —
sps wiki list <project> --tag <skill>and `sps wiki read
<project> "<query>"`. If a page exists that's close, update it; don't make a duplicate.
- Pick the type — module / concept / decision / lesson / source. If you're
not sure between concept and decision, ask: "is this an architectural choice we made?" → decision. "Is this a pattern we name?" → concept.
- Choose a Title — short, distinctive, no version suffix (avoid
"PipelineService v2", just "PipelineService").
- Pick tags — reuse existing tags from
index.mdfirst. Minimum 1, max 5.
Tags map to skills (per StageEngine); a page with no tags won't surface via skill-match retrieval.
- Write the TL;DR — first thing after frontmatter. 1-3 dense sentences.
This is the page's elevator pitch and what other Workers see.
- Write the body — what's not in the TL;DR. Use sub-headings (
## Body,
## Why, ## How to apply, etc). Keep it ≤ 300 lines. Split at 300+.
- Cross-reference — every relevant
[[type/Title]]link in body and
related[]. Don't bloat with weak links; aim for 2-5 strong ones.
- Save with
Writetool (orEditif updating). Path:
wiki/<type>s/<Title>.md (note plural directory).
Updating an existing page
Prefer Edit over Write. Surgical changes only:
- Bump
updated:to today. - If TL;DR changed, edit just that line.
- If you added a section, append it; don't rewrite the page.
- If status changed (e.g.
developing → mature), update only that field.
Never overwrite with a full re-write unless the page is genuinely re-scoped. Re-writes lose the git history of what was when.
Contradictions
When new info contradicts an existing page, don't silently overwrite. Add a callout on both pages:
If you're not sure which side wins, leave both flagged and keep going. The user will resolve.
After writing: index, hot, log, check
In this order:
- Update `wiki/index.md` — add a row for the new page (or bump the entry).
Title + TL;DR + tags. Keep alphabetical within the type section.
- Update `wiki/.hot.md` — overwrite "Last Updated" with this card's
summary; append to "Recent Changes" the new wikilinks. Keep total ≤ 500 chars.
- Append to `wiki/.log.md` at the top (newest-first):
```markdown ## 2026-04-27T14:30:00Z · ingest · card #42 Wrote [[lessons/Stop-Hook-Race]] from card #42 review.
- Pages: [[lessons/Stop-Hook-Race]], [[modules/PipelineService]]
```
- Run `sps wiki check <project>` — fix any errors before exiting. Warnings
(orphans, missing TL;DR) can wait, but errors (dead links in related[], empty title) MUST be resolved.
- (Optional)
sps wiki update <project> --finalize— flushes the manifest
so the next update shows clean diff.
Quality bar
A page is publishable when:
- TL;DR is dense (no "this page describes…").
- At least one strong cross-reference in
related[]. - All wikilinks resolve (no
[[Ghost]]). - Tags overlap with at least one skill or active card label.
- Body is ≤ 300 lines (split otherwise).
- Frontmatter passes
sps wiki check.
A page is not publishable when:
- It restates source verbatim.
- It's a placeholder ("TODO: fill in").
- It links to nothing.
- It uses generic tags like
["misc", "general"].
If a draft fails any of these, fix it or don't ship.
What NOT to do
- Don't read a whole
.raw/source ifwiki/.hot.mdalready covers it. - Don't create a page per card. Many cards produce zero wiki pages — that's
correct.
- Don't mass-rename pages. Wikilinks break and the manifest goes stale.
Use the Bash tool for sed renames only when you've also updated related[] in every linker.
- Don't edit
.raw/files. They're immutable sources. - Don't edit
wiki/.manifest.jsonby hand. Usesps wiki update --finalize. - Don't skip
sps wiki check. A broken wiki costs the team more than the
card's value.
CLI cheat sheet
Reference
This SOP is adapted from claude-obsidian/skills/wiki-ingest (MIT). The SPS-specific bits — 4 page types, sources={card,commit}, sps wiki check gate, 5-layer reader integration — are from docs/design/28-wiki-system.md.
If you find this skill conflicting with docs/design/28-wiki-system.md, the design doc wins. File a card to update this SKILL.md.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/wiki-update/SKILL.md
Popularity
- Repository stars
- 3
- Repository npm downloads, 7 days
- 192
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 10 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/edwardzhang/sps-cli/wiki-update)