Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

Framework vocabulary ratchet: family terms may not grow in packages/1-framework - #918

Merged
wmadden merged 5 commits into
mainfrom
lint-framework-vocabulary
Jul 7, 2026
Merged

wmadden merged 5 commits into
mainfrom
lint-framework-vocabulary

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

No ticket — review-process infrastructure, adopted as an intervention during the PR #906 review rounds.

At a glance

$ pnpm lint:framework-vocabulary
lint:framework-vocabulary: scope=packages/1-framework current=201 merge-base=200 delta=+1
NEW: packages/1-framework/1-core/framework-components/src/shared/codec-types.ts:24: readonly nativeType?: string;

A PR that adds family vocabulary to the framework domain now fails CI with the offending line, instead of waiting for a human review round to catch it.

Decision

The framework domain (packages/1-framework) is family-blind, but family vocabulary has repeatedly leaked into framework types through review misses — the identical defect class was flagged across three review rounds on PR #906 (CodecRef.nativeType, a nativeTypeFor framework hook, a strategy-enum field). This PR turns that review comment into a machine check, plus the rulecards that encode the discipline:

  1. lint:framework-vocabulary — a merge-base ratchet in the exact mold of lint:casts: counts forbidden-term occurrences (declarative per-scope config: nativeType, native-type, postgres, sqlite, mysql under packages/1-framework, source files only) at HEAD vs the merge-base; growth fails with new sites listed; the 200 pre-existing hits are grandfathered and can only shrink. Wired into the CI Lint job beside lint:casts.
  2. no-family-vocabulary-in-framework.mdc — the rule the ratchet enforces: the family-blindness test (would Mongo populate or consume this meaningfully?), the "family-agnostic dressing" tells (never-param bridges, duplicated "structurally identical" shapes, strategy string-enums), strategies as codec-owned hooks.
  3. fix-the-class-not-the-instance.mdc (alwaysApply) — review-response discipline: a comment names a class, not a point-fix; sweep the whole diff, fix every instance in one round; new surface never inherits grandfathering; design is never settled.

