@dotdotgod/claude-code

中文文档
0.8.1发布于 2026/11/11Elastic-2.0ES Module零依赖近 30 天下载 2431

Claude Code adapter for dotdotgod project memory workflows.

原始使用文档
文档目录10 节
  1. What Changes
  2. Start Here
  3. What It Adds to Claude Code
  4. Shared Project-Memory Contract
  5. Memory Areas and Traceability
  6. Bundled MCP And Hooks
  7. Native Plan Directory
  8. Local Development
  9. Learn More
  10. Workflow Model

@dotdotgod/claude-code

document-clarify is distributed separately through @dotdotgod/skills. Before upgrading from a bundled copy, follow its migration guide.

npm version GitHub License: Elastic 2.0

Claude Code adapter for dotdotgod's docs-first project-memory workflow.

Use this package when you want Claude Code to work from a shared project brain: maintained agent rules and docs, durable plans, focused context loading, and changed-file evidence before handoff.

What Changes

  • Claude starts from shared project knowledge. AGENTS.md and the documentation map remain reusable across agents while Claude-specific commands provide a native entry point.
  • Plans become durable project artifacts. /dd:plan records task intent under docs/plan/ so it survives compaction, handoff, and new sessions.
  • Project evidence arrives when needed. /dd:load and the local MCP runtime provide bounded documentation, command output, files, and fetched text.
  • Changed files retain their review context. Packaged hooks track successful edits and require matching graph impact before broad verification or handoff commands.
  • The workflow stays inspectable. A denied operation names the required MCP action, and Claude retries the original operation after the check succeeds.

Start Here

This package is a Claude Code plugin containing a manifest, /dd:* commands, skills, MCP integration, and hooks. Claude Code registers these resources when it loads the package through plugin registration or a local plugin directory.

Register the dotdotgod plugin marketplace inside Claude Code, then install the plugin:

/plugin marketplace add dotdotgod/dotdotgod-kit
/plugin install dotdotgod@dotdotgod

Then use the bundled /dd:* commands in your repository:

/dd:init
/dd:load
/dd:plan Update the API migration plan.
/dd:impact

After an update, restart Claude Code and confirm the active plugin points to the new installed cache entry. Source changes do not rewrite an existing ~/.claude/plugins/cache/.../<hash>/; reinstall the plugin through the supported flow if Claude continues using an older cache hash.

For local development from a source checkout, load the plugin directory directly instead of installing:

claude --plugin-dir /path/to/dotdotgod/packages/claude-code

What It Adds to Claude Code

Command or skillUse it forResult
/dd:initStart a repository with dotdotgod conventions.Creates or normalizes shared agent files, docs indexes, local-memory areas, and the complete default project config.
/dd:loadLoad project memory without changing maintained project files.Renders the shared Markdown tree and uses dotdotgod query when focus text is provided; unavailable optional semantic routing falls back to the map with bounded evidence.
/dd:planPlan before implementation.Writes or updates durable task intent in docs/plan/<task-slug>/README.md.
/dd:impactReview changed files before verification or handoff.Uses dotdotgod graph impact to identify likely related docs, tests, commands, and source files.
dotdotgod-context MCP toolsRun commands, process files, fetch/index text, and search large output locally.Keeps large raw bytes outside model context and returns bounded output or FTS5 excerpts.

Shared Project-Memory Contract

  • AGENTS.md remains canonical.
  • CLAUDE.md stays thin and imports or points to AGENTS.md.
  • Specs describe behavior and requirements.
  • Architecture docs explain rationale, boundaries, and conventions.
  • Test docs explain verification strategy, regression coverage, fixtures, and commands.
  • Active plans use docs/plan/<task-slug>/README.md.
  • Completed plans move to docs/archive/plan/<task-slug>/.
  • Temporary reports move to docs/archive/report/<report-slug>/.
  • docs/archive/README.md is the archive map; archive bodies should be read only when targeted.

Memory Areas and Traceability

