Skip to content

feat(cli): metadata-generation lint rules + quality scorer + eval harness#1625

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/metadata-lint-eval
Jun 6, 2026
Merged

feat(cli): metadata-generation lint rules + quality scorer + eval harness#1625
xuyushun441-sys merged 1 commit into
mainfrom
feat/metadata-lint-eval

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Summary

Makes "metadata should be AI-generated" checkable. Adds a linter that catches the data-modeling anti-patterns an author (human or AI) makes, and an eval harness that scores generation quality using that linter as the rubric — offline-first, with an optional live-LLM seam.

Lint (extends objectstack lint)

New cross-object data-model rules in lintConfig (encode ADR-0035 + objectstack-data/-ui conventions):

Rule Severity
relationship/missing-reference error
relationship/master-detail-required warning
relationship/delete-behavior suggestion
relationship/line-items-inline-edit suggestion
relationship/line-item-should-be-master-detail suggestion
relationship/association-inline-edit (anti-pattern) warning
rollup/missing-summary suggestion
field/select-missing-options warning
object/missing-name-field suggestion

Scorer (lint-as-rubric)

scoreMetadata(stack) → 0–100 + grade + breakdown = schema validity (ObjectStackDefinitionSchema) + weighted lint issues. Surfaced via objectstack lint --score.

Eval harness (offline-first)

runMetadataEval(cases, { generate? }) scores fixtures (offline) or generated stacks (live). Golden corpus of 5 enterprise shapes (invoice+lines, project+tasks, blog+comments [association], expense+lines, account+contacts). Surfaced via:

  • objectstack lint --eval — offline, deterministic, no API key (each case must clear --eval-min, default 75)
  • objectstack lint --eval --generator ./gen.mjslive: module default-exports (prompt, id) => stack; wire it to AIService.generateObject<SolutionBlueprint> to benchmark a real model. The seam keeps the CLI free of an LLM dependency.

Verification

  • 34 new unit tests (data-model-rules 18, score 6, metadata-eval 7, + integration) — all green
  • Golden corpus mean score ≥ 90 offline
  • tsc --noEmit: 0 errors in the touched files
  • Docs: objectstack-data skill gains a "Linting & Generation Quality" section

🤖 Generated with Claude Code

…ness

Make "metadata should be AI-generated" checkable: a linter that catches the
data-modeling anti-patterns an author (human or AI) makes, and an eval harness
that scores generation quality using that linter as the rubric.

Lint (extends `objectstack lint` / lintConfig):
- New cross-object data-model rules: relationship/missing-reference,
  master-detail-required, delete-behavior, line-items-inline-edit,
  line-item-should-be-master-detail, association-inline-edit (anti-pattern),
  rollup/missing-summary, field/select-missing-options, object/missing-name-field.
  These encode ADR-0035 + the objectstack-data/-ui conventions.

Scorer (lint-as-rubric):
- scoreMetadata(stack) → 0–100 + grade + breakdown: schema validity
  (ObjectStackDefinitionSchema) + weighted lint issues (schema/error/warning/
  suggestion). Exposed via `objectstack lint --score`.

Eval harness (offline-first, optional live):
- runMetadataEval(cases, { generate? }) scores fixtures (offline) or generated
  stacks (live seam). Golden corpus of 5 enterprise shapes. Surfaced via
  `objectstack lint --eval [--generator <module>] [--eval-min N]`. The
  --generator seam plugs a real model (AIService.generateObject<SolutionBlueprint>)
  in without giving the CLI an LLM dependency.

Docs: objectstack-data skill gains a "Linting & Generation Quality" section.
Tests: 34 new unit tests (data-model-rules, score, metadata-eval) all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 6, 2026 9:19pm

Request Review

@xuyushun441-sys xuyushun441-sys merged commit 1a5c4b4 into main Jun 6, 2026
7 of 8 checks passed
@xuyushun441-sys xuyushun441-sys deleted the feat/metadata-lint-eval branch June 6, 2026 21:20
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests size/xl labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants