feat(design): local corpus doctrine + tsdown bump + release 0.1.84 - #93
Merged
Conversation
The design-expert plugin produced generic, interchangeable pages because
its inspiration phase browsed ~100 Framer/Webflow templates. A local
corpus of 11 references (refs-design/) becomes the source of taste. The
harness still enforced the OLD doctrine (4 screenshots, an allowlist of
template platforms) and therefore blocked anyone following the new one.
This makes the harness EXECUTE the new doctrine without weakening the gate.
- corpus resolution per runtime: Claude marketplace tree vs Codex
plugins/cache/<mp>/<plugin>/<version>/, with semver selection; the
process.cwd() fallback is removed entirely
- corpus reads recorded as state progression; the citation<->read join
tolerates both naming conventions and both layouts
- quotas: >=1 screenshot in every mode, always; corpus present ->
{ full: 2, page: 1, component: 1 } plus the corpus reads
- template-platform allowlist inverted into a denylist (template-urls.ts,
deliberately frozen - the source of taste is the published corpus)
- apply_patch (Codex primitive) brought into the design pipeline: PRE
path/phase/quota gates, op:"add" validated as a Write, delete skipped,
cwd wired for the POST re-read
- pluginsWriteGuard extended to relative paths; corpusRoot and pluginsRoot
resolved independently
- substitution bypass closed on all four quadrants
Corpus absent leaves the requirement waived (pre-doctrine quotas) - the
branch stays dormant until refs-design/ ships to the marketplace.
901 -> 982 tests, 166 -> 178 files. Ten adversarial review rounds
(fresh-context challenger + factual audit each round); every conserved
mechanism mutation-tested, no survivors.
Bump PATCH and record the design corpus doctrine in the CHANGELOG (feat 2107330): per-runtime corpus resolution, revised quotas, apply_patch in the design pipeline, pluginsWriteGuard on relative paths, substitution bypass closed.
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
design-expertgates: per-runtime corpus resolution (Claude marketplace tree vs Codex versioned cache, semver-selected, noprocess.cwd()fallback), corpus reads tracked as state progression, citation<->read join tolerant of both naming conventions and layouts, template-platform allowlist inverted into a frozen denylist.{ full: 2, page: 1, component: 1 }plus corpus reads; corpus-absent leaves pre-doctrine quotas untouched.apply_patchwired into the design pipeline (Codexadd/deleteops validated against the PRE gates; POST re-reads the real file, promote-only).pluginsWriteGuardbypass on relative paths closed;String.replacesubstitution-pattern bypass in the design content gate closed ($&,$`,$',$$).tsdown0.22.13 -> 0.22.14 (transitively bumpsverkit0.1.2 -> 0.3.0,rolldown-plugin-dts).package.json0.1.83 -> 0.1.84, CHANGELOG entry added.Changes
src/policy/design/*(corpus.ts, corpus-resolve.ts, design-system-rules.ts, template-urls.ts, gates-pipeline.ts, gates.ts, state.ts, transitions.ts)src/runtime/design-content-gate.ts,design-files-gate.ts,design-helpers.ts,design.ts,handle-post.ts,handle-pre.ts,handle-types.ts,pre-allow.tstest/design-*.test.ts(14 new files),test/apexauth-usermessage.test.tspackage.json,bun.lock,CHANGELOG.mdTest plan
bun test-> 981 pass / 1 skip / 0 fail, 2976 expect() calls, 982 tests, 178 filesbunx tsc --noEmit-> exit 0Breaking changes
None.