Trails Dogfood Check
Use this skill when framework-owned trails, CLI helpers, loaders, or generators drift from the rules consumer trails must follow.
Workflow
- Locate the trail implementation, helper, loader, surface binding, or runtime boundary under review.
- Decide which boundary it lives on:
- Trail runtime behavior should return
Resultand specificTrailsErrorvalues. - Host construction, parser setup, and programmer-error boundaries may throw when documented.
- CLI presentation may handle process output and exits at the surface edge.
- Trail runtime behavior should return
- Check ambient state access. Prefer explicit
rootDir,workspaceRoot, config, or resource inputs overprocess.cwd()in reusable framework logic. - Check app-loading and materialization paths for Result-shaped errors unless they are intentionally outside trail execution.
- Verify tests cover the boundary decision, especially the error shape agents or surfaces will see.
Authoritative Sources
docs/testing.md- The nearest package
AGENTS.mdor package tests.
Advisory Context
- Prior hardening audit theme: framework-owned trails should follow the same Result and boundary doctrine they ask consumer trails to follow.
- PR #300 / TRL-564 changes and tests on queryable-contract hardening are useful precedent for distinguishing runtime Results from documented host-construction exceptions.
Must Not
- Do not call every throw a bug. Construction and programmer-error seams can stay throws when documented and tested.
- Do not move surface concerns into trail implementation logic.
- Do not replace explicit config or resource inputs with ambient
process.cwd()orprocess.envreads. - Do not hide native
Errorvalues insideResult.errwhere a specificTrailsErrorexists.
Output
Report:
- Boundary classification.
- Runtime Result or host exception decision.
- Any ambient cwd/config/resource drift.
- Expected error class and rendering behavior.
- Tests or follow-ups needed before accepting the change.