songjongdevsecops/dsh-regras ↗★ 0
dsh-regras
DeepSeek Harness plugin: semantic search over the AGENTS.md and README.md rules of your workspace tree, with a tool for the agent and a command for you. 适合需要在工作区中快速检索和应用AGENTS.md等规则文件的用户。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:songjongdevsecops/dsh-regrasREADME
Read the full README ↗Configuration
Every path is configurable and the defaults derive from your home directory, so
nothing is tied to a specific machine. Override by environment variable, or by
the config of the regras line in your profile patch. A patch replaces the
whole config of the line, so restate every key you want to keep.
| Config key | Environment variable | Default | Meaning |
|---|---|---|---|
raiz | DSH_REGRAS_RAIZ | ~/workspaces | root of the rules tree |
colecao | DSH_REGRAS_COLECAO | regras-bgem3-v1 | memsearch collection |
memsearch | DSH_REGRAS_MEMSEARCH | ~/.local/bin/memsearch | memsearch binary |
espelho | DSH_REGRAS_ESPELHO | ` | |
/.espelho, else raiz` | corpus scanned by the hygiene report |
The report also uses DSH_REGRAS_PY (a Python interpreter with pymilvus and
numpy); by default it uses the memsearch tool environment, then python3.
Profile patch example (~/.dsh/profiles/web/cordis.patch.yml):
- id: regras
config:
raiz: '/home/you/rules'
colecao: 'regras-bgem3-v1'
memsearch: '/home/you/.local/bin/memsearch'
espelho: '/home/you/rules'
Usage
Ask the agent a question about where something belongs, how to name it, what is
forbidden, or who owns it. It calls qual_regra and gets the matching segments
with their source paths.
In the chat:
/regras buscar naming # five best rule segments
/regras higiene # duplicate candidates, orphan paths, doc/code drift
/regras pares # the candidate pairs, with both texts, for review
higiene writes relatorios/-higiene/ next to the package, with
relatorio.md and pares-candidatos.jsonl. The duplicate line is candidates
only: embeddings measure topical proximity, not contradiction, and two
opposite rules look alike in the vector space. The reader decides with both
texts in hand. Nothing is rewritten: the report only reads files.