Skip to content

create-context

Brownfield back-fill — scout an existing codebase and populate .codearbiter/, then lock it initialized.

This is the populator for a project that already has code to read. Instead of interviewing you about architecture that’s already decided, it dispatches several scouts in parallel to read different slices of the repository — dependencies, infrastructure, and so on — and each one reports back structured findings rather than raw excerpts. Those findings get synthesized into a draft of the project’s state documents, and whatever the scouts couldn’t determine on their own becomes a short, targeted set of questions instead of a full interview. Once every gap is answered or explicitly deferred, the documents are finalized and the project is marked initialized.

/ca:create-context

No arguments — the skill reads the repository itself and only asks about what it can’t determine from the code.

> /ca:create-context
Existing source detected (Express API + React frontend). Beginning scout-based extraction.
Dispatching 6 scouts in parallel: tech stack, infrastructure, domain vocabulary, testing conventions,
security surface, existing conventions...
[scouts report back: file paths, line numbers, named values]
Synthesis complete. Two gaps the scouts couldn't resolve from code alone:
1. Is there a staging environment, or just local and prod?
2. Who are the two user roles referenced in permissions.ts — admin and... ?
> staging exists at staging.example.com; the second role is "billing-admin"
Writing tech-stack.md, security-controls.md, coding-standards.md, CONTEXT.md...
CONTEXT.md marked initialized.

Reach for /ca:create-context on an existing codebase with .codearbiter/ already scaffolded by /ca:init. For a project with no meaningful source yet, /ca:decompose is the right populator.

GateWhenEffect
brownfield checkbefore scouts are dispatchedmeaningful source code must already exist; a project with none redirects to decompose instead
parallel scout dispatchafter the pre-flight checkseveral read-only scouts each cover one slice of the codebase, returning file paths, line numbers, and named values only — never raw code or secret values
initialization lockafter the gap interviewthe completion marker is written only once every gap is either resolved or explicitly deferred
Source — plugins/ca/commands/create-context.md (v2.9.1)
---
description: Brownfield back-fill — scout an existing codebase and populate .codearbiter/, then lock it initialized.
argument-hint: (none)
---
# /ca:create-context — brownfield populate
Wraps an existing codebase in project state without guessing. Dispatches parallel scouts to read the repository, synthesizes their findings into the surviving `.codearbiter/` doc set, resolves gaps via a targeted interview, and locks the project initialized. No arguments — the skill reads the repo and asks only what it cannot determine.
The only permitted path to populate `.codearbiter/` when meaningful source code already exists. For a greenfield project with no source, use `/ca:decompose`.
## Routes to
The `context-creation` skill (`${CLAUDE_PLUGIN_ROOT}/skills/context-creation/SKILL.md`) — six gated
phases: pre-flight, scout dispatch, synthesis, gap interview, write, lock. Scouts return paths, line
numbers, and named values only — never raw source or secret values. The skill is canonical for the
phases and their gates.
## When NOT to use
- Project already initialized (`<!--INITIALIZED-->` in `CONTEXT.md`) → `/ca:status`.
- Greenfield project, no source → `/ca:decompose`.
- `.codearbiter/` not yet scaffolded → `/ca:init` first.
- Update one doc → edit `${CLAUDE_PROJECT_DIR}/.codearbiter/` directly or use `/ca:feature`.
## Hard gate
BLOCK if `<!--INITIALIZED-->` is already present in `CONTEXT.md`. BLOCK if no meaningful source exists
(route to `/ca:decompose`). BLOCK if any scout fails to return before synthesis. BLOCK if any
`[CONFIRM-NN]` exits the gap interview unresolved and undeferred. MUST NOT write `<!--INITIALIZED-->`
until every gap is resolved or deferred to `open-questions.md`.

View in repo