Skip to content

[Request]: describe every field in urlcode.schema.json #750

Closed

Description

@jimhoyd

Problem or use case

schemas/urlcode.schema.json is the source for docs/YAML-REFERENCE.md (scripts/generate-yaml-reference.ts), MCP get_schema and any tool that renders a form or hover help from the schema. Most fields have no description:

  • Walking properties in the schema: 204 properties, 27 with a description.
  • docs/YAML-REFERENCE.md: 452 rows, 388 with — in the description column.

Examples with no description: version, routes, includes, policies, every profiles.* key, site.robots.allow / disallow.

So the generated reference and get_schema show a key name and its type rules but not what the key does. A person or agent has to find the answer in prose pages instead. That prose repeats facts the schema should own, and it drifts.

This came up while designing a human-facing editor/report for urlcode.yaml. A schema-driven UI only stays low-maintenance if the schema can supply labels and help text. The read-only urlcode report (#749) already renders generically from explain output, and would benefit the same way wherever it shows keys.

Proposed behavior and alternatives

  • Give every property in urlcode.schema.json a one-sentence description that says what it does for a request, in reader terms. Link to the authoritative page rather than restating limits the schema already encodes as rules.
  • Regenerate YAML-REFERENCE.md (npm run docs:reference).
  • Add a check, in generate-yaml-reference.ts --check or a small test, that fails when a schema property has no description. That keeps new fields from landing undocumented, which is how the gap grew.
  • Optional, separate decision: UI hints (display order, "advanced") as x- keywords. Leave these out until something reads them.

Alternative considered: keep descriptions only in prose docs. Rejected because the schema is the one source every consumer reads (reference, MCP, editors), and prose copies are what drifted before.

No runtime behavior change. It is a schema documentation change, so the reference must be regenerated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions