返回目录
模型与 MCP 插件

dsh-agent-forge

sa998aaron/dsh-agent-forge

指定代码工作区 → 渐进式生成可固化 agent

Stars
1
Forks
0
Issues
0
更新
3 个月前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:sa998aaron/dsh-agent-forge

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-agent-forge

中文 | English

Forge a solidifiable agent from any code workspace — progressively.

A DeepSeek Harness (DSH) host plugin that turns an arbitrary code workspace into a persistent, installable agent (preset + guardrailed plugin). It formalizes the path we walked by hand on a real firmware project: observe the workspace, derive a persona, scaffold tools, derive guardrails, verify, then crystallize.

The maturity ladder

Level Meaning Tool
L0 Observed: workspace profile report forge_scan
L1 Persona: installable preset forge_generate target=preset
L2 Tools: plugin skeleton with detected tool stubs forge_generate target=plugin
L3 Guardrails: edit rules from detected quirks same (guard.ts rule table)
L4 Verified: three-layer verification passed forge_status + human confirmation
— Crystallized: installed into the preset roster forge_install

Tools

  • forge_scan(workspace) — profile a workspace: languages, build systems (cmd/cmake/npm/make), Kconfig, large XML/ITU files, .agents/skills, protected-dir candidates (sdk/vendor/third_party), and the .c #include .c compilation-unit quirk.
  • forge_plan(workspace) — report → forge plan (persona rules / tools / guardrails). Writes nothing; meant for human review first.
  • forge_generate(workspace, target) — writes .agents/dsh-<id>/{preset,plugin}/ in the workspace. Idempotent.
  • forge_install(workspace) — crystallizes the preset into ~/.dsh/.agent-presets/<id>/ with sha256 manifests. Files you edited are never overwritten (materialization pattern borrowed from dsh-ptc-cordis-preset).
  • forge_status(workspace) — current level + next step, derived from artifact existence (no state file, no drift).

Mounting

Forge is a meta-tool; mount it into the web profile so every session can use it:

# ~/.dsh/profiles/web/cordis.patch.yml
- insert:
    - id: agent-forge
      name: 'file:///E:/ai/dsh-agent-forge/src/index.ts'

Host-side changes require a DSH restart (ESM module cache is process-level).

Typical flow

forge_scan('D:/some/project')          # L0: profile
forge_plan('D:/some/project')          # review the plan
forge_generate(..., 'preset')          # L1
forge_generate(..., 'plugin')          # L2/L3
cd .agents/dsh-<id>/plugin && pnpm i && pnpm test   # layer 1-2
forge_install(...)                     # crystallize; new sessions can select it
verify on a real session               # layer 3 (human)

Testing

17 tests: layer 1 (pure functions: scan/plan/generate/materialize) + layer 2 (registration contracts, JSON-Schema compilation). generate.spec.ts even executes the generated define-tool.ts and asserts behavioral parity with the host copy.

pnpm install && pnpm test

Design principles

  • All decisions are pure functions; fs access lives only in collectSnapshot and tool execute.
  • No state file: maturity derives from artifact existence — it cannot drift.
  • Conservative generation: only evidence-backed entries are generated; quirk confirmation stays with the human.
  • Ecosystem position: dsh-assembler assembles agents from a capability catalog (parts are ready-made MCP/tools); this plugin forges agents from a code workspace (the repo itself is the material).

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。