-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
The view progress --json output is validated against view-progress.schema.json (added in #222). Currently the schema filename is hardcoded in the contracts table and test samples. As more views gain --json support, each will need a manual schema entry.
Proposal
Auto-discover per-view schema files by convention: view-{name}.schema.json in docs/contracts/cli/. When view <name> --json is invoked, the CLI (or test harness) could resolve the schema file automatically:
const schemaFile = `view-${viewName}.schema.json`;This would apply to:
- Contract test discovery (
contracts.test.js— scan forview-*.schema.json) - Integration canary generation (one canary per discovered view schema)
- CLI
outputJsonrouting (optional — could validate output before emitting)
Acceptance Criteria
-
contracts.test.jsauto-discoversview-*.schema.jsonfiles - Adding a new view schema doesn't require updating
VALID_SAMPLESmanually (or at least fails clearly) - Existing views without schemas are unaffected
Originated from PR #223 agent reflection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request