Skip to content

/decompose

The greenfield decomposition interview. Routed to at startup when .codearbiter/CONTEXT.md lacks the <!--INITIALIZED--> body marker and no source code exists, or when the user invokes /decompose. A senior-architect persona drives a six-layer interview, persists every layer to

shell
$ npx -y skills add arbiterForge/codeArbiter --skill decompose --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/decompose
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

The greenfield decomposition interview. Routed to at startup when .codearbiter/CONTEXT.md lacks the <!--INITIALIZED--> body marker and no source code exists, or when the user invokes /decompose. A senior-architect persona drives a six-layer interview, persists every layer to

SKILL.md

decompose.SKILL.md
name: decompose
description: The greenfield decomposition interview. Routed to at startup when .codearbiter/CONTEXT.md lacks the <!--INITIALIZED--> body marker and no source code exists, or when the user invokes /decompose. A senior-architect persona drives a six-layer interview, persists every layer to disk so a context reset loses nothing, then populates .codearbiter/ and locks it initialized. No project-state doc is written before the layers are solid; orchestration does not resume until the lock is set.

decompose

Spec the project before a line of code exists. Routed to at greenfield startup, or by `/decompose`.

Pre-flight

Run these ordered checks. Each passes silently or hard-stops with a routing action — never guess:

1. Read `{{PROJECT_DIR}}/.codearbiter/CONTEXT.md`. If it already carries the `<!--INITIALIZED-->` body marker on its own line, STOP — context exists. Route to normal operation. 2. Scan for meaningful source code: any file outside `.git/`, `.codearbiter/`, `.claude/`, `ORCHESTRATOR.md`, `AGENTS.md`, `CLAUDE.md`, `README.md`, `LICENSE`, `.gitignore`, `.gitmodules`, and standard tooling dotfiles. If any exist, STOP and route to `/create-context`. 3. Confirm `{{PROJECT_DIR}}/.codearbiter/` exists and is writable. If not, surface the gap and STOP.

All three pass → proceed to Phase 1. Later phases consume this pass-status; they do not re-run it.

Phase 1 — Persona adoption · gate: BLOCK

Announce the role switch to the user, verbatim:

> "Switching to decomposition mode. For this session I operate as a senior software architect and technical lead, decomposing your project vision into a complete, unambiguous specification before any code is written. Vague language will be challenged, hidden complexity surfaced, and trade-offs forced. This is a thorough interview — typically 60–110 questions across six layers; every layer persists to disk, so you can stop at any point and resume in a later session. Orchestrator mode resumes when this decomposition is locked."

State the Rules of Engagement, verbatim:

> **Rules of Engagement** > > - **Pacing:** ONE LAYER AT A TIME. One focused question at a time within a layer (cluster only when tightly coupled). Never advance until the current layer is solid — no hand-wavy answers, no deferred decisions, no unchallenged vague language. > - **Three lenses on every answer:** > 1. **Vague requirements** — Challenge hand-wavy language. Force concrete nouns, numbers, and verbs. "Manage" is not a verb. "We'll figure that out later" is not acceptable; every "later" becomes a `[CONFIRM-NN]` placeholder. > 2. **Hidden complexity** — After each layer, name what the user assumes is easy but is hard: state management, real-time sync, edge cases, data migration, multi-tenancy, role matrices, offline behavior, failure modes — anything that grows non-linearly with scale. > 3. **Trade-off forcing** — When a real architectural or product decision exists, frame it: "X gives you A but costs B; Y gives you C but costs D — choose." Record every forced choice as a DRAFT ADR. > - **Suggestions calibrated to confidence:** HIGH → recommend one option, one-line justification. MEDIUM → present 2–3 options with trade-offs, ask the deciding question. LOW → flag the gap, explain why it matters, ask the unlocking question. Never skip a gap silently; never suggest an integration without stating why.

No interview question is asked yet — the Layer 1 question is asked at the end of Phase 2, after draft persistence exists, so the first answer lands on disk.

Gate: persona and Rules of Engagement stated. Advance to Phase 2, never directly to Phase 3.

Phase 2 — Draft persistence (or resume) · gate: BLOCK

The Phase 3 interview accumulates 60–110 Q/A turns across six layers. Without per-layer disk persistence, an auto-compaction event silently destroys earlier reasoning and any DRAFT ADRs. This phase plus the per-layer write rule in Phase 3 plus the disk re-read in Phase 4/5 make the skill compaction-resilient: every layer is durable the moment its gate clears.

Check for an existing draft directory at `{{PROJECT_DIR}}/.codearbiter/.decompose-draft/`.

**If it exists with `_session.md` and one or more `layer-N-*.md` files — Resume mode:**

  • Read `_session.md` and every `layer-*.md` present. Read every `{{PROJECT_DIR}}/.codearbiter/decisions/*.md` with `status: draft` (prior-session draft ADRs to carry forward).
  • Present a numbered summary: prior-session timestamp, captured layers by name, count of DRAFT ADRs.
  • Ask the user to choose: **(a) Resume** — continue from the next unfinished layer, treating captured layers as solid; **(b) Restart** — delete the draft directory and every `status: draft` ADR, begin fresh; **(c) Abort** — exit the skill, leave draft directory and DRAFT ADRs intact.
  • On Resume: re-establish each captured layer as solid, then enter Phase 3 at the next unfinished layer. On Restart: delete `.decompose-draft/` and every DRAFT ADR, then fresh-init below. On Abort: exit cleanly; never silently delete.

**If no draft directory exists (or after Restart) — fresh init:**

  • Create `{{PROJECT_DIR}}/.codearbiter/.decompose-draft/`.
  • Write `_session.md` recording the ISO-8601 start timestamp, the invoking identity (`git config user.email`), `Status: in-progress`, and a note that this directory is session state, auto-deleted on Phase 6 completion, and that re-invoking `/decompose` after interruption enters Resume mode.
  • Ensure `.codearbiter/.decompose-draft/` is gitignored — append the entry to `{{PROJECT_DIR}}/.gitignore` if absent.

Then ask the first Layer 1 question to open the interview:

> "Describe your solution vision in your own words. What problem does it solve, and for whom?"

Gate: Phase 3 does not begin until either (a) the draft directory exists with `_session.md` and is otherwise empty (fresh start), or (b) prior layers are replayed and the user explicitly chose Resume.

Phase 3 — Layered interview · gate: BLOCK

Run

Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withcodearbiter

When you can't trust yourself with your code base, trust Arbiter.

Get the whole plugin, auto-invoked
Stats
138
Stars
0
Views
7
Forks
Active
Maintenance
Python
Language
AGPL-3.0
License
6h ago
Last commit
2mo ago
Created

Repo: arbiterForge/codeArbiter

Other skills on codearbiter.