By default, docs/spec/** has two separate roles:

  • It is stable shared project memory for product behavior and requirements.
  • It is the traceability-enforced path for behavior specs.

Projects can customize memory roles with memory.areas, select traceability-enforced Markdown with traceability.required and traceability.exclude, and define the ordered complete list of traceability string arrays with traceability.keys. Each key owns its label, path or command target, graph relation, and PPR weight.

Bundled MCP And Hooks

The plugin starts a local stdio MCP server. It exposes execute and execute_file; context index, search, fetch, session resume, durable ingestion-job lifecycle, explicit healing, stats, doctor, and purge tools; plus project_load, project_impact, impact_status, project_initialize, embedding_status, and confirmation-gated embedding_install. Individual names have no dotdotgod_ prefix; discover the host-qualified names. Reload existing sessions after upgrading; legacy names are not aliases.

Dotdotgod execution tools share a 10 MiB stdout/stderr capture ceiling per command. Crossing that ceiling terminates the child process and reports captureLimitExceeded; direct stdout and stderr excerpts are each capped at 1 MiB. Their child environments preserve compatibility-oriented inheritance after filtering runtime injection variables; this reports filtered names without values but does not isolate ordinary inherited credentials. Large output is indexed before retrieval in the ignored project-local .dotdotgod/context/context.sqlite FTS5 store, and searches return bounded excerpts. The store uses WAL, a bounded busy timeout, and transactional source replacement, expiry, and purge. Structural Markdown/JSON chunks, bounded typo-tolerant trigram candidates, reciprocal-rank fusion, and title/path/proximity signals improve retrieval while provenance and instructionAuthority: "none" identify retrieved text as non-authoritative data.

The MCP index tool accepts files or explicitly requested bounded directories, including external paths, with deterministic traversal, configurable resource limits, explicit extension/path exclusions, and symlinks skipped by default. These capture and retrieval rules apply when Claude calls the dotdotgod MCP tools; Claude Code's built-in Bash tool keeps its native behavior. URL indexing performs application-level HTTP(S), DNS/address, connected-peer, redirect, and byte-limit validation. Accepted HTML is normalized as bounded untrusted text without browser rendering, JavaScript, subresource loading, or link following by default. The server bundles no browser renderer, so browser opt-in fails unless a host injects that capability. These controls are not a network sandbox or complete prompt-injection prevention. See the @dotdotgod/context npm package, its GitHub README, and the maintained execution contract for the complete runtime behavior.

Bundled hooks mark project load as required at session start, record successful source/config edits, and deny broad verification or handoff commands until matching graph impact succeeds. Denial asks Claude to call the required MCP tool and retry; hooks do not silently change one tool type into another. See hooks/README.md for lifecycle and trust boundaries.

Native Plan Directory

After opting in, run dotdotgod init . --claude-plans --dry-run, then repeat without --dry-run to add project .claude/settings.json plansDirectory. Use node <plugin>/mcp/cli.mjs init . --claude-plans if the CLI is unavailable. Existing values and other settings are preserved; global settings and permissions are untouched. Native filenames remain Claude Code-owned, while shared task plans use docs/plan/<task-slug>/README.md when the mode permits. No Mods are required. Actual native storage was verified on Claude Code 2.1.308 with an offline fixture.

Local Development

pnpm --filter @dotdotgod/claude-code run verify
pnpm --filter @dotdotgod/claude-code run pack:dry-run

Learn More

See the root README, Context curation, Context mechanics, Memory area config, and Traceability config.

Workflow Model

The adapter connects Claude Code's commands, skills, MCP tools, and hooks to the same maintained project memory used by other agents. README indexes route focused reads, durable plans preserve intent, and graph impact supplies related evidence for review.

版本与发布记录

@dotdotgod/claude-code 共发布 99 个版本,首次发布于 2026/05/15;过去 12 个月发布了 99 个版本。

版本发布日期距今
0.8.1latest2026/11/112 天前
0.8.02026/11/103 天前
0.7.32026/11/058 天前
0.7.12026/10/2914 天前
0.7.02026/10/2915 天前
0.6.72026/10/2717 天前

其他发布通道:next → 0.6.6。

关于 @dotdotgod/claude-code 的常见问题

@dotdotgod/claude-code 是什么?

Claude Code adapter for dotdotgod project memory workflows.

如何安装 @dotdotgod/claude-code?

在项目目录运行 npm install @dotdotgod/claude-code,或使用 pnpm add / yarn add / bun add。

@dotdotgod/claude-code 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dotdotgod__claude-code 是否存在。

@dotdotgod/claude-code 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dotdotgod/claude-code 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.5.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dotdotgod/claude-code 可以商用吗?

@dotdotgod/claude-code 使用 Elastic-2.0 许可。声明的许可为 Elastic-2.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@dotdotgod/claude-code 的下载量有多少?

根据 npm 官方下载统计,@dotdotgod/claude-code 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,431 次,日均约 81 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dotdotgod/claude-code 还在维护吗?

最新版本 0.8.1 发布于 2026/11/11(2 天前);至今共发布 99 个版本,其中过去 12 个月发布了 99 个;首次发布于 2026/05/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。