talents/schedule: migrate to external schedule.schema.json
Next structured-outputs migration: constrain the schedule talent with an
external Draft 2020-12 schema. This introduces
`talent/schedule.schema.json`, wires it via
`"schema": "schedule.schema.json"` in the frontmatter, and encodes
every field the post-hook reads. `talent/schedule.py` is unchanged:
strict hook validation remains authoritative, and the schema adds
defense-in-depth plus provider-side constraint.
The single semantic tightening is `activity`: it now uses a closed enum
of 10 values (`meeting`, `call`, `deadline`, `appointment`, `event`,
`travel`, `reminder`, `errand`, `celebration`,
`doctor_appointment`) instead of the prompt's prior "not a restricted
enum" disclaimer. The scope's seed list held: a fixture scan across
`tests/fixtures/` and `tests/baselines/` found zero real anticipated
records, so no widening was required.
The inline participation entry deliberately omits `entity_id` (5 fields
instead of the shared fragment's 6) because the schedule hook assigns it
itself via `find_matching_entity`. A drift test in
`tests/test_schedule_schema.py` asserts the inline shape equals the
shared fragment minus `entity_id`, so any future fragment change forces
an explicit update here. The loader still has no cross-file `$ref`
plumbing, so the shape remains inlined rather than referenced.
A few schema decisions are worth recording. `participation_confidence`
is required but typed `["number", "null"]`, matching the hook's
`.get(...)` and null-tolerant prompt contract. `details` is required but
typed `"string"` with no `minLength`, because empty string is valid per
both the prompt and `str(... or "")` in the hook. `start` and `end`
use `["string", "null"]` plus an `HH:MM:SS` pattern; under Draft
2020-12 that pattern only applies to string instances.
This continues the structured-outputs series after participation
(07bc7b8e), detect_created (b58bd862), daily_schedule (0e098e7b), story
(50693752), and sense (8c952dc4). Live provider validation remains
deferred per precedent in those prior lodes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>