gdwiki Skill
Use this skill for project knowledge that is not a literal code detail:
architecture, domain models, business rules, user scenarios, service/component
responsibilities, integrations, and known decisions. The user does not need to
explicitly ask for wiki usage.
Routing (which skill first)
Pick the entry point by question type:
- Conceptual question - "how does X work", "why", architecture, domain, business rules, user scenarios, auth and other flows, integrations, known decisions - use gdwiki first: read
wiki/index.md, open the relevant page, then use gdgraph to jump from that page to code.
- Structural question - "where is X", "what files are related", "what breaks if I change Y", usages, cycles, orphans - use gdgraph first; wiki is optional.
- gdctx runs in parallel in either case to keep command/search/file-read output compact. It is not a step in the sequence.
Trigger Examples
- "Как работает авторизация?"
- "Где описан флоу логина / регистрации?"
- "Какие бизнес-правила у платежей?"
- "Объясни архитектуру этого модуля."
- "Какая доменная модель у заказа?"
- "Какие пользовательские сценарии при оплате?"
- "Почему приняли такое решение по интеграции?"
- "За что отвечает этот сервис и какие у него контракты?"
Workflow
- Read
.metaproject/wiki/index.md first. It is short and lists every page by type with a summary.
- Open only the specific pages relevant to the task. Do not read the whole wiki.
- To move from a wiki concept to code, use
skills/gdgraph/SKILL.md (each page has a Related Code section).
- For compact command/search/read output while working, use
skills/gdctx/SKILL.md.
- Treat wiki pages as curated context. Verify important claims against source code before editing or reporting.
Commands
keryx wiki status
keryx wiki new <type> <slug> --title "<title>"
keryx wiki collect
keryx wiki index
keryx wiki check-links
keryx wiki validate
Maintenance
- New pages start at
Version: 0.1.0; bump Version on every edit.
- Run
keryx wiki index after adding or renaming pages.
- Run
keryx wiki collect to generate safe draft pages from gdgraph, health, and testing context.
- Run
keryx wiki check-links before relying on cross-page links.
Enriching Collected Drafts (the wiki part)
keryx wiki collect is deterministic and needs no model: it fills the
## Reference section of each page (Public API, Key files, real dependencies)
from the graph and source. The ## Overview, ## How it works,
## Key concepts, and ## Main flows sections are left as Draft -
placeholders. Those are the actual wiki - the understanding the graph cannot
express - and they are filled by this skill, not by the CLI.
Model policy - use a cheap model
This is bounded, mechanical synthesis: read a module's key files and write
structured prose into fixed sections. It is NOT deep reasoning. Run it on a
non-flagship / cheap model (e.g. Haiku, or Sonnet at most) - do not spend a
flagship model on it. If you orchestrate, dispatch one subagent per page on
the cheap model; the flagship's job is only to review a sample at the end.
Work-front
The scaffold is graph-driven and covers the WHOLE project — a page per module at
every nesting depth (src/pipelines, src/pipelines/store,
src/pipelines/features/pipeline-variables, …), so there can be many draft
pages. Do NOT try to enrich all at once — work in priority batches, incrementally.
Procedure
- Prepare (deterministic, do this yourself — no subagents):
keryx gdgraph build # fresh symbols + cross-file links (feeds Public API)
keryx wiki collect # full scaffold; read its final line:
# "enrichment needed: N component page(s) still Status: draft"
keryx wiki index
That enrichment needed count is your work-front. On later commits,
keryx wiki collect --changed --since HEAD~1 re-scaffolds only the modules
whose graph shape moved — enrich exactly those.
- List + order the drafts to enrich:
grep -rl "Status: draft" .metaproject/wiki/components .metaproject/wiki/architecture
Order by importance - most-depended-on modules first (they anchor the Project
Map). Use the page's Reference -> Depended on by. Take a batch (e.g. 20);
leave the rest for the next pass.
- For each draft page, read the files listed under
Reference -> Key files
(they are the highest-connectivity files, i.e. the module's core). Read a few
more if needed. Do NOT read the whole module.
- Fill the prose sections from what you read:
## Overview - 2-4 sentences: what the module owns and its purpose.
## How it works - the internal architecture: layers, key abstractions,
how they relate. Explain the design, do not re-list files.
## Key concepts - the domain vocabulary and core objects.
## Main flows - trace 1-3 concrete flows through the key files.
- Leave the
## Reference section untouched (it is graph-owned and
regenerated). Update ## Summary if the overview sharpened it.
- Set
Status: accepted and bump Version (e.g. to 1.0.0). This marks the
page human-owned; keryx wiki collect --force will never overwrite it.
- Ground every claim in code you read - write "appears to" rather than
inventing. When you link related pages, link ONLY to pages that ACTUALLY
exist - never guess a slug. Verify the target first
(
ls .metaproject/wiki/components or the wiki index); a module's page slug
is its path slugified (src/lineage -> src-lineage.md, NOT
lineage-graph.md). Do not invent Related Wiki entries or link to
non-wiki files (e.g. CLAUDE.md). The graph-derived ## Reference /
Related Code links are already correct - reuse those. Broken links from
guessed slugs are the #1 enrichment defect; run keryx wiki check-links and
fix any you introduced.
- As orchestrator you do NOT read code or write prose yourself — only subagents
do (one per page, cheap model). When the batch is done, review a sample
(prose accurate, real symbol names,
## Reference untouched), then run
keryx wiki index and keryx wiki check-links. Report: pages enriched,
pages still draft, next batch.
--force regenerates only unmodified drafts, so collect and enrich compose:
re-run collect after code changes, then enrich the newly created drafts.
Always-on orientation (optional)
To make wiki knowledge always available (not just when the agent remembers to
read the index), install the orientation injector — it adds the wiki index +
code-graph map to the agent's context each turn:
keryx orient install-hook [--runtime <id|all>] # claude, codex, cursor
keryx wiki context # the wiki half of that orientation
Skip When
- The request is a pure code lookup with no architectural/domain/business context. Skipping the wiki is fine here — but it does not license raw
rg: the code lookup itself still goes through gdgraph and keryx ctx rg (see the gdgraph and gdctx skills).
keryx wiki is unavailable.
Reporting
When wiki context is used, mention which pages were read. For non-trivial tasks, record wiki_used: pages / not-relevant / unavailable as part of the routing audit (see the gdgraph skill's Reporting section).
1---2name: gdwiki3description: Use FIRST for conceptual questions - how something works, why, architecture, domain models, business rules, user scenarios, auth and other flows, integrations, and known decisions. Read wiki/index.md, then use gdgraph to reach code.4---56# gdwiki Skill78Use this skill for project knowledge that is not a literal code detail:9architecture, domain models, business rules, user scenarios, service/component10responsibilities, integrations, and known decisions. The user does not need to11explicitly ask for wiki usage.1213## Routing (which skill first)1415Pick the entry point by question type:1617- Conceptual question - "how does X work", "why", architecture, domain, business rules, user scenarios, auth and other flows, integrations, known decisions - **use gdwiki first**: read `wiki/index.md`, open the relevant page, then use gdgraph to jump from that page to code.18- Structural question - "where is X", "what files are related", "what breaks if I change Y", usages, cycles, orphans - **use gdgraph first**; wiki is optional.19- gdctx runs **in parallel** in either case to keep command/search/file-read output compact. It is not a step in the sequence.2021## Trigger Examples2223- "Как работает авторизация?"24- "Где описан флоу логина / регистрации?"25- "Какие бизнес-правила у платежей?"26- "Объясни архитектуру этого модуля."27- "Какая доменная модель у заказа?"28- "Какие пользовательские сценарии при оплате?"29- "Почему приняли такое решение по интеграции?"30- "За что отвечает этот сервис и какие у него контракты?"3132## Workflow33341. Read `.metaproject/wiki/index.md` first. It is short and lists every page by type with a summary.352. Open only the specific pages relevant to the task. Do not read the whole wiki.363. To move from a wiki concept to code, use `skills/gdgraph/SKILL.md` (each page has a `Related Code` section).374. For compact command/search/read output while working, use `skills/gdctx/SKILL.md`.385. Treat wiki pages as curated context. Verify important claims against source code before editing or reporting.3940## Commands4142```bash43keryx wiki status44keryx wiki new <type> <slug> --title "<title>"45keryx wiki collect46keryx wiki index47keryx wiki check-links48keryx wiki validate49```5051## Maintenance5253- New pages start at `Version: 0.1.0`; bump `Version` on every edit.54- Run `keryx wiki index` after adding or renaming pages.55- Run `keryx wiki collect` to generate safe draft pages from gdgraph, health, and testing context.56- Run `keryx wiki check-links` before relying on cross-page links.5758## Enriching Collected Drafts (the wiki part)5960`keryx wiki collect` is deterministic and needs no model: it fills the61`## Reference` section of each page (Public API, Key files, real dependencies)62from the graph and source. The `## Overview`, `## How it works`,63`## Key concepts`, and `## Main flows` sections are left as `Draft -`64placeholders. Those are the actual wiki - the understanding the graph cannot65express - and they are filled by **this skill**, not by the CLI.6667### Model policy - use a cheap model6869This is **bounded, mechanical synthesis**: read a module's key files and write70structured prose into fixed sections. It is NOT deep reasoning. Run it on a71**non-flagship / cheap model** (e.g. Haiku, or Sonnet at most) - do not spend a72flagship model on it. If you orchestrate, dispatch **one subagent per page on73the cheap model**; the flagship's job is only to review a sample at the end.7475### Work-front7677The scaffold is graph-driven and covers the WHOLE project — a page per module at78every nesting depth (`src/pipelines`, `src/pipelines/store`,79`src/pipelines/features/pipeline-variables`, …), so there can be many draft80pages. Do NOT try to enrich all at once — work in priority batches, incrementally.8182### Procedure83840. Prepare (deterministic, do this yourself — no subagents):85 ```bash86 keryx gdgraph build # fresh symbols + cross-file links (feeds Public API)87 keryx wiki collect # full scaffold; read its final line:88 # "enrichment needed: N component page(s) still Status: draft"89 keryx wiki index90 ```91 That `enrichment needed` count is your work-front. On later commits,92 `keryx wiki collect --changed --since HEAD~1` re-scaffolds only the modules93 whose graph shape moved — enrich exactly those.941. List + order the drafts to enrich:95 ```bash96 grep -rl "Status: draft" .metaproject/wiki/components .metaproject/wiki/architecture97 ```98 Order by importance - most-depended-on modules first (they anchor the Project99 Map). Use the page's `Reference` -> `Depended on by`. Take a batch (e.g. 20);100 leave the rest for the next pass.1012. For each draft page, read the files listed under `Reference` -> `Key files`102 (they are the highest-connectivity files, i.e. the module's core). Read a few103 more if needed. Do NOT read the whole module.1043. Fill the prose sections from what you read:105 - `## Overview` - 2-4 sentences: what the module owns and its purpose.106 - `## How it works` - the internal architecture: layers, key abstractions,107 how they relate. Explain the design, do not re-list files.108 - `## Key concepts` - the domain vocabulary and core objects.109 - `## Main flows` - trace 1-3 concrete flows through the key files.1104. Leave the `## Reference` section untouched (it is graph-owned and111 regenerated). Update `## Summary` if the overview sharpened it.1125. Set `Status: accepted` and bump `Version` (e.g. to `1.0.0`). This marks the113 page human-owned; `keryx wiki collect --force` will never overwrite it.1146. Ground every claim in code you read - write "appears to" rather than115 inventing. When you link related pages, link ONLY to pages that ACTUALLY116 exist - never guess a slug. Verify the target first117 (`ls .metaproject/wiki/components` or the wiki index); a module's page slug118 is its path slugified (`src/lineage` -> `src-lineage.md`, NOT119 `lineage-graph.md`). Do not invent `Related Wiki` entries or link to120 non-wiki files (e.g. `CLAUDE.md`). The graph-derived `## Reference` /121 `Related Code` links are already correct - reuse those. Broken links from122 guessed slugs are the #1 enrichment defect; run `keryx wiki check-links` and123 fix any you introduced.1247. As orchestrator you do NOT read code or write prose yourself — only subagents125 do (one per page, cheap model). When the batch is done, review a sample126 (prose accurate, real symbol names, `## Reference` untouched), then run127 `keryx wiki index` and `keryx wiki check-links`. Report: pages enriched,128 pages still draft, next batch.129130`--force` regenerates only unmodified drafts, so collect and enrich compose:131re-run collect after code changes, then enrich the newly created drafts.132133## Always-on orientation (optional)134135To make wiki knowledge always available (not just when the agent remembers to136read the index), install the orientation injector — it adds the wiki index +137code-graph map to the agent's context each turn:138139```bash140keryx orient install-hook [--runtime <id|all>] # claude, codex, cursor141keryx wiki context # the wiki half of that orientation142```143144## Skip When145146- The request is a pure code lookup with no architectural/domain/business context. Skipping the wiki is fine here — but it does not license raw `rg`: the code lookup itself still goes through gdgraph and `keryx ctx rg` (see the gdgraph and gdctx skills).147- `keryx wiki` is unavailable.148149## Reporting150151When wiki context is used, mention which pages were read. For non-trivial tasks, record `wiki_used: pages / not-relevant / unavailable` as part of the routing audit (see the gdgraph skill's Reporting section).