[NO-ISSUE] chore(specs): default optional text props to empty string, not undefined#671
Merged
Merged
Conversation
… not undefined Optional string props that hold renderable text now default to '' across the spec template, the spec-create / component-scaffold skills, and the scaffolder agent. Reserve undefined (unquoted) for props where absence differs from empty (open, modelValue, src); never the literal 'undefined'. Prevents the default-value issue raised in review of PR #646.
robsongajunior
previously approved these changes
Jun 25, 2026
…fault cells Enforces the empty-string default convention documented earlier in this PR via spec-validate Step 3 plus a shared defaultCellIsStringUndefined helper and a unit test; status:implemented specs (checkbox/dropdown) are not re-validated so they stay green.
robsongajunior
approved these changes
Jun 25, 2026
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
Prevents the default-value issue raised in review of #646: an optional string prop that holds renderable text was specced/scaffolded with
'undefined'/value: undefinedinstead of''.Makes the empty-string convention explicit across the component-creation pipeline:
.specs/_template.md— Props example now includes a string prop defaulting to'', and the Props rules spell out the convention (text →''; boolean →false;undefinedwritten unquoted only when absence ≠ empty, e.g.open/modelValue/src; never the literal'undefined')..claude/skills/spec-create/SKILL.md— the Props-collection step states the default rule..claude/skills/component-scaffold/SKILL.md—withDefaultsmirrors the spec; emitsBLOCKED:if a spec's Default cell says'undefined'for text instead of silently copying it..claude/agents/scaffolder.md— reinforces the same rule in the injected prompt (wherevalue: undefinedoriginally leaked).Notes
'undefined'in Default cells; (2) cleaning up the pre-existing'undefined'defaults already incheckbox.md/dropdown.md(bothstatus: implemented).