keyiadiannao/dsh-code-reuse-firewall

keyiadiannao★ 0TypeScript最后同步: 2026-08-16

在 GitHub 打开

Pre-write reuse firewall for DeepSeek Harness: before the agent writes a new helper/service, surface the existing implementations that already cover that intent. Deterministic retrieval (no LLM) via the Auto_code_audit capability channel.

README 摘要

dsh-code-reuse-firewall Pre-write reuse firewall for DeepSeek Harness — for PYTHON repositories. Before the agent writes a new helper / service / manager, reuse check deterministically surfaces the existing Python implementations that already cover that intent, so the agent reuses or extracts instead of duplicating. Why Static checkers only catch what looks wrong. The expensive failure mode in AI-maintained codebases is the opposite: two implementations of the same capability drift apart silently, because nothing looked broken when the second copy was written. The fix is to intervene before the second copy exists — surface the overlap while the new code is still a plan, not a file. The retrieval is deterministic and LLM-free (callable-name, docstring lexical, and string-literal channels with IDF-weighted query coverage, stdlib Python only), backed by the Auto code audit capability channel. It was validated on an unfamiliar mid-size project (arrow-py): a 1s scan surfaced nine near-identical locale format timeframe methods, four describe twins, and api.get vs ArrowFactory.get near-duplicates with zero noise in the dead-code / hardcoded / style categories. Requirements - A checkout of…

在 GitHub 查看完整 README →
Agent/智能体ai-codingcode-reusedeepseek-harnessdshdsh-pluginstatic-analysisagent

分类