@ladbabynpm/picc-init
v0.1.1
Published
Registers /init for pi: Claude Code-style codebase initialization that writes CLAUDE.md.
Maintainers
Readme
picc-init
/init command for pi.
Part of picc, a pi agent setup mirroring Claude Code's harness.
Adds a Claude-Code-style codebase-initialization command to pi that analyzes the repo and writes a concise CLAUDE.md at the project root.
The prompt is a verbatim port of Claude Code's default /init — the OLD_INIT_PROMPT in commands/init.ts, which is what regular users get. The 8-phase NEW_INIT_PROMPT (skills, hooks, CLAUDE.local.md, plugin suggestions) is gated behind the NEW_INIT feature flag and is not the default, so it is intentionally not ported.
What it does
Registers a single pi command, /init. Its handler notifies Analyzing your codebase..., waits for the agent to be idle (ctx.waitForIdle()), and injects the prompt via pi.sendUserMessage(...). The agent then:
- Analyzes the codebase and writes a
CLAUDE.mdat the project root covering:- Commands — build, lint, and test commands, including how to run a single test.
- Architecture — the "big picture" structure that only makes sense after reading multiple files.
The prompt carries the same usage notes as Claude Code: don't repeat yourself, skip obvious/generic instructions, avoid listing easily-discoverable file structure, fold in important parts of existing Cursor rules (.cursor/rules/, .cursorrules), Copilot rules (.github/copilot-instructions.md), and the README, and don't invent sections like "Common Development Tasks" or "Tips for Development". If a CLAUDE.md already exists, it proposes improvements rather than silently overwriting.
The generated file is prefixed with:
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.Usage
Install via pi install npm:@ladbabynpm/picc-init, then run:
/initDifferences from Claude Code
- Default prompt only. Only
OLD_INIT_PROMPTis ported. The feature-flaggedNEW_INIT_PROMPT(interactive setup choice,CLAUDE.local.md, skills, hooks, plugin/gh-CLI optimization suggestions) is not included. - No subagent / interview steps. The default Claude Code
/initis a single self-contained prompt — it does not launch a scout or ask the user questions. The earlier draft'sscoutsubagent andask_user_questioninterview were artifacts of the (non-default) NEW prompt and have been removed. - No Claude Code product features. Nothing here depends on official plugins,
.claude/settings.jsonhooks, or theghCLI.
