Repo onboarding
Inspect a repository and generate the cross-tool contract files this toolkit's skills rely on: `AGENTS.md` (architecture + agent instructions), `TASKS.md` (work queue), `.claude/project.json` (runner config), and `GOTCHAS.md` (pitfalls). Use when onboarding a new repo to the workflow toolkit, or when /onboard, /discovery, /codelearn, or /init-toolkit is invoked. Replaces the separate /codelearn skill — architecture discovery is part of onboarding here.From its SKILL.md
npx -y skills add exerias21/brainstorm-toolkit --skill repo-onboardingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
15.1 KB, as published. Nobody here has run it
Repo Onboarding / Discovery
This skill inspects the current repository and generates the config files that
the rest of the toolkit reads. Run this once per repo after dropping the
toolkit's skills and scripts in place. After it finishes, /test-check,
/eval-harness, and /sdlc should work with no further setup.
When triggered
- User invokes
/repo-onboarding,/discovery,/onboard,/codelearn, or/init-toolkit - User says "set this repo up for the toolkit", "onboard this repo", "analyze this codebase", "bootstrap AGENTS.md"
- After the user runs
setup.shfrom the brainstorm-toolkit plugin
Output
Produces (or offers to produce):
AGENTS.md(at repo root) — architecture summary + agent conventions (absorbs /codelearn)TASKS.md(at repo root) — empty task queue from template.claude/project.json— the runner config contractGOTCHAS.md(at repo root) — empty template if missing- A short report of what was detected and what was left blank
Procedure
Step 1 — Scan the repo
In the main context window (no subagents), survey the repo structure:
-
Language / stack fingerprints:
package.json→ Node/JS/TS project. Notescripts.test,scripts.e2e, workspace layout.pyproject.toml/requirements.txt/Pipfile→ Python. Check for pytest config.go.mod→ Go. Test command isgo test ./....Cargo.toml→ Rust. Test command iscargo test.Gemfile,pom.xml,build.gradle, etc. → flag the stack.
-
Container/orchestration:
docker-compose.yml/compose.yml→ read service namesDockerfileonly → single-container appkubernetes/ork8s/or Helm chart → kubectl-based logs- None → logs come from processes or log files directly
-
Test infrastructure:
tests/dir withtest_*.py→ pytest__tests__/,*.test.ts→ jest/vitestplaywright.config.*→ e2e tests presentvitest.config.*/jest.config.*→ unit test runner
-
Eval/fixtures (rare — toolkit-specific):
evals/directory → already set up for eval-harnesstests/eval/directory → already has eval tests
-
Branch info:
git remote -v+git symbolic-ref refs/remotes/origin/HEAD→ default branch name
-
Existing docs:
README.md,CLAUDE.md→ skim for existing commands and conventions
Step 2 — Propose the config
Build a draft project.json from what you found. Fill in:
test.unit— from detected test frameworktest.frontend— if a separate frontend package was detectedtest.e2e— if Playwright/Cypress/etc. was detectedlogs.command— from detected orchestration (docker / kubectl / file tail)logs.services— from compose services or k8s deploymentsstack.up/stack.down/stack.rebuild— how to bring the runnable stack up and down for manual verification; propose only from a detected orchestrator, never invent one (see the detection table).rebuildis the force-recreate variant used when a dependency manifest changed.stack.url— the local URL to open once it is up, if a port is discoverable from compose/Procfile/framework configeval.runner— only ifscripts/eval-runner.pyexists (from the toolkit)eval.features_dir—evals/if dir exists, otherwise blankgotchas_file—GOTCHAS.md(default)main_branch— from gitmodules— inferred from top-level code directories (src/,api/,web/,packages/*, etc.)models.cap— the standing sub-agent model-tier ceiling for every fan-out skill (/sdlc,/dead-code-review,/brainstorm-*, …). A ceiling, not a swap: tiers rankhaiku (1) < sonnet (2) < opus (3)andeffective = min(default, cap)— the cap only ever lowers, socap: "sonnet"runs Opus sites at Sonnet while Haiku/Sonnet sites are untouched. Governs sub-agent dispatch only, never the session orchestrator. Valid values: exactlyhaiku,sonnet,opus; absent = no cap (skills still default Sonnet-first, but a written cap makes it enforced policy). Full contract:skills/sdlc/templates/models.md. Default the proposal to{ "cap": "sonnet" }— it's the right ceiling for almost every repo (keeps quality on review/verify stages while cutting Opus cost); proposehaikuonly if the user wants to squeeze the cheap mechanical sweeps, or omit it only if they explicitly want uncapped Opus fan-out.
When unsure, leave the key out. A missing key causes skills to skip that step
gracefully — that's better than a wrong command. (Exception: models.cap — prefer
proposing sonnet over omitting, per above.)
Step 3 — Show the proposal, then walk the model choices
First print the proposed project.json with a one-line rationale per detected key
(Detected Python + pytest → test.unit; docker-compose services [api, web] → logs.* + stack.*;
no eval runner → eval.* left blank; main branch from origin HEAD; …).
Then ask the model questions explicitly — do not bury them in "does this look right?". Detection can't decide these, they are the main cost/quality levers, and a user who is never asked never discovers the key exists. Ask all four at once — prefer the host's built-in interactive question UI (the multiple-choice picker it already uses to ask you to choose an approach): one question per key, options as choices, recommended default first. Where the host has no such UI, print a numbered list and take the answers in a single reply. Default first so "just accept" is one keystroke, and state the cost direction in each option:
| Ask | Key | Options (default first) |
|---|---|---|
| Ceiling for every sub-agent fan-out — implementers, fix agents, sanity + review lenses. The single biggest cost lever. | models.cap | sonnet (Sonnet-first standing default) · haiku (cheapest; fine for sweeps/monitoring) · opus (no ceiling — every stage runs at its own full default tier) · omit |
Which model pre-flights your plan before any code is written (Stage 1.5, never gated — it runs on every /sdlc and /sdlc-lite run). Say plainly that the built-in is Haiku and that models.cap cannot raise it — this key is the only lever. | models.sanity / .focuses | omit → 3 Haiku agents (paths, completeness, gotchas) · sonnet (better judgment on completeness, which asks whether the plan hangs together) · fewer focuses to cut cost (paths is mechanical; drop gotchas when there's no GOTCHAS.md) |
| Enable the adversarial Review→Fix stage? Off unless you say yes — it never runs by accident. | pipeline.review_fix.enabled / .model | false (default) · true + reviewer opus · true + reviewer fable (usage-billed, explicit opt-in) |
| How many review lenses? Ask only if the stage was just enabled. One reviewer call per lens at the reviewer model, so this scales the stage's cost roughly linearly. | agents.code_review_lenses | omit → all four (correctness, plan-alignment, config-env-docs, security) · ["correctness", "security"] (half cost; good default for app code) · ["correctness"] (quarter cost; highest-yield single lens) |
| How do you bring this app up for manual verification? Confirm or correct what was detected. | stack.up / stack.rebuild / stack.url | the detected compose/dev commands · corrected by the user · omit (skills then say which key is missing instead of guessing) |
Explain the interaction once, because it surprises people: models.cap is a ceiling, not a
target — it can only lower a stage's default tier, never raise it. So plan_validate.model: "opus" under models.cap: "sonnet" still dispatches Sonnet. If a per-stage tier is meant to
actually take effect, the cap must be at or above it. Close with the open catch-all: "Anything
else to add, remove, or correct?"
Step 4 — Write AGENTS.md (architecture summary)
If AGENTS.md is missing (or the user asks to regenerate it), produce one by filling in the placeholders in templates/AGENTS.md.template. Derive each section from the scan:
- Project summary — 1–3 sentences. Infer from
README.md, package name, top-level structure. - Tech stack — bullet list from detected stack (language, framework, DB, test/build tools).
- Architecture at a glance — 5–10 bullets covering: top-level module layout, how requests flow (entry point → router → service → data), key cross-module dependencies. Do NOT invent what you can't see.
- Build / test / run — concrete commands, preferring what's already in
README.mdorpackage.jsonscripts. If unsure, say "TODO: confirm with maintainer" inline.
Keep each section terse. AGENTS.md is read by every agent, every session — brevity beats completeness.
Step 5 — Write the files
After the user confirms (or adjusts):
-
Write
.claude/project.json(create.claude/if missing). -
Write
AGENTS.mdat repo root. IfCLAUDE.mdis also missing, symlink it toAGENTS.mdon POSIX, else copy. -
If no
TASKS.md, copytemplates/TASKS.md.templateto repo root. -
If no
GOTCHAS.mdat repo root, create one fromexamples/GOTCHAS.md.example. -
Update
.gitignore. The toolkit's working files are local working files — they churn every run, they are personal to whoever is driving, and they are a merge-conflict magnet in any repo with more than one contributor. Ensure these lines are present (create.gitignoreif missing; append under a# brainstorm-toolkitcomment — don't duplicate lines that already exist):# brainstorm-toolkit — local working state, not shared contract .claude/pipeline/ .claude/.next-action .claude/.auto-continue-hops .claude/project.json TASKS.md plans/Why each:
.claude/pipeline/— per-run/sdlc+/sdlc-liteenvelopes; one dir per run, pure churn if tracked..claude/.next-action/.auto-continue-hops— the seam's scratch files..claude/project.json— machine-specific. It holds test commands, paths and runner invocations that differ per checkout. The committed template is.claude/project.json.example; a fresh clone copies it and edits locally.TASKS.md— a personal work queue, rewritten constantly.plans/— personal planning artifacts.
Ignoring these does not break the cross-tool contract. Copilot and Codex read these files off disk in the working copy;
.gitignoregoverns what gets shared, not what gets read. The contract is per-checkout, and it still holds.Keep tracked:
.claude/project.json.example(the bootstrap template),.claude/settings.json(hook wiring the team does share),AGENTS.md,GOTCHAS.md, and any committed agent/skill definitions.Note the knock-on: with
project.jsonignored, a fresh clone has the example but not the real file, so/repo-healthCheck 9 will flag "config inert" until someone copies it. That is the intended nudge, not a false positive.
Step 5.5 — Offer secret-blocking PreToolUse hook (Claude only)
After the project.json bootstrap, ask the user:
"Enable secret-blocking PreToolUse hook? (recommended for production repos) When enabled, Claude Code blocks Write/Edit if the about-to-be-written content matches a known secret shape (AWS keys, GitHub tokens, JWTs, private-key blocks). Default: off. (Copilot consumers: this hook is Claude-only — no effect for you.)"
- On no: leave both
pipeline.poka_yokeand.claude/settings.jsonunchanged. Note in the report that the user declined. - On yes:
- Set
pipeline.poka_yoke: truein.claude/project.json. - Write the PreToolUse hook entry into
.claude/settings.json(create the file if missing; merge into existinghooks.PreToolUselist rather than overwriting). The schema is documented intemplates/AGENTS.md.templateunder "Hooks (Claude-only)" — matcher is"Write|Edit",commandruns the secret-pattern scanner, non-zero exit blocks the tool call. - If a
scripts/hooks/secret-scan.shis not already present in the repo, stub one out (or document where the user should drop it) using the pattern set inexamples/GOTCHAS.md.example"Secret Patterns (recommended for hooks)".
- Set
Step 6 — Report
Report what was written and suggest next steps:
- "Try
/test-checkto see which steps run." - "Start a new feature with
/brainstorm [topic]or/task <description>." - "See current work queue with
/status."
What NOT to do
- Do not overwrite an existing
project.jsonwithout explicit confirmation. If one already exists, read it, show the user what's there vs. what you'd propose, and ask. - Do not infer commands that haven't been verified. If you see
pytest.inibut no actual tests pass, still propose the pytest command but flag it. - Do not generate evals. That's a separate skill (/eval-harness). This skill only sets up the config needed for evals to work if the user chooses to use them.
Detection heuristics reference
| Signal | Implies |
|---|---|
package.json with "test" script | test.unit or test.frontend = npm test (or pnpm/yarn equivalent) |
pyproject.toml with [tool.pytest] | test.unit = pytest |
playwright.config.* at root | test.e2e = npx playwright test |
docker-compose.yml | logs.command = docker compose logs {service} --tail={tail}, logs.services from compose services; stack.up = docker compose up -d --build, stack.down = docker compose down, stack.rebuild = docker compose up -d --build --force-recreate; stack.url from the first published host port |
| Kubernetes manifests | logs.command = kubectl logs deploy/{service} --tail={tail}; leave stack.* unset — a cluster is not a local up/down |
package.json with a dev/start script and no compose file | stack.up = that script (npm run dev); no stack.rebuild unless a build step is separate |
go.mod | test.unit = go test ./... |
Cargo.toml | test.unit = cargo test |
Top-level dirs like api/, web/, worker/ | modules list |
.git/HEAD or origin default | main_branch |
| Always (standing policy) | models.cap = "sonnet" — Sonnet-first ceiling for sub-agent fan-out; propose haiku to squeeze cheap sweeps, omit for uncapped Opus |
| Repo uses this toolkit | gitignore the local working state: .claude/pipeline/, .claude/.next-action, .claude/.auto-continue-hops, .claude/project.json, TASKS.md, plans/. Keep .claude/project.json.example tracked as the bootstrap template |