Read installation prompt설치 프롬프트 읽기
Set up or refresh my default coding-agent environment from https://github.com/cskwork/pi-setup-public.
The default harness is pi. The default Z.ai model is GLM-5.3-Flash, which accepts text and images natively.
Work autonomously and make the process idempotent. Preserve user-owned files and settings unless the
pi-setup installer explicitly owns them. Never print credentials. Report real verification output.
1. Detect the operating system and shell.
- Supported: macOS, Linux, and Windows.
- On Windows, prefer PowerShell for bootstrap commands. pi itself uses Git Bash internally.
2. Ensure Node.js 22.19+ and npm are available.
- First run `node -v` and `npm -v`.
- If Node is missing or older than 22.19, use the platform package manager when available.
- If no safe package manager is available, stop and tell me to install a supported Node.js LTS release from https://nodejs.org.
3. Install pi if missing, or update an existing pi installation to the latest release.
- Record the current version with `pi --version` when available.
- Read the published release and its Node.js requirement:
`npm view @earendil-works/pi-coding-agent version engines --json`
If the current Node.js version does not satisfy that requirement, upgrade Node.js before continuing.
- Run this command for both a new installation and an existing installation:
`npm install -g --ignore-scripts @earendil-works/pi-coding-agent@latest`
- Re-run `pi --version` and compare it with the published release. Report the before/after versions;
if they are equal, report that pi was already current. Do not call an unsuccessful update complete.
- If the command is still missing, report the npm global prefix and ask me to open a new terminal.
Do not patch PATH silently.
4. Clone or update pi-setup at `~/pi-setup-public`.
- Canonical remote: `https://github.com/cskwork/pi-setup-public.git`.
- If the directory is absent, clone it.
- If it is a clean clone of that remote, run `git pull --ff-only`.
- If it has local changes, do not discard them. Report the diff summary and continue with the local tree.
- If the path exists but is not that repository, move it to a timestamped backup path before cloning.
- Never use `git reset --hard`, `git clean`, or `rm -rf`.
5. Validate the checked-out setup before installing.
- `models.json` must declare model id `glm-5.3-flash` with input types `text` and `image`.
- The configured default model must be `glm-5.3-flash` on provider `zai`.
- Confirm `skills/impeccable/SKILL.md` and its companion `reference/` and `scripts/` directories exist.
- Confirm the bundled `skills/` directory does not contain `supergoal`, `superdesign`, `superoffice`,
or `superhacker`; these are not part of the default onboarding installation.
- If any check fails, stop installation and report that pi-setup is stale. Do not invent a local workaround.
6. Run the repository installer.
- macOS/Linux/Git Bash: `~/pi-setup-public/install.sh`.
- Windows PowerShell: run the documented Windows path from the repository README; do not translate the
shell script by guessing.
- The installer backs up replaced files and links or copies `~/.pi/agent` configuration from the repo.
- Include the bundled Impeccable skill through this installer, with its companion files intact.
- Do not separately install or update supergoal, superdesign, superoffice, or superhacker as part of
onboarding. Do not uninstall user-owned copies already present in other agent environments.
7. Install the default system prompt and share it with every coding agent on this machine.
- Canonical source: https://github.com/cskwork/THE-SYSTEM-PROMPT, file `AGENTS.md` on `main`.
- Fetch the current source at execution time from:
https://raw.githubusercontent.com/cskwork/THE-SYSTEM-PROMPT/main/AGENTS.md
Download it to a temporary file first and check that the request succeeded and the file is nonempty.
Use those exact bytes, without paraphrasing, merging in older rules, or substituting pi-setup's copy.
- Keep the canonical local file at `~/.agents/AGENTS.md`. If an existing file differs, back it up to
a timestamped path before replacing it with the validated download. Report the backup path.
If the bytes already match, leave it unchanged.
- Link the one file into each agent you use, and skip any directory whose agent is not installed:
`ln -sfn ~/.agents/AGENTS.md ~/.claude/CLAUDE.md`
`ln -sfn ~/.agents/AGENTS.md ~/.codex/AGENTS.md`
`ln -sfn ~/.agents/AGENTS.md ~/.gemini/GEMINI.md`
`ln -sfn ~/.agents/AGENTS.md ~/.config/opencode/AGENTS.md`
`ln -sfn ~/.agents/AGENTS.md ~/.pi/agent/AGENTS.md`
- The pi installer points `~/.pi/agent/AGENTS.md` at the pi-setup copy of the same contract. Relinking
it here keeps one source of truth; the pi-setup copy stays a mirror.
- If a target is an existing regular file rather than a symlink, move it to a timestamped backup first
and report the path. Never overwrite my own instructions in place.
- On Windows, symlinks need Developer Mode or an admin terminal. Copy the file instead and tell me the
copy will drift.
8. Check authentication without exposing a key.
- Run `pi auth check --provider zai`.
- If it is not ready, tell me to run `pi auth`, log in to Z.ai, restart pi, and rerun this prompt.
- Never ask me to paste an API key into chat.
9. Verify the installed setup with real commands.
- `pi --version`
- `pi auth check --provider zai`
- `pi --list-models zai` and confirm `glm-5.3-flash` appears.
- Parse `~/.pi/agent/models.json` and confirm `glm-5.3-flash` has both `text` and `image` inputs.
- Compare `~/.agents/AGENTS.md` byte-for-byte with the GitHub download from step 7.
- Resolve every operating-instruction link from step 7 and confirm each one points at
`~/.agents/AGENTS.md`. For Windows copies, compare their contents with that canonical file.
- Verify `~/.pi/agent/skills/impeccable/SKILL.md`, `reference/`, and `scripts/` resolve to the bundled
skill installed in step 6. Report Impeccable as installed only when these checks pass.
- `pi list` and report the installed package count.
- If Z.ai auth is ready, run a text round trip:
`pi -p "reply with exactly: PI-SETUP-OK" --no-session`
- If a local image is available, run one native multimodal probe by asking GLM-5.3-Flash to read it.
Do not install an image adapter if no image is available; report that the image probe was skipped.
10. Finish with a numbered report.
- State the OS and shell.
- State the Node.js version and the pi version before and after installation/update.
- State whether pi-setup was cloned, updated, or already current.
- State which agents now read the operating instructions, and which were skipped because they are absent.
- State whether Z.ai authentication and text/image capability were verified or remain user actions.
- State the backup path created by the installer, if any.
- Do not commit or push either repository.