This page defines the documentation buckets referenced from docs/README.md and the placement rules for new docs. If you're looking for the docs themselves, start at docs/README.md; this page is for deciding where a doc (or a doc change) belongs.
The default local-first product story: everything a new user or agent needs without opting into remote/control-plane features.
README.md— product boundary and quick startdocs/core.md— core docs indexdocs/architecture.md— local-first runtime architecturedocs/env.md— env model and secret handlingdocs/lifecycle.md— lifecycle hooks and startup processesdocs/sessions.md— persistent workspace modeldocs/guides/init-project.md— project init walkthroughdocs/guides/global-settings.md— global configdocs/guides/agent-first-setup.md— agent-assisted onboarding (hack init --with,hack agent onboard)docs/guides/prerequisite-detection-matrix.md— environment prerequisite checks- Generated agent-facing guidance:
AGENTS.md/CLAUDE.mdsnippets,.codex/skills/hack-cli/SKILL.md, andhack-initskill/MCP prompt content, all rendered fromsrc/agents/instruction-source.ts(canonical source) viasrc/agents/*andsrc/mcp/agent-docs.ts.
New docs belong here when they describe supported v3 CLI surface a user hits without opting into
remote/gateway/node/dispatch: project lifecycle, env, sessions, worktrees, diagnostics (hack doctor),
JSON/--no-interactive agent ergonomics, and onboarding.
Unsupported experimental remote/control-plane workflows: gateway exposure, remote nodes, remote
execution, remote supervisor jobs. These commands are hidden from default hack --help output
(visible via hack help --all) and print a warning when invoked.
docs/beta.md— beta docs indexdocs/gateway.md— gateway overviewdocs/supervisor.md— supervisor jobsdocs/guides/remote-node-quickstart.md,remote-node-laptop-e2e.md,remote-node-railway.md,remote-node-container.md— remote node setup pathsdocs/guides/remote-ssh.md,remote-cloudflare.md,remote-tailscale.md— gateway exposure pathsdocs/guides/remote-supervisor.md— remote supervisor jobsdocs/guides/codex-managed-environments.md— portable managed-container setup withHACK_ENV_SECRET_KEY(listed in beta because managed-container orchestration builds on the remote/node surface, even though the underlying slim-mode CLI behavior is supported)
New docs belong here when they document hack remote/hack gateway/hack node/hack dispatch,
anything gated behind the experimental warning, or workflows that only make sense once a user has
opted into that surface.
Lower-level and generated reference material: full command reference, extension authoring, control-plane SDK, and API-level detail for the beta surface.
docs/reference.md— reference docs indexdocs/reference/cli.md— generated exhaustive CLI reference (every command, subcommand, option, and flag). Regenerate withbun run docs:cli-reference; do not hand-edit.docs/cli.md— hand-written overview of the supported v3 command surface; links todocs/reference/cli.mdfor exhaustive flags instead of duplicating themdocs/extensions.md— extension model, dispatch (hack x <namespace> <command>), built-in extensionsdocs/integrations.md— what shipped, what was removed, optional agent-setup helpersdocs/guides/create-extension.md— how to author a new extensiondocs/guides/tickets.md— deprecated compatibility and migration referencedocs/gateway-api.md— gateway HTTP/WS API surface (unsupported experimental)docs/sdk.md— control-plane SDK
New docs belong here when they are exhaustive/generated references, or when they document how to
extend hack (authoring extensions, SDK usage) rather than how to use it.
- AX surface (
--jsonenvelope,E_*error codes,--no-interactive/HACK_NO_INTERACTIVE,NO_COLOR): document once indocs/cli.md(overview) anddocs/reference/cli.md(generated, per-command); cross-reference fromdocs/core.mdandREADME.mdrather than restating in every doc. - Linked worktrees (
worktree.auto_branch, secret-key inheritance via the git common dir,hack doctordivergent-key checks): core bucket —docs/architecture.mdandREADME.md. - e2e suite (
bun run test:e2e:local,tests/e2e/): not a user-facing doc surface; mention in passing indocs/README.md"Repo notes" as how docs claims get verified, not as its own page. - Agent onboarding (
hack init --with,hack agent onboard,/hack-initskill,hack-initMCP prompt): core bucket —docs/guides/agent-first-setup.mdis the canonical guide. - Committed
.hack/.gitignore+hack doctor --fixuntracking: core bucket —docs/architecture.mdanddocs/env.md. HACK_HOME: core bucket —docs/architecture.md(global file locations) andREADME.md(env var reference) wherever~/.hackis introduced.hack projects prune: core bucket —docs/core.mdday-to-day workflows anddocs/cli.mdcommand overview.
docs/reference/cli.md is generated from the command specs (bun run docs:cli-reference) and
must not be hand-edited. Agent-facing instruction surfaces (AGENTS.md/CLAUDE.md snippets, the
Codex skill, Cursor rules, the session primer) are all rendered from the canonical section list in
src/agents/instruction-source.ts; update that file, not the individual renderers, when agent
guidance needs to change, then regenerate.
docs/plans/— historical design/plan notes, not the supported product contract..factory/validation/— historical evidence from retired hosted/web/integration work, not current product guidance..factory/library/and.factory/skills/— current worker context for the factory tooling.