swe-shape
Skill2 starsChanged 6 months agoMITView on GitHub
Turn a software change idea into a concise, repository-grounded product brief. Use before designing or implementing non-trivial features, fixes, refactors, or migrations.
In this repository10 other files it gives its agents.
- gitSkill
- handoff-sessionSkill
- html-artifactsSkill
- prompt-writerSkill
- swe-executeSkill
- swe-planSkill
- swe-researchSkill
- swe-reviewSkill
- swe-specSkill
- swe-worktreeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Inspect before interviewing: Read the smallest useful set of repository guidance, product documentation, relevant source, tests, and …
- Distinctive: line 55
Interview selectively: Ask the smallest set of questions that can change scope, acceptance criteria, feasibility, or risk.
- Distinctive: line 70
When shaping exposes a factual unknown:
- Very specific: line 72
check RESEARCH_DIR first — the answer may already be there from an earlier change.
- Very specific: line 73
run swe-research with sub-agents when the question is clear, bounded, safe, and answerable through repository inspection, public …
- Distinctive: line 76
Ask the user directly when evidence cannot choose between valid outcomes.
- Distinctive: line 81
Use research findings as evidence, and inspect the saved artifacts when a conclusion depends on observed payloads, experiments, or impact …
- Distinctive: line 82
Prefer official documentation, standards, schemas, or dependency source for external claims.
- Distinctive: line 83
Treat missing evidence as unknown, not as proof.
- Very specific: line 85
Stop broad inline reading once the feasibility decision can be supported.
- Very specific: line 89
Read repository files, run read-only inspection, and delegate bounded research without asking.
- Distinctive: line 91
Ask first when an investigation is authenticated, paid, mutating, destructive, rate-sensitive, unusually broad, or when framing the …
- Distinctive: line 93
Never modify source code, and never invoke another SWE pipeline stage — recommend the next one instead.
- Distinctive: line 97
Do not design: no components, APIs, DTOs, schemas, interfaces, file structure, or chosen mechanisms.
- Distinctive: line 98
Do not turn every user statement into a requirement.
- Very specific: line 105
Write BRIEF_FILE, then report:
- Distinctive: line 116
Every statement passes the rewritten-from-scratch test.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Pipeline
swe-shape → swe-spec → [swe-plan] → [swe-worktree] → swe-execute → swe-review, with swe-research available at any point.
Each stage runs in its own session: the user invokes one skill, reviews the artifact, clears the context, then invokes the next with the artifacts as input. Assume no memory of other stages beyond the files named below.
- This stage: decide whether the idea is worth building and what it must achieve.
- Reads: the user's idea, the repository, and the shared research corpus.
- Writes:
brief.md. - Next: the user runs
swe-specto decide what actually changes.
Purpose
Determine whether a proposed change is worth building, what outcome it must produce, and whether it is feasible in this repository. Produce a brief — not a design, at any level of detail.
Inputs
CHANGE_DIR: .swe/YYYY-MM-DD-<slug>/ — create it for this change unless the conversation already names one.
BRIEF_FILE: {CHANGE_DIR}/brief.md, written from brief.template.md.
RESEARCH_DIR: .swe/research/ — shared across all changes, indexed by INDEX.md.
What Belongs in a Brief
A brief answers why, and how will we know it worked. It never says how the change is built.
The working test: every statement in the brief must still be true if the codebase were rewritten from scratch in a different language. If a statement would change because the implementation changed, it belongs to the next stage.
- "p95 under 300ms" belongs. "Response cached in Redis with a 60s TTL" does not.
- "Must not break the v1 API contract" belongs. "The v1 adapter maps
footobar" does not. - "Must reuse the existing job queue" does not — that is a solution choice. If it is genuinely non-negotiable for an external reason, record the reason in Non-negotiables, not the mechanism.
Engineering Stance
You and the user are peers shaping this idea together; neither outranks the other, and being asked to put something in the brief is not authorization to record it unexamined.
- Evaluate every idea, requirement, or acceptance criterion against the evidence gathered, repository fit, and actual product/user value before it goes into the brief — do not transcribe a request just because it was asked.
- Actively look for a better outcome: a narrower scope that keeps most of the value, a different framing of the problem, an existing capability that already covers it, or a higher-value change the user didn't propose. Suggest it before being asked, not only once the user's version fails feasibility.
- When a request would produce a weaker, riskier, redundant, or lower-value outcome than an available alternative, or conflicts with evidence already gathered, say so plainly in the same pass: state the concern, the evidence or reasoning behind it, and the alternative you'd recommend, using
Narrow,Blocked, orStopfromDecision Ruleswhen it applies. Do not silently comply, and do not bury the objection as a footnote. - Raise it once, with your reasoning. Do not repeat an objection the user has already heard and decided on, and do not withhold the requested content while waiting for agreement.
- The user has the final call. Once they've heard the concern and confirm a direction, write the brief to that direction, record the decision and its rationale where a future reader needs it (a callout, not a silent overwrite of your objection), and move on without relitigating it.
- This does not license inventing scope the user never asked about and will not use, or turning
Interview selectively's narrow question budget into open-ended debate.
Workflow
- Inspect before interviewing. Read the smallest useful set of repository guidance, product documentation, relevant source, tests, and existing research reports. Do not ask what repository evidence or the research corpus already answers.
- Restate the problem. Separate the user's underlying problem and desired outcome from their suggested solution.
- Challenge the idea. Apply
Engineering Stance: test assumptions about users, current behaviour, value, scope, edge cases, and existing capabilities, and proactively propose a better outcome, narrower scope, or alternative approach wherever one exists — do not just validate what was asked. Surface any conflict with gathered evidence plainly, once, before it reaches the brief. - Check feasibility. Identify repository seams, conflicts, prerequisites, external dependencies, migration or compatibility concerns, and major unknowns. Resolve bounded factual unknowns through
Research delegation, then continue shaping from the evidence. - Interview selectively. Ask the smallest set of questions that can change scope, acceptance criteria, feasibility, or risk. Ask dependent questions one at a time. Offer 2–4 concrete options with a recommendation when meaningful.
- Assess. Choose a recommendation, rate complexity and risk, and name the main uncertainty. Do not invent calendar estimates.
- Write the brief, then stop. The human decides whether to revise, investigate, or continue.
Decision Rules
Recommendation
- Proceed: Evidence is sufficient and no known blocker invalidates the change.
- Narrow: A smaller outcome preserves most of the value while materially reducing risk or scope.
- Blocked: A required investigation was deferred, could not be run safely, or was inconclusive, and scope or feasibility cannot be decided without it. Record the concrete unresolved question. This is an abnormal outcome — research that can be run should be run, inline, during shaping.
- Stop: The change duplicates existing capability, conflicts with a hard constraint, lacks a coherent outcome, or is demonstrably infeasible.
Research delegation
When shaping exposes a factual unknown:
- check
RESEARCH_DIRfirst — the answer may already be there from an earlier change; - run
swe-researchwith sub-agents when the question is clear, bounded, safe, and answerable through repository inspection, public documentation, a read-only probe, or a disposable local experiment; - resume shaping from the report and link it in
## Research used.
Ask the user directly when evidence cannot choose between valid outcomes; research does not settle subjective product trade-offs.
Evidence Rules
- Cite repository claims with stable paths and symbols when they affect feasibility.
- Use research findings as evidence, and inspect the saved artifacts when a conclusion depends on observed payloads, experiments, or impact analysis.
- Prefer official documentation, standards, schemas, or dependency source for external claims.
- Treat missing evidence as unknown, not as proof.
- A research finding becomes product intent only once the brief incorporates it.
- Stop broad inline reading once the feasibility decision can be supported; delegate deeper or artifact-producing investigation to
swe-research.
Autonomy
Read repository files, run read-only inspection, and delegate bounded research without asking. Write only inside CHANGE_DIR and RESEARCH_DIR.
Ask first when an investigation is authenticated, paid, mutating, destructive, rate-sensitive, unusually broad, or when framing the question requires a product choice.
Never modify source code, and never invoke another SWE pipeline stage — recommend the next one instead.
Constraints
- Do not design: no components, APIs, DTOs, schemas, interfaces, file structure, or chosen mechanisms.
- Do not turn every user statement into a requirement.
- Acceptance criteria are the single home for required behaviour; do not restate the same outcome as a requirement, an example, and a success criterion.
- Keep the brief proportional to the change and free of padding — restated requirements, narrative, or examples that don't add a decision — but do not compress a genuinely complex change to fit an arbitrary length. Length follows scope, not a fixed limit; narrow or split the change itself if it is genuinely too large to reason about as one brief.
- Record unresolved decisions only for
BlockedorStop. Otherwise resolve them in the interview or drop them as non-blocking follow-up.
Output
Write BRIEF_FILE, then report:
- change directory;
- recommendation and main uncertainty;
- research created or reused;
- next skill (
swe-specunless the recommendation isBlockedorStop), and whether a blocking decision remains.
Completion Criteria
- The recommendation is supported by evidence proportionate to its risk.
- Problem, outcome, acceptance criteria, exclusions, and feasibility are clear enough for that recommendation.
- Every statement passes the rewritten-from-scratch test.
- Any idea, requirement, or acceptance criterion that conflicted with gathered evidence, repository fit, or a better available outcome was raised once with reasoning before being written in, and the brief reflects the user's decision either way.
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
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.

