@zhenjiawang/duomi
v0.1.1
Published
Local boundary, evidence, and memory substrate for LLM coding agents.
Readme
Duomi
Duomi 是给 coding agent 使用的本地边界、证据和记忆底座。
它不是 workflow manager,不是项目管理系统,不是 prompt handoff 工具,也不是 spec-driven development 框架。它的目标是让 LLM coding agent 能自然地工作,同时 在本地得到几个硬答案:
- 什么是真的?
- 我现在能改什么?
- 我现在不能改什么?
- 什么证据算数?
- 什么时候必须停下来问人?
- 哪些经验只能在现实验证之后再记住?
先读:
PRODUCT.md 包含产品图、初代使用方式和 LLM role contract。
CLI
Current primitives:
duomi init --json
duomi policy check --json
duomi check --json
duomi grant request --intent "..." --write <path> --create <path> --reference <path> --json
duomi check --grant <grant_id> --json
duomi boundary start --intent "..." --json
duomi evidence run --boundary <boundary_id> --profile <id> --json
duomi evidence run --boundary <boundary_id> -- <command>
duomi evidence status --boundary <boundary_id> --json
duomi record emit --boundary <boundary_id> --json
duomi record show <record_id> --json
duomi learn propose --record <record_id> --claim "..." --kind <kind> --json
duomi learn list --json
duomi learn apply <candidate_id> --json
duomi learn reject <candidate_id> --reason "..." --json
duomi context inventory --json
duomi context check --json
duomi context build --json
duomi context --intent "..." --json
duomi skill sync --target codex --json
duomi skill sync --target claude --json
duomi skill sync --target gemini --json
duomi skill sync --target all --jsonduomi check --json is the default optimistic post-hoc check for normal existing-file edits.
Explicit grants are only for high-drift mutations such as creates, sensitive paths,
reference-only writes, deletes, renames, policy changes, migrations, and irreversible actions.
Phase 2 evidence binds executed command output to a runtime boundary. Starting a boundary requires a clean worktree; if existing changes are present, Duomi blocks and asks the agent to have the user commit, stash, or revert them first.
Policy bootstrap follows "LLM Draft + CLI Validate": duomi init creates a conservative
default policy, while an agent or skill may help draft project-specific validation profiles.
Only the checked .duomi/policy.yaml is the machine-checkable authority.
The intended human entrypoint is an agent skill, not memorizing every CLI command. For
example, /duomi-init or "帮这个项目接入 Duomi" should let an agent run duomi init,
inspect the repo, draft validation profiles, run duomi policy check --json, and then
present the policy diff and high-impact choices for confirmation.
Agent context follows the same pattern. duomi context inventory --json mechanically reads
repo signals for an LLM agent; the agent/skill drafts docs/agent/spec.md and
docs/agent/metadata.yaml; duomi context check --json validates the structure; and
duomi context build --json renders the quick-read context packet. CLI does not understand
old projects by itself.
Human interrupts are agent-facing structured signals. When a command returns
status: "interrupt", each interrupt includes the original type/path/reason plus an
agent draft question, severity, and next_actions. There is no
duomi interrupt approve/reject/resolve; the agent asks the human in natural language and
continues through existing grant/check/evidence/record primitives.
The repo-owned bootstrap skills live under skills/.
duomi skill sync --target all --json copies skills/* to ~/.codex/skills,
~/.claude/skills, and ~/.gemini/skills.
Current repo-owned skills:
duomi-initduomi-contextduomi-workduomi-finish
CLI / Skill Contract
Skills may remind an agent when to call the CLI and how to repair from JSON. They must not grant permissions, select target files from intent, route areas, or encode policy. The CLI is the only machine-checkable boundary authority.
