chore: bootstrap repo with chunks 1 and 2

Establishes the global AI development config repo from scratch:

- Chunk 1: repo skeleton, install.sh, statusline, deploy manifest
- Chunk 2: core instructions (coding/git/testing), CLAUDE.md rewrite
  (always-on + content index two-tier model), docs restructure,
  6 ADRs, ROADMAP.md, .gitkeep placeholders
- Bootstrap skills in .claude/skills/ (to be catalogued and migrated
  to .agents/skills/ in Chunk 3)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 19:29:58 +00:00
commit a3bb708bff
66 changed files with 3283 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# 0001 — Repo skeleton: content files ✅
## What to build
Create the three content files that `install.sh` will deploy. This establishes the repo skeleton and makes the global Claude Code config a real, version-controlled artifact.
- `providers/claude-code/CLAUDE.md` — fill in the two-tier structure: one always-on rule ("when you need workflows, agents, or prompts, read them from `~/.claude/core/`") plus a content index section with pointers to `~/.claude/core/` (initially sparse, populated as chunks complete)
- `providers/claude-code/settings.json` — `{"theme": "dark"}`
- `core/instructions/global.md` — placeholder stub confirming the pipeline works; real content comes in Chunk 2
The root `CLAUDE.md` and `providers/claude-code/CLAUDE.md` already exist as shells with warnings — this issue fills in the real content of `providers/claude-code/CLAUDE.md`.
## Acceptance criteria
- [ ] `providers/claude-code/CLAUDE.md` has a short always-on section with the content index rule and a pointers section referencing `~/.claude/core/`
- [ ] `providers/claude-code/settings.json` contains `{"theme": "dark"}`
- [ ] `core/instructions/global.md` exists as a clearly-labelled placeholder stub
- [ ] No empty directories committed (`core/agents/`, `core/workflows/`, `core/prompts/` do not exist yet)
- [ ] `providers/claude-code/CLAUDE.md` warning banner distinguishes it from the root `CLAUDE.md`
## Blocked by
None — can start immediately.

View File

@@ -0,0 +1,28 @@
# 0002 — install.sh — deploy script ✅
## What to build
Write `scripts/install.sh` — an idempotent script that deploys this repo's content to `~/.claude/` and creates `~/.agents/skills/` as an empty directory. Running it once wires Claude Code to use this repo as its global config source. Running it again after pulling updates is safe.
Deployment targets:
- `providers/claude-code/CLAUDE.md` → `~/.claude/CLAUDE.md`
- `providers/claude-code/settings.json` → `~/.claude/settings.json`
- `core/` → `~/.claude/core/` (full directory copy)
- Create `~/.agents/skills/` as an empty directory
Always overwrites deployed files — editing deployed files directly is a usage error, not a conflict. Creates directories if they don't exist.
After writing the script, run it once and perform the manual smoke test.
## Acceptance criteria
- [ ] `scripts/install.sh` exists and is executable
- [ ] Running it deploys `~/.claude/CLAUDE.md`, `~/.claude/settings.json`, and `~/.claude/core/instructions/global.md`
- [ ] Running it creates `~/.agents/skills/` on disk
- [ ] Running it a second time completes without errors (idempotency check)
- [ ] A new Claude Code session confirms the always-on rule is in effect (ask Claude where it looks for workflows — it references `~/.claude/core/`)
- [ ] Bootstrap skills at `.claude/skills/` are untouched
## Blocked by
- 0001 — Repo skeleton: content files

View File

@@ -0,0 +1,42 @@
# 0003 — Claude Code status line ✅
## What to build
Add a custom status line to the Claude Code provider that shows session context at a glance. The status line is a bash script that reads JSON from stdin on every Claude Code render event and prints a formatted, colored line.
Segments (left to right — identity → config → health):
- **Directory** — basename of working dir (bold blue)
- **Git branch** — green on feature branches, red on `main`/`master`
- **Model** — colored by cost tier: Haiku green, Sonnet amber, Opus red
- **Context %** — model-aware thresholds: Opus 55/75%, Sonnet 65/85%, Haiku 75/90%; green → amber → red
- **Cost** — session cost in USD; shown as ¢ below $1, $X.XX above; green → amber at $1.50 → red at $3.00
- **Tokens** — cumulative session total, formatted as Xk when ≥ 1000; blue (informational only)
- **Vim mode** — magenta, only shown when active
Segments joined with ` · `. Missing or zero-value segments are omitted entirely.
Files:
- `providers/claude-code/statusline-command.sh` — the script
- `providers/claude-code/settings.json` — updated with `statusLine` config
- `scripts/install.sh` — updated to deploy the script and set executable bit
## Acceptance criteria
- [x] `providers/claude-code/statusline-command.sh` exists and is executable
- [x] `settings.json` references the script via `statusLine.command`
- [x] `install.sh` deploys the script to `~/.claude/statusline-command.sh` with `chmod +x`
- [x] All segments render correctly with ANSI colors (no literal `\033[0m` in output)
- [x] Segments separated by ` · `, not `|`
- [x] Cost shown as ¢ below $1, $X.XX above
- [x] Tokens shown as Xk when ≥ 1000, raw number below
- [x] Missing fields produce no empty segment
- [x] `tests/test-statusline.sh` passes (11 tests)
- [x] `tests/test-install.sh` passes (now covers statusline deployment)
## Cost threshold rationale
On a $20/month subscription, `total_cost_usd` measures session weight rather than real spend. Thresholds ($1.50 amber / $3.00 red) are calibrated to signal a heavy session, not budget overrun. Adjust upward if amber rarely appears.
## Blocked by
- 0002 — install.sh

View File

