new: scaffold materializes a schema default only for a required field
Files changed: - CHANGES.md - VERSION - instructions/CONTRACT.md - tools/CONTRACT.md - tools/chemenu/commands/new_page.py - tools/chemenu/tests/test_new_page.py - types/type-spec.md
This commit is contained in:
@@ -126,6 +126,13 @@ Each type is at least two files, and a `root: kb` type may be three:
|
||||
| `types/<name>.schema.yaml` | The machine-checkable half: fields, types, enums, defaults, required-ness, `additionalProperties: false` |
|
||||
| `types/<name>.guidance.md` (optional, `root: kb` only) | The stack-owned authoring contract: when to use the type, when not to, and mechanism-level advice that holds regardless of this instance's own enum values or template text - linked from the type-spec's own `guidance:` field. `types/type-guidance.md` is its contract |
|
||||
|
||||
**A `default:` is materialized by `wikitool new` only for a field the schema also lists in
|
||||
`required:`.** On an optional field, `default:` documents what a reader should assume when the
|
||||
field is absent - writing it into every scaffolded page turns that silent assumption into a
|
||||
stated claim instead. `instruction.obligation` is the field this was fixed for: a migration-only
|
||||
axis, unrelated to an ordinary instruction, whose `default: required` used to land in every
|
||||
newly scaffolded instruction regardless.
|
||||
|
||||
This file is the self-referential root contract every type-spec is validated against, and
|
||||
`type-guidance.md` is validated against it the same way `lint-report.md` is - itself a
|
||||
non-instantiable, contract-only type. `tools/wikitool types describe <name>` composes all of a
|
||||
|
||||
Reference in New Issue
Block a user