Control Plane
@mesgme/control-planev2026.09.03.1
01README
Bootstraps a control plane for a new swamp project. A four-phase guided workflow — understand, decide, generate, finalise — backed by typed, resumable state.
Phase answers live in the model as queryable resources; the workflow holds the spine and pauses. Pull this extension to get the full guided experience.
02Models
@mesgme/control-planev2026.09.03.1control-plane/mod.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| targetDir | string | Absolute path to the new project directory (must exist as a git repo) |
fn understand(projectName: string, description: string, projectStatus: enum, teamSize: enum, constraints: string)
Record the outcomes of a Phase 1 project-understanding conversation.
Guide the conversation through these areas before recording answers:
1. PRODUCT AND PURPOSE
Ask: "What are you building — the product, the purpose, who it's for?"
Capture a one-paragraph description and a short slug name for the project.
2. STARTING POINT
Ask: "Where are you starting from?"
Classify as one of: greenfield (nothing exists yet), existing (adding a
control plane to a running codebase), rewrite (re
| Argument | Type | Description |
|---|---|---|
| projectName | string | Short slug-style name for the project (e.g. my-infra) |
| description | string | One-paragraph description — what it does, who it's for, and why |
| projectStatus | enum | Where the project is starting from |
| teamSize | enum | Scale expectations |
| constraints | string | Timeline, budget, compliance, or integration constraints (free text or 'none') |
fn decide(modelTypes: array, workflowNames: array, extensionNames: array, vaultNeeded: enum, additionalTech: string)
Record the outcomes of a Phase 2 architecture-decision conversation.
Read the project spec first (swamp model get control-plane --json) to
understand what was captured in Phase 1. Then guide the conversation:
1. SWAMP PRIMITIVES
Ask: "What external resources will you manage?"
Help them search for community types: swamp extension search <domain>.
Decide which community types fit and which need custom extensions.
Record the type names as an array (e.g. ["@swamp/git", "@swamp/github"]
| Argument | Type | Description |
|---|---|---|
| modelTypes | array | Community or custom swamp model types to use |
| workflowNames | array | Workflows to automate, each as 'name: purpose' |
| extensionNames | array | Custom extensions to build |
| vaultNeeded | enum | Whether secrets management is needed |
| additionalTech | string | Languages, frameworks, infrastructure beyond swamp (or 'swamp-only') |
fn generate(documents: array)
Record the control plane documents produced in Phase 3.
Read the project spec (swamp model get control-plane --json) to see all
Phase 1 and Phase 2 answers. Then generate these files in the target directory:
1. CLAUDE.md
The system context file. Under 200 lines. Must include:
- Project name and one-paragraph description
- Core principles (3–5 values that guide every decision)
- Architecture overview (components, responsibilities, connections)
- List of child projects/packages wi
| Argument | Type | Description |
|---|---|---|
| documents | array | File paths of generated control plane documents |
fn finalise(swampInitialised: boolean, firstBuildSuggestion: string)
Record the finalisation status of the control plane in Phase 4.
Documents are in place. Complete the setup:
1. INITIALISE SWAMP
Run swamp repo init in the target directory:
cd <targetDir> && swamp repo init
2. VERIFY INITIALISATION
Check the repo initialised correctly:
swamp model search --json
Confirm the structure is correct — CLAUDE.md (with swamp managed section
at top), docs/conventions.md, docs/architecture/L1-system-context.md,
docs/architecture/L2-containers.m
| Argument | Type | Description |
|---|---|---|
| swampInitialised | boolean | Whether swamp repo init has been run in the target directory |
| firstBuildSuggestion | string | What to build first and what the first implementation conversation should say |
Resources
projectSpec(infinite)— Project understanding and architecture decisions collected across phases 1–2
controlPlane(infinite)— Generated control plane documents and finalisation status from phases 3–4
03Workflows
@mesgme/bootstrap0fee37f8-e6dc-4245-8be8-36c00963cdbc
Guides a developer through setting up a control plane for a new swamp project. Four phases: understand the project, make architecture decisions, generate control plane documents, and finalise. Phase answers are recorded on the @mesgme/control-plane model; the workflow holds the spine and pauses.
understandPhase 1 — have a conversation with Claude to understand the project, then resume with your answers.
1.phase-1-checkpoint— Pause for project understanding conversation
decidePhase 2 — work through architecture decisions with Claude, then resume with your choices.
1.phase-2-checkpoint— Pause for architecture decision conversation
generatePhase 3 — Claude writes the control plane documents into targetDir. Review each one and approve when satisfied.
1.phase-3-generate— Ask Claude to generate all control plane documents
finalisePhase 4 — initialise swamp in the target directory and confirm handoff.
1.phase-4-init— Init swamp in target dir and confirm control plane is ready
04Stats
B
85 / 100
Downloads
2
Archive size
17.7 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository0/2missing
Repository
https://github.com/mesgme/swamplane05Platforms
06Labels