# reflect

- **Event:** [Built with Opus 4.7: a Claude Code hackathon](https://cerebralvalley.ai/e/built-with-4-7-hackathon)
- **When:** Apr 21 at 12:00 PM – Apr 27 at 2:00 AM (EDT)
- **Where:** Online
- **Team:** [Chanjoong Kim](https://cerebralvalley.ai/u/chanjoongx)
- **GitHub:** https://github.com/chanjoongx/reflect
- **Demo video:** https://youtube.com/watch?v=l2bBJbnMQaA
- **Gallery:** https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery/36

reflect is session-local metacognition for Claude Code: the deliberate opposite of cross-session memory. Long /loop sessions drift; I watched it happen in my own multi-hour runs, hour two, the model repeating the same misjudgment.

When suggestions get reverted 3+ times within 10 tool calls (weighted threshold, not single fail-retry), Opus 4.7 reads back recent tool history, active rules, and the rolled-back diff, infers why the user kept pushing back, not what failed, and injects structured guidance into the next turn: pattern, signal, adjustment, confidence.

I'd previously shipped a static-rules version (stetkeep on npm). reflect is the dynamic recalibration layer static rules can't reach.

Single-shot. Prompt-cached (3-layer: 1h + 5m + ephemeral, measured 95.9% warm cache hit). No persistence, no telemetry, by design. MIT-licensed, published as @chanjoongx/reflect. Failure modes characterized: cold-start refusal, false-trigger flagging, abstention on ambiguous prompts.

Built solo over 6 days: npm package, Claude Code plugin, localhost viewer, dogfooded on the build itself.

---

Markdown version of https://cerebralvalley.ai/e/built-with-4-7-hackathon/hackathon/gallery/36. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
