feat: record review-gated project learnings
SU
3mo ago+450+450+012345678901234567890123456789-0-0-0123456789
Summary
Adds the first mergeable slice of #31: structured project learnings that remain separate from decisions, reflections, and durable project instructions.
- Adds a typed
learningtrajectory event with source, affected area, evidence, recurrence key, and promotion status. - Adds
trail learningfor recording one-off learnings or human-review candidates. - Adds
trail show <id> --learningsfor querying them separately. - Exposes the new API and schemas from the public package.
Safety boundary
This slice deliberately does not write to AGENTS.md, CLAUDE.md, or skills. One-off learnings are archived; --promotion-candidate records pending_review. There is no approved state in this PR, so a candidate cannot be mistaken for a human-approved durable instruction.
Recurrence aggregation, configurable thresholds, reviewer authentication, and promotion adapters remain follow-up work.
Validation
npm test -- --run— 263 tests passednpm run buildnpm run lintnpm run typecheck
AI assistance
Implemented with OpenAI Codex assistance and reviewed by SuhaibAslam before submission.