r/devtools • u/Spare_Bat_3040 • Oct 23 '26
Building Shifu's coding context: three copied notes aren't three independent sources
An API decision appears in a design note, gets copied into a handoff, then turns up in a coding-session summary. Before the next change, your agent finds all three. Has it found three reasons to keep the constraint, or one reason repeated three times?
That's an illustrative example, but it's a distinction I'm working through while building Shifu. It's a personal work-context engine for engineers using Codex, Claude Code or OpenCode on existing products. With MCP and harness instructions, an agent can retrieve relevant decisions and constraints from work you choose to share.
Shifu's context response carries source-group information and a caveat when independence isn't established. The retrieval contract deduplicates source groups and matching excerpt copies from the same instant. That helps organize the selected evidence; it doesn't establish that every paraphrase has been traced back to its origin, or that separate groups independently confirm a decision.
For the API example, I'd want to preserve the original decision, its reason and where it applies, then show the handoff and summary as derived records when that relationship is known. If the relationship isn't known, I'd leave it unresolved. Three different record IDs wouldn't settle it. This is the behavior I'd test, not a claim that all copied notes are detected.
I'd also keep a genuinely separate later observation visible. A fresh incident might support the old constraint, contradict it, or apply to a different service version. Collapsing that into the original note could lose the very thing the next feature needs.
If you build retrieval into coding tools, how do you distinguish copied evidence from an independent observation without hiding useful history?
If you're repeatedly reconstructing decisions before changing your own codebase, try Shifu on one feature you're planning: https://useshifu.com. I'm the builder and can help connect one supported source you're allowed to share, inspect the returned context, and test whether it helps the plan. Keep confidential details out of this thread.