Skip to content
Back to search

DM-Code-Agent

Local-first, auditable Python code agent. Ships its own 30-task hidden-test benchmark plus SWE-bench Verified scored by the official harness -- every number reproducible, negative results included.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/hwfengcs/DM-Code-Agent with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/hwfengcs/DM-Code-Agent'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hwfengcs--dm-code-agent/badge.svg)](/listings/hwfengcs--dm-code-agent)

HTML

<a href="/listings/hwfengcs--dm-code-agent"><img src="/api/listings/hwfengcs--dm-code-agent/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 178 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <picture>
  3. <source media="(max-width: 640px)" srcset="docs/media/readme-hero-mobile.svg">
  4. <img src="docs/media/readme-hero.svg" alt="DM-Code-Agent — Every change. In plain sight." width="1280">
  5. </picture>
  6. <h1>DM-Code-Agent</h1>
  7. <p><strong>A coding agent you can inspect.</strong><br>Trace the changes. Diagnose the failure. Check the test evidence.</p>
  8. <p>
  9. <a href="https://github.com/hwfengcs/DM-Code-Agent/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/hwfengcs/DM-Code-Agent/ci.yml?branch=main&amp;style=flat-square&amp;label=build&amp;labelColor=18251f" alt="CI status"></a>
  10. <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/Python-3.10%2B-81ecb0?style=flat-square&amp;labelColor=18251f" alt="Python 3.10 or newer"></a>
  11. <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-81ecb0?style=flat-square&amp;labelColor=18251f" alt="MIT license"></a>
  12. </p>
  13. <p><strong>English</strong> · <a href="README_ZH.md">简体中文</a></p>
  14. <p>
  15. <a href="https://hwfengcs.github.io/DM-Code-Agent/"><strong>Interactive demo</strong></a> &nbsp; / &nbsp;
  16. <a href="#try-it-without-an-api-key"><strong>Quick start</strong></a> &nbsp; / &nbsp;
  17. <a href="docs/case-studies/failure-classification/README.md"><strong>Real maintenance case</strong></a> &nbsp; / &nbsp;
  18. <a href="docs/README.md"><strong>Docs</strong></a>
  19. </p>
  20. </div>
  21. DM-Code-Agent works in your local repository and keeps an append-only record of each run.
  22. Follow the evidence in the terminal or browser, then export a report another developer can open.
  23. - **See the change.** Reads, edits, commands, and test output in one execution trail.
  24. - **Find the gap.** Inspect failures, recovery attempts, and completion without recorded verification.
  25. - **Make it yours.** Extend tools, providers, and lifecycle hooks around a readable Python agent.
  26. ## Watch the evidence
  27. **Two runs. The same edit. Only one runs the tests.**
  28. <a href="https://hwfengcs.github.io/DM-Code-Agent/">
  29. <picture>
  30. <source media="(prefers-reduced-motion: reduce)" srcset="docs/media/demo-preview.png">
  31. <img src="docs/media/readme-demo.gif" alt="A tested repair shows failing then passing checks; an untested repair shows a verification gap. Open the interactive demo to inspect both." width="880">
  32. </picture>
  33. </a>
  34. *10-second excerpt of the real browser walkthrough. Scripted assistant decisions; real file edits
  35. and unittest checks. No model key required. [Watch all 38 seconds](docs/media/demo-walkthrough.mp4).*
  36. ## Try it without an API key
  37. Python 3.10+, three commands. The release wheel includes the browser console; no Node.js needed.
  38. ```bash
  39. pip install "dm-code-agent[web] @ https://github.com/hwfengcs/DM-Code-Agent/releases/download/v2.1.1/dm_code_agent-2.1.1-py3-none-any.whl"
  40. dm-agent-demo --output demo-run
  41. dm-agent-web --sessions-dir demo-run/sessions --read-only
  42. ```
  43. Open the complete local URL printed by the server. Choose `verified.jsonl` or `unverified.jsonl`
  44. and inspect the difference. Use a new or empty output directory.
  45. <details>
  46. <summary><strong>Inside the demo · terminal inspection · HTML export</strong></summary>
  47. | Run | Evidence |
  48. | --- | --- |
  49. | `verified.jsonl` | A retry-boundary bug, a failing test, an edit, and passing checks |
  50. | `unverified.jsonl` | The same edit without a test run; the analyzer flags the verification gap |
  51. The scripted client drives the real agent, file tools, and Python unittest. It makes no model
  52. calls, reads no user configuration or extensions, and writes only to the chosen new or empty
  53. directory. It demonstrates inspectability, not model performance.
  54. ```bash
  55. dm-agent-trace analyze demo-run/sessions/unverified.jsonl
  56. dm-agent-trace export demo-run/sessions/verified.jsonl --output report.html --include-content
  57. ```
  58. Open `report.html` without a server. The demo contains only bundled sample code. For real sessions,
  59. export defaults to a structural summary; `--include-content` adds redacted task, tool, and edit
  60. excerpts. Review those reports before sharing: redaction cannot recognize every secret.
  61. </details>
  62. ## Use it in your repository
  63. Set your provider's key: `DEEPSEEK_API_KEY`, `OPENAI_API_KEY`, `CLAUDE_API_KEY`, or `GEMINI_API_KEY`.
  64. Run from a Git checkout you can review:
  65. ```bash
  66. dm-agent "Inspect this repository and identify the modules that most need tests" --provider deepseek --trace sessions/review.jsonl --show-steps
  67. dm-agent-trace analyze sessions/review.jsonl
  68. ```
  69. **[Configuration and first task](docs/getting-started.en.md)** · **[Xinference / local-model recipe](docs/local-models.en.md)** · **[Web console](docs/web.md)**
  70. The agent can modify files and run commands with your local permissions; it is not a sandbox.
  71. `--trace` is redacted by default. Full model I/O, checkpoints, and tool replay have separate,
  72. explicit controls. [Session privacy and replay](docs/tracing.md).
  73. ## What makes a run inspectable?
  74. | Your question | The evidence you can inspect |
  75. | --- | --- |
  76. | **What changed?** | Ordered tool calls, arguments, observations, and replacement excerpts |
  77. | **Where did it fail?** | Failure-stage analysis and recovery attempts |
  78. | **Did it verify?** | Recorded validation actions and a verification-gap signal |
  79. | **What changed between runs?** | Trace comparison and per-task benchmark regressions |
  80. | **What happened to old context?** | Compaction appends derived records; originals remain available |
  81. The CLI and console share the same analysis functions. Standalone HTML reports need no server.
  82. Recorded checks are not a proof of correctness, and replacement excerpts are not a complete Git
  83. diff. Explicit replay and checkpoint-based forks are available for local investigation.
  84. ## A real repair, with the rough edges left in
  85. > **12 targeted checks passed. The broader suite still failed.**
  86. >
  87. > A live model attempted to repair a historical defect in this repository. Two broader checks
  88. > remained failing, and the agent exhausted its step budget. The incomplete result is preserved
  89. > with its patch, supplied tests, token usage, and an independent offline reproduction.
  90. **[Inspect the live run](https://hwfengcs.github.io/DM-Code-Agent/cases/failure-classification.html)** · **[Read and reproduce the case](docs/case-studies/failure-classification/README.md)**
  91. ## Field notes
  92. Small failures, useful lessons. Each article links its original evidence and an offline reproduction.
  93. | Story | What we learned |
  94. | --- | --- |
  95. | [**More steps did not establish a better agent**](docs/articles/01-more-steps.en.md) | Pass counts rose from 22 to 24, alongside four regressions and 30.6% more estimated tokens. |
  96. | [**When source code says “error”**](docs/articles/02-error-is-not-failure.en.md) | `from errors import NotFound` was mistaken for tool failure; reclassification removed 38 false positives in the inspected traces. |
  97. | [**Find the text before changing the code**](docs/articles/03-content-anchored-edits.en.md) | Content-anchored edits addressed a line-range failure mode, then exposed another bug. |
  98. The bundled benchmark has **30 hidden-test tasks** across coding and maintenance. Historical runs
  99. support conclusions about those configurations, not a leaderboard claim. The demo is not an
  100. evaluation. [Methodology](docs/benchmarks.md) · [Project status](docs/project-status.md) · [Research logs](docs/research-log/).
  101. ## Build and verify
  102. <details>
  103. <summary><strong>Develop from source — tests and deterministic evals need no API key</strong></summary>
  104. ```bash
  105. git clone https://github.com/hwfengcs/DM-Code-Agent.git
  106. cd DM-Code-Agent
  107. uv sync --frozen --extra dev
  108. uv run --frozen dm-agent-demo --output demo-run
  109. uv run --frozen python -m pytest
  110. uv run --frozen python -m dm_agent.evals.cli --variant full --task direct_finish
  111. ```
  112. The [contribution guide](CONTRIBUTING.md) and [agent instructions](AGENTS.md) list the complete
  113. checks. [Extension examples](examples/) show how to add behavior outside the kernel.
  114. </details>
  115. ## Find your next step
  116. | Start here | Go deeper |
  117. | --- | --- |
  118. | [Getting started](docs/getting-started.en.md) · [中文首页](README_ZH.md) | [Architecture](docs/architecture.md) |
  119. | [Local models / Xinference](docs/local-models.en.md) | [Provider extension example](examples/openai_compatible.py) |
  120. | [CLI reference](docs/cli.md) · [Web console](docs/web.md) | [Extension API](docs/extensions.md) |
  121. | [Sessions, privacy, and HTML export](docs/tracing.md) | [Benchmarks](docs/benchmarks.md) |
  122. | [Bilingual articles](docs/articles/README.md) | [Full documentation index](docs/README.md) |
  123. The homepage, setup guide, local-model recipe, and articles are bilingual; deeper reference docs
  124. are mostly in Chinese. Reproducible issues and focused contributions are welcome.
  125. <div align="center">
  126. **If the evidence helps, give the project a star.**
  127. [Contribute](CONTRIBUTING.md) · [Report a security issue](SECURITY.md) · [MIT license](LICENSE)
  128. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.