What We Learned
The spec-to-package prompt pattern from the fingerprint session (read spec, define API surface, enumerate test cases) scaled to a larger package with two new refinements.1. External Gist as Spec Reference
The prompt referenced a GitHub gist by ID for the TAD. The agent’s WebFetch failed (404), but it fell back togh gist view via CLI — and retrieved all 1,670 lines. Then it grep’d for specific sections (Layer 3, failure_modes) and read only the relevant ranges.
Takeaway: External spec references are more resilient than pasting content into prompts. The agent can navigate to the right section. If one access method fails, it finds another.
2. Failure Modes as Acceptance Criteria
The prompt specified: “Write tests for each failure mode (8 tests minimum, one per FM) plus a happy-path test.” Each FM-XX maps to a named trigger, a detection function, and a test case. This eliminated the usual negotiation about test coverage — the TAD’s failure mode table IS the test plan. The first test run hit 34/35 (FM-08 needed a try/catch wrapper in the CI orchestrator). One fix, 35/35.3. Cross-Package Type Reuse via Exploration
The prompt said “parse their imports blocks” and “verify protected agent presence” — it didn’t specify theUnit type shape or CompositionStep fields. The agent explored @stratt/schema to discover these types, then imported and used them directly. This kept the prompt focused on behaviour rather than types.