Contribution Guide
Purpose #
The single starting point for anyone contributing to aidokit. Distills CLAUDE.md, CONTRIBUTING.md, and the relevant specs into a per-PR workflow.
Read these first #
- CLAUDE.md — project rules; read at every session start.
- .docs/README.md, .docs/ROADMAP.md, .docs/ARCHITECTURE.md — orientation triad.
- The contract relevant to your work: .docs/docs/specs/adapter-contract.md, .docs/docs/specs/stack-pack-contract.md, .docs/docs/specs/cli-reference.md, .docs/docs/specs/mcp-catalog.md, .docs/docs/specs/conformance-levels.md, .docs/docs/specs/security-model.md.
Rules at a glance #
From CLAUDE.md:
aidokitmakes zero LLM calls. No telemetry. No phone-home. No auto-install of prereqs.- Adapters and stack packs are siblings — they never import each other; only
@aidokit/cliconsumes both. - No template engines (Handlebars/EJS/Nunjucks/Mustache).
{{varName}}interpolation only; complex emission is programmatic. - No YAML-as-code, no runtime plugin discovery. Contracts are TS interfaces; catalogs are TS
constarrays. - Three-layer architecture with strict downward dependencies.
@aidokit/corehas zero@aidokit/*runtime deps. - Read-before-write everywhere. No file overwritten without diff + confirmation.
- Migrations are first-class. Every breaking change ships with
aidokit migrate. - Dogfood gate is permanent — the adapter's emitted
.claude/must byte-equal the repo's hand-built.claude/.
Per-PR workflow #
The full loop is in tutorials/prepare-a-change-for-review.md. Summary:
- Confirm scope — one package per PR. Cross-package refactors are separate PRs.
- Cite the spec section in your PR body. Source-of-truth ordering from CLAUDE.md §9.3.
- Draft an ADR if the change touches a contract / runtime / monorepo / MCP shape (how-to-write-an-adr.md).
- Write code + tests — co-located unit tests, integration test if emitted output affected, conformance harness in CI.
- Update specs / ADR / wiki in the same PR.
- File a changeset (
pnpm changeset) for any behaviour change. - Run dogfood byte-compare if you touched
@aidokit/adapter-claude-codeor@aidokit/base-skills. - Self-review against review-checklist.md before opening.
Local setup #
getting-started/quick-start.md covers it. TL;DR:
git clone <repo>
corepack enable
pnpm install
pnpm build
pnpm test
Code conventions #
See code-standards.md. Highlights:
- TypeScript strict, ESM,
nodenextresolution (.jsextensions on imports). - One responsibility per file; public surface through
index.ts. - No default exports in
@aidokit/core. - All async I/O via
fs/promises; nofs.*Syncin command paths. - Shell execution goes through the single helper in
@aidokit/coreso capability declarations stay enforceable. Directchild_process.spawnis a code-review red flag. - Templates under
packages/*/src/files/are checked in verbatim; build copies todist/files/.
Doc conventions #
See documentation-standards.md. Highlights:
- Specs (
/.docs/docs/specs/) use RFC 2119 keywords. - ADRs follow the template at .docs/docs/architecture/decisions/0000-template.md.
- Wiki pages use the section structure in this file's pages.
- File and command names in backticks.
- Package names always fully qualified (
@aidokit/adapter-claude-code) on first mention per page. - No emojis unless the user explicitly requests them.
What to do when stuck #
From CLAUDE.md §9.4:
- Search the kit context files (
.docs/context/) — the answer is usually there. - Then check the spec files (
.docs/docs/specs/). - Then check the ADRs.
- Then ask the maintainer with the specific question, the sources you consulted, and the candidate answers.
Anti-patterns to refuse #
From CLAUDE.md §8:
- Template engines (Handlebars/EJS/Nunjucks/Mustache).
- YAML "config" instead of typed contracts.
- Runtime plugin discovery / dynamic
require. - LLM calls from
aidokititself. - Telemetry, phone-home, anonymous metrics.
- Cross-package upward imports; adapter ↔ stack-pack imports.
- Overwriting user files without diff + confirm.
- Auto-installing prereqs (even with
--yes). - Speculative features not in the v1.0 In-Scope list.
If a request asks for any of these, push back politely and cite the source.
Non-goals (push-back list) #
From CLAUDE.md §11: LLM calls, telemetry, daemon mode, replacing the user's AI coding CLI, auto-progression between tasks, project-management suite, IDE plugin, enterprise SaaS.