Preface¶
Common practices for enabling agents to “understand the entire repository” within DSH involve repeatedly reading files, stacking code snippets via context, or manually maintaining documentation. Documentation easily falls out of sync with the code, while full scans consume tokens and are difficult to audit. AOCI (AI-Oriented Cognition Infrastructure) writes cognition into governed assets versioned by Git and exposes them to the model via local MCP; dsh-aoci connects this system to DeepSeek Harness, using slash commands and a dynamic MCP bridge to handle verification, binding, and indexing guidance. The following introduces what it is, what it can do, and how to install and use it.
What is this¶
dsh-aoci (GitHub: Fourteenth-Night/dsh-aoci, npm package name dsh-aoci, current version 0.2.9) is a community-maintained DSH workflow plugin. It integrates AOCI-CODE (a local stdio MCP server + Go CLI) into the DSH ecosystem: it separates deterministic governance (init, baseline, verification) from semantic authoring (where the model writes FRAS entries under the AOCI protocol), allowing agents to read and maintain a “repository/database cognitive map” via the tool surface.
The plugin itself is MIT licensed; AOCI-CODE is FSL-1.1-MIT (source-available). The plugin does not bundle the aoci binary; users must download it from the official Release, verify it using SHA-256 and minimum version checks, and then configure the path.
Core Features¶
One-click Slash Command /aoci¶
When a path is provided, it resolves absolute paths or paths relative to defaultRoot; when no path is provided, it automatically locates the current session workspace. The workflow includes: verifying the aoci binary → conditionally executing init/scan based on repository status → binding the dynamic MCP bridge → instructing the current agent to build the index via agent.steer. Optional parameters: --locale, --scope, --agent, --skip-scan, --db.
Dynamic MCP Bridge and Nine Cognition Tools¶
It launches aoci --repo <root> mcp (stdio) on demand and registers MCP tools: aoci_rules, aoci_overview, aoci_get_entries, aoci_search, aoci_maintain, aoci_update_entry, aoci_remove_entry, aoci_header, aoci_report.
By default, when toolSurface is compact, the model primarily sees aoci_overview and the aggregated entry aoci_call { tool, args }, reducing the tool schema size by approximately half; setting it to full exposes all nine tools directly.
Deterministic Governance and Query Tools¶
The host side also provides tools that do not rely on “the model improvising commands,” such as: aoci_status, aoci_verify, aoci_check, aoci_use, aoci_unbind, aoci_refresh (git changeset and incremental maintenance instructions since the last maintenance HEAD), aoci_audit, aoci_build_status; in compact mode, aoci_query { kind: relations|impact|lineage|db } merges multiple types of system cognition queries, while in full mode, aoci_scan, aoci_panel, aoci_relations, aoci_impact, aoci_lineage, aoci_db can be called separately.
Additionally, there is a static entry aoci_cognition { action, project?, path?, args? }, available in both PTC and native tool modes, supporting actions like rules/overview/maintain and local entry pre-validation (action: "validate").
Token and Compression¶
It features a compact tool surface, result truncation with receipt pointers, and a compaction hook: under context pressure, AOCI bodies can be folded into receipts, combined with ctx.tokenMeter to escalate recovery prompts (fold → fold+compact).
Browser Client¶
The ./client included in the package serves as the browser half of the web profile, registered via DSH’s __ModuleLoader__.load protocol; state and audit trails are stored in state/aoci/ (e.g., projects.json, runs.jsonl, aoci-events.jsonl).
Scope of Application¶
- Tested Environment: DSH 0.2.0-rc.2 (harness runtime
^0.2.0-rc.2, cordis^4.0.4); web profile. The desktop compatibility range inpackage.jsonis>=2.7.0 <4.0.0. - Node:
>=20. - Prerequisite Binary:
aocifrom the official AOCI-CODE Release (the documentation’s default path example isC:/aoci/bin/aoci.exe); the config itemminAociVersiondefaults to0.1.0-rc21in the Chinese README (the English README default was previously written as0.1.0-rc18at the truncation point; refer to the README of the plugin you installed).
Installation and Enablement¶
-
Download the corresponding platform’s
aoci(e.g.,aoci_0.1.0-rc21_windows_amd64.zip) from AOCI-CODE Releases, verify it against the publishedSHA256SUMS, and place it in a stable absolute path. -
After obtaining the plugin source directory, package it according to the official steps and add it to the profile (installation commands from the project README.zh-CN):
cd <plugin-checkout>
pnpm install
pnpm check
pnpm pack
dsh plugin --profile <name> add ./dsh-aoci-<version>.tgz
- After restarting DSH, fill in
binaryPath(and optionalbinarySha256) in the settings to point to youraociexecutable.
The DeepSeek Harness community plugin directory is located at the independent site dsh-aoci page on SkillHub; it has no official affiliation with DeepSeek / High-Flyer. It is recommended to review the source code and license yourself before installation.
Typical Usage¶
Restart and use the slash command in the conversation (examples from README.zh-CN):
/aoci D:\path\to\repo
/aoci
The first command binds and guides the indexing of the specified repository; the second automatically uses the current workspace when no path is provided.
For daily maintenance, you can let the agent call aoci_refresh to obtain incremental changes and maintenance batches, avoiding full rebuilds every time. The time for the initial indexing grows with the repository size (the documentation provides a magnitude reference: approximately 1 hour / 200,000 lines) and consumes model quota.
Common configuration items (excerpt):
| Key | Default | Description |
|---|---|---|
binaryPath |
C:/aoci/bin/aoci.exe |
Path to aoci |
toolSurface |
compact |
compact or full |
readOnly |
false |
When true, prohibits init/scan/maintain |
governance |
standard |
strict / standard / relaxed |
defaultRoot |
`` | Base for relative path resolution |
Applicable Scenarios and Notes¶
Suitable for: Teams that want to provide agents with a Git-traceable, verifiable/checkable repository cognition layer within the DSH workflow; teams that need pre-checks for dependencies, impact analysis, lineage, or database table structure metadata (without reading business data).
Notes:
- The plugin runs with the current DSH process privileges; the subprocess environment is whitelisted, and credentials are referenced only via environment variable names like
AOCI_DB_*, with no keys stored. readOnly: trueor binary SHA/version verification failure will prevent binding or write operations./aoci/apiis disabled by default; when enabled, the documentation states it is read-only and loopback.- After the host fully exits, the documentation notes that background scheduling such as nightly tasks is not guaranteed to execute.
- The package includes
scripts/aoci-mcp-driver.mjs, which can drive single-process MCP steps without a full host binding, with the output directory set tostate/aoci/tmp.
Conclusion¶
dsh-aoci stitches together AOCI-CODE’s governed cognition with DSH’s slash commands, dynamic MCP registration, and deterministic tools: a single /aoci completes verification and access, followed by using overview/search/maintain and refresh/audit to keep cognition synced with git. For further understanding of the design and version history, please refer to the repository’s docs/DESIGN.md and RELEASE.md.
- Directory Page: https://www.skillhub.cn/plugins/Fourteenth-Night/dsh-aoci
- GitHub: https://github.com/Fourteenth-Night/dsh-aoci