원클릭으로
wiki
Generate comprehensive codebase documentation for a repository. Uploads the wiki to view in the Factory app.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate comprehensive codebase documentation for a repository. Uploads the wiki to view in the Factory app.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Background knowledge for droid-control workflows -- not invoked directly. Recording lifecycle for terminal and browser sessions.
Background knowledge for droid-control workflows -- not invoked directly. Desktop-control driver mechanics for native GUI app automation via trycua cua-driver.
Control terminal TUIs and web/Electron apps for testing, demos, QA, and computer-use tasks. Use when you need to automate a CLI, drive a browser, record a demo, or capture proof artifacts.
Create a pull request with Conventional Commits formatting, a templated body, and local verification. Use when the user asks to create a PR, open a PR, submit changes for review, or put code up for review.
Follow up on an existing PR by rebasing on the base branch, addressing reviewer comments, fixing CI issues, and pushing updates. Use when the user provides a PR URL or number and wants to get it ready for merge.
Intercept and debug HTTP traffic from any CLI, service, or script using HTTP Toolkit. Use when you need to inspect LLM API calls, backend requests, auth flows, or debug network-level issues across any language or runtime.
| name | wiki |
| version | 1.0.0 |
| description | Generate comprehensive codebase documentation for a repository. Uploads the wiki to view in the Factory app. |
| user-invocable | true |
| disable-model-invocation | true |
Read a repository, then produce a set of interconnected documentation pages that explain what the code does and how it fits together. The output is a droid-wiki/ directory of markdown files, uploaded to Factory via droid wiki-upload.
Before writing anything, build a mental model of the codebase. The survey has two passes: a structural scan and a deep code scan.
Read these files (when they exist):
README.md, AGENTS.md, CONTRIBUTING.md — project intent and conventionspackage.json, Cargo.toml, go.mod, pyproject.toml — dependencies and scriptsdocs/ directory — existing documentationsrc/index.ts, main.go, app.py, etc.) — how the application starts.github/workflows/, .gitlab-ci.yml, Jenkinsfile, azure-pipelines.yml, etc.)webpack.config.*, vite.config.*, Makefile, build/, Gulpfile.*, etc.)eslint.config.*, custom lint plugins, rustfmt.toml, .golangci.yml, etc.)Build a map of:
The structural scan catches what's visible from directory names and config files. The deep scan catches features, domains, and capabilities that are only visible in the code itself. Probe the codebase for signals that reveal topics the structural scan missed:
src/features/, src/modules/, src/domains/, or equivalent directories — the names and contents reveal product capabilitiesThe goal is to discover the complete list of topics the wiki should cover. The structural scan gives you the skeleton; the deep scan fills in the muscle. A feature like "Analytics" might not have its own top-level directory but lives inside src/features/analytics/ or is revealed by a set of feature flags and API endpoints.
After both passes, walk every top-level source directory (and one level below) to check for subsystems you missed. For each directory that contains its own service, module, or feature, decide:
Small repos may only need a few domain pages. Large repos should have as many as the codebase warrants. Do not cap arbitrarily — let the repo's actual structure determine coverage.
After scanning the source tree, check for these commonly overlooked areas:
scripts/, tools/, or bin/If any of these are non-trivial, they deserve coverage — either as their own page or as a section in a related page.
At the end of the survey, produce a survey context document — a compact summary that will be shared with sub-agents. This document should include:
Before moving to planning, reconcile two independent topic sources to ensure nothing is missed:
Source A: Discovered topics. The topics found during Pass 1 (structural scan) and Pass 2 (deep code scan). These include cross-cutting features that don't map to a single directory (e.g., "LLM integration" spanning multiple packages, "authentication" touching frontend, backend, and CLI).
Source B: Directory enumeration. For each lens that applies to the repo, run ls on the corresponding source directories and list every subdirectory:
apps/ (or the repo's equivalent)src/features/, packages/frontend/src/features/, or wherever the repo organizes features)Reconciliation: Merge both lists. For every item on either list, decide:
The discovered topics catch things that directories miss (cross-cutting concerns, emergent patterns). The directory enumeration catches things that discovery misses (features the agent didn't encounter in the files it read). Together they produce comprehensive coverage.
Silent omissions are not acceptable. If a source directory exists with non-trivial code and has no wiki topic, that's a gap that must be justified.
Design a page tree before writing any prose. The wiki has three tiers of content: always-present pages, organizational lenses, and conditional sections.
These pages appear in every wiki, in this order:
overview/ — introductory material grouped under one section
index.md — project overview: what it does, who uses it, quick linksarchitecture.md — system architecture with Mermaid diagramsgetting-started.md — prerequisites, install, build, test, runglossary.md — project-specific terms and domain vocabularyby-the-numbers.md — codebase statistics snapshot (see below)lore.md — timeline and history of the codebase (see below)how-to-contribute/ — how to work in this codebase
index.md — work pickup, PR process, review expectations, definition of donedevelopment-workflow.md — branch, code, test, PR, merge cycletesting.md — frameworks, patterns, how to run, mock, and coverdebugging.md — logs, common errors, troubleshooting runbookpatterns-and-conventions.md — error handling, coding style, cross-cutting concernstooling.md — build system, linters, code generators, CI tooling (if the repo's tooling is the product itself, promote this to a top-level section instead)A top-level by-the-numbers.md page that gives a quantitative snapshot of the codebase. Start the page with a "Data collected on [date]" note so readers know how current the numbers are.
Include these sections:
Co-authored-by: factory-droid[bot], dependabot[bot], github-actions[bot], copilot[bot]). This is a lower bound on AI-assisted work since inline AI tools like Copilot leave no trace in git history. Be transparent about what's counted.Use Mermaid xychart-beta (horizontal bar charts) for language breakdown and any other stat where a visual helps. Do NOT use Mermaid pie charts — they are not supported by the renderer. Use tables for lists of files/directories.
Never include individual contributor stats (top committers, lines per person, leaderboards). The by-the-numbers page is about the codebase, not the people. Per-person metrics create toxic comparisons and don't belong in team documentation. The maintainers.md page handles ownership mapping separately.
Inline stats in other pages: In addition to this summary page, weave relevant stats into existing pages:
architecture.mdcleanup-opportunities/ (if that section exists)reference/dependencies.mdA top-level lore.md page that tells the story of how the codebase evolved. This is a narrative history, not a technical reference. It answers "what happened here and when?"
Boundaries with other sections:
by-the-numbers.md = current snapshot (what the codebase looks like today)lore.md = timeline and history (what changed and when)fun-facts.md = light trivia (easter eggs, amusing discoveries)background/ = technical rationale (why decisions were made)Every event, era, and milestone must include a date or month (e.g., "Mar 2023", "Q4 2024"). Derive dates from git commit timestamps, tag dates, and file creation dates. If an exact date isn't available, use the month of the earliest relevant commit.
Include these sections:
@deprecated annotations, and removed routes. What was the feature, when was it introduced, when was it deprecated, and what replaced it.Speculation: When the "why" behind a change isn't clear from commits, use natural hedging language ("appears to have been", "likely replaced due to"). No special formatting for speculative content.
Five lenses are available for organizing the codebase deep-dives. Use any combination based on what the repo actually contains. At least one lens is required. Most repos use 2-3. The features lens is strongly encouraged -- it's the most intuitive entry point for new engineers ("what does this thing do?"). Even small repos typically have user-visible or developer-visible capabilities worth documenting. Only skip it if the repo is a single-purpose library with no distinct features.
| Concept | Default label | Also called | When to use |
|---|---|---|---|
| Deployable units | applications/ | services/, apps/ | Repo ships multiple distinct runtimes |
| Internal building blocks | systems/ | services/, modules/, subsystems/ | Architectural components that don't map to a single app or package |
| Cross-cutting capabilities | features/ | capabilities/, workflows/ | User-visible or developer-visible things that span multiple systems |
| Workspace packages | packages/ | libraries/, crates/, modules/ | Monorepo with shared libraries worth documenting individually |
| Foundational domain objects | primitives/ | core-concepts/, domain-models/, entities/ | Types/concepts that appear across 3+ systems (e.g., session, user, message) |
Choosing labels: Mirror the repo's own vocabulary. If the repo has an apps/ directory, call the section apps/, not applications/. If the repo calls things "services," use services/. The default labels are fallbacks for when the repo has no existing convention.
Placement rules:
packages/droid-core, document it under packages, not systems.Heuristics for identifying each lens:
Include these based on your judgment after surveying the repo. Skip any that don't apply.
api/ — if the repo exposes REST, GraphQL, WebSocket, or other APIsdeployment/ — if there's a non-trivial deployment process (CI/CD, environments, rollback, infrastructure)security/ — if there are meaningful trust boundaries (auth, authorization, secrets, input validation)background/ — if the repo has meaningful history (design decisions, pitfalls/danger zones, migration context)how-to-monitor/ — if the repo runs as a service with logging, metrics, tracing, or alerting infrastructurecleanup-opportunities/ — if the repo has dead code, accumulated TODOs/FIXMEs, oversized files, or outdated dependencies. Only include if there is actual content to report (see below)fun-facts.md — easter eggs, origin stories, oldest code, naming originsThis conditional section documents how to see what the system is doing. Only generate it for repos that run as services with logging, metrics, or tracing infrastructure. Not applicable to libraries, CLI tools, or packages.
Sub-pages:
logging.md — where logs go, how to query them, log levels and conventions, structured logging patterns, how to add new log statementsmetrics.md — what metrics are tracked, key SLIs/SLOs, available dashboards, how to add new metricstracing.md — distributed tracing setup, how to trace a request end-to-end, span naming conventions, how to instrument new code pathsalerting.md — what alerts exist, alert thresholds and rationale, escalation paths, known noisy alerts, how to add new alertsSkip any sub-page the repo has no infrastructure for. If only one sub-page has content, collapse how-to-monitor/ into a single how-to-monitor.md file instead of a directory.
This conditional section surfaces actionable maintenance work. Only generate it if the scan finds meaningful content. Possible sub-pages:
dead-ends.md — files, exports, or modules that nothing imports. The code equivalent of a ghost town.todos-and-fixmes.md — accumulated TODO, FIXME, and HACK comments with file locations. Include the oldest ones.complexity-hotspots.md — the largest source files, deepest nesting, or most complex functions. A gentle nudge toward refactoring.dependency-freshness.md — outdated or unmaintained dependencies. The oldest dependency still in use.Skip any sub-page that has no findings. If only one sub-page has content, collapse cleanup-opportunities/ into a single cleanup-opportunities.md file instead of a directory.
Include a top-level maintainers.md page that maps subsystems to the people who know them. This page uses two data sources:
Present as a table:
| Subsystem | Official owners (CODEOWNERS) | Recent contributors (git history) | Last activity |
|---|---|---|---|
| Authentication | @alice | alice, bob | 2 weeks ago |
| CLI | @charlie, @dave | charlie, eve | 3 days ago |
If the repo has no CODEOWNERS file, omit that column and derive all data from git history. If the repo has very few contributors (e.g., a solo project), skip this page entirely.
Each domain page (apps, systems, features, packages, primitives) should include an "Active contributors" byline as the very first line after the page heading, before the Purpose section:
# Authentication
Active contributors: alice, bob
## Purpose
...
Derive the names from CODEOWNERS (if available) merged with the top 2-3 recent committers from git blame for that subsystem's directory. Use first names or GitHub usernames, no @ symbols.
Exclude bot accounts from contributor lists — filter out usernames ending in [bot] (e.g., factory-droid[bot], dependabot[bot], github-actions[bot]). Bots are not people you'd reach out to with questions. This applies to both the per-page active contributors byline and the maintainers page.
Use the default branch for contributor data. When deriving contributors from git blame or git log, always query against the default branch (main or dev), not the current branch. Feature branches skew contributor data toward whoever is working on that branch. Use git log origin/main -- <path> or git log origin/dev -- <path> to get accurate contributor history.
These appear at the end of every wiki:
reference/ — configuration, data models, external dependenciesmaintainers.md — subsystem ownership table (conditional, skip for solo projects; always the very last page)The sidebar ordering is critical for navigation. Every page must appear in its defined position — do NOT group childless pages together at the top or bottom.
The full ordering in the wiki is:
Ordering rules:
by-the-numbers.md appears after overview/ even though it has no children, not at the top with other childless pages.pageOrder array in .wiki-meta.json must exactly follow this ordering. It controls the sidebar display order.apps/), order pages from most important to least important. The index.md is always first.overview/ (index.md, architecture.md, getting-started.md, glossary.md) which are always single filesapps/cli.md or apps/cli/index.md + apps/cli/tui-rendering.md). No deeper.index.mdgetting-started.md, not GettingStarted.mdPage titles (the # Heading at the top of each .md file) should be concise noun phrases that match how the team refers to the thing. The section hierarchy already provides context, so titles should not repeat it.
overview/index.md which may include the project name (e.g., "Factory platform overview").features/sessions.md is titled "Sessions", not "Features — Sessions".Page generation uses a top-level agent for orchestration and foundation pages, then delegates domain pages to sub-agents for depth and parallelism.
1. SURVEY (top-level)
Structural scan + deep code scan
Produce: survey_context
│
▼
2. PLAN (top-level)
Decide lens sections, list all pages, mark criticality
Produce: page_plan (JSON with per-page briefs)
│
▼
3. FOUNDATION PAGES (top-level, sequential)
Write: overview/*, how-to-contribute/patterns-and-conventions
These establish shared vocabulary and conventions
│
├────────────────────────────────────────┐
▼ ▼
4a. LENS PAGES (sub-agents, parallel) 4b. DATA PAGES (sub-agents, parallel)
Critical pages: 1 agent each by-the-numbers
Normal pages: batched 3-5 lore
Each agent writes its page(s) fun-facts
+ sub-pages if warranted
│ │
├────────────────────────────────────────┘
▼
5. REMAINING PAGES (sub-agents, parallel)
how-to-contribute/ (remaining pages)
Conditional sections: api, deployment, security,
how-to-monitor, background, cleanup-opportunities
reference/ + maintainers.md
│
▼
6. ASSEMBLY (top-level)
Cross-link audit, .wiki-meta.json
│
▼
7. UPLOAD
After the survey, the top-level agent produces a page plan — a structured list of every page the wiki will contain. For each page, the plan includes:
apps/cli/index.md)critical (gets a dedicated sub-agent) or normal (batched with related pages)Criticality guidelines: Pages covering apps, packages, or features with large codebases, high churn, or central architectural roles are strong candidates for dedicated agents. Examples: a CLI with 50+ source files, a core library imported by most other packages, a feature that spans 5+ directories. The agent uses its judgment from the survey — these are guidelines, not hard rules.
Depth guidelines for sub-agents: A single page should not try to cover a complex subsystem end-to-end. Sub-agents should create sub-pages when:
Examples of when to split:
cli/tui-rendering.md, cli/exec-mode.md, cli/skills.md, cli/session-management.md)Examples of when NOT to split:
The top-level agent writes these pages sequentially before any sub-agents run:
overview/index.md — project overviewoverview/architecture.md — system architecture with Mermaid diagramsoverview/getting-started.md — prerequisites, install, build, test, runoverview/glossary.md — project-specific termshow-to-contribute/patterns-and-conventions.md — coding patterns and conventionsThese pages establish the shared vocabulary and architectural context that sub-agents reference. They must be complete before delegation begins.
Two groups of sub-agents run in parallel:
4a. Lens pages — all organizational lens pages (apps, systems, features, packages, primitives):
section/page.md). The top-level agent does NOT pre-plan sub-pages for critical pages — the sub-agent explores and decides.4b. Data pages — run in parallel with lens pages since they only need git history and source file structure:
by-the-numbers.mdlore.mdfun-facts.mdAfter all lens pages complete, spawn sub-agents for:
how-to-contribute/ remaining pages (development-workflow, testing, debugging, tooling) as one batchreference/ + maintainers.md as one batchThese pages can now cross-reference lens pages since they're complete.
The top-level agent does a final pass:
.wiki-meta.json with final page list and orderingindex.md filesEvery sub-agent receives a prompt with this structure:
You are writing wiki page(s) for [repo].
## Shared Context
[The survey_context document from Step 1 — compact repo overview,
architecture, key patterns, glossary terms. Same for all agents.]
## Your Assignment
Pages: [list of pages this agent is responsible for]
Criticality: [critical or normal]
Content brief: [2-3 sentences per page describing what to cover]
Relevant source paths: [specific files/directories to read]
## Related Pages (link to these, don't duplicate their content)
- apps/cli (apps/cli/index.md): "CLI architecture, entry points, and TUI rendering"
- features/llm-integration (features/llm-integration.md): "LLM provider abstraction and streaming"
- ...
## Rules
- Follow the page template (sections 3a-3e in the skill)
- Maximum nesting: 2 levels (section/page.md)
- For critical pages: explore the code and create sub-pages if the topic
has clearly distinct sub-areas. Write both the index.md and sub-pages.
- For normal pages: write single-file pages unless complexity demands splitting
- Use Mermaid diagrams when they help explain data flows or component relationships
- Cross-link to related pages listed above instead of re-explaining their topics
- Write output to [wiki_dir path]
The shared context is the same for all agents — the compact survey document. The per-page brief is tailored by the top-level agent during planning. This ensures no sub-agent re-discovers what the survey already found, and no sub-agent explains what another page covers.
For each page:
Open and read the actual source files for the section you are writing. Do not guess or hallucinate file contents. If a file is too large, read the parts that matter for the current section.
Explain what the code does in plain language. Start with the high-level purpose, then drill into specifics. Every claim should be traceable to a specific file or function.
Each domain page should include these sections (skip any that don't apply to the subsystem):
Let the complexity of the subsystem determine how long the page is. A thin wrapper might only need sections 1, 3, and 5. A complex subsystem might need all six with multiple diagrams.
Use Mermaid diagrams to illustrate:
Mermaid diagram guidelines:
graph TD or graph LR for architecture and flow diagramssequenceDiagram for request/response flows between servicesstateDiagram-v2 for state machinesExample:
```mermaid
graph LR
Client -->|HTTP request| APIGateway
APIGateway -->|validate + route| Handler
Handler -->|query| Database
Database -->|rows| Handler
Handler -->|JSON response| Client
```
Do not use Mermaid for simple relationships that a sentence can explain. A diagram should earn its place by showing something that is hard to describe in words.
Each domain page must include a "Key source files" table listing the most important files for that subsystem:
| File | Purpose |
|---|---|
| `src/auth/middleware.ts` | Validates JWT tokens, attaches user to request |
| `src/auth/token-service.ts` | Token creation, refresh, and revocation |
The table should cover whatever files are important — don't pad it with trivial files and don't skip files just because there are few.
Reference every file you mention in prose. When mentioning a class, interface, function, or type, include its file path in backticks on first mention. Readers should be able to go from the documentation to the code in one step.
Link between pages using relative markdown links:
For details on how the auth middleware integrates with the API layer,
see [API authentication](../api/authentication.md).
Each page should link to at least one other page. The reader should be able to navigate the wiki without using the sidebar.
The fun-facts.md page is optional but encouraged. Pick the 3-5 most interesting topics for the specific repo from this list:
Do not force all of these into every wiki. Pick only the ones where the repo has something genuinely interesting to say. If nothing stands out, skip fun-facts entirely.
After generating all pages, create .wiki-meta.json in the wiki directory root. The pageOrder array is critical -- it controls the display order of pages in the wiki sidebar. List every generated file path in the exact order you want them to appear. Without this, pages sort alphabetically.
{
"generatedAt": "2025-01-15T10:30:00Z",
"pageCount": 42,
"topLevelSections": ["overview", "by-the-numbers", "lore", "fun-facts", "how-to-contribute", "apps", "systems", "features", "packages", "primitives", "api", "deployment", "security", "how-to-monitor", "background", "cleanup-opportunities", "reference", "maintainers"],
"pageOrder": [
"overview/index.md",
"overview/architecture.md",
"overview/getting-started.md",
"overview/glossary.md",
"by-the-numbers.md",
"lore.md",
"fun-facts.md",
"how-to-contribute/index.md",
"how-to-contribute/development-workflow.md",
"how-to-contribute/testing.md",
"how-to-contribute/debugging.md",
"how-to-contribute/patterns-and-conventions.md",
"how-to-contribute/tooling.md",
"apps/index.md",
"apps/cli/index.md",
"apps/cli/command-structure.md",
"apps/cli/tui-rendering.md",
"apps/daemon.md",
"systems/index.md",
"systems/auth.md",
"features/index.md",
"features/wiki-generation.md",
"packages/index.md",
"packages/common.md",
"primitives/index.md",
"primitives/session.md",
"api/index.md",
"api/rest-endpoints.md",
"deployment.md",
"security.md",
"how-to-monitor/index.md",
"how-to-monitor/logging.md",
"how-to-monitor/metrics.md",
"how-to-monitor/tracing.md",
"how-to-monitor/alerting.md",
"background/index.md",
"background/design-decisions.md",
"background/pitfalls.md",
"background/migration-context.md",
"cleanup-opportunities/index.md",
"cleanup-opportunities/dead-ends.md",
"cleanup-opportunities/todos-and-fixmes.md",
"cleanup-opportunities/complexity-hotspots.md",
"cleanup-opportunities/dependency-freshness.md",
"reference/index.md",
"reference/configuration.md",
"reference/data-models.md",
"reference/dependencies.md",
"maintainers.md"
]
}
The example above is abbreviated. In practice, list every .md file in the wiki directory. The order must match the page ordering defined in Section 2: overview → by-the-numbers → lore → fun-facts → how-to-contribute → lenses → conditional → reference → maintainers.
When the user wants to keep a local copy (the default):
droid wiki-upload \
--repo-url "$REPO_URL" \
--wiki-dir ./droid-wiki
Arguments:
--repo-url — the repository URL (the remote origin, e.g., https://github.com/org/repo)--wiki-dir — path to the directory containing the generated markdown files--cleanup — (optional) delete the wiki directory after a successful uploadWhen the user asks to generate the wiki without leaving files on disk (e.g., the user says "don't leave files locally" or passes a --no-local flag):
# Create a temporary directory
WIKI_TMPDIR=$(mktemp -d)
# Write all wiki files to the temporary directory instead of ./droid-wiki
# ... generate pages into $WIKI_TMPDIR ...
# Upload with --cleanup to remove the temp directory after success
droid wiki-upload \
--repo-url "$REPO_URL" \
--wiki-dir "$WIKI_TMPDIR" \
--cleanup
The --cleanup flag tells the CLI to delete the --wiki-dir directory after a successful upload. If the upload fails, the directory is preserved so the user can retry.
Start every page with a 1–3 sentence summary of what the page covers. Follow with an overview section that explains the main concepts. Put implementation details, edge cases, and configuration options later in the page.
A reader skimming the first paragraph of each page should get a useful overview of the entire system.
Keep individual pages under 500KB. If a page approaches this limit, split it into sub-pages. For example, a large API reference page could become a directory with one page per endpoint group.
Write documentation that reads like a person wrote it. Technical docs are especially prone to AI-sounding patterns because the subject matter is dry. Fight that tendency.
Specific rules to follow:
Cut inflated significance. Do not write "serves as a testament to," "pivotal role in the evolving landscape," "setting the stage for," or "underscores the importance of." Just state what the thing does.
Bad: "The authentication module serves as a critical pillar in the application's security landscape." Good: "The authentication module validates JWT tokens and attaches user context to requests."
Cut promotional language. Do not write "boasts," "vibrant," "rich," "profound," "showcasing," "exemplifies," "commitment to," "groundbreaking," "renowned," or "breathtaking." Technical docs describe; they do not sell.
Bad: "The codebase boasts a rich set of vibrant utilities that showcase the team's commitment to developer experience."
Good: "The utils/ directory has helpers for string formatting, date parsing, and retry logic."
Kill superficial -ing analyses. Do not tack "highlighting," "ensuring," "reflecting," "symbolizing," "showcasing," or "contributing to" onto sentences to add fake depth.
Bad: "The service processes events asynchronously, ensuring scalability while highlighting the system's robust architecture." Good: "The service processes events asynchronously. It pulls from an SQS queue and can handle ~500 events/second per instance."
Avoid AI vocabulary words. These words appear far more often in AI-generated text: additionally, crucial, delve, emphasizing, enduring, enhance, fostering, garner, interplay, intricate/intricacies, landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore (verb), vibrant. Replace them with plainer alternatives.
Skip the rule of three. Do not force ideas into groups of three to sound comprehensive (e.g., "innovation, inspiration, and industry insights"). If there are two things, list two. If there are four, list four.
Do not use copula avoidance. Write "X is Y" or "X has Y" instead of "X serves as Y," "X stands as Y," "X represents Y," "X boasts Y," "X features Y," or "X offers Y."
Bad: "The config module serves as the central hub for environment variable management." Good: "The config module reads environment variables and exports typed constants."
Do not use negative parallelisms. Avoid "It's not just X, it's Y" and "Not only X but Y" constructions.
Use sentence case in headings. Write "Getting started with authentication," not "Getting Started With Authentication."
Cut filler phrases. Replace "in order to" with "to," "due to the fact that" with "because," "it is important to note that" with nothing (just state the fact).
Be specific, not vague. Replace "industry experts believe" with a concrete reference. Replace "several components" with the actual component names. Replace "various configurations" with the actual config options.
Avoid em dash overuse. Use commas or periods instead of em dashes (—) in most cases. One em dash per page is fine; three or more is a pattern.
Do not use chatbot artifacts. Never write "I hope this helps," "Let me know if," "Here is an overview of," "Certainly!", or "Great question!" These are conversation patterns, not documentation.
Every factual claim about the code should point to the source file. Do not say "the system handles authentication" without saying where. Do not say "the database schema includes a users table" without pointing to the migration or model file.
If you cannot find the file that implements something, say so: "The retry logic is referenced in config.ts but the implementation was not found in the current codebase."
Include at least one Mermaid diagram in the architecture page. Include diagrams in domain pages when they help explain data flows or component relationships. Do not add diagrams to every page — a page about configuration options or environment variables probably does not need one.
The generated wiki follows this layout:
droid-wiki/
├── .wiki-meta.json
# Always present (in this order)
├── overview/ # Introductory material
│ ├── index.md # Project overview
│ ├── architecture.md # System architecture with Mermaid diagrams
│ ├── getting-started.md # Prerequisites, install, build, test, run
│ └── glossary.md # Project-specific terms and vocabulary
├── by-the-numbers.md # Codebase statistics snapshot
├── lore.md # Timeline, eras, deprecated features, rewrites
├── fun-facts.md # Easter eggs, origin stories, oldest code
├── how-to-contribute/ # How to work in this codebase
│ ├── index.md
│ ├── development-workflow.md
│ ├── testing.md
│ ├── debugging.md
│ ├── patterns-and-conventions.md
│ └── tooling.md
# Organizational lenses (use any combination, at least one required)
# Labels mirror the repo's own vocabulary
├── <apps|services|applications>/ # Deployable units
│ ├── index.md
│ ├── <simple-app>.md # Single page for simple apps
│ └── <complex-app>/ # Directory for complex apps
│ ├── index.md
│ └── <sub-topic>.md
├── <systems|modules|subsystems>/ # Internal building blocks
│ ├── index.md
│ ├── <simple-system>.md
│ └── <complex-system>/ # 3rd level for complex subsystems
│ ├── index.md
│ └── <sub-topic>.md
├── <features|capabilities|workflows>/ # Cross-cutting capabilities
│ ├── index.md
│ ├── <simple-feature>.md
│ └── <complex-feature>/ # Features that span many systems deserve sub-pages
│ ├── index.md
│ └── <sub-topic>.md
├── <packages|libraries|crates>/ # Workspace packages
│ ├── index.md
│ ├── <simple-package>.md
│ └── <complex-package>/
│ ├── index.md
│ └── <sub-topic>.md
├── <primitives|core-concepts|entities>/ # Foundational domain objects
│ ├── index.md
│ └── *.md
# Conditional sections (LLM judgment)
├── api/ # If the repo exposes APIs
│ ├── index.md
│ └── *.md
├── deployment.md # Single page or directory
├── security.md # Single page or directory
├── how-to-monitor/ # Logging, metrics, tracing, alerting (services only)
│ ├── index.md
│ ├── logging.md # Where logs go, how to query, log levels
│ ├── metrics.md # What's tracked, dashboards, SLIs
│ ├── tracing.md # Distributed tracing, request tracing
│ └── alerting.md # Alerts, thresholds, escalation, noisy alerts
├── background/ # Design decisions, pitfalls, migration context
│ ├── index.md
│ └── *.md
├── cleanup-opportunities/ # Dead code, TODOs, complexity hotspots, stale deps
│ ├── index.md
│ ├── dead-ends.md # Unused files, exports, modules
│ ├── todos-and-fixmes.md # Accumulated TODO/FIXME/HACK comments
│ ├── complexity-hotspots.md # Largest files, deepest nesting
│ └── dependency-freshness.md # Outdated or unmaintained dependencies
# Always present (bottom)
├── reference/
│ ├── index.md
│ ├── configuration.md
│ ├── data-models.md
│ └── dependencies.md
└── maintainers.md # Subsystem ownership table (conditional, always last)
Rules:
.md file must start with a level-1 heading (# Title). The upload tool extracts the title from this heading.index.md..wiki-meta.json file is for tracking purposes and is not uploaded as a page.overview/ (index.md, architecture.md, getting-started.md, glossary.md) are always single files. All other pages can expand into directories with sub-pages.apps/cli/command-structure.md). No deeper.