| name | sgc-bootstrap |
| description | Use when starting any conversation - establishes SGC commands, routes tasks to appropriate skills, and enforces system invariants |
SGC Bootstrap
Load SGC rules, verify .sgc/ state integrity, route user intent to the correct command.
⚠️ Install the CLI before first command
The plugin layer is markdown-only; every /sgc:* command shells out to sgc <cmd> (npm-installed) or bun src/sgc.ts <cmd> (source-clone). If neither is available, every command preflight-fails with help.
Recommended — npm (global install):
npm install -g @sdsrs/sgc
sgc --version
After this, /sgc:* commands run from any directory.
Alternative — clone from source (you want to hack on sgc itself or the npm package is unreachable):
git clone https://github.com/sdsrss/sgc
cd sgc
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install
In this mode /sgc:* commands must run from inside the sgc/ directory (the preflight checks for src/sgc.ts in cwd).
bun ≥1.3 is required as the runtime in both modes (bun --version to verify). See README.md#install for the canonical install reference.
When a user hits the preflight error, surface this block once per session — do not repeat on every command.
When to Use
At the start of every conversation. Runs before any other SGC skill.
Initialization Sequence
- Read
plugins/sgc/CLAUDE.md — authoritative command table, permission matrix, task levels, and the 7 invariants.
- Verify
.sgc/ structure (decisions/, progress/, solutions/, reviews/). Auto-created by ensureSgcStructure in src/dispatcher/state.ts; no action needed unless missing in a non-dispatcher flow.
- Check
progress/current-task.md — if present, offer to resume or start fresh.
- Read
tasks/lessons.md (if present) — apply silently.
Routing Table
| User intent | Command | Trigger phrases |
|---|
| Requirements unclear | /discover (⏸ stub) | "what should...", "clarify", "I'm not sure..." |
| Start / plan a task | /plan <task> | "plan", "implement", "build", "add", "fix" |
| Execute approved plan | /work | "work", "execute", "begin" |
| Review completed work | /review | "review", "check my code" |
| Browser test | /qa <url> | "qa", "test the UI", "browser test" |
| Release | /ship | "ship", "deploy", "release", "merge" |
| Capture knowledge | /compound | "compound", "save solution" |
| Check state | /status | "status", "where am I", "resume" |
Ambiguous intent → ask one clarifying question, don't guess.
Invariant Reminders (authoritative: plugins/sgc/CLAUDE.md)
- Reviewers + QA MUST NOT read
solutions/ (§1)
intent.md immutable after write (§2)
- No
solutions/ write without compound.related dedup; threshold 0.85 (§3)
- L3 refuses
--auto; requires --signed-by + interactive yes (§4)
- Reviewer-fail override needs ≥40-char reason (§5)
- Every janitor decision logged, including skips (§6)
- Schema validation on every
.sgc/ write (§7)
Red Flags (shared with ~/.claude/CLAUDE.md §8)
Intercept / refuse: rm -rf $VAR, DROP/DELETE without WHERE, git push --force to main, disabling SSL verification, committing .env / credentials, plaintext secrets in logs/commits. Full rules in the user's global spec — this skill does not duplicate them.
Agent Namespacing
When the dispatcher writes a spawn prompt, the agent key in contracts/sgc-capabilities.yaml short form (e.g. reviewer.correctness) maps to the wire format sgc:reviewer:correctness. The dispatcher handles the translation; skills do not hand-assemble names.
After Bootstrap
Route to the appropriate command based on intent. If no clear command, show the routing table and ask.