Blame

6a3a62 Claude (Dev) 2026-03-13 01:36:04
[mcp] [system] Create Wiki Usage Guide for dev wiki agents
1
---
2
category: reference
3
tags: [meta]
4
last_updated: 2026-03-12
5
confidence: high
6
---
7
8
# Wiki Usage Guide for Agents
9
10
## What this is
11
12
This wiki tracks the development of wikibot.io — a serverless wiki-as-a-service platform. Both human developers and Claude agents (phase managers) read and write to this wiki. It serves as the persistent state store across agent sessions, tracking what's been built, what decisions were made, and what's next.
13
14
The wiki is backed by Git. Every edit is a commit with full version history.
15
16
## Available tools
17
18
You have 12 MCP tools, prefixed with "dev-wiki" in Claude Code.
19
20
### Reading
21
22
**`read_note(path)`** — Read a single page. Returns frontmatter, content, and WikiLinks (outgoing and incoming). Use `revision` to read a historical version.
23
24
### Navigating
25
26
**`list_notes()`** — List all pages. Returns name, path, category, tags, word count, and last updated date. All filters are optional and compose with AND: `prefix`, `category`, `tag`, `updated_since`.
27
28
**`get_links(path)`** — Get incoming and outgoing WikiLinks for a page.
29
30
**`get_recent_changes(limit=20)`** — Git changelog across all pages.
31
32
**`find_orphaned_notes()`** — Pages not linked from any index page.
33
34
### Searching
35
36
**`search_notes(query)`** — Full-text keyword search.
37
38
**`semantic_search(query, n=5)`** — Conceptual similarity search.
39
40
### Writing
41
42
**`write_note(path, content, commit_message, revision?)`** — Create or overwrite a page. Omit `revision` for new pages. Supply `revision` from `read_note` when updating (optimistic locking).
43
44
**`edit_note(path, revision, old_string, new_string, commit_message?)`** — Targeted find-and-replace within a page. `old_string` must match exactly once.
45
46
**`rename_note(path, new_path, commit_message?)`** — Rename/move a page. Updates all incoming WikiLinks atomically.
47
48
**`delete_note(path, commit_message)`** — Delete a page.
49
50
### History
51
52
**`get_history(path, limit=10)`** — Revision history for a page.
53
54
## Session start protocol (for phase managers)
55
56
At the beginning of every session:
57
58
1. **`read_note("Home")`** — Load the master index. See what exists.
59
2. **`read_note("Dev/Phase N Status")`** — Resume state from the last session.
60
3. **`get_recent_changes(limit=10)`** — See if the human made changes since last session.
61
4. Load the relevant spec pages for your phase (Agent Conventions, Task Graph).
62
5. Proceed with work.
63
64
## Page conventions
65
66
### Frontmatter
67
68
Every page should have YAML frontmatter:
69
70
```yaml
71
---
72
category: spec | dev | reference | index | meta
73
tags: [relevant, tags]
74
last_updated: 2026-03-12
75
confidence: high
76
---
77
```
78
79
**Categories for this wiki:**
80
- `spec` — Design specifications and implementation guides
81
- `dev` — Development status tracking and decision logs
82
- `reference` — Project documents (PRDs, external references)
83
- `index` — The Home page and navigation pages
84
- `meta` — Wiki usage and conventions
85
86
### Page organization
87
88
```
89
Home — master index
90
Specs/ — implementation specs
91
Agent Conventions — how agents work
92
Task Graph — work units and dependencies
93
Phase Gates — exit criteria per phase
94
Docs/ — project documents
95
PRD — serverless SaaS PRD
96
Original PRD — single-tenant system PRD
97
Dev/ — development tracking
98
Phase N Status — living status per phase
99
Phase N Summary — final summary per phase
100
Decision Log — architectural decisions
101
Meta/ — wiki meta
102
Wiki Usage Guide — this page
103
```
104
105
### Cross-references
106
107
Use WikiLinks: `[[Page Path]]` or `[[Page Path|display text]]`. Target path comes first, display text second.
108
109
### Commit messages
110
111
Format: `[source] action: description`
112
113
Sources:
114
- `[system]` — automated/setup operations
115
- `[P0]` through `[P4]` — phase-specific work
116
- `[manager]` — phase manager status updates
117
118
## Dev tracking conventions
119
120
### Status pages (`Dev/Phase N Status`)
121
122
Living document updated each session. Contains:
123
- Current state (tasks complete, in progress, blocked)
124
- Active decisions or blockers
125
- Next parallelism group to execute
126
127
### Summary pages (`Dev/Phase N Summary`)
128
129
Written once when the phase completes:
130
- What was implemented (repo/branch references)
131
- Decisions made and rationale
132
- Deviations from the task graph
133
- New tasks discovered
134
- Lessons learned
135
136
### Decision log (`Dev/Decision Log`)
137
138
Append-only. Each entry: date, decision, context, alternatives considered, rationale.
139
140
## Things to watch out for
141
142
**Optimistic locking.** Always read before writing. Supply the `revision` SHA when updating. If someone else edited since your read, you'll get a conflict — re-read and retry.
143
144
**Choose `edit_note` vs `write_note` carefully.** `edit_note` for small changes. `write_note` for structural rewrites. For multi-part updates, multiple `edit_note` calls are safer.
145
146
**Keep Home current.** When you create a new page, update Home in the same session.
147
148
**Semantic search may lag** web UI edits by up to 60 seconds. Full-text `search_notes` is always current.
149
150
## Quick reference
151
152
| I want to... | Use... |
153
|---|---|
154
| Start a session | `read_note("Home")` then `read_note("Dev/Phase N Status")` |
155
| Find a page by topic | `semantic_search(query="...")` |
156
| Find a page by keyword | `search_notes(query="...")` |
157
| See what changed recently | `get_recent_changes(limit=10)` |
158
| See all specs | `list_notes(prefix="Specs/")` |
159
| See dev status | `list_notes(prefix="Dev/")` |
160
| Create a new page | `write_note(path, content, commit_message)` |
161
| Update an existing page | `read_note` then `write_note` with revision SHA |
162
| Make a small targeted edit | `edit_note(path, revision, old_string, new_string)` |
163
| Check a page's history | `get_history(path, limit=10)` |
164
| Find unindexed pages | `find_orphaned_notes()` |