Inspiration
Vibe coding has made the distance between having an idea and writing code almost disappear. That is powerful, but it also makes it easy to build a full system for a one-off problem, discover a mature alternative halfway through, or spend substantial time and tokens reinventing something that already exists. I built Search Before Build to insert a small but rigorous reality check before implementation begins.
What it does
Search Before Build is a plugin for Codex and Claude Code with two focused workflows:
- Assess starts from an idea, clarifies the real problem, checks whether development is necessary, researches existing solutions, and returns exactly one recommendation: Build, Adapt, Use existing, or Stop.
- Compare starts from an existing plan, prototype, or repository, establishes its current baseline, compares it with real alternatives, identifies reusable work, and returns the same clear decision.
Before expensive research begins, the plugin asks up to five high-information questions and restates its full understanding for confirmation. It then creates a functional fingerprint, routes research across the sources that match the problem—including package registries, product websites, academic indexes, model hubs, app stores, and GitHub—and keeps unsupported claims marked as unverified.
The result appears as a polished local HTML report with the recommendation, search coverage, capability matrix, candidate analyses, reusable lessons, sources, and unknowns. Casual questions only overwrite one temporary file. After reviewing the result, users can save selected competitor analyses as Markdown or export the complete visual report as PDF.
How I built it
The project is structured as a dual-agent skill package. The two public skills share a read-only internal research method. Research produces only an evidence package; it cannot issue or imply a final verdict. The calling Assess or Compare workflow is the sole owner of the final recommendation.
Candidate capabilities use stable internal enums—native, partial, extensible, unsupported, and unverified—while the visible report follows the user's language. A deterministic Node.js renderer validates structured report data and injects it into a self-contained HTML template with no CDN dependency. Python contract tests protect the skill boundaries, source-routing rules, report schema, security limits, and persistence behavior.
How I used Codex and GPT-5.6
The 0.2.x redesign was developed in one primary Codex session using GPT-5.6. Codex helped me inspect the existing behavior, challenge architectural choices, edit the skills and shared references, implement the HTML viewer and PDF export, design regression tests, run cross-domain behavior checks with subagents, and verify the npm release pipeline.
The most important decisions were made through iterative human review: separating evidence collection from final decision authority, requiring a confirmation gate before research, making report persistence opt-in, broadening source coverage beyond GitHub, and tying each npm version to an immutable Git tag and commit. I reviewed the generated changes, tested the workflows, and decided what to keep.
Challenges I ran into
The hardest part was not finding more candidates; it was defining boundaries that keep an agent honest. Research had to remain evidence-only while Assess and Compare retained sole decision authority. Unknown evidence could not silently become “unsupported,” and GitHub could not stand in for every other software or product channel.
The report introduced two connected usability challenges. First, users needed a convenient way to decide whether to keep each competitor analysis after seeing the result; asking them to make that choice before research would be premature, while automatically saving every report would create unnecessary files. Second, plain Markdown could preserve the information but could not deliver the polished, readable comparison experience I wanted. I moved away from treating Markdown as the primary output and built a temporary, self-contained HTML viewer instead. It solves both problems at once: every run overwrites one temporary page, users can review the visual report first, then selectively save or copy only the competitor analyses they want. The same viewer also supports full PDF export, with print layouts that expand horizontally scrollable matrices into PDF-safe tables.
Accomplishments that I am proud of
- A complete clarify → confirm → research → decide workflow for both new ideas and existing projects.
- Research routing that covers the source types relevant to each request instead of defaulting to GitHub.
- A self-contained bilingual visual report with selective Markdown saving and full PDF export.
- Stable evidence labels and strict separation between research evidence and final recommendations.
- Reproducible releases where the npm version, Git tag, and immutable commit correspond.
- Contract, renderer, boundary, and behavioral tests that protect user-visible guarantees.
What I learned
The quality of agentic research depends as much on decision ownership and stopping rules as on search breadth. A useful agent should expose uncertainty, confirm the problem before spending resources, and make it easy for the user to inspect evidence rather than hiding everything behind one confident answer.
What's next
I want to add more domain-specific source routes, expand behavioral evaluation across languages and technical levels, and use real-user feedback to improve question quality and report clarity without making the workflow heavier.