---
title: "Onboarding, Playbooks, and Repo Scan"
description: "Run the guided Onboarding workflow, choose an optional SDLC Playbook, and scan your real repository safely before starting Cycle 1."
---

> Documentation Index
> Fetch the complete documentation index at: https://adaptive-factory.system3inference.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Onboarding, Playbooks, and Repo Scan

Before opening your first delivery Cycle, Adaptive Factory guides your team through **Onboarding** (`OBD-*`). Onboarding captures your migration or build shape, generates a customer-specific **Scout program** (`PRG-*`), and builds a Readiness Checklist that stays separate from application Work orders on the Planner board.

## Five-step Onboarding flow

1. **Read (Houses and Rungs)**: Inspect what each of the five Houses owns, what it never does, and what each plug-in Rung (`R0` to `R4`) proves.
2. **Practice (Mini Factory Loop)**: Walk through one throwaway 5-beat sandbox cycle in memory (`Scouts` -> `Library` -> `Planner & Floor` -> `Validation house` -> `Promotion gate`). Nothing writes to Git or triggers external tools.
3. **Intake Interview (2-pass discovery)**:
   - **Pass 1 (Deterministic Fast-Pass)**: Choose a **Discovery Archetype**, an optional **Playbook**, and your external services to generate an initial Scout program and checklist.
   - **Pass 2 (Safe Repo Scan)**: Scan your real codebase via the browser folder picker or `af onboard scan --repo-dir <path>` to detect framework, routes, middleware, models, external adapters, and missing Rung access.
   - **Pre-commit File Inspector**: Read every generated Markdown and YAML file (`overview.md`, `onboarding/scout-program.md`, `standing/STD-PB-*.md`, `decisions/DEC-PB-*.md`) before committing to Git.
4. **Scout Plan and Human Advisory Review**: Review the Intake summary, schedule or record human expert sign-off, and add custom tracks (for example a third-party webhook mock or custom middleware hook).
5. **Readiness Checklist**: Track predetermined, Playbook, and dynamic Scout tasks (`OBD-*`) until the factory is ready for Cycle 1.

## Discovery Archetypes

Adaptive Factory ships six starter Archetypes covering common starting shapes:

- `laravel-php-to-laravel-rust`: Cross-language Laravel migration (Rust default via `laravel new --rust`; generalizes to Go, Java, and Perl).
- `non-framework-to-laravel`: Move a bespoke or non-framework system onto Laravel for delivery speed and out-of-the-box Scout and Validation middleware.
- `node-postgres-to-workers-do`: Reference Northstar Goods migration to Cloudflare Workers and Durable Object SQLite.
- `erp-to-custom`: Legacy ERP (SAP or NetSuite) to custom software with edge or API capture and external mocks.
- `platform-swap`: Storefront platform swap (WordPress or WooCommerce to Shopify) focusing on webhooks and plugin side effects.
- `greenfield-build`: New build with no Champion, proven via Playbook standing rules and synthetic Scenario sets (`SCN-*`).

## Optional SDLC Playbooks (`PB-*`)

A **Playbook** is an optional starter bundle that seeds Standing requirements (`STD-*`), proposed Decisions (`DEC-*`), and Floor skills into your Library. Once committed, the files belong to your Git repository.

Built-in Playbooks:

- `PB-LARAVEL-RUST-CLOUD`: `laravel new --rust`, `inertia-react` starter kit, Laravel Cloud push-to-deploy, Laravel Nightwatch telemetry, toggleable default adapters (`laravel/ai`, `laravel/mcp`, `laravel-s3`), design kit rule (`shadcn` + `@ui-sdk/core`), plain-English docs site updates, `/docs` hygiene, and git rules.
- `PB-LARAVEL-PHP-CLOUD`: Laravel 12 (PHP 8.3+) with Boost skills, Inertia React, Nightwatch, and Laravel Cloud.
- `PB-WORKERS-TS`: Cloudflare Workers, Hono, Durable Object SQLite, and `globalOutbound: null` shadow isolation.

## Safe Repo Scan allowlist

The scanner inspects only safe metadata and structural source files:

- `composer.json`, `package.json`, `Cargo.toml`, `wrangler.jsonc`, `wrangler.toml`
- `.env.example` and `.env.sample` (key names only, values ignored)
- `routes/*.php`, `bootstrap/app.php`, `app/Http/Middleware/*`, `app/Models/*`, and API router files

It never reads `.env` secret files, `vendor/`, `node_modules/`, `target/`, or `.git/`.

## CLI commands

```bash
# List built-in Playbooks and Discovery Archetypes
af playbook list
af archetype list

# Run a local repository scan and push findings to a running Worker
af onboard scan --repo-dir /path/to/your/repo --url http://localhost:8789 --tenant my-app

# Initialize, inspect, update, and approve Onboarding from the terminal
af onboard init --tenant my-app --archetype laravel-php-to-laravel-rust --playbook PB-LARAVEL-RUST-CLOUD
af onboard show --tenant my-app
af onboard check OBD-003 --status done --tenant my-app
af onboard review --status approved --tenant my-app
```

Source: https://adaptive-factory.system3inference.dev/docs/using/onboarding-and-playbooks/index.mdx
