fix(design): count screenshots and corpus reads the pipeline was dropping - #95
Merged
Merged
Conversation
…ping - credit browser_shots_batch and browser_site_shots, not only browser_screenshot, toward the screenshot quota (screenshot-tools.ts) - recognize the cache/<mkt>/<plugin>/<version>/ plugin tree structurally (corpus suffix, not a hardcoded name) alongside marketplaces/<mkt>/, with marketplace priority and maxSemver selection (corpus-fs.ts, corpus-resolve-cache.ts) - root cause of uncredited corpus reads - allow motion*.js by basename in the write gate; app.js and motionless-app.js stay refused (allowed-write.ts) - raise the "full" corpus quota to README + 3 tokens (was 2) - credit reference design-system.md sheets as a new "sheet" CorpusKind, without counting them toward the tokens-* threshold - restrict Tailwind CSS detection to .css files whose content matches known Tailwind markers, instead of classifying every .css as tailwind Verified end-to-end: the previously-stuck scene now reports corpusReads: 4, screenshotsCount: 2, currentPhase: 2.
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
screenshotsCount:0, corpusReads:[], currentPhase:1, so the phase-2 gate never opened.marketplaces/<mkt>/plugins/design-expert, not thecache/<mkt>/<plugin>/<version>/tree Claude Code also serves (plugin namedfuse-designthere) — now detected structurally by corpus suffix, never a hardcoded name, with marketplace priority +maxSemverselection.motion*.jsallowed by basename in the write gate (C4);fullcorpus quota raised to README+3 tokens, owner-arbitrated (C5); referencedesign-system.mdsheets credit as a newsheetCorpusKind without counting towardtokens-*(C6);.cssclassifiedtailwindonly by content markers, not extension alone (C7).chorecommit bumps CHANGELOG/package.json to 0.1.86 (PATCH, per post-commit procedure).Changes
src/policy/design/corpus-resolve.ts, newcorpus-fs.ts,corpus-resolve-cache.ts— dual-tree corpus resolutionsrc/policy/design/screenshot-tools.ts,src/runtime/design-helpers.ts— batch screenshot creditsrc/policy/design/gates.ts, newallowed-write.ts—motion*.jswrite gatesrc/policy/design/corpus.ts— quota bump +sheetCorpusKindsrc/policy/detect-framework.ts— content-gated Tailwind CSS detectiontest/design-corpus-transitions.test.ts,test/design-corpus.test.ts,test/design-gate-corpus.test.tsupdated; newtest/design-corpus-cache.test.ts,design-corpus-sheet.test.ts,design-motion-js.test.ts,design-screenshot-tools.test.ts,detect-framework-css-tailwind.test.tsCHANGELOG.md,package.json— 0.1.86 (separate commit)Test plan
bun test— 1012 pass / 1 skip / 0 fail (baseline was 1007/1/0)bunx tsc --noEmit— exit 0design-gate-corpus.test.ts/design-corpus-transitions.test.ts(verified via diff)design-corpus.test.tsfullquota 2→3 tokens (owner-arbitrated)corpusReads: 4, screenshotsCount: 2, currentPhase: 2Breaking changes
None.