breadboard-reflection/SKILL.md
# Breadboard Analysis Reflect on a breadboard by syncing it to the implementation, then finding and fixing design smells. Works on existing breadboards built with the `/breadboarding` skill. --- ## What a Breadboard Is A breadboard should be a legible explanation of how the system produces its effects. When you look at it, you should be able to account for every behavior — not just see that an effect happens, but understand *how* it happens through the wiring. When someone's mental model of
npx skillsauth add rjs/shaping-skills breadboard-reflectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reflect on a breadboard by syncing it to the implementation, then finding and fixing design smells. Works on existing breadboards built with the /breadboarding skill.
A breadboard should be a legible explanation of how the system produces its effects. When you look at it, you should be able to account for every behavior — not just see that an effect happens, but understand how it happens through the wiring.
When someone's mental model of how the system behaves doesn't match what the breadboard shows, either their model is wrong or the breadboard is incomplete. A smell is that gap — you expect to see work being done (data transformed, decisions made, state managed) and the breadboard doesn't show it. Each question that probes the gap ("what generates this data?", "where is this defined?", "who calls this?") is testing the mental model against the artifact.
The breadboard is complete when it can explain every behavior without hidden steps.
Reflection is a two-phase loop: SEE, then REFLECT. Always in this order.
The code is ground truth. The breadboard may have drifted or been built from a conceptual shape that doesn't match what was actually implemented. Before looking for design problems, make the breadboard accurate.
After Phase 1, the breadboard shows what IS, not what should be.
Phase 1 is preparation. Phase 2 is the point. Do not skip it.
Now that the breadboard is accurate, inspect it for design problems. The code's names might be wrong. The split of responsibilities might not be ideal. The wiring might reveal unnecessary coupling or missing abstractions. Walk through each of these concrete checks:
The loop: SEE what the code actually does → REFLECT on whether that design is right → fix the breadboard → optionally fix the code → repeat.
The code is ground truth. Read it before judging the breadboard.
1. Module boundaries are seams. Each file or module is a boundary the code has already chosen. Check what crosses it — that's a public interface, and the breadboard should show it. If a module exists (e.g., llm.py separate from app.py), the breadboard shouldn't reach through it to grab internals. The module's public function is the affordance; what it calls internally is behind the boundary.
2. Module-level definitions are data stores. Constants, configurations, and templates at the top of a module — TOOLS, SYSTEM_PROMPT, DEFAULTS — are static state that shapes behavior. If code reads them to produce effects, they belong in the breadboard as stores. They're easy to miss because they don't change at runtime, but they define what the system can do.
3. Function signatures are contracts. The types tell you what data flows across boundaries. When a function's return type differs from what its downstream dependency returns (e.g., send_command returns list[dict] but ollama.chat returns a Response object), there's a transformation happening. That transformation is work the breadboard should account for. Name it.
4. Trace the full call chain, not just endpoints. Don't jump from the UI event to the external service to the executor. Walk every function in the chain. Each one exists for a reason — orchestration, state management, data transformation, error handling. The ones that do real work (not just forwarding) are affordances. Skipping intermediate functions because they look like "glue" hides the explanation.
5. Decorators and patterns signal architectural roles. @work(thread=True) means background worker. try/except wrappers mean error boundary. async means concurrency management. These aren't just implementation details — they tell you a function has a specific role in the system's architecture. An event handler that delegates to a @work function is two distinct things: a trigger and an orchestrator.
6. State that co-accesses suggests places. Which functions and state are used together but don't touch other parts of the system? If loading, TOOLS, and SYSTEM_PROMPT are all accessed by the command input flow and never by the table display, they cluster into a candidate place. Places emerge from co-access patterns, not just from UI layout.
A breadboard designed from a conceptual shape ("user types, LLM processes, app executes") will be a flat pipeline. The code is more specific — it has already decided where the seams are through module splits, function extractions, and static configuration. When a breadboard exists alongside code, read the code's seams and check that the breadboard accounts for them. Not every function needs a node, but every module boundary, every data transformation, and every piece of static configuration that shapes behavior should show up somewhere.
After inspecting the code, update the breadboard to match what IS:
Do NOT fix design problems yet. The goal of Phase 1 is an accurate picture, even if the design has issues.
Now the breadboard is accurate. The code's names might be wrong, the split of responsibilities might not be ideal, the wiring might reveal unnecessary coupling. This is where you judge the design.
Take a user story from the requirements or frame. Trace it through the breadboard wiring. Ask: does the path tell a coherent story that produces the expected effect?
Example: "User says 'add Tokyo after Detroit' → Tokyo appears after Detroit in the table, and persists across restarts."
Trace: U4 (input) → N1 → N2 (LLM) → N3 (dispatch) → N4 (handle) → ... → S1 (locales updated) → N12 (persist) → S4 (config written).
At each link, ask: does this step logically lead to the next? Does the wiring make sense as a story about how the effect happens?
| Smell | What you notice | |-------|-----------------| | Unexplained behavior | You know the system does something (transforms data, makes decisions) but the breadboard doesn't show how — the explanation is missing | | Incoherent wiring | A node writes to S1 AND triggers the thing that writes to S1 — redundant or contradictory | | Missing path | The user story requires an effect, but no wiring path produces it | | Diagram-only nodes | Nodes in the diagram that aren't in the affordance tables — decoration, not real affordances | | Naming resistance | You can't name an affordance with one idiomatic verb (see Naming Test below) | | Stale affordances | The breadboard shows something that no longer exists in the code — should have been caught in Phase 1 | | Wrong causality | The wiring shows A calls B, but the code shows C calls B — should have been caught in Phase 1 |
The first five are design smells — the code works but the design could be better. The last two are accuracy problems that Phase 1 should have caught; if you find them here, go back to Phase 1.
The primary tool for finding and fixing affordance boundary problems.
For each affordance:
| Signal | Meaning | |--------|---------| | One verb covers all code paths | Boundary is correct | | Need "or" to connect two verbs | Likely two affordances bundled together | | Name doesn't feel idiomatic | Boundary is wrong | | Name matches a downstream effect, not this step | You're naming the chain, not the step |
Name what THIS step does, not the downstream cascade.
Chain-level (wrong): An orchestrator that calls validate, find, extract, and insert is named add_locale — but it doesn't add anything itself. Adding is the chain's effect.
Step-level (right): The orchestrator's own effect is handling/dispatching → handle_place_locale. The adding happens downstream.
How to check:
If what's left is just sequencing and branching, it's a handler. Name it as such.
Names should reflect what the affordance affords from the caller's perspective — the effect the caller achieves by using it.
| Perspective | Question | Example | |-------------|----------|---------| | Caller | "What can I achieve by calling this?" | N3 calls N4 → "handle place_locale tool call" | | Step | "What does this function do, not its callees?" | N4 itself → "dispatch to validate, resolve, insert" | | Effect | "What changes in the system after this runs?" | N15 → "locale is extracted from its position" |
A tool exposed to an external caller (like an LLM) should be named for the effect the caller wants: place_locale — the caller wants to place a locale.
The internal handler that processes that tool call should be named for its own role: handle_place_locale — it handles the dispatch, delegating work to sub-steps.
A function resolve_locale either pops an existing locale from a list OR creates a new dict:
extract_locale (pop) and create_locale (new)The inability to find one idiomatic verb was the signal that this was two distinct operations forced into one function.
When the naming test reveals a bundled affordance:
Never split only in the diagram (e.g., adding unnamed sub-nodes in a subgraph). If it's not a named function in the code and a row in the table, it's not a real affordance.
When the causality is wrong (A → B in the breadboard but C → B in the code):
After any changes:
development
Use this methodology when collaboratively shaping a solution with the user - iterating on problem definition (requirements) and solution options (shapes).
development
Turn a shaped project kickoff transcript into a reference document for the builder. Use when the user has a transcript (VTT, etc.) from a kickoff call and wants to produce a document that captures what was shaped and agreed.
documentation
Create a framing document from conversation transcripts. Use when the user has transcripts (VTT, call notes, etc.) and wants to produce a frame that captures the problem worth solving and why it was chosen over alternatives.
development
Transform a workflow description into affordance tables showing UI and Code affordances with their wiring. Use to map existing systems or design new ones from shaped parts.