mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-13 08:03:04 +08:00
4.0 KiB
4.0 KiB
description
| description |
|---|
| Detect a project's stack and produce a dry-run ECC onboarding plan using the repository's install manifests and stack mappings. |
/project-init
Create a safe, reviewable ECC onboarding plan for the current project. This command should start in dry-run mode and only write files after explicit user approval.
Usage
/project-init
/project-init --dry-run
/project-init --target claude
/project-init --target cursor
/project-init --skills continuous-learning-v2,security-review
/project-init --config ecc-install.json
Safety Rules
- Default to dry-run. Do not modify
CLAUDE.md, settings files, rules, skills, or install state until the user approves the concrete plan. - Preserve existing project guidance. If
CLAUDE.md,.claude/settings.local.json,.cursor/,.codex/,.gemini/,.opencode/,.codebuddy/,.joycode/, or.qwen/already exists, inspect it and propose a merge/append plan instead of overwriting. - Use ECC's installer and manifest tooling. Do not hand-copy files or clone arbitrary remotes as an install shortcut.
- Keep permissions narrow. Any generated settings should match detected build/test/lint tools and avoid broad shell access.
- Report exactly what would change before applying anything.
Detection Inputs
Read the current project root and detect stack signals from:
- package manager files:
package.json,package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lockb - language manifests:
pyproject.toml,requirements.txt,go.mod,Cargo.toml,pom.xml,build.gradle,build.gradle.kts - framework files:
next.config.*,vite.config.*,tailwind.config.*,Dockerfile,docker-compose.yml - ECC config:
ecc-install.json - optional stack map:
config/project-stack-mappings.jsonin the ECC repo
When the ECC checkout is available, use config/project-stack-mappings.json as the stack-to-rules/skills reference. If the file is unavailable, fall back to the installed ECC manifests and explicit user choices.
Planning Flow
- Identify the target harness. Default to
claudeunless the user asks forcursor,codex,gemini,opencode,codebuddy,joycode, orqwen. - Detect stacks from project files and show the evidence for each match.
- Resolve the smallest useful ECC plan:
- project has an
ecc-install.json:node scripts/install-plan.js --config ecc-install.json --json - user named a profile:
node scripts/install-plan.js --profile <profile> --target <target> --json - user named skills:
node scripts/install-plan.js --skills <skill-ids> --target <target> --json - only language stacks are detected: use the legacy language install dry-run with those language names
- project has an
- Run a dry-run apply command before writing:
node scripts/install-apply.js --target <target> --dry-run --json <language-or-profile-args>
- Summarize detected stacks, selected modules/components/skills, target paths, skipped unsupported modules, and files that would be changed.
- Ask for approval before applying the non-dry-run command.
Output Contract
Return:
- detected stack evidence
- proposed target harness
- exact dry-run command used
- exact apply command to run after approval
- files/directories that would be created or changed
- warnings about existing files, broad permissions, missing scripts, or unsupported targets
CLAUDE.md Guidance
If the user wants a CLAUDE.md starter, generate it separately from the installer plan and keep it minimal:
- build command, if detected
- test command, if detected
- lint/typecheck command, if detected
- dev server command, if detected
- repo-specific notes from existing package scripts or manifests
Never replace an existing CLAUDE.md without showing a diff and receiving approval.
Related
config/project-stack-mappings.jsonfor stack-to-surface hintsscripts/install-plan.jsfor deterministic plan resolutionscripts/install-apply.jsfor dry-run and apply operations/ecc-guidefor interactive feature discovery before installing