PRD: Chunk 1 — Repo Skeleton + install.sh #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PRD: Chunk 1 — Repo Skeleton + install.sh
Problem Statement
Claude Code is not currently using this repo as its global config source. There is no directory structure, no install mechanism, and no deployed configuration — Claude Code runs with default behavior across all projects. The global AI development config repo exists in name only.
Solution
Build the repo skeleton and an idempotent
install.shthat deploys this repo's content to~/.claude/and~/.agents/skills/. After running it once, Claude Code will load universal rules every session and know where to find on-demand content (workflows, agents, prompts). The repo becomes the authoritative global config source.User Stories
install.shonce and have Claude Code configured globally, so that I don't need to configure it per-project.install.shto be idempotent, so that I can re-run it after pulling updates without fear of breaking my setup.core/to validate the pipeline end-to-end, so that I can confirm the structure works before building real content in Chunk 2.~/.agents/skills/created on my machine during install, so that Chunk 3 can populate it without needing to create the directory itself.settings.jsoncommitted to this repo, so that my Claude Code preferences are version-controlled and reproducible.CLAUDE.mdfiles to have prominent warnings at the top, so that I never accidentally edit the deployed global config thinking it's the repo meta-config.Implementation Decisions
Modules
scripts/install.shIdempotent shell script. Always overwrites deployed files (never skips on conflict — editing deployed files directly is a usage error, not a sync problem). Creates directories if they don't exist. Deploys:
providers/claude-code/CLAUDE.md→~/.claude/CLAUDE.mdproviders/claude-code/settings.json→~/.claude/settings.jsoncore/→~/.claude/core/(full directory copy)~/.agents/skills/as an empty directory (Chunk 3 populates it)providers/claude-code/CLAUDE.mdVerbatim source file —
install.shcopies it as-is, no templating. Two-tier structure:~/.claude/core/~/.claude/core/(populated as chunks are completed)providers/claude-code/settings.jsonMinimal global settings baseline for Chunk 1:
{"theme": "dark"}. Permissions, hooks, and model defaults are Chunk 2+ territory.core/instructions/global.mdSingle placeholder stub file. Exists to validate that
install.shcorrectly deployscore/to~/.claude/core/and that the always-on rule inCLAUDE.mdcan successfully point to it. Content is a stub; real instructions are written in Chunk 2.Key decisions
providers/claude-code/CLAUDE.mdis a verbatim copy — no variable substitution. Paths like~/.claude/core/are stable and don't vary per machine. Templating is deferred until there's a concrete need.core/agents/,core/workflows/,core/prompts/) are not committed. They are created when Chunk 2+ populates them..claude/skills/are not touched by Chunk 1. They stay in place until Chunk 3 migrates them to.agents/skills/.CLAUDE.mdfiles exist in this repo and must never be conflated: the rootCLAUDE.md(how to work in this repo) andproviders/claude-code/CLAUDE.md(deployed global config). Both have prominent warnings.Testing Decisions
A good test for this chunk verifies observable end-state, not script internals: after running
install.sh, the right files exist at the right paths with the right content.Manual smoke test (sufficient for Chunk 1):
scripts/install.sh~/.claude/CLAUDE.md,~/.claude/settings.json,~/.claude/core/instructions/global.md, and~/.agents/skills/all exist~/.claude/core/install.sha second time and verify it completes without errors (idempotency check)No automated tests for Chunk 1. The install script is simple enough that a one-time manual check is sufficient. Automated install testing becomes worthwhile when
sync.shandinit-project.share added in Chunk 6.Out of Scope
.claude/skills/to.agents/skills/(Chunk 3)sync.shandinit-project.sh(Chunk 6)skills-lock.jsondesign and long-term role (Chunk 3)providers/claude-code/settings.jsonpermissions, hooks, model defaults (Chunk 2+)install.sh(deferred until concretely needed)Further Notes
The root
CLAUDE.mdandproviders/claude-code/CLAUDE.mdwere created during the grilling session and already exist in the repo — Chunk 1 implementation should fill in the content ofproviders/claude-code/CLAUDE.mdand ensure the rootCLAUDE.mdaccurately reflects the final structure.V1 is complete when Chunk 1 is done: the repo is structured,
install.shhas been run once, and Claude Code uses this repo as its global config source.