# Recipe: the new-project prompt (bootstrap an empty repo into the federation)

> **Front door:** reachable via `mgf-fed start --mode new` (or just
> `mgf-fed start` in an empty repo). `mgf-fed start` is the single onboarding
> front-door over all four prompts.

> **Audience:** an AI agent (or human) standing in an **empty/greenfield** repo
> that should become a Magogi Foundation **federation member** (a new `mgf-*`
> sibling).
> **What this is:** the copy-paste prompt that takes an empty directory to a
> scaffolded, conformant federation project. It is the **bootstrap** companion
> to [`federation-sync-prompt.md`](federation-sync-prompt.md): *this* creates
> the project, *that* keeps it in sync. `mgf-fed new-project-prompt` prints
> it (self-updating, resolved from the pinned `mgf-standard`).

## When to use

- A brand-new repo that will be an `mgf-*` library, service, CLI, or app.
- **Not** for an existing member (use the sync prompt) and **not** for a
  non-member that only wants to adopt the standards (use the adopt prompt).

## The prompt

Copy the block below into an agent launched from the root of the empty repo.

```text
ROLE: You are bootstrapping an EMPTY repository into a Magogi Foundation (MGF) federation member — a
new `mgf-*` sibling. UNDERSTAND the federation first, SCAFFOLD second, CONFORM third. Zero assumptions;
read the living sources, never work from memory.

STEP 0 — INSTALL + UNDERSTAND (the federation is a dependency you read, not guess):
  pip install -U 'mgf-common[standards]'   # needs the codeberg-mgf index + $CB token (magogi-admin is PRIVATE)
  mgf-fed agents        # the canonical AI briefing + a live "you are here" federation map
  mgf-fed standards     # list EVERY topic and read them all (mgf.standard.list_standards / read_standard)
  # the contract + the WHY: mgf.standard.federation()  and  mgf.standard.read_design("federation")
  GUARD: if `agents`/`standards` error "install [standards]" or show no map, STOP and install the extra —
  a plain `mgf-common` cannot resolve the corpus. Never proceed on a degraded resolve.

STEP 1 — SCAFFOLD the conformant skeleton (do NOT hand-roll it):
  mgf-fed init-project --name <NAME> --kind <cli|fastapi|django|gui|library|service>
  # writes the cookiecutter: pyproject, .woodpecker CI, the uniform 10-doc root baseline + docs/, CLAUDE.md,
  # the §Z MGF_STANDARDS_CONFORMANCE.md ledger, .importlinter, py.typed, … Choose --kind by what you are building.
  Then read the generated CLAUDE.md + README + STARTHERE — they orient the new repo.

STEP 2 — CONFORM completely (the repo now EXISTS, so run the standard sync):
  Run `mgf-fed sync-prompt` against the scaffolded repo and follow it end-to-end — comprehend every MUST,
  give each a ledger row (✅ / N/A-with-reason / ⏳ / 🚫-declined), apply fixes, and prove the gates green:
  ruff check · ruff format --check · mypy --strict · lint-imports · pytest at/above the coverage floor · gitleaks.
  A NEW project is mostly N/A-by-shape + a few ⏳ at first — that is fine; COMPLETENESS (every MUST addressed) is
  the bar, not 100% ✅.

STEP 3 — DECLARE + WIRE IN:
  • Set your conformance level (L1/L2/L3) in README + the ledger header — L1 is the default for a new sibling.
  • Fill DEPS.md (what you depend on); pin the mgf-* siblings you use as `>=X,<X+1`.
  • Inherit the slash command: copy `mgf-common/.claude/commands/sync.md` into `.claude/commands/` so future
    syncs are one keystroke.

GUARDRAILS: read-only on EVERY other repo (mgf-standard / mgf-common / siblings) — surface any cross-repo need via a
`pending-feedback/<target>.md` outbox, never a direct edit (FB-05). Commit on a branch with the AG-03 trailers. Do
NOT publish/tag/release unless explicitly asked (the supervisor's REL-13 step). The registry/roster is owned by
mgf-standard; you are a new leaf joining, not editing it.

DELIVERABLE: identity + --kind + resolved versions; confirmation the scaffold landed and the gates are green; the
§Z ledger with every MUST addressed; and OPEN QUESTIONS for the human (the level choice, any ambiguous applicability).
```

## Notes

- **Scaffold, then sync.** `init-project` writes the conformant skeleton; the
  sync prompt then drives it to *complete* conformance. They compose — this
  prompt routes through both rather than duplicating either.
- **Self-updating.** Like the sync prompt, this is resolved live from the
  pinned `mgf-standard` (`read_recipe`), so new standards/commands flow in
  without editing the prompt.

## Related

- [`federation-sync-prompt.md`](federation-sync-prompt.md) — the ongoing-sync prompt STEP 2 hands off to.
- [`federation-adopt-prompt.md`](federation-adopt-prompt.md) — for a **non-member** adopting the standards.
- [`commit-signing.md`](commit-signing.md) · [`codeberg-pr.md`](codeberg-pr.md) — the AG-03 trailers + the PR flow.
