fix: types/type-spec.schema.yaml enforced against real type-spec frontmatter, doc-pull-through.md docs/-page count corrected (closes #105)
Files changed: - CHANGES.md - VERSION - instructions/dev/doc-pull-through.md - tools/CONTRACT.md - tools/chemenu/commands/docs_verify.py - tools/chemenu/tests/test_docs_verify.py - types/type-spec.md - types/type-spec.schema.yaml
This commit is contained in:
@@ -44,6 +44,8 @@ Two systems check conformance to a type:
|
||||
|
||||
Do not restate a schema rule in body text. The validator already enforces it, so the restatement adds no protection — it only spends the reviewer's judgment re-confirming something already guaranteed, instead of on the properties only a reviewer can check.
|
||||
|
||||
A type-spec's own frontmatter is checked the same way a page's is: `docs verify` validates every file under `types/` declaring `type: types/type-spec.md` against `types/type-spec.schema.yaml`. A frontmatter field used here needs a matching line in that schema, or `docs verify` fails.
|
||||
|
||||
## Writing Shape
|
||||
|
||||
- Write the body as a **content contract**: checkable properties of a conforming instance, in a form the type-conformance gate can apply directly. Prefer "what a conforming instance contains or claims" over "how to produce one" — production process is invisible to the reviewer, so it belongs in a skill or instruction, linked rather than embedded.
|
||||
|
||||
@@ -69,6 +69,33 @@ properties:
|
||||
items:
|
||||
type: string
|
||||
pattern: "^[a-z][a-z0-9_]*$"
|
||||
capture_fields:
|
||||
type: array
|
||||
description: >-
|
||||
Frontmatter fields on instances of this type that are fixed at capture
|
||||
time and never correctable afterwards except by re-capturing the source
|
||||
(e.g. `fidelity`, `authority` for a source page). `raw accept`,
|
||||
`new source` and `touch --set` read this instead of a hardcoded field
|
||||
list. Omit for types with no capture-time fields.
|
||||
items:
|
||||
type: string
|
||||
pattern: "^[a-z][a-z0-9_]*$"
|
||||
root:
|
||||
type: string
|
||||
description: >-
|
||||
Which root a `base_dir:` resolves against - `kb` (the default, so
|
||||
omitting this field is equivalent to `kb`) for a page this instance
|
||||
writes, or `repo` for a type whose artifacts are legitimately not
|
||||
knowledge (e.g. `instruction`).
|
||||
enum: [kb, repo]
|
||||
guidance:
|
||||
type: string
|
||||
description: >-
|
||||
Repo-relative path to a `types/type-guidance.md`-shaped document
|
||||
holding this type's stack-owned authoring prose. Meaningful only on a
|
||||
`root: kb` type-spec; omit for a type an instance writes entirely for
|
||||
itself.
|
||||
pattern: "^types/.*\\.md$"
|
||||
required:
|
||||
- type
|
||||
- name
|
||||
|
||||
Reference in New Issue
Block a user