/caddis-extras:setup-project-aifrom caddis-extras
Install or refresh the project AI harness: AGENTS.md, CLAUDE.md shims, agents, settings. Use when the user says 'set up the harness', 'generate CLAUDE.md', or runs /setup-project-ai.
Ships in caddis-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Produce a working, TDD-first, context-rot-resistant dev harness for any project. Two layers: deterministic (a Python generator — mechanics that must not vary) + generative (you — curating project-specific AGENTS.md content and verifying). Proven in the Phase 0 spike.
--force).AGENTS.md canonical root rules (identity + harness loop + laws + pointers) — every agent reads it
CLAUDE.md root @AGENTS.md import shim + a small Claude-native block (subagents/skills/commands)
src/AGENTS.md backend conventions (when a Python/FastAPI backend is detected) + src/CLAUDE.md shim
frontend/AGENTS.md frontend conventions (when React/Vite is detected) + frontend/CLAUDE.md shim
tests/AGENTS.md test/TDD conventions (when pytest/tests are detected) + tests/CLAUDE.md shim
.claude/agents/* lean subagents: tester, code-reviewer, preflight
.claude/commands/* feature-plan, tdd, prd, handoff, setup-project-ai
.claude/settings.json stack-tuned permissions (pipeline MCP off by default)
Each CLAUDE.md is a thin @AGENTS.md import shim — Claude Code inlines the sibling AGENTS.md at load,
so the rules are single-sourced. Codex and Antigravity (agy) read the AGENTS.md files directly.
Resolve <harness-root> first — the generator ships in two places and finds its own templates:
<harness-root> = ${CLAUDE_PLUGIN_ROOT},
so the script is ${CLAUDE_PLUGIN_ROOT}/scripts/setup_project_ai.py. Templates (claude-md/,
settings.template.json, stack-map.json) sit at the plugin root and are auto-located.<harness-root> = the caddis repo root; the script is
scripts/setup_project_ai.py with templates in the sibling claude-harness/.Run a dry-run first to see stack detection and unresolved placeholders:
python <harness-root>/scripts/setup_project_ai.py <target-project-dir> \
--name "<Display Name>" --desc "<one-line description>" --dry-run
Read the output. It reports the detected stack, the AGENTS.md rules hierarchy (+ CLAUDE.md shims) it will write, the subagents/
commands it will deploy, and — critically — unresolved {{PLACEHOLDER}} tokens grouped by file
(Phase 0 friction #1: these break runtime if left, e.g. ports in settings.py/vite.config.ts).
Existing project (the common case): placeholder substitution is OFF by default — the generator
reports {{TOKENS}} it finds (informational; usually just example text in docs) but never rewrites
repo files. Just run without --dry-run:
python <harness-root>/scripts/setup_project_ai.py <target-project-dir> \
--name "<Display Name>" --desc "<one-line description>"
Fresh-from-template project only: the copy has real {{API_PORT_DEV}} etc. that break runtime
(Phase 0 friction #1). Resolve them from the platform port registry / project-config.md and pass
--substitute plus each --set:
python <harness-root>/scripts/setup_project_ai.py <target-project-dir> \
--name "<Display Name>" --desc "<one-line description>" --substitute \
--set PROJECT_NAME=<slug> --set API_PORT_DEV=<n> --set FE_PORT_DEV=<n> --set PROJECT_SHORT=<short> ...
⚠ Never pass
--substituteon an existing repo — it would rewrite docs/code containing{{...}}as literal examples (dogfood learning from a live incident on an existing project). Substitution is a template-bootstrap step.
Add --force only when intentionally overwriting an existing CLAUDE.md/AGENTS.md/harness file.
Confirm zero runtime placeholders remain: the runtime files (settings.py, vite.config.ts,
main.py) must compile / parse. Quick check: python -m py_compile src/config/settings.py.
The generator writes generic fragments and pre-extracts real facts into
.caddis/PROJECT-FACTS.md (run/test/build commands, env-var names, CI/deploy workflows, entry
points). Start there — fold each fact into the right AGENTS.md (root vs src/ vs
frontend/ vs tests/) — the canonical rules file, never the CLAUDE.md shim — then delete
PROJECT-FACTS.md. Then read STACK.md (if present), project-config.md, and skim the actual code to
add the project-specific truth the generic fragments can't know:
package.json/pyproject.toml/scripts).src/services/<x>_store.py").AGENTS.md files and into skills. Do not duplicate
the generic laws/harness (already in the root AGENTS.md). The goal is the best-of-best AGENTS.md per
repo. Leave every CLAUDE.md as the generated shim — enriching it would fork the rules for Claude only..venv missing, create it and install dev deps:
python -m venv .venv then .venv/Scripts/pip install -e .[dev] (Windows) / .venv/bin/pip ....npm install in the frontend
so jsdom + @testing-library/jest-dom actually install, and confirm vite.config has a test
block (the generator emits the exact snippet to add if missing).Prove the harness is live before declaring done:
pytest -q, npm test) — or write one trivial passing test — and show output.preflight subagent on any existing plan to confirm subagent dispatch works.Summarize what was created, the detected stack, any deferred placeholders, and the smoke-test result.
If this is a multi-session effort, run /handoff to write relay.md.
--force; settings
allow-lists are always merged (union). Safe to re-run.mcpServers.junai +
.github/pipeline-state.json).AGENTS.md is the canonical rules file; CLAUDE.md is a thin @AGENTS.md import
shim (Claude Code inlines it). subagents/commands/skills are plain markdown Codex/agy can also read.
The same harness serves Claude Code, Codex CLI, and Antigravity (agy).scripts/setup_project_ai.py
with the templates at the plugin root), so /setup-project-ai runs from a plain plugin install with
no harness checkout. The same script also runs from the harness repo for harness development.
Resolve its path via <harness-root> as described in Step 1.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub saajunaid/caddis-plugin --plugin caddis-extras81 skills in this plugin
/adopt-rbacPointer to the org's RBAC adoption skill. Use for "add RBAC to this app" or "adopt rbac-kit"./agent-md-refactorRefactor bloated agent instruction files (AGENTS.md, .cursorrules, .github/ files) into linked, progressively disclosed docs./agent-orchestrationBlueprint for orchestrating the agent pipeline from spec to planning, implementation, testing and debugging, plus when a second model is worth it, the intent→model map and cost guardrails./algorithmic-artGenerative and algorithmic art with p5.js: flow fields, particle systems, animations, WebGL, audio-reactive visuals; exports HTML, PNG, GIF, MP4, SVG. Use for creative coding or any p5.js visual./anchor-reviewSingle-model adversarial review technique — 3-lens analysis with confidence scoring and self-challenge/api-client-patternsTyped client-side API consumption: fetch wrappers, zod validation, auth injection, TanStack Query (useQuery, useMutation, optimistic updates), tRPC, OpenAPI codegen, pagination. Use when consuming REST or tRPC APIs.