Repository navigation
Description
Found by the sweep #10924's triage put in scope ("the suggested co-check is in-scope as a sweep, findings filed not folded"). Filed, not folded: repairing these is not #10924's scope — that card builds the gate. PR #11433 adds the surface and marks the six blocks that compile; these four are left unmarked and unrepaired.
How they were found
With the new packages/spec/src surface active, every one of the 146 fenced ts blocks in that tree was extracted. 128 carry no import of their own and three more are ellipsis-placeholder prose, so 15 self-contained blocks were type-checked against the built @objectstack/spec declarations, the same way the gate does (paths map derived from the package's own exports).
Note the first run proved nothing and was discarded — the three ellipsis fragments' TS1109 syntax errors suppress tsc's semantic pass for the whole program, exactly the trap check-skill-examples.ts's header documents. The diagnostics below come from the re-run with those excluded.
The four
1. packages/spec/src/index.ts — three blocks, the package's front door
The file's own header documents three import styles. All three name things that do not exist:
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'Data'.
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'UI'.
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'System'.
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'Auth'.
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'AI'.
index.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'API'.
index.ts:26 TS2307: Cannot find module '@objectstack/spec/auth' or its corresponding type declarations.
index.ts:35 TS2307: Cannot find module '@objectstack/spec/auth' or its corresponding type declarations.
Two distinct defects here:
@objectstack/spec/authis not an exported subpath. The package'sexportsdeclares./identity(User, Organization, Profile), not./auth. Styles 2 and 3 both instruct the reader to importAuth.User/{ User, Session }from a specifier that cannot resolve.- Style 1's root namespace imports do not exist either — which the prose two lines above arguably already concedes ("This package does NOT export types at the root level"), making the block and its own preamble disagree.
This is the highest-value instance in the sweep: it is the first docblock in the package's entry point, i.e. the first thing an AI author reads.
2. packages/spec/src/shared/branded-types.zod.ts:14
branded-types.zod.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'ObjectNameSchema'.
branded-types.zod.ts:15 TS2305: Module '"@objectstack/spec"' has no exported member 'FieldNameSchema'.
Both symbols exist — export const ObjectNameSchema / FieldNameSchema are declared in this very file and re-exported through shared/index.ts. The example simply names the wrong specifier: they resolve from @objectstack/spec/shared, not the root.
Suggested repair
Rewrite each block against the current exports map and built declarations, then add the <!-- os:check --> marker so the gate keeps them honest — that marker is what makes the repair permanent rather than a point fix. Acceptance is mechanical: pnpm --filter @objectstack/spec check:skill-examples stays green with four more marked blocks (10 on the spec-source surface instead of 6).
Worth deciding during the work, and the reason this is filed rather than guessed: whether the root index.ts header should document the namespace-import style at all, or be rewritten around the subpath styles that do resolve. That is a docs-shape question about the package's front door, not a mechanical rename, and it is why these were not folded into #11433.
Splittable if preferred — index.ts and branded-types.zod.ts share a defect class and an acceptance test but no code.
Activity
claude commentedon Aug 24, 2026
Triage (daily round, session
session_01Kktexqp6uVuFMztvvTMf3V, 2026-08-24): lands inpackages/spec/srcTSDoc examples (4 blocks incl. the package front door teaching a non-existent@objectstack/spec/authsubpath) →domain:spec+pm:queue, Bug. The gate (#10924 / PR #11433) marks the compiling six; this card repairs the four left unmarked so they can be marked.Generated by Claude Code
os-steve commentedon Aug 24, 2026
Claim: PM seat
session_01T9cDbY2NBiVJWYx3BpWfH2(/pm-dispatch, spec lane) — dispatching to an os-dev subagent.Session: session_01T9cDbY2NBiVJWYx3BpWfH2
Branch:
claude/issue-11436-front-door-examplesWorktree:
../objectstack-11436(created by the dev agent, per-task)Domain: domain:spec
File surface: TSDoc example blocks in
packages/spec/src/index.ts(3 blocks, the front door) +packages/spec/src/shared/branded-types.zod.ts(1 block);os:checkmarkers added on all four post-repair. Not split — shared defect class and acceptance test.Container & model: os-dev subagent, sonnet (mechanical against the measured
exportsmap; the one docs-shape call has a measurement-driven default).Clause-②: substantively no (docblock examples only, no accept/reject change, no export change) — but the diff lives in
packages/spec/src/**, so the path limb applies mechanically:needs:contract-reviewhung at claim; PR-side at creation; PR stays draft for the PM's (quick) review.Docs-shape latitude with default: rewrite the front-door header around import styles that actually COMPILE against the built declarations and
exportsmap (the subpath styles); drop or truthfully reframe the namespace style the root does not export — the prose already concedes it. Acceptance mechanical per the card:check:skill-examplesgreen with 10 marked spec-source blocks (6→10).Serial constraints: none in flight; predecessor #11433 (the gate + 6 markers) landed — no overlap.
Generated by Claude Code
docs(spec): front-door and branded-types examples compile against the…
os-steve commentedon Aug 24, 2026
os-dev-report
{ "issue": 11436, "status": "done", "branch": "claude/issue-11436-front-door-examples", "pr": "https://github.com/objectstack-ai/objectstack/pull/11531", "premise_still_valid": true, "summary": "Rewrote the four broken TSDoc @example blocks in packages/spec/src (index.ts's three front-door import-style blocks + branded-types.zod.ts:14) against the package's real exports map and built declarations, and added os:check markers to all four. index.ts's Style 1 (root namespace imports) was reframed rather than dropped -- it now shows the defineX factory imports the root genuinely exports, since dropping it would have thinned the header without making it more honest. Styles 2-3 and branded-types.zod.ts now use the real @objectstack/spec/identity and @objectstack/spec/shared subpaths instead of the nonexistent /auth and root specifiers.", "tests": "Reverse verification first: added os:check markers to all four blocks against the OLD broken text -- check:skill-examples went red with exactly the card's diagnostics (TS2305 on Data/UI/System/Auth/AI/API, TS2307 on @objectstack/spec/auth x2, TS2305 on ObjectNameSchema/FieldNameSchema). Rewrote in place to the real exports/declarations (final committed state is the marked+fixed text, no separate revert needed) -- gate went green. Re-verified on the committed HEAD 41ea937bc7: `pnpm --filter @objectstack/spec check:skill-examples` -> spec-source surface 6->10 marked blocks, '257 prose examples type-check across 3 surface(s)'. `pnpm --filter @objectstack/spec build` clean. `pnpm --filter @objectstack/spec typecheck` green (tsc --noEmit + check:scripts-typecheck + check:test-typecheck, debt ledger unchanged). `pnpm --filter @objectstack/spec test` green: Test Files 420 passed (420), Tests 11204 passed (11204). `pnpm --filter @objectstack/spec check:generated` found check:docs stale (the branded-types.zod.ts @example feeds a generated reference page) -> ran gen:docs, re-ran clean 14/14; regen diff audited as exactly the one-line specifier fix propagating into content/docs/references/shared/branded-types.mdx. Targeted eslint on both edited source files clean. check:exported-any and check-nul-bytes clean. node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack derived 27 matched local gate families (+5 changeset-triggered once the changeset existed) for this diff; all green except node scripts/check-dev-prereqs.mjs, which fails on unrelated packages' missing dist/ in this worktree (never ran a full monorepo pnpm build) -- an environment precondition unrelated to this docblock-only diff.", "open_questions": [], "out_of_scope_findings": [] }Generated by Claude Code
Generated by Claude Code
os-steve commentedon Aug 24, 2026
PM verdict: ACCEPT — PR #11531
Contract review (clause-② path limb): PASS. Fuse reading this stroke:
external_metadata.last_served_model = claude-fable-5. Reviewed the actual diff at head41ea937bc7(4 files).defineXfactories yes), and every code block is compile-verified by the gate it now sits under.defineSkillfactory) example instead of being dropped — the header stays teaching-quality while becoming true./auth→/identityand root →/sharedmatch the measuredexportsmap;Sessiondropped because it doesn't resolve; theUserliterals carry the fields the real type requires (the gate compiles them, so this is checked, not styled).os:checkmarkers, spec-source surface 6→10,check:skill-examplesgreen with257 prose examples type-check across 3 surface(s). Reverse verification reproduced the card's exact TS2305/TS2307 inventory against the old text.branded-types.mdx;check:generated14/14.patchchangeset correct.check-dev-prereqsdeclared-unrunnable on the standard unbuilt-siblings ground.needs:contract-reviewcleared from both carriers in this same stroke. Landing: flip ready → every check green → merge queue.Fixes #11436closes this card at merge; hygiene at the landing stroke.Generated by Claude Code