--- name: project-bootstrap description: > Initializes or upgrades a project in the current folder: git, .gitignore, README.md, .wiki/ using Karpathy's method, .tasks/ for task tracking, CLAUDE.md with skill triggers. Use this skill when the user says "initialize project", "bootstrap", "setup project", "upgrade project", "add wiki", "add tasks", "start project", "set everything up", or launches the agent in a new or existing folder and wants to configure the workspace. Trigger even if the user just says "let's start a project" or "set it all up". --- # Project Bootstrap Sets up a complete working environment for a monorepo project in one pass. Operates in two modes: **init** (new project) and **upgrade** (existing project). --- ## Step 0 — Detect mode Check what already exists in the current directory: ```bash ls -la git rev-parse --git-dir 2>/dev/null && echo "git:yes" || echo "git:no" [ -d .wiki ] && echo "wiki:yes" || echo "wiki:no" [ -d .tasks ] && echo "tasks:yes" || echo "tasks:no" [ -f CLAUDE.md ] && echo "claude:yes" || echo "claude:no" [ -f README.md ] && echo "readme:yes" || echo "readme:no" ``` Show the user a summary in one block — what was found, what will be created: ``` Found: ✅ git ❌ .wiki ✅ .tasks ❌ CLAUDE.md ✅ README.md Create: .wiki CLAUDE.md Skip: git (exists) .tasks (exists) README.md (exists) ``` Ask one question: "Looks right? Shall we proceed?" — and wait for confirmation. **Create nothing before confirmation.** --- ## Step 1 — Git If git is not initialized: ```bash git init ``` If `.gitignore` does not exist — create from template `assets/.gitignore.template`. If it exists — leave it untouched. --- ## Step 2 — README.md If it does not exist — create a minimal one: ```markdown # ## About ## Quick start ``` If it exists — leave it untouched. --- ## Step 3 — .wiki/ If `.wiki/` already exists — skip it, notify the user. If it does not exist — create the structure: ``` .wiki/ raw/ ← raw inputs: transcripts, docs, links — anything not yet processed source/ ← compiled knowledge: wiki pages maintained by the agent SUMMARY.md ← table of contents: all source/ pages with one-line descriptions WORKFLOW.md ← how to work with the wiki: when to read, when to update ``` Contents of `WORKFLOW.md`: ```markdown # Wiki Workflow This wiki follows Karpathy's method: knowledge accumulates rather than being re-derived. ## Rules for the agent - **Before starting work** — read relevant pages from source/ - **After an important decision** — update or create a page in source/ - **New raw materials** (links, docs, transcripts) — put in raw/ - **Processed knowledge** — write as markdown pages in source/ - **SUMMARY.md** — update whenever a page is added to source/ ## Trigger Skill is activated by the phrase: **use project wiki** ``` Contents of `SUMMARY.md`: ```markdown # Wiki Summary List of all pages in source/ with one-line descriptions. The agent updates this file whenever source/ changes. ## Pages ``` --- ## Step 4 — .tasks/ If `.tasks/` already exists — skip it, notify the user. If it does not exist — create the structure: ``` .tasks/ STATUS.md ← task board ``` Contents of `STATUS.md`: ```markdown # Task Board _Updated: _ ``` --- ## Step 5 — CLAUDE.md If `CLAUDE.md` already exists — show its contents and ask: "CLAUDE.md already exists. Append skill triggers to the end, or leave as is?" If it does not exist — create from template `assets/CLAUDE.md.template`. Template contents: ```markdown # CLAUDE.md # Agent instructions. Each line is a trigger for an installed skill. talk like a caveman use superpowers use project wiki use task management system ``` --- ## Step 6 — Commit ```bash git add . git commit -m "chore: bootstrap project structure" ``` If the repo already had commits — commit only the files just created: ```bash git add .wiki/ .tasks/ CLAUDE.md .gitignore README.md git commit -m "chore: upgrade project structure" ``` --- ## Step 7 — Summary Print a final report: ``` ✅ Done! Created: .wiki/ — project wiki (Karpathy method) .tasks/ — task tracking system CLAUDE.md — skill triggers .gitignore — standard template README.md — starter file Skipped (already existed): git — left untouched Next step: describe the project in README.md and start your first task — say "use task management system". ``` --- ## Rules - **Never overwrite** existing files without explicit user confirmation - **Always show the plan first** — one question, one confirmation - **Never invent details** — if the project already exists, read what's there - **Commit only what was just created** — do not touch the rest of the file tree - **Commit automatically** after each successful step, no extra questions - **Push only after explicit user confirmation** — ask "Push to remote?" and wait for "yes"