Contributing to Everdoc
Thanks for helping. Everdoc compiles a codebase into an architecture atlas with static analysis, so the bar for a change is simple to state: the output stays deterministic, generic, and true to the code. This guide covers how to work in the repository and what a pull request needs to be merged.
Coding agents: read AGENTS.md as well. It holds the same rules in checklist form.
Local setup
Requirements: Node.js 22 or newer (CI uses 24), pnpm (the version pinned in package.json#packageManager;
corepack enable picks it up), and git.
pnpm install
pnpm build # tsc per package → dist/, plus the site's Cloudflare worker bundle
pnpm typecheck # strict TypeScript over sources and tests
pnpm test # Vitest; workspace packages resolve to src/, so no build is needed for unit tests
pnpm pack:check # npm pack --dry-run of every publishable package (run after pnpm build)CI runs exactly these five commands on every push to main and every pull request
(ci.yml). Run all of them before you open a pull request.
To see your change on a real site, build an atlas of any repository you have locally:
node packages/cli/bin/everdoc.js init --yes # in the repository to document
node packages/cli/bin/everdoc.js build # extract, then render dist/
node packages/cli/bin/everdoc.js serve --dir dist # http://localhost:4321everdoc build --skip-extract re-renders the site from the last extraction, which is the fast loop for
site and Markdown changes.
How the workspace is layered
Dependencies point one way. A package may depend only on the packages to its left:
ir → sdk, diff, llms → engine, extractors-*, mcp, summarize → site → cli@everdoc/iris the leaf: the snapshot types, canonical JSON, hashing, stable IDs, andvalidateSnapshot. It has no runtime dependencies. Keep it that way; a type or helper that needs a dependency belongs in a higher package.@everdoc/sdkholds the config schema and the extractor plugin API.@everdoc/llmsrenders Markdown andllms.txtand depends only on the IR, so the CLI, the site, and the MCP server all share one rendering.@everdoc/extractors-*are packs of generic recognizers for frameworks and languages (commander, Effect, express, zod, clap, axum, serde, and so on). They never know which repository they are reading.@everdoc/siterenders the static atlas;everdoc(the CLI) wires everything together.
Zero repository-specific code
Nothing in packages/*/src may name, special-case, or tune for a specific repository, including the
public showcases (T3 Code, Klav) and Everdoc itself. If a repository needs different behavior, that is
a config option or a generic heuristic that holds for any repository with the same shape. A test walks
every packages/*/src tree and fails on the showcase names
(genericity test); the e2e test also checks that the
fixture site carries none of them.
Adding a language or an extractor pack
- Write the recognizer generically. Match the framework's API (imports, call shapes, macros, manifests), not file paths or names from a particular project. Read the extractor guide for the fact → link model.
- Add a generic fixture. A small, invented project under
packages/*/test/fixtures/(or inline in the test) that uses the framework the way real projects do. No code copied from a real repository, no real product names: useacme-style names. - Prove determinism. Two extractions of the fixture must produce byte-identical snapshots
(
assertSnapshotDeterministicfrom@everdoc/sdk, or compare canonical JSON yourself). - Validate the output.
validateSnapshotmust report zero errors on the fixture snapshot. - Test the edges. Unresolvable references, empty inputs, and partial code must produce fewer
facts, never a crash or an invented entity. Prefer
undefinedand a diagnostic over a guess. - Document it. Add the framework to the package's README and to the packages table in the root README.
Commits
Conventional commits, imperative mood, one logical change each:
feat(site): frame walkthrough screenshots on a backdrop
fix(engine): resolve re-exported RPC contracts through barrel files
docs: explain channel compare pairs
chore: bump Astro to 7.4Common types: feat, fix, perf, refactor, test, docs, ci, chore. The scope is the
package name without @everdoc/ when the change lives in one package.
Pull requests
- Keep the diff focused. One concern per pull request. Refactors that a feature needs go in their own commit; unrelated cleanups go in their own pull request.
- Replace, don't duplicate. When you supersede a component, helper, or code path, move its callers and delete the old one in the same change.
- Test what you changed. New behavior comes with unit tests; bug fixes come with a test that fails without the fix.
- Screenshots for UI changes. Any change to
packages/siteincludes before and after screenshots of the rendered page, in light and dark themes, plus a narrow (mobile) width when layout changed. - Mind the page weight. The atlas of a large monorepo must stay fast. On the T3 Code benchmark,
/and/<channel>/architecturestay under 100 KB of HTML and/<channel>/flowsand/<channel>/reference/envunder 80 KB. Datasets belong in/<channel>/data/*.json, loaded by the islands on demand; repeated styling belongs in the shared stylesheet (packages/site/src/styles), not in long utility strings on every row. - Fill in the template. Say what changed, why, and how you verified it. Tick only the checks you actually ran.
AI-assisted contributions
AI-assisted contributions are welcome. The standard is the same as for any other contribution, and the person opening the pull request owns all of it:
- You have read every line of the diff and can explain why each change is there.
- You ran the verification yourself: the five commands above, plus a look at the rendered site in a real browser for UI changes. Passing type checks or a mocked test is not verification.
- The description is yours and accurate. Do not paste a generated summary of work that was not done.
Pull requests that show signs of unreviewed generation (code that does not run, invented APIs, tests that assert nothing, descriptions that do not match the diff) are closed without a detailed review.
Reporting bugs and requesting extractors
Use the issue forms: a bug report, a request for a framework or language, or a public repository to showcase. Report security problems privately as described in SECURITY.md, never in a public issue.
Code of conduct
Everyone taking part follows the Code of Conduct.
License
By contributing, you agree that your contributions are licensed under the MIT License.