Skip to content

spike

Exploratory spike on a throwaway branch — answer a named question with disposable code. Never merges; exits to a findings note or /ca:feature.

This is the outlet for “I need to write code to find out” rather than “I know what to build.” The work happens on a disposable branch with none of the usual process overhead — no plan, no test-first discipline, no review fleet — because the code itself is never meant to survive. What survives is the answer: once the question is settled (or the timebox runs out without one), the finding gets written down as a short note and the branch is deleted. If the answer turns out to justify building the real thing, that’s a fresh /ca:feature request that treats the spike as reference material, not as a starting diff.

/ca:spike <question to answer> [timebox]

State the question the exploration needs to answer; an optional timebox overrides the one-session default.

> /ca:spike can we stream large CSV exports without loading the whole file into memory? 2 hours
Question: can a 500MB export stream to the client without a full in-memory buffer?
Timebox: 2 hours. Confirm? (y/n)
> y
Branch spike/streaming-csv-export created.
[exploration — no plan, no tdd, no review]
Timebox reached. Answer: yes, a Node stream + res.write() loop holds memory flat at ~40MB regardless
of file size; the current buffer-then-send path is the only blocker.
Findings written to .codearbiter/spikes/streaming-csv-export.md.
Branch spike/streaming-csv-export deleted.

Reach for /ca:spike when you don’t yet know if an approach works. Once you do, hand the findings to /ca:feature — the implementation is written fresh, test-first, never copied from the spike branch.

GateWhenEffect
named questionbefore the branch is createda spike must restate the request as a falsifiable question plus a timebox, and you confirm it before any code is written
no merge, everfor the lifetime of the spike branchthe branch can only end in a findings file and deletion — it is never PR’d or merged
security floorthroughout explorationno secret leaves the approved store and no irreversible operation runs, even on disposable code
Source — plugins/ca/commands/spike.md (v2.9.1)
---
description: Exploratory spike on a throwaway branch — answer a named question with disposable code. Never merges; exits to a findings note or /ca:feature.
argument-hint: "<question to answer> [timebox]"
---
# /ca:spike — exploratory spike
The sanctioned lane for "I need to write code to find out." Spike code is disposable by contract:
it never merges, never PRs, and never becomes the implementation. What survives a spike is the
*answer*, written down — the code is burned.
## Flow
1. **Name the question** — a spike without a falsifiable question is just freelancing. Restate
`$ARGUMENTS` as the question the spike answers and the timebox (default: one session). STOP for
the user's confirmation.
2. **Branch** — create `spike/<slug>` from the current branch. All spike work stays on it.
3. **Explore** — no `tdd`, no plan, no review fleet. Two rules survive even here: no secret leaves
the approved store, and no irreversible operation (prod data, destructive migration) runs from a
spike.
4. **Exit — exactly one of:**
- **Answered** → write the findings to `${CLAUDE_PROJECT_DIR}/.codearbiter/spikes/<slug>.md`
(the question, what was tried, the answer, what it implies), then delete the branch. If the
answer warrants building, hand the findings to `/ca:feature` — the spike file seeds
`brainstorming`; the spike code is reference material, never the implementation.
- **Timebox expired, no answer** → record that too (a dead end is a finding), delete the branch.
## Hard gate
MUST NOT merge or PR a `spike/*` branch — its only exits are a findings file and deletion. MUST NOT
copy spike code into an implementation branch wholesale; implementation re-enters through
`/ca:feature` and `tdd`. Secret-handling and irreversibility rules hold even in a spike. Commits on
a `spike/*` branch are exempt from `commit-gate` — the exemption is safe precisely because nothing
on the branch can ever land.
## When NOT to use
- You already know what to build → `/ca:feature`.
- Diagnosing a defect → `/ca:debug` (investigation with a structured exit).
- A question answerable by reading code or docs → `/ca:btw`.

View in repo