@dotdotgod/claude-code 0.2.22 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,5 +3,13 @@
3
3
  "description": "Dotdotgod project memory workflows for Claude Code: initialize shared docs, load project memory, plan doc-first, review graph impact, and clarify documentation.",
4
4
  "author": {
5
5
  "name": "dotdotgod"
6
+ },
7
+ "mcpServers": {
8
+ "dotdotgod-context": {
9
+ "command": "node",
10
+ "args": [
11
+ "${CLAUDE_PLUGIN_ROOT}/mcp/server.mjs"
12
+ ]
13
+ }
6
14
  }
7
15
  }
package/README.md CHANGED
@@ -41,6 +41,7 @@ claude --plugin-dir /path/to/dotdotgod/packages/claude-code
41
41
  | `/dd:plan` | Plan before implementation. | Writes or updates durable task intent in `docs/plan/<task-slug>/README.md`. |
42
42
  | `/dd:impact` | Review changed files before verification or handoff. | Uses `dotdotgod graph impact` to identify likely related docs, tests, commands, and source files. |
43
43
  | `document-clarify` | Improve docs wording without changing behavior contracts. | Clarifies README/spec/test/arch/plan/archive docs using memory-area roles. |
44
+ | `dotdotgod-context` MCP tools | Run 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. |
44
45
 
45
46
  ## Shared Project-Memory Contract
46
47
 
@@ -63,11 +64,11 @@ By default, `docs/spec/**` has two separate roles:
63
64
 
64
65
  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.
65
66
 
66
- ## Optional Hooks
67
+ ## Bundled MCP And Hooks
67
68
 
68
- Claude Code can run local lifecycle hooks from Claude settings. dotdotgod does not require hooks: `/dd:init`, `/dd:load`, `/dd:plan`, `/dd:impact`, and the bundled skills work without them.
69
+ The plugin starts a local stdio MCP server. It exposes generic execution/retrieval tools plus `dotdotgod_project_load`, `dotdotgod_project_impact`, and `dotdotgod_project_initialize`. Large outputs use the ignored project-local `.dotdotgod/context/` SQLite FTS5 store.
69
70
 
70
- Use hooks only when you want opt-in reminders, validation, or local safety rails around the same loop: plan, implement, impact-review, verify, review, and archive. See [`hooks/README.md`](https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/hooks/README.md) for current lifecycle notes and advisory examples.
71
+ 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`](https://github.com/dotdotgod/dotdotgod-kit/blob/main/packages/claude-code/hooks/README.md) for lifecycle and trust boundaries.
71
72
 
72
73
  ## Local Development
73
74
 
package/hooks/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # Optional Claude Code Hooks
1
+ # Claude Code Hooks
2
2
 
3
- Claude Code hooks can complement dotdotgod commands and skills, but they are not required. `/dd:load`, `/dd:plan`, `/dd:init`, `/dd:impact`, and the bundled skills work without hook configuration.
3
+ ## Packaged Defaults
4
4
 
5
- Use hooks only when you want opt-in reminders, lightweight validation, or local safety rails around the same doc-first workflow. Hooks run local commands with your user permissions, so copy and adapt examples deliberately.
5
+ The adapter packages `hooks/hooks.json` and `hooks/runtime.mjs`. They inject a bounded project-load requirement at session start, record successful `Edit`/`Write` paths, and deny broad verification or handoff shell commands while graph impact is pending. A denial names the required dotdotgod MCP tool; Claude calls it and retries the original operation. MCP tools bypass their own guards to prevent recursion.
6
+
7
+ Runtime state is local to `.dotdotgod/context/runtime/`. A successful impact call clears only paths whose current fingerprints match recorded edit state. Hooks run local commands with user permissions; review plugin resources before enabling them.
6
8
 
7
9
  ## Current Claude Code Lifecycle Notes
8
10
 
@@ -0,0 +1,7 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [{ "matcher": "", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/runtime.mjs\" sessionstart" }] }],
4
+ "PreToolUse": [{ "matcher": "Bash|Shell|Edit|Write|mcp__", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/runtime.mjs\" pretooluse" }] }],
5
+ "PostToolUse": [{ "matcher": "Edit|Write|mcp__", "hooks": [{ "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/runtime.mjs\" posttooluse" }] }]
6
+ }
7
+ }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { hookMain } from '@dotdotgod/context/hooks';
3
+ hookMain(process.argv[2] || '');
package/mcp/server.mjs ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { startServer } from '@dotdotgod/context/server';
3
+
4
+ startServer().catch((error) => {
5
+ console.error(error);
6
+ process.exitCode = 1;
7
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdotgod/claude-code",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "description": "Claude Code adapter for dotdotgod project memory workflows.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",
@@ -20,11 +20,15 @@
20
20
  "project-memory",
21
21
  "traceability"
22
22
  ],
23
+ "dependencies": {
24
+ "@dotdotgod/context": "0.2.23"
25
+ },
23
26
  "files": [
24
27
  ".claude-plugin",
25
28
  "commands",
26
29
  "skills",
27
30
  "hooks",
31
+ "mcp",
28
32
  "README.md",
29
33
  "LICENSE"
30
34
  ],
@@ -38,7 +42,7 @@
38
42
  "url": "https://github.com/dotdotgod/dotdotgod-kit/issues"
39
43
  },
40
44
  "scripts": {
41
- "verify": "node -e \"const fs=require('fs'); const req=['.claude-plugin/plugin.json','commands/dd/load.md','commands/dd/plan.md','commands/dd/init.md','commands/dd/impact.md','skills/project-load/SKILL.md','skills/doc-first-planning/SKILL.md','skills/project-initializer/SKILL.md','skills/impact-review/SKILL.md','skills/document-clarify/SKILL.md','skills/document-clarify/agents/openai.yaml','skills/project-initializer/scripts/init_project.sh','skills/project-initializer/templates/dotdotgod.config.json','hooks/README.md']; JSON.parse(fs.readFileSync('.claude-plugin/plugin.json','utf8')); for (const f of req) { if (!fs.existsSync(f)) throw new Error('missing '+f); } console.log('claude-code adapter ok')\"",
45
+ "verify": "node -e \"const fs=require('fs'); const req=['.claude-plugin/plugin.json','commands/dd/load.md','commands/dd/plan.md','commands/dd/init.md','commands/dd/impact.md','skills/project-load/SKILL.md','skills/doc-first-planning/SKILL.md','skills/project-initializer/SKILL.md','skills/impact-review/SKILL.md','skills/document-clarify/SKILL.md','skills/document-clarify/agents/openai.yaml','skills/project-initializer/scripts/init_project.sh','skills/project-initializer/templates/dotdotgod.config.json','hooks/README.md','hooks/hooks.json','hooks/runtime.mjs','mcp/server.mjs']; JSON.parse(fs.readFileSync('.claude-plugin/plugin.json','utf8')); for (const f of req) { if (!fs.existsSync(f)) throw new Error('missing '+f); } console.log('claude-code adapter ok')\"",
42
46
  "pack:dry-run": "pnpm pack --dry-run --json"
43
47
  }
44
48
  }