Hold the request line's keys to a contract, and the skill to the line
Stacked on #843 (base connect-role), because the contract includes #843's role key. It retargets to main once #843 merges.
Why
basecamp connect supersedes the local agent connector, so its "type":"request" line is the contract that the basecamp-connect skill, and any session or practice driving the connector, keys on. Until now nothing held it:
- A renamed tag passed every test. The handoff tests decode the line into the same struct that wrote it.
- The skill's example could drift silently. The example in
skills/basecamp-connect/SKILL.mdthat teaches the reader the field names could drift from the real line with nothing noticing.
This is the small part worth keeping from "one format for both connectors". We don't need a shared driver. We do need a written contract for the connector that stays.
What changes
requestLineContractnames every key the line must carry, with nested keys written asparent.child. A renamed or dropped key failsTestTheRequestLineKeepsItsContract. Adding a key is allowed.TestTheSkillDocumentsTheRequestLineItGetsholds the skill's example to the line's keys exactly. A key added to the line has to be documented where readers learn it.HandoffLine's doc comment says so.
Tests
These tests pin current behaviour, so they pass on creation. I checked they catch drift by mutating:
- renaming
requester_id's tag fails the contract test; - removing
rolefrom the skill example fails the skill test; - adding an undocumented field to the line fails the skill test.
make check passes on linux.
Summary by cubic
Pins the keys of the "type":"request" handoff line to a contract, and holds the basecamp-connect skill's example to those exact keys. The contract covers every key the line can carry: optional fields are flushed by reflection so a key hidden behind omitempty can't slip past, nested keys are compared as full dotted paths, and a zero-valued line keeps every required key. The line's keys must equal the contract in both directions, so renaming, dropping, or adding a key fails tests, and the skill has to document any change, where before a renamed tag passed tests and the skill's example could drift silently.