prepare-this-repo

A repository onboarding command that checks a project against abcd's recorded conventions and prepares it for them. It can add the .abcd folder layout, document conventions in AGENTS.md, and add commit checks.

In plain words
What is it for?
Use it to prepare, onboard, scaffold, or bootstrap a repository you own, including migrating an older .work layout.
Why use it?
It gives an existing repository the files and rules expected by abcd, while first checking ownership and auditing the current state.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/intentdriven/abcd/prepare-this-repo
Clone the repo
git clone --depth 1 https://github.com/intentdriven/abcd
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,287 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00093 $0.03287
Opus 5 $0.00046 $0.01643
Sonnet 5 $0.00019 $0.00657
Haiku 4.5 $0.00009 $0.00329

Measured 2d ago against content hash 927405326642, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prepare-this-repo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/prepare-this-repo.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prepare this repo

An interim bridge: abcd cannot yet manage repositories directly, so this command reads the abcd record and brings the current repository up to its conventions in a way the abcd CLI can later take over without unpicking. It supersedes the older scaffold-repo layout (.work/ at the repo root); Phase 3 migrates that layout when found.

Locate the record first. This command file lives at <abcd-root>/commands/prepare-this-repo.md — the abcd repository root is two levels up from it, the same root ${CLAUDE_PLUGIN_ROOT} names (Phase 2 onward uses it for the binary). Call that $ABCD below. Never assume any other checkout location.

Phase 0 — Refuse unless the user owns this repo

Check the origin remote (git remote get-url origin). If the repository is not owned by the user (their account or an org they control) — or there is no remote and the user cannot confirm ownership — stop entirely. No audit, no local layer, no exceptions: imposing these conventions on a third-party repo interferes with its own development principles.

Authority ordering

Parts of the abcd record are still being reconciled. When sources conflict, trust in this order:

  1. $ABCD/AGENTS.md — the binding conventions.
  2. $ABCD/.abcd/work/CONTEXT.md — current phase and the Live constraints / sharp edges section, which names what is not yet authoritative.
  3. $ABCD/.abcd/development/decisions/adrs/ — ratified decisions.
  4. Everything else (brief, intents, research) — read for understanding, not as gospel.

Phase 1 — Orient

Read from $ABCD, delegating heavy reading to subagents where available:

  • .abcd/README.md — the three-tier layout (durability × sharing): development/ (durable record, committed), work/ (shared working state, committed), .work.local/ (local ephemeral, gitignored).
  • .abcd/development/brief/ — the shape of a design brief (product, constraints, evidence, surfaces, internals, delivery, glossary).
  • .abcd/development/principles/ — one principle per file, plus the three-rung promotion ladder in its README.
  • .abcd/development/decisions/adrs/ — MADR, sequential NNNN. Session decisions live in work/DECISIONS.md; architecture-shaping ones graduate.
  • .abcd/development/intents/ — lifecycle by directory (drafts/planned/shipped/superseded/).
  • docs/README.md — strict Diátaxis, four directories, present tense only, user-facing only.
  • .abcd/docs-lint.json and record-lint.json — study as patterns (banned-token rules with severity, fix message, allow_context escapes).
  • .abcd/.work.local/private-names.txtif present: the banlist for the Phase 2 privacy audit. Its contents are read-only context; never reproduce them in anything committed or published. Do not read anything else under $ABCD/.abcd/.work.local/.

Read the full file on GitHub · 253 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 253 lines · 93 tokens per session scan A 927405326642

Subscribe to this mod's changes

prepare-this-repo is a command published in the GitHub repository intentdriven/abcd (3 stars, last pushed 2d ago), licensed MIT. It adds 93 tokens to every session and 3,287 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other commands, from other repositories