artgraph-setuplisted
Install: claude install-skill mori-shin-x/artgraph
## Purpose
Installs artgraph using the project's detected package manager and runs `artgraph init` to lay down the full agent-native setup — Skills, hooks, agent-context snippet, and SDD-tool integration. If artgraph is already installed, it inspects and reports the current setup state instead of reinstalling.
## Steps
Every Bash tool call is a **fresh shell** — variables do not persist across calls. Each step below is one self-contained Bash invocation; carry the detected PM across steps as plain text in your reasoning, not as a shell variable.
### 1. Confirm CLI is not yet installed
See [install-check](../_shared/install-check.md). For this Skill the probe is expected to FAIL — if it succeeds (CLI already on PATH or installed locally), tell the user "artgraph is already installed", skip steps 2-6, and report the current state instead (see "Already installed? Report the state" below).
### 2. Detect the package manager
Inspect the project root and apply these rules in order — first match wins. The Corepack `packageManager` field wins over lockfile sniffing (Corepack convention: an explicit `packageManager` field always overrides a lockfile signal, even when the two disagree — e.g. `packageManager: bun@*` with a stale `pnpm-lock.yaml` still selects bun). The canonical rules and rationale live in [package-manager](../_shared/package-manager.md), which must stay in sync with `src/package-manager.ts`.
1. If `package.json` exists, read it as UTF-8 and strip a leading UTF-8