|
| 1 | +--- |
| 2 | +name: criew-wiki-authoring |
| 3 | +description: Write and revise pages under `docs/wiki` for the CRIEW GitHub wiki and its MkDocs-backed GitHub Pages site. Use when Codex needs to create, expand, reorganize, or review CRIEW wiki pages such as `Home.md`, `_Sidebar.md`, `_Footer.md`, or topic pages, and when the output or workflow must follow GitHub wiki conventions, the local MkDocs pipeline, and a pragmatic, kernel-documentation writing style. |
| 4 | +--- |
| 5 | + |
| 6 | +# Criew Wiki Authoring |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +Write CRIEW wiki pages as maintainer documentation. |
| 11 | +Treat `docs/wiki/` as the source GitHub wiki repository, and treat the published website as a derived MkDocs build driven from the main `CRIEW` repository. |
| 12 | +Keep the source compatible with both GitHub wiki rendering and the local Pages build pipeline, and prefer a direct, technical style over narrative or marketing copy. |
| 13 | + |
| 14 | +## Follow This Workflow |
| 15 | + |
| 16 | +1. Confirm the source of truth before writing. |
| 17 | +- Read the code, README, spec, config example, or architecture note that defines the behavior. |
| 18 | +- Prefer `README.md`, `README-zh.md`, `docs/architecture/design.md`, `docs/specs/`, and `docs/reference/config.example.toml` depending on the topic. |
| 19 | +- Do not invent commands, defaults, limitations, or workflows. |
| 20 | + |
| 21 | +2. Check the wiki context. |
| 22 | +- List the existing pages in `docs/wiki/` before creating or renaming a page. |
| 23 | +- Treat `docs/wiki/` as a separate Git repository. Use `git -C docs/wiki ...` when checking history or status. |
| 24 | +- Read `references/publish-workflow.md` before changing local preview, staging, or deployment behavior. |
| 25 | +- Keep `Home.md` as the landing page and update it when a new top-level page changes how readers enter the wiki. |
| 26 | +- Read `references/style-guide.md` for page rules. |
| 27 | +- Read `references/page-patterns.md` when choosing a page shape. |
| 28 | + |
| 29 | +3. Choose the smallest page that fits the job. |
| 30 | +- Use a short reference page for stable facts and concepts. |
| 31 | +- Use a workflow page for operator tasks with prerequisites and ordered steps. |
| 32 | +- Use a troubleshooting page for symptoms, likely causes, and recovery actions. |
| 33 | +- Split a page once it starts carrying more than one primary purpose. |
| 34 | + |
| 35 | +4. Draft in GitHub wiki form. |
| 36 | +- Use page names and filenames that are stable, literal, and easy to scan. |
| 37 | +- Prefer normal Markdown links such as `[Configuration](Configuration.md)` because they work in both GitHub wiki and MkDocs. |
| 38 | +- Treat `[[Page Name]]` and `[[Page Name|Link text]]` as compatibility syntax only. The local staging script rewrites them for MkDocs, but new content should not depend on that rewrite when a Markdown link is clear enough. |
| 39 | +- Use full GitHub URLs when linking from the wiki back into the main CRIEW repository, because the wiki is a separate repository. |
| 40 | +- Add `_Sidebar.md` or `_Footer.md` only when shared navigation or repeated context is materially useful. |
| 41 | + |
| 42 | +5. Check the publish path before finishing. |
| 43 | +- Local copy lint goes through `./scripts/wiki-lint.sh`. |
| 44 | +- Local preview and local build go through `./scripts/wiki-site.sh serve` and `./scripts/wiki-site.sh build`. |
| 45 | +- The staging step copies `docs/wiki/` into `target/wiki-docs/`, turns `Home.md` into the MkDocs `index.md`, excludes special wiki-only files such as `_Sidebar.md` and `_Footer.md`, and normalizes source-only links. |
| 46 | +- The published website is built from `mkdocs.yml` and deployed by `.github/workflows/wiki-pages.yml`. |
| 47 | +- The lint script requires `autocorrect`. If it is missing, the script downloads a local copy into `target/wiki-venv/bin/` and then reruns the check. |
| 48 | +- Treat a clean `./scripts/wiki-lint.sh` result as part of done for every wiki page this skill creates or edits. |
| 49 | +- Because `docs/wiki` is a submodule, the main repository deploys the pinned wiki commit, not the remote wiki repository's latest HEAD. A new wiki commit reaches GitHub Pages only after the CRIEW repository updates the `docs/wiki` submodule pointer. |
| 50 | + |
| 51 | +6. Draft in kernel-documentation style. |
| 52 | +- Lead with scope and purpose. |
| 53 | +- Prefer active voice, short sentences, and concrete nouns. |
| 54 | +- State prerequisites, constraints, and side effects before optional detail. |
| 55 | +- Prefer commands, paths, config keys, and observable outcomes over abstract explanation. |
| 56 | +- Avoid filler, advocacy, roadmap prose, and vague adjectives such as `simple`, `easy`, `powerful`, or `seamless`. |
| 57 | +- Name conditions directly when behavior depends on mode, configuration, or state. |
| 58 | + |
| 59 | +7. Review before finishing. |
| 60 | +- Verify commands, file paths, environment variables, config keys, and feature names against the repository. |
| 61 | +- Keep language consistent within the page. Match the page's existing language unless the user requests a change. |
| 62 | +- Check that headings are informative, examples are minimal, and links resolve to the intended wiki page or repository URL. |
| 63 | +- Run `./scripts/wiki-lint.sh` for every text change and revise the page until it passes. If the environment prevents the check, report that explicitly instead of assuming the page is clean. |
| 64 | +- When page structure or links changed, run `./scripts/wiki-site.sh build` if the environment allows it. |
| 65 | + |
| 66 | +## Apply These Page Rules |
| 67 | + |
| 68 | +- Start each page with a short paragraph that states what the page covers and when to use it. |
| 69 | +- Prefer headings such as `Prerequisites`, `Workflow`, `Configuration`, `Troubleshooting`, `Limitations`, and `See also` when they fit the content. |
| 70 | +- Keep heading depth shallow unless the page genuinely needs more structure. |
| 71 | +- Keep lists parallel and action-oriented. |
| 72 | +- Use fenced code blocks for commands, config fragments, and sample output. |
| 73 | +- Keep examples minimal but real. |
| 74 | +- Write copy that passes `autocorrect`; treat lint failures as defects that need wording changes before the page is considered complete. |
| 75 | +- Preserve CRIEW naming: use `CRIEW` for the project and `criew` for the binary, crate, config file, runtime directory, and environment variables. |
| 76 | + |
| 77 | +## Use The References |
| 78 | + |
| 79 | +- `references/style-guide.md`: GitHub wiki constraints, linking rules, and writing expectations. |
| 80 | +- `references/page-patterns.md`: Reusable page skeletons for `Home.md`, workflow pages, reference pages, and troubleshooting pages. |
| 81 | +- `references/publish-workflow.md`: The `docs/wiki -> MkDocs -> GitHub Pages` pipeline, local preview commands, and submodule publication constraints. |
0 commit comments