mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 07:41:52 +08:00
Add a genuinely useful /init command that creates a starter CLAUDE.md from the current repository shape without inventing unsupported setup flows. The scaffold pulls in real verification commands and repo-structure notes for this workspace, and it refuses to overwrite an existing CLAUDE.md. This keeps the command honest and low-risk while moving the CLI closer to Claude Code's practical bootstrap surface. Constraint: /init must be non-destructive and must not overwrite an existing CLAUDE.md Constraint: Generated guidance must come from observable repo structure rather than placeholder text Rejected: Interactive multi-step init workflow | too much unsupported UI/state machinery for this Rust CLI slice Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep generated CLAUDE.md templates concise and repo-derived; do not let /init drift into fake setup promises Tested: cargo fmt; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace Not-tested: manual /init invocation in a separate temporary repository without a preexisting CLAUDE.md