pocket-init
pocket-init onboards an existing project with an evidence-based, merge-safe project guide, and can enable Pocket Education with a saved learner profile.
pocket-init takes an existing project from zero Pocket context to a useful project guide the agent can rely on, and optionally enables Pocket Education with a persisted learner profile.
Core principle: Read the project, never guess it. Every claim written to the memory file must come from files actually inspected in that run.
When to use it
- Adopting Pocketto in an existing (brownfield) repository.
- Regenerating a stale project guide.
- Enabling Pocket Education for a learner.
When not to use it:
- The project already has a current memory file and learner profile.
- You want to change learner levels later. That is pocket-education's job; it never needs a re-init.
- Spec work: that is grinding.
Prerequisites
An existing project directory. No remote access is configured or performed. Onboarding is strictly local.
How to invoke it
/pocketto:pocket-init [<dir>]How it works
- Brownfield scan (read-only): stack and manifests, build/test/lint/typecheck commands (each recorded verbatim with its source, or
Not configuredrather than guessed), layout, conventions, existing memory files. - Pick the memory file:
CLAUDE.mdon Claude Code,AGENTS.mdon Pi; never both. - Write the managed section: stack, verified commands, layout, conventions, inside
<!-- pocket-init:start -->…<!-- pocket-init:end -->markers, kept under ~60 lines. Merge, never clobber: bytes outside the managed section are preserved exactly; a malformed marker pair aborts the write and asks how to repair it. - Education Gate (opt-in): checks the current profile with
npx -y pocketto-pi edu --json --contract 3. If none exists, asks one question: "Enable Pocket Education for this repo?" A yes runs the lightweight calibration, shows the proposed profile, and writes it withedu initonly after you confirm every level. - Completion report: what was written, whether Education is enabled/reused/disabled, and the suggested next command.
Outputs and artifacts
CLAUDE.md or AGENTS.md managed project-guide section (merge-safe)
## Pocket Education learner profile block, outside the managed section, owned by the edu CLIRegenerating the guide never touches the Education block and never resets calibration.
Approval gates and constraints
- Declining the Education Gate does not cancel the project guide.
- Education is never enabled for you silently: the gate is explicit, and existing profiles are reused, never recalibrated, without your request.
- Local onboarding only: no integrations, no remote services, no Enterprise setup (that belongs to the optional adapter).
Example
Illustrative: on a TypeScript service with bun test, pocket-init writes Build: bun run build (from package.json), Test: bun test (verified), Lint: Not configured, and skips nothing it did not see.
Related documentation
pocket-help
pocket-help maps the Pocket skills: what Pocket is, which skill fits the task in front of you, and how the local flow works, without loading every skill.
Pocket Education
Pocket Education is the opt-in mentor mode: you write the code while the agent explains the task, reviews your diff, and coaches with a hint ladder.