Conversation
The site is published at https://n1n3.net/kernelCAD-web/ but vite.config.ts had base: '/'. Asset URLs in the built HTML therefore pointed at the apex (e.g. /assets/index-XXX.js → 404), giving a blank white page on Pages. Set base conditionally on command so dev still uses '/'.
w1ne
added a commit
that referenced
this pull request
May 3, 2026
…erns + lookup_cookbook MCP tool + eval --cookbook flag (#22) (#59) * docs(cookbook): v1 design spec — workstream #22 Curated library of canonical .kcad.ts pattern snippets, indexed for in-prompt retrieval. Distinct from corpus expansion (cookbook is for agents to reference, corpus is for evaluation). Continuous. v1 scope: - 12 starter pattern snippets seeded from eval expert solutions and the documented kernel surface - Markdown frontmatter file format (id, title, tags, keywords, when_to_use, fenced TS body) - BM25 retrieval over title/tags/keywords/when_to_use; score floor 0.5; ~40 LoC pure TS, no external deps - Hybrid agent surface: build-generated SKILL.md cookbook index + MCP tool lookup_cookbook(query, k) - Eval --cookbook flag with pre-injection (separate cache_control block); A/B golden test on bracket-holes - CI gates: validate frontmatter, evaluate every body clean, diff-check generated SKILL.md section - Continuous growth contract: same-PR additions, eval-driven additions, snapshot-test gate on ranking shifts Native-framed per the no-competitor-refs rule. Lineage captured in ~/.claude/projects/-home-andrii/memory/kernelcad_design_lineage.md under '#22 cookbook with retrieval (2026-05-03) — design-time lineage'. * docs(cookbook): v1 implementation plan — workstream #22 19 tasks (102 bite-sized steps) covering: - yaml dep + tags whitelist + 12 starter snippets - Pure BM25 retrieval module (~60 LoC, no deps) - Snippet loader with frontmatter + tag-whitelist validation - search() composition with score floor + k clamping - 3 CI gates (validate, evaluate, build) wired into qc - SKILL.md cookbook index generator + diff-check - MCP tool lookup_cookbook - TranscriptEvent kind cookbook_inject + renderer - AgentClient systemAddendum (separate cache_control block) - Eval --cookbook flag + per-task pre-injection - A/B golden test on bracket-holes - npm run eval:ab convenience script - CHANGELOG entry TDD throughout (test before implementation). Frequent commits (one per task). Ready for subagent-driven-development execution. Spec lineage: docs/superpowers/specs/2026-05-03-cookbook-with-retrieval-design.md (2ab8190). * chore(cookbook): add yaml dep + tags whitelist + snippets folder * feat(cookbook): pure BM25 tokenizer + scorer * feat(cookbook): snippet loader with frontmatter + tag validation * feat(cookbook): public search() with score floor + k clamping * feat(cookbook): 12 starter pattern snippets * fix(cookbook): use 3-backtick fences in snippet bodies * fix(cookbook): drop no-op translate from mirror-half-part snippet * feat(cookbook): cookbook:validate npm script * feat(cookbook): cookbook:evaluate gate (every body must kernelcad evaluate clean) * test(cookbook): snapshot top-3 IDs for 5 hand-picked queries * feat(cookbook): SKILL.md cookbook index generator * fix(cookbook): use plan-verbatim empty-cookbook placeholder text * revert: keep '_(empty)_' placeholder so plan-verbatim test still passes * feat(cookbook): SKILL.md cookbook index — markers + generated section * chore(cookbook): wire cookbook:validate/evaluate/build + diff-check into qc - Add cookbook:validate, cookbook:evaluate, and cookbook:build to qc script - Add git diff --exit-code check on src/skill/SKILL.md to catch drift - Fix lint error: remove unused import of loadSnippets (re-exported via export statement) * feat(mcp): lookup_cookbook tool — BM25 retrieval over cookbook * feat(eval): cookbook_inject TranscriptEvent + renderer * feat(eval): AgentClient supports optional systemAddendum (separate cache block) * feat(eval): cookbook injector — wraps search() for the harness * feat(eval): --cookbook flag wires per-task injection into runner * test(eval): A/B golden — bracket-holes identical with/without --cookbook * chore(eval): eval:ab script — runs suite twice, prints score delta * fix(eval): eval:ab forwards argv to inner runs (e.g. --mock, task name) * docs(changelog): cookbook v1 — workstream #22 --------- Co-authored-by: w1ne <w1ne@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pages deploy succeeded but the site rendered blank because Vite's base was '/' while Pages serves at /kernelCAD-web/. Asset paths 404'd. Fixed by setting base conditionally:
```ts
base: command === 'build' ? '/kernelCAD-web/' : '/'
```
Dev keeps '/' so `npm run dev` works unchanged.
Test plan