Reviewer notes

  • The scanner counts line-hits per term in git ls-files-tracked *.ts/*.tsx under each scope, excluding tests and dist/. Matching is substring, case-insensitive per config — deliberately blunt; the ratchet (not precision) is what makes it safe, since pre-existing hits never fail.
  • Baseline under packages/1-framework: postgres 136 · nativeType 41 · sqlite 13 · mysql 8 · native-type 2 (200 total, 45 files). Shrinking these is tracked debt (TML-2966 covers the nativeType authoring surface).
  • The config supports more scopes (e.g. target names under packages/2-sql) — seeded with the one scope this intervention is about.

Testing performed

  • scripts/lint-framework-vocabulary.test.mjs — 17 tests via the lint-casts.test.mjs fixture-repo pattern: baseline passes, new occurrence fails with site listed, negative delta passes, exclusions hold, scope isolation, worktree cleanup.
  • pnpm test:scripts 183/183 · pnpm lint:framework-vocabulary exits 0 on this branch · package.json/ci.yml parse-validated.

Alternatives considered

  • An allowlist file of pre-existing sites instead of the merge-base ratchet. Rejected: allowlists rot and invite append-to-pass; the merge-base comparison grandfathers exactly what exists with zero maintenance, the same trade lint:casts already made.
  • Precise AST-level detection (only flag identifiers, not comments). Rejected: vocabulary in doc comments is the same leak (it documents family semantics on framework surface), and the ratchet makes false-positive cost near zero.
  • Judgment-only enforcement (rulecards without the lint). Rejected by three empirical rounds of review evidence.

Checklist

  • DCO sign-off on every commit.
  • Tests added.
  • TML-NNNN: title — no ticket; process infrastructure (see Linked issue).

Summary by CodeRabbit

  • New Features
    • Added a framework vocabulary guard that flags newly introduced forbidden database/domain terms in the framework layer.
    • Enabled the vocabulary guard in CI via a dedicated lint step.
  • Documentation
    • Updated review rules to require class-first feedback with full PR-wide sweeps, plus strengthened layering guidance for framework changes.
    • Added calibration guidance for repeated “point-fixed” defect patterns.
  • Tests
    • Added/updated automated coverage for the vocabulary checker’s matching, scoping, and threshold behavior.

…w in packages/1-framework

The framework domain is family-blind, but family vocabulary (nativeType, target
names) has repeatedly leaked into framework types through review misses — the
same defect class flagged across three review rounds on PR #906. This turns
that review comment into a machine check.

lint:framework-vocabulary mirrors the lint-casts merge-base ratchet: it counts
occurrences of forbidden terms (declarative per-scope config; seeded with
nativeType / native-type / postgres / sqlite / mysql under packages/1-framework,
source files only) at HEAD and at the merge-base, and fails with the new sites
listed when the count grows. The 200 pre-existing hits are grandfathered by
construction and may only shrink. Wired into the CI Lint job beside lint:casts;
fixture-repo tests mirror lint-casts.test.mjs.

Two rulecards encode the discipline the ratchet enforces mechanically:
- no-family-vocabulary-in-framework: the family-blindness test ("would Mongo
  populate or consume this meaningfully?"), the dressing tells, strategies as
  codec-owned hooks never string enums.
- fix-the-class-not-the-instance (alwaysApply): a review comment names a class;
  sweep the whole diff and fix every instance in one round; new surface never
  inherits grandfathering; design is never settled.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner July 7, 2026 06:06
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@wmadden-electric, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 51b79c08-329f-4a24-9cb7-265835b496fc

📥 Commits

Reviewing files that changed from the base of the PR and between 6c25550 and 0aa214c.

📒 Files selected for processing (2)
  • scripts/lint-framework-vocabulary.mjs
  • scripts/lint-framework-vocabulary.test.mjs
📝 Walkthrough

Walkthrough

Adds a framework vocabulary threshold lint, its config, CI/script wiring, tests, and related agent-rule and calibration updates. The check scans packages/1-framework for forbidden terms and compares the result to a configured threshold.

Changes

Framework vocabulary lint enforcement

Layer / File(s) Summary
Agent rule docs
.agents/rules/README.md, .agents/rules/fix-the-class-not-the-instance.mdc, .agents/rules/no-family-vocabulary-in-framework.mdc
Adds class-based review remediation guidance and a new framework-vocabulary rule, then links both from the rules README.
Lint config and script implementation
scripts/lint-framework-vocabulary.config.json, scripts/lint-framework-vocabulary.mjs
Defines the scoped forbidden-term list and implements token-based file scanning, threshold comparison, and list output for framework vocabulary checks.
Script wiring
package.json, .github/workflows/ci.yml, .cursor/rules-footprint.config.json
Adds the npm script, includes the new test file in test:scripts, runs the lint step in CI, and updates the rules-footprint threshold.
Lint script test suite
scripts/lint-framework-vocabulary.test.mjs
Covers file filtering, forbidden-term matching, threshold outcomes, scoped exclusions, and ignored test or dist files.
Calibration references
drive/calibration/failure-modes.md, drive/code/README.md
Adds the failure-mode entry and the corresponding code-review heuristic note.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • prisma/prisma-next#82 — Related to the same rules-footprint monitoring setup and threshold-based lint infrastructure.

Suggested reviewers: wmadden, aqrln

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a framework-domain vocabulary ratchet preventing family terms from growing in packages/1-framework.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lint-framework-vocabulary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 148.97 KB (0%)
postgres / emit 126.45 KB (0%)
mongo / no-emit 98.2 KB (0%)
mongo / emit 89.39 KB (0%)
cf-worker / no-emit 175.52 KB (0%)
cf-worker / emit 150.97 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@918

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@918

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@918

@prisma-next/sql-runtime

npm i https://pkg.pr.new/@prisma-next/sql-runtime@918

@prisma-next/family-sql

npm i https://pkg.pr.new/@prisma-next/family-sql@918

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@918

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@918

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@918

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@918

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/@prisma-next/extension-pgvector@918

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@918

@prisma-next/postgres

npm i https://pkg.pr.new/@prisma-next/postgres@918

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/@prisma-next/sql-orm-client@918

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@918

@prisma-next/extension-supabase

npm i https://pkg.pr.new/@prisma-next/extension-supabase@918

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@918

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@918

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@918

@prisma-next/contract

npm i https://pkg.pr.new/@prisma-next/contract@918

@prisma-next/utils

npm i https://pkg.pr.new/@prisma-next/utils@918

@prisma-next/config

npm i https://pkg.pr.new/@prisma-next/config@918

@prisma-next/errors

npm i https://pkg.pr.new/@prisma-next/errors@918

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@918

@prisma-next/operations

npm i https://pkg.pr.new/@prisma-next/operations@918

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@918

@prisma-next/contract-authoring

npm i https://pkg.pr.new/@prisma-next/contract-authoring@918

@prisma-next/ids

npm i https://pkg.pr.new/@prisma-next/ids@918

@prisma-next/psl-parser

npm i https://pkg.pr.new/@prisma-next/psl-parser@918

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@918

@prisma-next/cli

npm i https://pkg.pr.new/@prisma-next/cli@918

@prisma-next/cli-telemetry

npm i https://pkg.pr.new/@prisma-next/cli-telemetry@918

@prisma-next/config-loader

npm i https://pkg.pr.new/@prisma-next/config-loader@918

@prisma-next/emitter

npm i https://pkg.pr.new/@prisma-next/emitter@918

@prisma-next/language-server

npm i https://pkg.pr.new/@prisma-next/language-server@918

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@918

prisma-next

npm i https://pkg.pr.new/prisma-next@918

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/@prisma-next/vite-plugin-contract-emit@918

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@918

@prisma-next/mongo-contract

npm i https://pkg.pr.new/@prisma-next/mongo-contract@918

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@918

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@918

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/@prisma-next/mongo-contract-ts@918

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/@prisma-next/mongo-emitter@918

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@918

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@918

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@918

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@918

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@918

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@918

@prisma-next/sql-contract

npm i https://pkg.pr.new/@prisma-next/sql-contract@918

@prisma-next/sql-errors

npm i https://pkg.pr.new/@prisma-next/sql-errors@918

@prisma-next/sql-operations

npm i https://pkg.pr.new/@prisma-next/sql-operations@918

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/@prisma-next/sql-schema-ir@918

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/@prisma-next/sql-contract-psl@918

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/@prisma-next/sql-contract-ts@918

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/@prisma-next/sql-contract-emitter@918

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/@prisma-next/sql-lane-query-builder@918

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/@prisma-next/sql-relational-core@918

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@918

@prisma-next/target-postgres

npm i https://pkg.pr.new/@prisma-next/target-postgres@918

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@918

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/@prisma-next/adapter-postgres@918

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@918

@prisma-next/driver-postgres

npm i https://pkg.pr.new/@prisma-next/driver-postgres@918

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@918

commit: 0aa214c

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
scripts/lint-framework-vocabulary.mjs (1)

56-58: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Line-keyed hit dedup can misreport which sites are "new".

hitKey includes the line number, so if an unrelated edit shifts line numbers between merge-base and HEAD, a pre-existing (grandfathered) occurrence will appear as a "new" site in the printed diagnostic even though it merely moved. The exit code stays correct (it's driven by the raw count delta), but the reported "new forbidden vocabulary" list can mislead a developer trying to locate what they actually introduced, undermining the main value of the ratchet's output.

Consider keying on file:term:trimmedText instead of line number to be resilient to line shifts (accepting that identical duplicate lines will be deduped together, which is a reasonable trade-off for a substring-based scan).

Also applies to: 134-144

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/lint-framework-vocabulary.mjs` around lines 56 - 58, The hit dedup
key in hitKey is too dependent on line numbers, so shifted lines can make
grandfathered forbidden-vocabulary matches look newly introduced in the
diagnostic output. Update hitKey and the surrounding new-hit reporting in
lint-framework-vocabulary.mjs to key on stable identifiers such as file, term,
and the trimmed matched text instead of hit.line, so the printed “new” list
stays resilient to unrelated line moves.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/lint-framework-vocabulary.mjs`:
- Around line 31-38: isScannableFile currently excludes .test.ts but still
treats .test.tsx as scannable, so extend the test-file filtering in
isScannableFile to also reject .test.tsx files. Update the existing path checks
alongside the current .test.ts, .test-d.ts, test/, and dist/ exclusions so
foo.test.tsx is not included in the vocabulary scan.
- Around line 111-121: The worktree setup in the main scan flow can leave
baseHitsByScope undefined if git worktree add fails, leading to a later
TypeError instead of a clear failure. Update the logic around the
tmpDir/mergeBase worktree creation so the failure is handled immediately in the
try block for the scanScope path, and do not continue to the later
baseHitsByScope access unless initialization succeeded. Use the existing
scanScope and git worktree add/remove sequence as the place to catch/report the
error with a direct diagnostic.

---

Nitpick comments:
In `@scripts/lint-framework-vocabulary.mjs`:
- Around line 56-58: The hit dedup key in hitKey is too dependent on line
numbers, so shifted lines can make grandfathered forbidden-vocabulary matches
look newly introduced in the diagnostic output. Update hitKey and the
surrounding new-hit reporting in lint-framework-vocabulary.mjs to key on stable
identifiers such as file, term, and the trimmed matched text instead of
hit.line, so the printed “new” list stays resilient to unrelated line moves.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: b07d9300-edcc-48e2-9140-ccb58329d178

📥 Commits

Reviewing files that changed from the base of the PR and between 720677e and 9a11c96.

📒 Files selected for processing (8)
  • .agents/rules/README.md
  • .agents/rules/fix-the-class-not-the-instance.mdc
  • .agents/rules/no-family-vocabulary-in-framework.mdc
  • .github/workflows/ci.yml
  • package.json
  • scripts/lint-framework-vocabulary.config.json
  • scripts/lint-framework-vocabulary.mjs
  • scripts/lint-framework-vocabulary.test.mjs

Comment thread scripts/lint-framework-vocabulary.mjs Resolved
Comment thread scripts/lint-framework-vocabulary.mjs Resolved
Project-context Drive advice for reviewer passes, paired with the vocabulary
ratchet: drive/code/README.md gains the framework-vocabulary smell (the
family-blindness test, the dressing tells, and the instruction that findings
name the CLASS so responders sweep the whole diff), and the failure-mode
catalogue gains F26 — review comment point-fixed, class re-ships next round —
with detection signals, the class-first response protocol, and the PR #906
three-round reference incident.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Comment thread scripts/lint-framework-vocabulary.mjs Resolved
…tching

Replaces the merge-base ratchet with a high-water-mark threshold recorded in
the config: fail when the live count exceeds it (remove the new vocabulary, or
raise the threshold with justification) and fail when it drops below (lower the
threshold to lock in the win). No git merge-base, worktree, or origin/main
requirement — the check runs from any checkout and the number is visible and
reviewable in the diff.

Matching is now identifier-token aware rather than substring: a line is
tokenized on camelCase and non-alphanumeric boundaries, and a term matches as a
consecutive token subsequence (with plural tolerance). This rejects substring
noise (abortable/urls no longer count as table/rls) while still catching
camelCase leaks (parentColumns, MongoStorage). That makes it safe to expand the
forbidden list to the full family/target vocabulary (postgres, mongo, column,
table, sql, jsonb, primaryKey, …); the current baseline is 967 lines.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
wmadden-electric and others added 2 commits July 7, 2026 10:00
…ew rulecards

This PR adds fix-the-class-not-the-instance.mdc and
no-family-vocabulary-in-framework.mdc, taking the .cursor/rules total to
203,824 bytes — 324 over the previously tight-pinned 203,500. CI checks the
footprint on the fully-synced rule tree (prepare → rules:sync), so it caught
what a local unsynced tree missed. Raise the byte budget to 208,000 (~2%
buffer). Only this budget was affected; lines and alwaysApply stay well under.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
isScannableFile only excluded .test.ts/.test-d.ts, so a .test.tsx file would be
scanned as production code and its vocabulary would count toward the threshold.
Match the .tsx variants too. No .tsx files exist under packages/1-framework, so
the baseline stays 967. (CodeRabbit review.)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric added this pull request to the merge queue Jul 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 7, 2026
@wmadden
wmadden added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit e7bd0de Jul 7, 2026
20 checks passed
@wmadden
wmadden deleted the lint-framework-vocabulary branch July 7, 2026 08:59
wmadden-electric added a commit that referenced this pull request Jul 7, 2026
…amily-neutral

#918's lint:framework-vocabulary ratchet (now on main) flagged five lines this
PR added under packages/1-framework — all doc-comment prose naming family
concepts (StorageColumn/computeColumnType/column.valueSet, and "native types …
the SQL family's isSqlEntityRefResolution" as examples). Reword them to describe
the same framework mechanism without family vocabulary, rather than raise the
threshold for our own additions. Comment-only; count back to 967 = threshold.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants