Skip to content

[finding] objectstack-platform skill still teaches that an unknown top-level defineStack key is silently stripped — #8687 made it throw #9907

Description

@os-steve

Found while working #9867 (rewriting packages/drivers/driver-sql/README.md), where skills/objectstack-platform/rules/bootstrap-patterns.md was the authority for the correct form. Its prescription is right — drivers are plugins, not a driver: key — but the mechanism it states for why the wrong form is wrong has been stale since #8687.

The claim

Three places say an undeclared top-level key is dropped without error:

  • skills/objectstack-platform/rules/bootstrap-patterns.md:6-9
    "There is no driver: key on defineStack() — unknown keys are silently stripped by strict parsing, so a driver: entry is a no-op."
  • skills/objectstack-platform/rules/bootstrap-patterns.md:69
    the heading "### ❌ Incorrect — driver: Key (Silently Stripped)"
  • skills/objectstack-platform/rules/bootstrap-patterns.md:74
    the inline comment "// ❌ Not a defineStack key — no-op"

skills/objectstack-platform/SKILL.md:189-190 states the general form of the same rule:
"Unknown keys are silently stripped by strict parsing — a phantom key like roles: or policies: is a no-op, not an error."

Measured

ObjectStackDefinitionSchema is built with strictObject(...) (packages/spec/src/shared/strict-object.ts:327), which is z.object(shape, …).strict(). The schema's own history slot records the change: "Until #8687 closed this surface (the outermost #4001 door), an unknown top-level stack key parsed green and its value was silently dropped."

Executed against the built @objectstack/spec:

defineStack({ manifest: {…}, driver: {…} })
-> THREW: defineStack validation failed (1 issue):
(root): Unrecognized key(s) on this stack definition: `driver`. …

tsc refuses it too: TS2353: Object literal may only specify known properties, and 'driver' does not exist in type 'ObjectStackDefinitionInput'.

Why it matters

An agent that believes the key is a silent no-op will rank the mistake as cosmetic and may leave it in place, or spend a debugging pass looking for a runtime symptom that a load-time refusal already produced loudly. The direction of the error is the harmful one: the doc understates the failure, so it reads as "harmless" when the real behaviour is "the stack does not load".

The general sentence in SKILL.md:189 also needs re-measuring per key family rather than a blanket rewrite — ObjectSchema / FieldSchema still only warn (warnUnknownAuthoringKeys in packages/spec/src/stack.zod.ts, scheduled for #4001's strict tiers), so "stripped" remains true at those two sites and is false at the top level. Whoever fixes this should state which surfaces refuse and which warn, not flip the whole page.

Scope note: these are governed surfaces under skills/, so #9867 did not touch them. Filing unassigned for triage.

Refs: #9867 · #8687 · #4001


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions