agentleFS
abipalliabipalli/agent-skills/skills/stage-spike/SKILL.md

stage-spike

Skill1 starsChanged 18 days agoApache-2.0View on GitHub

Pipeline stage 2b: run scoping spikes in throwaway worktrees and record what they showed. Loaded by a pipeline conductor such as feature-pipeline.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before a side_effects spike starts, ask a person.

    line 31
  2. Very specific:

    When the spike reports, record its result, then remove the worktree and branch (git worktree remove --force, then git branch -D).

    line 54
  3. Distinctive:

    Prefer a probe whose result cannot be an artifact of the probe itself.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

stage-spike

This stage runs only after scope returns spike. Record the results as the spike stage record, then rerun scope with them.

A spike turns a guess into evidence before anyone builds on it. Examples: "is this check enforced in that environment?", "does this SDK version parse that service's responses?", "does the deploy work with separate keys per role?". A spike answers one question and is then thrown away. Its result goes into the brief; its code never lands.

1. Sort each spike by class

The scope record gives each spike a class. Check it against the experiment, because the class decides who runs the spike and whether a person must approve it first. When unsure, take the stricter class.

ClassWhat it doesRunnerApproval
read_onlyreads code, docs, service state or API answers; sends nothingscopernone
localwrites or runs code on this machine: a script, a test, a local environmentbuilder in a throwaway worktreenone
side_effectsspends money or touches anything shared: cloud resources, shared environments, posts, pushesbuilder, once approveda person first

Before a side_effects spike starts, ask a person. Interactively, use AskUserQuestion; otherwise pause the run with hook.waiting. The question says:

  • what the spike creates or sends;
  • what it costs;
  • how it is cleaned up;
  • the cheaper alternative, if there is one.

The options are run, skip (recorded as not run) and run cheaper (with notes). Without a run, the spike does not run.

2. Throwaway worktrees

A local or side_effects spike gets its own worktree off the base branch:

git -C <checkout> worktree add <lanes_dir>/<run_id>-spike-<spike_id> -b spike/<run_id>/<spike_id> <base>
  • The builder works only there and never pushes. It commits only if the spike needs a commit to run.
  • Nothing from a spike worktree feeds the build stage. Builders start again from the base branch, so spike shortcuts cannot leak into the PR.
  • When the spike reports, record its result, then remove the worktree and branch (git worktree remove --force, then git branch -D). Keep them only if a person asked to, and list them in cleanup.
  • Tear down any cloud resource a spike created in this same stage, and record the teardown. A spike that cannot clean up stops the run for a person.

3. Dispatch

Send independent spikes at the same time. Each request carries only the spike's contract:

  • the assumption;
  • the experiment;
  • the pass and fail signals;
  • the timebox;
  • the worktree path.

The runner reports one JSON block:

{"spike_id": "", "result": "pass|fail|inconclusive", "observed": "", "evidence": [], "minutes": 0}

Prefer a probe whose result cannot be an artifact of the probe itself. A simulated write is not the write: a dry-run call can fail or succeed for reasons the real operation would not. When a probe could mislead that way, use a local run instead.

A spike that hits its timebox stops and reports inconclusive with what it saw. It does not keep digging. The point is a cheap answer, and an expensive one belongs in the scoped work or with a person.

4. Hand back to scope

Send all the results to the same scoper session and rerun scope. The rerun must pick proceed, rescoped, need_more_information or defer. It may not return spike again: one round only, so a run cannot loop on spikes. An inconclusive result becomes a need_more_information question or a defer, not a second spike.

Record

{"spike": {"status": "ok", "verdict": "validated", "summary": "", "reasoning": "",
  "spikes": [
    {"spike_id": "", "assumption": "", "class": "read_only|local|side_effects",
     "runner": "scoper|builder", "approval": "not_needed|approved|skipped",
     "worktree": "", "result": "pass|fail|inconclusive|not_run",
     "observed": "", "evidence": [], "minutes": 0}
  ],
  "cleanup": [{"what": "worktree|branch|cloud", "ref": "", "done": true}],
  "next": "scope"}}

Verdicts:

  • validated: every spike reported pass or fail.
  • partially_validated: any spike is inconclusive or not_run. Name those in reasoning.
  • failed: the stage could not run.

Also copy each spike's class into scope.spikes, so fp approve can see whether any spike had side effects.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.