Skip to content

Guide Wiki Contributing

Reese Hodge edited this page Nov 1, 2026 · 5 revisions

Guide: Contributing to This Wiki

If you are editing a page on github.com, this is the page you need. You will not see AGENTS.md and you will not run our tooling.

The one thing to know first

Wiki edits are live. A GitHub wiki has no branches, no pull requests, no review and no CI. Whatever you save is published immediately to everyone.

Two ways to edit

Browser (github.com)

Fine for a typo or a one-paragraph correction. Note that browser edits bypass wiki:lint entirely — nothing checks your links, your metadata block or your page name. Read Wiki-Conventions before you save.

Local clone (preferred for anything larger)

git clone https://github.com/quattro004/Agent004.wiki.git wiki   # first time
git -C wiki pull                                                 # thereafter
# ...edit files in ./wiki...
pnpm run wiki:lint
git -C wiki add -A; git -C wiki commit -m "Record the CRLF trap"; git -C wiki push

Use git -C wiki rather than cd wiki. The wiki is a separate repo nested inside the main repo's working tree, so a bare git push at the root pushes Agent004 instead — -C removes the ambiguity.

Separate the last three with ;, not &&. git commit exits non-zero on a clean tree, so && skips the push and the wiki looks published when it is not.

There used to be scripts for this. wiki:pull and wiki:push wrapped these commands and were deleted on 2026-11-01, because every bug this tooling ever had came from the wrappers rather than from git: the && short-circuit above, a bin that read argv[2] positionally and committed the literal string --message to the live wiki, and a || git clone fallback that replaced git's real error with destination path 'wiki' already exists. wiki:lint stays — it checks conventions git knows nothing about. See Gotchas.

./wiki is a separate git repository and is gitignored by the main repo. It is also excluded from prettier, so it cannot break pnpm run validate. See Guide-Validation-Gate.

Its default branch is master, not main. Scripts must not assume otherwise.

Rules for every page

Full detail in Wiki-Conventions. The short version:

  • Start the file with the <!--meta ... --> block. Not YAML frontmatter — the wiki renders frontmatter as visible junk.
  • Name the file with an allowed prefix: Concept-, Component-, Contract-, Decision-, Feature-, Guide-, Source-. Names are globally unique; the namespace is flat, folders do not nest.
  • Add the page to Index and append a line to Log.
  • Cite your sources in sources:; set verified: to the date you actually checked the claims against the code.
  • Keep the page under 300 lines.
  • This wiki is public: never write "Max Headroom" in project copy (the name is Max Height), and never write a credential, access key or AWS account ID.
  • Hit a non-obvious trap? Write it on the page that owns it and link it from Gotchas, in the same change.

Reverting a bad edit

The wiki is a git repository, so a bad push is recoverable — just not automatically, and not before people have seen it.

cd wiki
git log --oneline
git revert <sha>
git push origin master

The asymmetry worth remembering

Main-repo changes go through a branch and a pull request. Wiki changes do not — they are live the moment they are pushed. So when a change spans both, the wiki half goes public before the pull request merges. If the pull request is later reworked or rejected, the wiki must be reverted separately.

This is the price of the no-branching workflow that motivated the wiki in the first place. It is worth paying; it is not worth forgetting.

First-page bootstrap

An empty GitHub wiki cannot be cloned — git clone fails until at least one page exists, and the first page can only be created through the browser UI. If you ever recreate this wiki from scratch, make Home in the browser first.

Line endings — pinned to LF

The wiki is edited from Windows, Linux and the browser UI, so line endings drift. A Windows checkout that rewrites a page will convert it to CRLF, and git then reports every line as changed — the real edit disappears into the noise.

This bit Log first, and worst: a one-line append showed as 37 added and 35 deleted lines. An append-only history whose diffs are unreadable is not much of a history.

.gitattributes in the wiki repo now pins everything to LF:

* text=auto eol=lf
*.md text eol=lf

If you find a page showing whole-file churn for a small edit, it predates the fix — run git add --renormalize . and commit that separately from the content change. The main repo has the same trap in a different place; see Decision-Spec-Kit-Upgrade, where Spec Kit hashes its scripts as LF while .gitattributes forced CRLF.

See also: Wiki-Conventions, Gotchas, Home.

Clone this wiki locally