build
Skill86 starsChanged 4 months agoMITView on GitHub
Rigorous build process with worktree isolation, structured phases, quality gates, layered testing, observability, and self-improvement. Use for any substantial build task. Structurally enforced via stop hook.
- Sends data out
169 other projects use a version of this.
Adopted by
Most recently taken up by
- IntelRealSense/librealsensetheir own version, first seen Nov 16, 2026
- realsenseai/librealsensetheir own version, first seen Nov 16, 2026
- mannobeats/hyper-tastetheir own version, first seen Nov 16, 2026
- jayden-dang/skillstheir own version, first seen Nov 16, 2026
- colinc86/glosstheir own version, first seen Nov 16, 2026
- wald21x6-ops/builder-kittheir own version, first seen Nov 16, 2026
Used with
Projects with it also use backprop, finances and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JuliusBrusseeSkillbackprop
Bug → spec protocol. When a bug is found or a test fails, trace the cause, decide whether a new §V invariant would catch recurrence, append to §B. This is the one non-obvious thing SDD does that plan-then-execute doesn't. Triggers on test failure, bug report, post-mortem, or explicit user ask.
Also in 4 projects that use this
GerardoRdz96Skillfinances
Use when Gera talks about his money — logging an expense ("I spent X on Y"), checking where he stands this pay-period, closing a period, planning debt payoff, onboarding his financial picture, or asking for budgeting/finance opinions. Servy's financial brain. Triggers — "I spent", "log this expense", "where am I this period", "close the period", "how's my budget", "debt plan", "should I pay off", "finances onboard", "/finances".
Also in 3 projects that use this
cpiprintSkillfavicon
Generate favicons from a source image
Also in 3 projects that use this
madeehahassanSkillGo-Live
Pre-launch checklist. Use before making any app public, sharing a link externally, or announcing a product launch. Adapts to Claude Code, claude.ai, and Cowork.
Also in 3 projects that use this
TrevokeSkilldefine
Use when a new feature request, bug report, or work request needs requirements defined before implementation
Also in 3 projects that use this
HAR5HA-7663Skillshape
Plan the UX and UI for a feature before writing code. Runs a structured discovery interview, then produces a design brief that guides implementation. Use during the planning phase to establish design direction, constraints, and strategy before any code is written.
Also in 6 projects that use this
Other versions169 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 169
- FalkorDB/FalkorDB★ 11ksame name
- realsenseai/librealsense★ 9.1ksame name
- IntelRealSense/librealsense★ 9.1ksame name
- microsoft/microsoft-ui-xaml★ 8.6ksame name
- NexaAI/nexa-sdk★ 8.5ksame name
- hathach/tinyusb★ 7.3ksame name
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- pytorch/TensorRT★ 3ksame name
159 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- autonomousSkill
- instar-projectSkill
- secret-setupSkill
- setup-wizardSkill
- test-as-selfSkill
- agent-identitySkill
- agent-memorySkill
- agent-passportSkill
- agent-readinessSkill
- command-guardSkill
- credential-leak-detectorSkill
- instar-devSkill
- instar-feedbackSkill
- instar-identitySkill
- instar-schedulerSkill
- instar-sessionSkill
- instar-telegramSkill
- iterative-converging-auditSkill
- knowledge-baseSkill
- smart-web-fetchSkill
- spec-convergeSkill
- systematic-debuggingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 15 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 155 edited versions we read keep these.
15
Distinctive
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 32
Model routing: Use Opus for all coding, testing, architecture, and verification.
- Distinctive: line 38
ALL build work MUST happen in an isolated git worktree.
- Distinctive: line 47
All subsequent work happens in that directory
- Very specific: line 49
CRITICAL: After creating the worktree, cd into it:
- Distinctive: line 54
All code changes, tests, and builds happen here.
- Distinctive: line 98
If weighted score > 0.20: Ask ONE clarifying question targeting the weakest dimension.
- Distinctive: line 104
Before planning HOW, state WHAT must be observably true.
- Very specific: line 106
Write a must_haves block to .instar/state/build/must-haves.md:
- Distinctive: line 135
Quality Gate: must-haves.md exists before Phase 1.
- Very specific: line 145
Write the plan to .instar/state/build/plan.md.
- Distinctive: line 163
Write the code (in the worktree)
- Distinctive: line 164
Write tests IMMEDIATELY — unit + integration as appropriate
- Very specific: line 165
Run tests: npm test or equivalent
- Distinctive: line 166
Run FULL test suite to catch regressions
- Distinctive: line 177
Never add a found problem to the task list silently, and never draft a spec or audit for a non-blocking one inside this run.
- Distinctive: line 193
Commit per-task, not in one mega-commit at the end.
- Distinctive: line 215
Real-world test: If runtime, build and test actual endpoints
- Distinctive: line 217
Zero-failure gate: Must pass the Zero-Failure Standard
- Distinctive: line 219
If verification fails: transition to fixing, max 3 cycles.
- Very specific: line 326
If resumable: load state, re-read plan, cd into worktree if it exists, run full test suite, continue.
“Common” is measured: kept by at least 6 in 10 of the 155 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/build — Rigorous Build Skill
Structure > Willpower. The pipeline won't let you skip the parts that matter. ALL development happens in an isolated worktree — zero conflict with other work.
When to use: Any task that's more than a quick fix. Multiple files, needs tests, or would benefit from a plan. When NOT to use: Single-file edits, config changes, quick lookups. Suggest to user when: They describe a substantial feature, say "build", "implement", "create", or scope a multi-step task.
Step 1: Initialize Build (MANDATORY)
python3 playbook-scripts/build-state.py init "TASK DESCRIPTION" --size SMALL|STANDARD|LARGESize determines protection level:
- SMALL (light): 3 stop-hook reinforcements, basic observability
- STANDARD (medium): 5 reinforcements, full observability + review
- LARGE (heavy): 10 reinforcements, full observability + multi-agent review
<!-- FRACTAL_8020_TRIAGE (CMT-917) -->Pick the size by the change, not by habit: SMALL = reversible and narrow (a revert fully undoes it): short plan, one review pass, targeted tests. LARGE = irreversible, fleet-wide, or security-sensitive. Everything else is STANDARD. Apply fractal 80/20 at every level: stop refining when the next pass would not change what gets built.
Model routing: Use Opus for all coding, testing, architecture, and verification. Haiku only for quick file searches.
Step 2: Create Worktree (MANDATORY)
ALL build work MUST happen in an isolated git worktree. This prevents conflicts with other development:
python3 playbook-scripts/build-state.py worktree-createThis creates:
- A new branch (
build/<task-slug>) from your current branch - A worktree at
.instar/worktrees/build-<task-slug>/ - All subsequent work happens in that directory
CRITICAL: After creating the worktree, cd into it:
cd .instar/worktrees/build-<task-slug>/All code changes, tests, and builds happen here. The main working directory is untouched.
Step 3: Register Stop Hook
The stop hook STRUCTURALLY PREVENTS exit until the build completes:
python3 -c "
import json
with open('.claude/settings.json') as f:
s = json.load(f)
hooks = s.setdefault('hooks', {}).setdefault('Stop', [])
if not any('build-stop-hook' in str(h) for h in hooks):
hooks.append({'matcher': '', 'hooks': [{'type': 'command', 'command': 'bash \"\${CLAUDE_PROJECT_DIR}/.instar/hooks/instar/build-stop-hook.sh\"', 'timeout': 10000}]})
with open('.claude/settings.json', 'w') as f:
json.dump(s, f, indent=2)
print('Build stop hook registered')
"The Pipeline
Phase 0: CLARIFY (optional) Score ambiguity, ask questions
Phase 0.5: MUST-HAVES Goal-backward truths + artifacts + key_links (+ STRIDE on LARGE)
Phase 1: PLAN Architecture + test strategy
Phase 2: EXECUTE Build incrementally with tests + atomic per-task commits
Phase 3: VERIFY Independent review + real-world testing
Phase 4: HARDEN Observability + self-improvement
Phase 5: COMPLETE Merge worktree, deploy, capture learnings + SUMMARY deviationsAdvance phases with: python3 playbook-scripts/build-state.py transition <phase> --evidence "reason"
Phase 0: CLARIFY (skip if task is clear)
Score ambiguity across 5 dimensions (scope 30%, requirements 25%, architecture 20%, success criteria 15%, dependencies 10%).
If weighted score > 0.20: Ask ONE clarifying question targeting the weakest dimension.
Phase 0.5: MUST-HAVES (goal-backward) — cherry-picked from GSD planner
Before planning HOW, state WHAT must be observably true. Goal-backward beats jumping straight to a task list — it surfaces the verification gates and the wiring checks that ad-hoc planning forgets.
Write a must_haves block to .instar/state/build/must-haves.md:
## Truths (observable, from the consumer's perspective)
- "<thing that must be TRUE when this is done — e.g. GET /x returns 200 with real data, not 503>"
- "<another truth — e.g. component Y is constructed AND started in the boot path>"
## Artifacts (what must exist + be substantive + be wired)
- path: src/... provides: "<what>" contains: "<grep-able signature>"
## Key links (the WIRED check — grep patterns proving real wiring, not just file existence)
- from: src/server/routes.ts to: src/server/xRoutes.ts via: "createXRoutes mounted" pattern: "createXRoutes"
- from: src/commands/server.ts to: src/core/X.ts via: "new X(...) constructed at boot" pattern: "new X"Each truth becomes a Phase 3 verification gate. Each key_link's grep pattern becomes the WIRED check (run /verify-claim against it). This is what prevents shipping a component that compiles + passes unit tests but is never instantiated (the dead-code failure).
STRIDE threat pass (LARGE builds only; optional for STANDARD)
For LARGE builds, also enumerate threats. Output a small register to .instar/state/build/threats.md:
| ID | STRIDE category | Threat | Mitigation | Bound test |
|----|-----------------|--------|------------|-----------|
| T-01 | Information disclosure | <e.g. diagnostics endpoint leaks raw user content> | <allowlist filter> | tests/.../x-pii.test.ts |STRIDE = Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege. Most rows for a given build are empty — that's fine; the value is the one or two real threats it surfaces. Each mitigation binds to a specific test (no hand-waving). Skip the table entirely for SMALL builds.
Quality Gate: must-haves.md exists before Phase 1. On LARGE, threats.md exists too.
Phase 1: PLAN
- Architecture: Where does this live? What patterns to follow?
- Test Strategy (MANDATORY): Define unit/integration/e2e tests BEFORE writing code
- Incremental Steps: Each step produces working, testable code
Write the plan to .instar/state/build/plan.md.
Quality Gate: Plan MUST have test strategy. No plan = no execution.
Phase 2: EXECUTE (in worktree)
The core build loop. For EACH step in the plan:
Write Code -> Write Tests -> Run Tests -> Fix -> Verify Full Suite
^ |
+------------ (if failing) -----------+Per-step discipline:
- Write the code (in the worktree)
- Write tests IMMEDIATELY — unit + integration as appropriate
- Run tests:
npm testor equivalent - Run FULL test suite to catch regressions
- Record:
python3 playbook-scripts/build-state.py step-complete N "Description" TESTS PASSING
Found problems: triage, never accrete
Finding problems along the way is good. Triage each one on the spot; only the first kind joins this work:
- Blocks the current work? Fix it now.
- A major issue (broken for users, a safety/security/data-loss risk, or more than about a day of work)? Spin it off: a new topic with its own session (dashboard New Session, or
POST /sessions/create) whose brief starts an/autonomousrun to complete it under these same 80/20 + triage rules; tell the operator in one line. - Everything else → a queue, and say which: an instar defect or improvement → the feedback queue (
/feedback); an improvement to this agent's own process → the evolution queue (/commit-action).
Never add a found problem to the task list silently, and never draft a spec or audit for a non-blocking one inside this run.
Testing layers (non-negotiable):
| Layer | Tests | When |
Unit (tests/unit/) | Individual functions, edge cases | Every new function |
Integration (tests/integration/) | Components together, HTTP pipeline | After each component |
E2E (tests/e2e/) | Feature alive in production path | After all components |
NEVER move to the next step with failing tests.
Max 3 fix cycles per step before escalation.
Atomic-commit discipline (cherry-picked from GSD executor)
Commit per-task, not in one mega-commit at the end. A single 3000-line commit is unreviewable; per-task commits give a readable history and a clean revert surface.
- One commit per plan step once its tests pass — not one commit for the whole build.
- Stage specific files by name —
git add src/x.ts tests/unit/x.test.ts. NEVERgit add -A/git add .(sweeps in unrelated WIP, secrets, build residue). - Commit-message format:
{type}({scope}): {summary}— e.g.feat(topic-intent): add EvidenceEvent projection. Types: feat / fix / refactor / test / docs / chore. - Verify no accidental deletions:
git diff --diff-filter=D HEAD~1 HEADafter each commit. - Track each commit's short SHA for the Phase 5 SUMMARY.
Phase 3: VERIFY
Verification scaled by size:
SMALL: Spawn one Explore agent for fresh-eyes code review.
STANDARD: Spawn 3 parallel review agents (correctness, gaps, untested paths).
LARGE: Spawn 5+ review agents covering security, architecture, scalability, and correctness.
For all sizes:
- Real-world test: If runtime, build and test actual endpoints
- Regression sweep: Full test suite (
npm run test:all), compare counts - Zero-failure gate: Must pass the Zero-Failure Standard
If verification fails: transition to fixing, max 3 cycles.
Phase 4: HARDEN
Scaled by size:
SMALL: Error handling + basic logging
- Errors surface (not swallowed)
- Basic logging for debugging
STANDARD: Above + health check + structured logs
- Health/status endpoint or check
- Structured logging
- Can trace what happened on failure
LARGE: Above + audit trail + failure patterns + self-improvement
- Audit log (JSONL) recording significant events
- Failure pattern detection
- Effectiveness scoring
- Queryable audit trail
Phase 5: COMPLETE
- Final test run — Full suite in worktree:
npm run test:all - Write SUMMARY.md with tracked deviations (cherry-picked from GSD executor) — before merging, write
.instar/state/build/SUMMARY.md:
## What shipped
- <one line per plan step + its commit SHA>
## Deviations from plan (categorized)
- [Rule 1 - auto-fixed bug] <what + why>
- [Rule 2 - added critical missing functionality] <what + why — e.g. atomic-write, input validation>
- [Rule 3 - auto-fixed blocking issue] <what>
- [Rule 4 - architectural decision deferred/changed] <what + whether it needs user confirmation>
## Found problems (triage)
- <problem> → fixed here (blocked the work) / spun off to topic <id> / queued in <feedback|evolution queue>
## Proportion
- Size <SMALL|STANDARD|LARGE>, <files>/<LOC>; review passes <n>; commit/gate attempts <n>. Flag in one line if out of line with the size (signal only).
## Must-haves verification (from Phase 0.5)
- <each truth> → VERIFIED / HOLLOW / ORPHANED (run /verify-claim per key_link)
## Deferred (with backing infrastructure, NOT orphan TODOs)
- <item> → tracked via <scheduled job / commit-action / same-branch follow-up>The deviation log is the antidote to "I changed a bunch of stuff during the build and don't remember what diverged from the plan." Empty sections are fine; the discipline is enumerating, not padding.
- Merge worktree — commit any remaining changes with atomic per-file staging (NEVER
git add -A), then merge back:
# In worktree: stage specific files, commit with {type}({scope}): {summary}
git add <specific files>
git commit -m "feat(scope): final integration"
# Back in main directory
cd /path/to/project
python3 playbook-scripts/build-state.py worktree-merge
python3 playbook-scripts/build-state.py worktree-cleanup- Build & verify —
npm run buildfrom main directory, verify zero errors - Capture learnings — Write to MEMORY.md if significant
- Generate report:
python3 playbook-scripts/build-state.py report
python3 playbook-scripts/build-state.py complete- Remove stop hook:
python3 -c "
import json
with open('.claude/settings.json') as f:
s = json.load(f)
s['hooks']['Stop'] = [h for h in s.get('hooks',{}).get('Stop',[]) if 'build-stop-hook' not in str(h)]
with open('.claude/settings.json', 'w') as f:
json.dump(s, f, indent=2)
print('Build stop hook removed')
"- Upstream if valuable — If this build created something generalizable:
curl -s -X POST http://localhost:PORT/feedback \
-H 'Content-Type: application/json' \
-d '{"type":"improvement","title":"TITLE","description":"WHAT_WAS_BUILT_AND_WHY"}'Resume After Session Death
python3 playbook-scripts/build-state.py resumeIf resumable: load state, re-read plan, cd into worktree if it exists, run full test suite, continue.
Worktree Lifecycle
| Command | What it does |
worktree-create | Creates branch + worktree for isolated development |
worktree-merge | Merges build branch back to source |
worktree-cleanup | Removes worktree and optionally deletes branch |
status | Shows worktree info if active |
Why worktrees? Multiple builds can run in parallel. Each gets its own branch and directory. No merge conflicts during development. Changes only merge back when the build is verified and complete.
When to Suggest /build
You should proactively suggest /build when:
- User says "build", "implement", "create", or describes a multi-file feature
- Task will touch 3+ files
- Task needs tests (most non-trivial tasks do)
- User describes something that would benefit from a plan
How to suggest: "This looks like a substantial task. I can use /build to work through it with a structured pipeline — planning, testing at every step, independent verification, and worktree isolation so nothing conflicts with your other work. Want me to use that?"
Philosophy
Structure > Willpower. The pipeline won't let you skip testing, verification, or hardening. The worktree won't let you pollute the main branch. The stop hook won't let you quit mid-build. These aren't restrictions — they're how quality becomes automatic.
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.

