Adopting PLATE into an existing repository
Use this guide when adding PLATE to a mature codebase (an existing product repo, not a greenfield bootstrap).
Greenfield path: docs/bootstrap/starting-a-new-repository.md and new-repository-checklist.md.
Epic #633 targets a healthy PLATE state in under 30 minutes of mostly automated work. The steps below are the durable operator path; agents follow the same sequence via plate_what_next / feed process items.
Prerequisites (install path — do this first)
Mismatched pins burn the under-30m budget. After v0.10.0, align runtime before step 0:
pip install -U 'plate-core==0.10.0'
python -c "import plate_core; print(plate_core.__version__)" # expect 0.10.0
gh extension install akasper/gh-plate # or: gh extension upgrade plate
# If gh plate still locks an older plate-core (e.g. 0.7.2), or upgrade fails with
# a non-fast-forward error after the 2026-10-23 gh-plate history rewrite
# (old clone head 2e0b9b6 → current main cf0630c), reinstall:
gh extension remove plate && gh extension install akasper/gh-plate
| Check | Healthy signal |
|---|---|
| pip / import | plate_core.__version__ == "0.10.0" |
| gh-plate | extension at v0.10.0; PLATE_CORE_VERSION content 0.10.0 |
| Self-migrate | gh plate self-migrate --verify --json → no false drift when pin==target |
Full public install notes: root README.md (Quick Start → Install versions). Local offline dry-run timings (not LIVE third-party E2E): docs/research/adopter-install-path-0.8.0-parity.md.
Recommended sequence (<30m)
Start wall-clock session (optional but recommended, #955)
gh plate adopt --start-session --jsonRecords
started_atunder.agentic/adoption/session.json.
MCP:plate_adoption_sessionwithaction=start.
While the session is active,plate_what_nextranks priorityadoption_session(#957).Readiness status (status only, #935)
gh plate adopt --json gh plate health --json # also exposes adoption_core_ready / first_qa_seeded (#953)Machine-checkable checklist:
.plate,AGENTS.md, Goals wiki,.agentic/releases, labels/plate workflows, optional SPEC/CURRENT.
Reportsestimated_minutes_remaining,within_30m_budget,next_command, andfirst_qa.
MCP:plate_adoption_status. Does not apply changes.Local payload (reviewable diffs)
gh plate import-payload --dry-run --strategy conservative --json # Follow report.next_command (usually --apply same strategy; conflicts → escape-hatch) gh plate import-payload --apply --strategy conservativePrefer
conservativeso differing existing files become conflicts (not silent skips/overwrites). Usesafeto skip any existing path;forceonly with explicit human approval. JSON reports include a singlenext_commandfor agents (#996) — do not invent force-apply.GitHub-side baseline
gh plate bootstrap --repo OWNER/REPO --adopt --applyAdoption mode (auto-detected or
--adopt):- Prefer local import for file payload; remote copy still skips existing Contents paths.
- Skips seeding a duplicate initial Epic when open Epics already exist.
- Skips starter Questions when open Questions already exist; on apply, syncs
.agentic/adoption/first_qa_seed.jsonwhen Questions are present (#951). - Emits adoption-tailored next steps (Goals.md, CODEOWNERS, CI coexistence, migrate plan).
First Q&A seed (if not already seeded, #949 / #1001)
gh plate adopt --first-qa-plan --json # Dry-run next_command points at apply (do not re-plan in a loop): gh plate adopt --first-qa-plan --apply-first-qa --json # requires injectable runnerPlans three starter Curiosity Questions (same catalog as bootstrap).
Live create requires an injectable runner / bootstrap--applypath; CLI alone does not open issues.
MCP:plate_adoption_first_qa_plan.
Offline marker:.agentic/adoption/first_qa_seed.json.Health + intent
gh plate health --json gh plate config show gh plate adopt --json gh plate feed --json # adoption* process items rank high (#959) gh plate what-next --json # or plate_what_nextWrite real mission text in
docs/wiki/Goals.md. Replace CODEOWNERS placeholders.Self-migrate verify (#649 / #965)
gh plate self-migrate --plan --json gh plate self-migrate --verify --jsonOffline post-migrate checks: pin/payload drift, adoption
core_ready,.platevalidity.
Health also exposesself_migrate_ready/self_migrate_drift(#967).
MCP:plate_self_migrate_verify.Complete session timer (#955 / #1003)
gh plate adopt --session-status --json gh plate adopt --complete-session --json # Follow report.next_command: first-qa-plan if unseeded; feed only when first_qa_seededRecords
duration_minutesandwithin_30magainst the 30-minute budget.
Does not jump to feed whencore_readybut first Q&A is still unseeded (#1003).
This is local proof evidence, not a claim that every monorepo finished live E2E.Optional cutover
If the repo was previously template-derived:gh plate migrate planthen review before apply.
Self-migrate pin/payload drift:gh plate self-migrate --plan --json(#649).
Success signals (do not re-check #654 boxes without live E2E)
| Signal | How to read |
|---|---|
core_ready |
gh plate adopt --json / health adoption_core_ready |
first_qa_seeded |
adopt first_qa.seeded / health first_qa_seeded / marker file |
Session within_30m |
gh plate adopt --complete-session --json |
Self-migrate ready |
gh plate self-migrate --verify --json / health self_migrate_ready |
| Feed / what_next | No longer stuck on adoption / adoption_session / first_qa_seed / self_migrate* |
Auto-detect
gh plate bootstrap sets adoption_mode when heuristics fire (e.g. missing .plate plus local CI/package.json, open issues, open Epics/Questions). Force with --adopt / --existing-repo, or force greenfield with --greenfield.
Conflict strategies (manifest path_rules)
Import decisions are driven by template_payload_manifest.yml path_rules (#617), e.g.:
- Existing
.github/workflows/ci.yml→ install PLATE process as.github/workflows/plate-ci.yml(product CI preserved). - Root
package.json/SPEC.md/README.md→ conflict (human merge). .github/labels.yml, issue templates, andPULL_REQUEST_TEMPLATE.md→ overwrite with--strategy safe(refresh PLATE taxonomy); conflict with--strategy conservativewhen content differs.
Dry-run shows create_as / conflict / skip per file. Customize rules only in a deliberate fork.
CURRENT.md seeding
gh plate import-payload seeds a minimal CURRENT.md when missing (#618) so
validate_plate_repo and feature detection do not fail after adopt. Prefer
durable evidence in .agentic/releases/; treat CURRENT.md as a short index.
scripts/plate convention
When the target already has product scripts under scripts/, import installs
PLATE helpers under scripts/plate/ and rewrites workflow references (#621).
Discover payload files with gh plate payload list --json.
Template payload .github/workflows/ci.yml resolves validate_plate_repo.sh
under scripts/plate/ first, then scripts/, so namespaced installs pass the
test check without a manual path edit.
Providing the `test` required check with your own CI
Branch protection after 0.8.5 expects check contexts labels, test, and
pr-gates (see actions-cost-rollout.md). Import
payload ci.yml when PLATE should own baseline validation. When you keep a
product-owned test workflow (pytest, npm test, Playwright, and so on), add a
small aggregate job whose job id is test so GitHub reports the test
context:
jobs:
test:
runs-on: ubuntu-latest
needs: [unit, integration] # your existing jobs
if: always()
steps:
- shell: bash
run: |
set -euo pipefail
unit="${{ needs.unit.result }}"
integration="${{ needs.integration.result }}"
if [[ "$unit" != "success" && "$unit" != "skipped" ]]; then
echo "unit finished with $unit" >&2
exit 1
fi
if [[ "$integration" != "success" && "$integration" != "skipped" ]]; then
echo "integration finished with $integration" >&2
exit 1
fi
echo "Aggregate test gate passed."
Keep PLATE process checks in plate-ci.yml / plate-pr-gates.yml (or payload
ci.yml jobs labels and imported gates) and point required checks at those
context names exactly—job display name: values become the context when
set, so prefer the job id alone for labels and test.
Related issues
- #935 adoption readiness status (
gh plate adopt/plate_adoption_status) - #937 what_next ranks incomplete adoption
- #949 first Q&A seed plan
- #951 bootstrap writes/syncs first_qa marker
- #953 health exposes adoption fields
- #955 adoption session wall-clock timer
- #957 what_next ranks active session
- #959 feed ranks adoption process items
- #619 adoption mode
- #616 / #620 import-payload + shared planner
- #633 frictionless onboarding epic
- #649 self-migrate for adopters
- #1210 optional self-hosted runners — self-hosted-runners.md (private repos only)
- #1283 CI speed checklist — ci-speed-checklist.md