update-llm-wiki
Update only the active project's local {root}/llm-wiki/** tree. You may read
the rest of the repository to ground the guidance, but do not write to root
AGENTS.md, skills/**, .agents/**, vendor/**, installed skills, another
checkout, or remote state.
If the active repository has no {root}/llm-wiki/ directory, stop and report
that there is no local llm-wiki profile to update.
When to use
- The user asks to record a repository-specific pattern, idiom, best practice, or case study in the active project.
- A code change establishes a local convention that should outlive the session.
- A
/cleanuppass surfaces a repeatable local smell worth a case page. - The skill is invoked without an additional prompt; review the current chat as described below.
Skip the update when the user wants code only or the local guidance already states the same rule clearly.
When run without a prompt
- Review the current chat for agreed or demonstrated repository-specific patterns, idioms, syntax, and stylistic preferences.
- Keep only conclusions that were explicitly requested, agreed, or shown in code. Do not codify unresolved debate or speculative suggestions.
- Search
{root}/llm-wiki/patterns/index.mdand the matching local pattern files. Skip lessons already stated clearly. - If nothing remains, say so briefly and do not invent a pattern.
Instructions
Extract the lesson State in one sentence what someone should do or avoid in a concrete local situation.
Find a useful repository example Search the active worktree before inventing a mock. Prefer the file or symbol the user named or just changed. Generalize names while preserving the code shape that demonstrated the lesson.
Choose the local destination Search
{root}/llm-wiki/patterns/index.mdfirst.- Put reusable mock patterns in the matching
{root}/llm-wiki/patterns/<topic>/directory. - Put concrete before/after session evidence in
{root}/llm-wiki/patterns/cases/. - Extend an existing local page when it already owns the topic.
- Put reusable mock patterns in the matching
Write the smallest useful pattern Prefer a focused mock
.tsfile when code demonstrates the rule best:- The code body shows only the preferred shape.
- A leading JSDoc sentence states the rule.
- Each
@badJSDoc tag names one rejected shape. - Case pages may cite active-repository
path:start-endevidence.
Map the current change accurately When the user explicitly requested a fix, use the prior state as the
@badexample and the requested result as the preferred code body.Update the local index Add or revise the matching row in
{root}/llm-wiki/patterns/index.mdso keyword routing finds the pattern.Keep scope tight Write one pattern per lesson and touch only files under
{root}/llm-wiki/**. Report any desirable change outside that boundary instead of making it.
Use imperative, specific, scannable prose. Prefer “Do X” and “Do not Y” over narrative advice.