GentBajko/capstone / skills/core
core
VerifiedInternal to the capstone suite - carries the shared rules (references/) and scripts every capstone subcommand reads; it exists so npx-skills installs ship them alongside the command skills. Not meant to be invoked directly; when invoked anyway, run references/../scripts/help.sh and output its stdout verbatim.
references/protocols/build.md
View on GitHub# build - implementation research, then working code
**Reads:** config → `build-interview.md` (resume) → the ledger's
`stack/all`, `readback/all` and `architecture/all` keys → the index
and chapters → `logic/`, `mockup/`, `uiux/`, `standards.md` (Phase A
only, to copy its constraints into the plan),
`../code-craft.md` → the stack chapter → the existing
`implementation.md` (resume).
The last stage: turns the whole reference into running code, backend
first, then frontend. With `implement`, one of the **two commands
allowed to write source code** (core.md hard rule 2), and only after
its plan gate.
**Entry gate:** apply [Execution choice](../core.md#execution-choice)
before prerequisite stages, research or resumed work. Inherit the
current `start` run's explicit answer; a stage entered directly as
`start build` always asks and waits, including a resume. Record the chosen
`execution: subagent | inline` in `build-interview.md`'s frontmatter
(Phase A creates the file); a saved value never skips the entry gate.
State: `docs/capstone/build-interview.md`, created when Phase A starts
with `status: interviewing` and the recorded `execution` (standard
lifecycle per core.md; `formalized` here means every build-order step
is checked). `build` asks no interview questions, so the file holds no
`### Q<n>` and its ledger keys carry the run's commit stamp as `<rev>`.
Plan output: `docs/capstone/implementation.md` (companion, indexed).
Prerequisites: execute `protocols/stack.md` first when the `stack/all`
key is absent or the capability matrix is incomplete, either one
alone; an architecture-stage draft alone is not enough. The capability
matrix is complete when the `stack/all` key exists and every
capability row in `05-dependencies.md` has a pick, a no-dependency
decision, a "not needed" ruling, or an open or deferred marker. A
directly entered `start build` then runs the readback pass
(`protocols/start.md` step 7) first when no `readback/all@<stamp>` key
matches the current outputs.
**Resume:** if `implementation.md` exists and the interview records
plan approval (`plan_approved: true` in its frontmatter, set at the
gate), skip straight to Phase C and continue from the first unchecked
build-order step; never re-present an approved plan, never restart a
checked step.
## Phase A - implementation research
Create `build-interview.md` if it does not exist (State above). Read
everything: the index and chapters, `docs/capstone/logic/`,
`docs/capstone/mockup/`, `docs/capstone/uiux/`,
`docs/capstone/standards.md`, and the stack chapter. Research (web
search when available) how the chosen pieces actually connect:
scaffold conventions for the chosen framework, integration patterns
between the picks (auth ↔ framework, ORM ↔ database, deploy target),
official quickstarts for anything unfamiliar. Then write
`docs/capstone/implementation.md`:
- **Global constraints**, copied verbatim from `standards.md` and the
stack chapter (version floors, naming rules, banned patterns), at
the top of the file. Phase C writes code without `standards.md` in
front of it, so a rule not copied here binds nothing.
- The module/file layout to create: backend tree, then frontend tree.
- Per component: what it does, its key files, and real code sketches
for the load-bearing seams (the wiring, not the boilerplate),
commented only where `../code-craft.md`'s Comments section earns it.
- How components connect (interfaces, calls, events), each traceable
to the architecture chapters that decided it.
- Build order: the walking-skeleton slice first (read from the
architecture chapters where they record it, otherwise from the
`architecture/all@...` ledger entry), then backend capabilities in
the order of `mockup/README.md`'s Scenarios table, then frontend
screens in mockup order, each
implementing its `uiux/screens/` chapter and
`uiux/02-system.md`'s Implementation constraints, which carry
`../uiux-craft.md` §8's build-time checklist. Each step is a
`- [ ]` checkbox line, checked in Phase C.
- Per step: how to verify it works before moving on.
- **Coverage**, the closing section: a table mapping every `logic/`
scenario, every `mockup/` and `uiux/screens/` screen, and every
component in the index's module map to the build-order step that
implements it. Anything deliberately excluded gets a row naming the
recorded decision that excludes it. A row with no step is a gap in
the plan; fix the plan, never the table.
Every code decision follows `standards.md`, and every plan step and
line of code obeys `../code-craft.md` (TDD + YAGNI, earned
interfaces, its Comments section, and its Git section for every
branch and commit this stage makes; standards wins on conflict): the
layout and sketches carry no layer, file, abstraction, or comment the
ladder didn't earn.
**Review, then re-review.** A drafted `implementation.md` is not
presentable until it survives full passes of this check, repeated
until a pass finds nothing to fix:
1. Re-open the source lists fresh (the index's module map, `logic/`'s
scenario list, the `mockup/` and `uiux/screens/` file lists, the
stack chapter's picks) and walk the Coverage table against them:
every item has a step or a recorded exclusion.
2. Walk the build order: every step's dependencies (the components,
interfaces, and data it consumes) are produced by an earlier step;
the walking-skeleton slice is first; backend precedes the frontend
that calls it.
3. Every step carries its verification, and every load-bearing seam
its code sketch, checked against Phase A's research (the chosen
stack's real APIs, not remembered ones).
Fix what a pass finds, then run the next full pass; a pass that found
anything voids the ones before it. Skipping or thinning a scenario,
screen, or component because the plan "covers it implicitly" is a
gap, not a judgment call.
## Phase B - the gate
Set `status: awaiting-formalization`; present the plan summary
(layout, build order, the first slice, and the Coverage table's
totals: N scenarios, N screens, N components, all mapped). The gate
is a message question per core.md's Structured questions: the summary
and `implementation.md`'s path are the chat message, its last line
asks the user to approve the plan or change it, and the turn ends
there. The user approves before any code is written. Only an explicit
approval passes, and it covers the plan as presented: a reply that
changes a step is an amendment, so update `implementation.md` and
present the gate again (core.md's Structured questions). On approval,
append the
changelog entry per core.md's ledger, key `build/plan@<stamp>` with
the run's commit stamp as `<rev>`; record the approved module
layout, the build order starting with the walking-skeleton slice, and
the per-step verification method. Then record `plan_approved: true`
in the interview frontmatter; Phase C's coding sessions resume
against it.
## Phase C - write the code
Use the execution mode explicitly chosen at entry for this run.
Reaching the coding phase does not ask again or change that choice.
This phase reads `implementation.md` and `../code-craft.md`, and
never `standards.md`: Phase A already copied that file's constraints
into the plan's Global constraints section, and a session that
scaffolds, wires and debugs has no budget for seventeen domains
beside the work. Follow the copied constraints; when one of them is
wrong, stop and say so rather than reading around it: the user rules,
`implementation.md` is corrected, and a change to a step or a
constraint they approved goes back through Phase B's gate before
coding continues.
Then execute `implementation.md` directly: its build-order steps in
order, the walking-skeleton slice first, backend before the frontend
that calls it, verifying each step as the plan specifies before
starting the next. Commits follow `../code-craft.md`'s Git section,
one per step. A step's checkbox in `implementation.md` is checked when
its verification passes, one step at a time, never in a batch. The
walking-skeleton slice is the first milestone: report it when it
runs, and record nothing as done for it.
**Subagent mode** works exactly as `implement.md`'s Phase B describes
it: one subagent per build-order step, dispatched fresh and never in
parallel, with the step's full text, its code sketches, the verified
commands, `implementation.md`'s Global constraints, and
`../code-craft.md`'s ladder,
TDD scoping, Comments section, and Git section **copied into the
prompt** rather than referenced. Nothing else crosses into a
subagent's context, so a pointer to a file it will never open buys
nothing. The main session verifies each step's report before
dispatching the next.
**Inline mode** runs the same steps in this session, same order, same
verification, same commits.
**Brand assets**, once the step that scaffolds the frontend tree has
run and before the first screen is built:
1. Read `uiux/02-system.md`'s `## Assets` table. Every row whose
`Status` is `awaited` **stops the build**: list those rows, say
what each file is for, and ask for them. Never substitute a
placeholder for an awaited asset - the table records what the user
decided to supply, and shipping around it hides the gap in a
binary nobody re-reads.
2. Move each SVG from `docs/capstone/uiux/assets/` to its place in the
scaffolded tree (the framework's static or public directory,
whichever Phase A's research established), and rewrite that row's
`File` cell to the destination path, so the table keeps pointing at
the file rather than at where it used to live.
3. Rasterize from those SVG sources at that point: the favicon at the
sizes the framework's head expects, the app icon per platform
target, and `og.png`. The rasters are generated output in the
app's own tree: whether they are committed follows the app's
conventions, since core-authoring.md's Local-only outputs covers
only the copies under `uiux/assets/`. The SVGs stay the source of
record.
Either way, code lands in the repository's source tree (never under
the docs area). A coding session that ends with steps unchecked writes
no `build/code` entry; the next session resumes at the first unchecked
step. When every box is checked, append the changelog entry per
core.md's ledger, key `build/code@<stamp>` with the run's commit stamp
as `<rev>`; record the build-order steps, the source paths created,
the dependencies installed, and the divergences from
`implementation.md`. Then set `status: formalized`.
## After
Point the user at the `map` skill: as real code lands, refresh runs
flip the reference from prescriptive to observed, recording
divergences between the design and what was actually built.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |