Case 1: nothing is installed
If none of AGENTS.md, CLAUDE.md, GEMINI.md, START_NEXT_SESSION_PROMPT.txt, or dev/ exists, use a fresh install.
This page is for an agentic AI that can read and write the local folder and run terminal commands. The user should not have to choose an npm command or diagnose a conflict. Read this page before acting in the folder.
Version note: this page is aligned with v0.3.66. @latest means the version currently available from the npm registry.
Before running any npx command, remember this section. After installation or upgrade, the AI must not say only “completed” or paste only terminal output. It must explain the result and next step to the user in the following format.
Completion-report template: ✅ Installation completed. 📁 Current folder: <absolute path>. 🩺 doctor passed. ⚠️ The next step is not a terminal command; in an AI conversation that can read and write this folder, enter Start Agent Handoff or “開工”. Only if the AI has not yet been pointed at this folder, use: Work in <absolute path>. Read AGENTS.md first, then Start Agent Handoff. Before changing anything, tell me the current state and your recommended next step.
init, upgrade, or doctor.AGENTS.md, CLAUDE.md, GEMINI.md, START_NEXT_SESSION_PROMPT.txt, or dev/.If none of AGENTS.md, CLAUDE.md, GEMINI.md, START_NEXT_SESSION_PROMPT.txt, or dev/ exists, use a fresh install.
If any Kit file or existing AI memory file exists, preview the upgrade first. Do not overwrite directly.
upgrade --dry-run, then validate with doctor and hash/readback evidence. Report to the Kit maintainer only if the evidence shows Kit misclassified an unchanged formal old file. Do not reinstall or replace whole files to bypass the conflict.This version also strengthens everyday rule-writing boundaries. When the user later asks to add a durable rule, follow Governance Write Boundary in the installed dev/rules/agent-governance.md to find an existing writable home, protect official prose, and verify the reading route. This does not automatically reconcile older local rules already mixed into official prose; handle those conflicts through the authorized merge flow above.
Report the migration result separately from whole-project health. A changed version number alone is not completion evidence. Existing handoff content is preserved. At the next real closeout, the AI should use the updated rules to reconcile the overall outcome, subtask, resume point, and source-reading gaps, rather than inventing project state during the upgrade.
doctor result without another run only when the process exits successfully, installation is complete or the upgrade is committed (or confirmed unnecessary), no transaction remains unresolved, health explicitly passes, and no relevant files have changed or become uncertain afterwards. Preserve all warnings. A version number, a success message somewhere in the output, or an old conversation record is insufficient.upgrade --yes --root ., then verify the complete terminal outcome; do not delete the lock or substitute a standalone doctor for recovery. Run the command below when no transaction is unresolved but valid health evidence is still missing, or when the user separately requests a check.The same-operation result proves that local health check, not a fresh lookup of npm's latest version. A latest-version claim still requires npm registry readback and comparison with the actual CLI and installed versions; a successful preview does not replace completed installation or upgrade. This rule does not remove checks separately required by formal closeout or independent acceptance.
doctor passes, read AGENTS.md, then follow the Start Agent Handoff startup flow to connect this folder.doctor only reports that the convenience copy START_NEXT_SESSION_PROMPT.txt is behind, explain that it will be regenerated at formal closeout; do not reinstall because of this.This section is the checklist for the completion-report contract at the top of the page. After acting, the AI must not say only “completed” or paste only terminal output. It must explain the result and next step to the user in short, plain language.
doctor passed, failed, or only noted that the convenience copy is behind.Start Agent Handoff / “開工” must be entered in an AI conversation that can read and write this folder.Start Agent Handoff or “開工”; only if the AI has not yet been pointed at the folder, give the path-bearing startup sentence.✅ Installation completed. 📁 Current folder: <absolute path>. 🩺 doctor passed. Do not remain in the terminal for the next step; in an AI conversation that can read and write this folder, enter Start Agent Handoff or “開工”. Only if the AI has not yet been pointed at the folder, use: Work in <absolute path>. Read AGENTS.md first, then Start Agent Handoff. Before changing anything, tell me the current state and your recommended next step.