@@ -0,0 +1,26 @@
# 0004 — Rewrite providers/claude-code/CLAUDE.md and retire global.md ✅
## What to build
Replace the sparse content in `providers/claude-code/CLAUDE.md` with a complete always-on section covering communication style and behavior rules, plus a content index that tells the agent when to load each topic instruction file. Delete `core/instructions/global.md`, which is a placeholder stub with no content — the content index update makes it obsolete.
The always-on communication rules define how the agent responds: answer directly first, challenge bad ideas explicitly rather than validating them, explain the why behind decisions, and never soften disagreement into a suggestion.
The always-on behavior rules define when the agent asks permission: reads and exploration proceed freely; writes, edits, and git operations state intent before acting; irreversible or shared-state operations (push, drop, publish) require explicit confirmation every time.
The content index provides inline load triggers so the agent knows when to read each on-demand instruction file without requiring frontmatter in those files.
## Acceptance criteria
- [ ] `providers/claude-code/CLAUDE.md` contains an always-on communication section with all seven rules from the PRD
- [ ] `providers/claude-code/CLAUDE.md` contains an always-on behavior section covering reads, writes, and irreversible operations
- [ ] Content index includes load triggers for: coding conventions, git conventions, testing conventions, and workflows/agents/prompts
- [ ] `core/instructions/global.md` is deleted
- [ ] In a new session, ask an exploratory design question — agent responds with one recommendation and one tradeoff in 2–3 sentences
- [ ] In a new session, propose a clearly overengineered approach — agent names the problem rather than implementing it
- [ ] In a new session, ask the agent to edit a file — agent states what it is about to do before proceeding
- [ ] In a new session, ask the agent to push a commit — agent requires explicit confirmation
## Blocked by
None — can start immediately

View File

@@ -0,0 +1,18 @@
# 0005 — Write core/instructions/coding.md ✅
## What to build
Create the coding conventions instruction file at `core/instructions/coding.md`. Plain markdown, no frontmatter. The agent reads this file on demand when writing, editing, or reviewing code, as directed by the content index in `providers/claude-code/CLAUDE.md`.
The file establishes five key rules: automate anything repeatable; no comments unless the why is genuinely non-obvious; no defensive code at internal boundaries; prefer explicit over implicit; no abstractions, features, or cleanup beyond what the task requires.
## Acceptance criteria
- [ ] File exists at `core/instructions/coding.md`
- [ ] Contains all five rules from the PRD Module 2 section
- [ ] Plain markdown with no frontmatter or schema
- [ ] In a new session, ask the agent to implement something with unnecessary complexity — agent pushes back and names the rule being violated
## Blocked by
- 0004 — rewrite providers/claude-code/CLAUDE.md and retire global.md

View File

@@ -0,0 +1,19 @@
# 0006 — Write core/instructions/git.md ✅
## What to build
Create the git conventions instruction file at `core/instructions/git.md`. Plain markdown, no frontmatter. The agent reads this file on demand when doing git operations, as directed by the content index in `providers/claude-code/CLAUDE.md`.
The file establishes five key rules: never skip hooks (`--no-verify`); never force-push main or master; commit messages explain why, not what; never commit secrets or credentials; and the conventional commits vocabulary (`feat:`, `fix:`, `docs:`, `chore:`, `refactor:`, `test:`).
## Acceptance criteria
- [ ] File exists at `core/instructions/git.md`
- [ ] Contains all five rules from the PRD Module 3 section, including the conventional commits vocabulary
- [ ] Plain markdown with no frontmatter or schema
- [ ] In a new session, ask the agent to commit a change — agent uses conventional commits format unprompted
- [ ] In a new session, ask the agent to skip a pre-commit hook — agent refuses
## Blocked by
- 0004 — rewrite providers/claude-code/CLAUDE.md and retire global.md

View File

@@ -0,0 +1,18 @@
# 0007 — Write core/instructions/testing.md ✅
## What to build
Create the testing conventions instruction file at `core/instructions/testing.md`. Plain markdown, no frontmatter. The agent reads this file on demand when writing or running tests, as directed by the content index in `providers/claude-code/CLAUDE.md`.
The file establishes four key rules: prefer integration tests over mocks; automate everything automatable; test observable end-state, not implementation internals; no test is better than a wrong test.
## Acceptance criteria
- [ ] File exists at `core/instructions/testing.md`
- [ ] Contains all four rules from the PRD Module 4 section
- [ ] Plain markdown with no frontmatter or schema
- [ ] In a new session, ask the agent to write a test requiring a mocked database — agent pushes back and proposes an integration test instead
## Blocked by
- 0004 — rewrite providers/claude-code/CLAUDE.md and retire global.md

View File

@@ -0,0 +1,21 @@
# 0008 — Restructure docs/ subdirectories and migrate existing PRD ✅
## What to build
Create the subdirectory-by-type structure under `docs/` as defined in CONTEXT.md. Migrate the one existing PRD from its flat location to the correct subdirectory. No other files move.
New directories to create: `docs/prd/`, `docs/ard/`, `docs/bug/`, `docs/notes/`, `docs/adr/`. (`docs/issues/` already exists and is correctly placed.) `docs/VISION.md` stays at `docs/VISION.md`.
Migration: `docs/prd-chunk-1.md` → `docs/prd/chunk-1.md`.
## Acceptance criteria
- [ ] `docs/prd/`, `docs/ard/`, `docs/bug/`, `docs/notes/`, `docs/adr/` directories exist
- [ ] `docs/prd/chunk-1.md` exists (migrated from `docs/prd-chunk-1.md`)
- [ ] `docs/prd-chunk-1.md` no longer exists
- [ ] `docs/VISION.md` is unchanged at `docs/VISION.md`
- [ ] `docs/issues/` is unchanged
## Blocked by
None — can start immediately