@dotdotgod/claude-code 0.6.6 → 0.7.0
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.
- package/commands/dd/init.md +1 -1
- package/mcp/cli.mjs +402 -385
- package/mcp/server.mjs +2 -4
- package/package.json +2 -2
- package/skills/project-initializer/scripts/init_project.sh +22 -130
- package/skills/project-initializer/templates/case-and-evidence.map.md +3 -0
- package/skills/project-initializer/templates/policy.map.md +4 -0
- package/skills/project-initializer/templates/portfolio.map.md +4 -0
- package/skills/project-initializer/templates/publication.map.md +4 -0
- package/skills/project-initializer/templates/research.map.md +6 -0
- package/skills/project-initializer/templates/software.map.md +3 -0
package/mcp/server.mjs
CHANGED
|
@@ -23310,7 +23310,6 @@ async function projectInitialize(input) {
|
|
|
23310
23310
|
if (dryRun) args.push("--dry-run");
|
|
23311
23311
|
if (input.projectName) args.push("--project-name", input.projectName);
|
|
23312
23312
|
if (input.template) args.push("--template", input.template);
|
|
23313
|
-
if (input.dotdotSetting) args.push("--dotdot-setting");
|
|
23314
23313
|
return await cliJson(args, root2);
|
|
23315
23314
|
}
|
|
23316
23315
|
|
|
@@ -23545,7 +23544,7 @@ function getJobs() {
|
|
|
23545
23544
|
jobRunner ??= new IngestionJobRunner(getStore());
|
|
23546
23545
|
return jobRunner;
|
|
23547
23546
|
}
|
|
23548
|
-
var server = new McpServer({ name: "dotdotgod-context", version: "0.
|
|
23547
|
+
var server = new McpServer({ name: "dotdotgod-context", version: "0.7.0" });
|
|
23549
23548
|
var scopeSchema = external_exports.enum(["transient", "session", "project"]).optional();
|
|
23550
23549
|
var outputModeSchema = external_exports.enum(["auto", "direct", "indexed", "discard"]).optional();
|
|
23551
23550
|
var commandSchema = {
|
|
@@ -23702,8 +23701,7 @@ register("project_initialize", "Initialize project memory; dry-run is default an
|
|
|
23702
23701
|
dryRun: external_exports.boolean().optional(),
|
|
23703
23702
|
confirmWrite: external_exports.boolean().optional(),
|
|
23704
23703
|
projectName: external_exports.string().optional(),
|
|
23705
|
-
template: external_exports.string().optional()
|
|
23706
|
-
dotdotSetting: external_exports.boolean().optional()
|
|
23704
|
+
template: external_exports.string().optional()
|
|
23707
23705
|
}, (input) => projectInitialize(projectInput(input)), { destructiveHint: true });
|
|
23708
23706
|
async function startServer() {
|
|
23709
23707
|
await server.connect(new StdioServerTransport());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotdotgod/claude-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Claude Code adapter for dotdotgod project memory workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"esbuild": "0.27.3",
|
|
28
|
-
"@dotdotgod/context": "0.
|
|
28
|
+
"@dotdotgod/context": "0.7.0"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
".claude-plugin",
|
|
@@ -6,15 +6,13 @@ TEMPLATES_DIR="$SCRIPT_DIR/../templates"
|
|
|
6
6
|
|
|
7
7
|
usage() {
|
|
8
8
|
cat <<'EOF'
|
|
9
|
-
Usage: init_project.sh <project-root> [--project-name NAME] [--template NAME] [--documentation-root PATH] [--
|
|
9
|
+
Usage: init_project.sh <project-root> [--project-name NAME] [--template NAME] [--documentation-root PATH] [--dry-run]
|
|
10
10
|
|
|
11
11
|
Initializes:
|
|
12
12
|
AGENTS.md, CLAUDE.md, CODEX.md
|
|
13
13
|
dotdotgod.config.json
|
|
14
14
|
docs/README.md
|
|
15
|
-
|
|
16
|
-
docs/test/README.md
|
|
17
|
-
docs/arch/README.md
|
|
15
|
+
Template-specific domain indexes (spec/arch/test only for software and research)
|
|
18
16
|
docs/plan/README.md
|
|
19
17
|
docs/archive/README.md
|
|
20
18
|
.gitignore entries for docs/plan, docs/archive, and .dotdotgod
|
|
@@ -24,7 +22,6 @@ EOF
|
|
|
24
22
|
PROJECT_ROOT=""
|
|
25
23
|
PROJECT_NAME=""
|
|
26
24
|
DRY_RUN=0
|
|
27
|
-
DOTDOT_SETTING=0
|
|
28
25
|
TEMPLATE_NAME="software"
|
|
29
26
|
DOCUMENTATION_ROOT="docs"
|
|
30
27
|
|
|
@@ -51,10 +48,6 @@ while [ "$#" -gt 0 ]; do
|
|
|
51
48
|
DOCUMENTATION_ROOT=$2
|
|
52
49
|
shift 2
|
|
53
50
|
;;
|
|
54
|
-
--dotdot-setting)
|
|
55
|
-
DOTDOT_SETTING=1
|
|
56
|
-
shift
|
|
57
|
-
;;
|
|
58
51
|
--dry-run)
|
|
59
52
|
DRY_RUN=1
|
|
60
53
|
shift
|
|
@@ -195,21 +188,11 @@ if [ "$DRY_RUN" -ne 1 ]; then
|
|
|
195
188
|
mkdir -p "$PROJECT_ROOT"
|
|
196
189
|
fi
|
|
197
190
|
|
|
198
|
-
|
|
199
|
-
if [ "$
|
|
200
|
-
|
|
201
|
-
- Follow the project documentation structure in `$DOCUMENTATION_ROOT/arch/DOCS_STRUCTURE.md` and code conventions in `$DOCUMENTATION_ROOT/arch/CODE_CONVENTIONS.md`.'
|
|
202
|
-
fi
|
|
203
|
-
|
|
204
|
-
ARCH_README_EXTRA=""
|
|
205
|
-
if [ "$DOTDOT_SETTING" -eq 1 ]; then
|
|
206
|
-
ARCH_README_EXTRA='
|
|
207
|
-
|
|
208
|
-
## Index
|
|
209
|
-
|
|
210
|
-
- `DOCS_STRUCTURE.md`: documentation layout, naming, README index, spec current-state writing contract, and domain directory promotion rules.
|
|
211
|
-
- `CODE_CONVENTIONS.md`: dotdot code conventions, including abstraction boundaries, source file size guidance, impact hotspot handling, and extraction/testability rules. If conventions grow across multiple topics, promote them to `conventions/README.md` with supporting UPPER_SNAKE_CASE files.'
|
|
191
|
+
DOMAIN_MAP=""
|
|
192
|
+
if [ ! -e "$CONFIG_PATH" ]; then
|
|
193
|
+
DOMAIN_MAP=$(cat "$TEMPLATES_DIR/$TEMPLATE_NAME.map.md")
|
|
212
194
|
fi
|
|
195
|
+
DOMAIN_MAP=$(printf '%s' "$DOMAIN_MAP" | sed "s#\`docs/#\`$DOCUMENTATION_ROOT/#g")
|
|
213
196
|
|
|
214
197
|
write_file "$PROJECT_ROOT/AGENTS.md" "# AGENTS.md
|
|
215
198
|
|
|
@@ -228,7 +211,7 @@ Canonical instructions for AI coding agents working in this repository.
|
|
|
228
211
|
- Preserve user edits and unrelated dirty worktree changes.
|
|
229
212
|
- Prefer existing local patterns over introducing new abstractions.
|
|
230
213
|
- Update docs when behavior, architecture, or test strategy changes.
|
|
231
|
-
- When using the dotdotgod CLI, run \`dotdotgod validate\` after docs changes and follow its traceability guidance
|
|
214
|
+
- When using the dotdotgod CLI, run \`dotdotgod validate\` after docs changes and follow its traceability guidance.
|
|
232
215
|
|
|
233
216
|
## dotdotgod
|
|
234
217
|
|
|
@@ -253,15 +236,12 @@ TODO
|
|
|
253
236
|
|
|
254
237
|
## Documentation Map
|
|
255
238
|
|
|
256
|
-
|
|
257
|
-
- \`$DOCUMENTATION_ROOT/test/\`: test strategy, regression cases, manual verification notes.
|
|
258
|
-
- \`$DOCUMENTATION_ROOT/arch/\`: architecture decisions, code conventions, module boundaries, data flow, infrastructure/runtime dependencies, integration boundaries, and migration design.
|
|
239
|
+
$DOMAIN_MAP
|
|
259
240
|
- \`$DOCUMENTATION_ROOT/\`: all directories use kebab-case; all markdown file names use UPPER_SNAKE_CASE, including \`README.md\`.
|
|
260
241
|
- \`$DOCUMENTATION_ROOT/\`: prefer keeping individual markdown files under 200 lines and under 10,000 characters; split larger docs into focused UPPER_SNAKE_CASE files and keep \`README.md\` as the index/overview.
|
|
261
242
|
- \`$DOCUMENTATION_ROOT/\`: when adding, renaming, splitting, moving, or archiving docs, update the nearest relevant \`README.md\` index/table of contents in the same change.
|
|
262
243
|
- \`$DOCUMENTATION_ROOT/\`: each docs subdirectory \`README.md\` acts as the local table of contents; list important files, task directories, status, and a one-line purpose for each entry.
|
|
263
244
|
- \`$DOCUMENTATION_ROOT/\`: start small with a single focused markdown file; when one domain grows into multiple docs, promote it to \`$DOCUMENTATION_ROOT/<area>/<domain>/README.md\` plus related UPPER_SNAKE_CASE files in that directory.
|
|
264
|
-
- \`$DOCUMENTATION_ROOT/arch/\`: code conventions may start as \`CODE_CONVENTIONS.md\`; when they grow across multiple topics, use \`$DOCUMENTATION_ROOT/arch/conventions/README.md\` as the index with supporting UPPER_SNAKE_CASE files.
|
|
265
245
|
- \`$DOCUMENTATION_ROOT/plan/\`: local active implementation plans. Create one kebab-case directory per task (\`$DOCUMENTATION_ROOT/plan/<task-slug>/\`), keep the task overview/index in that directory's \`README.md\`, and add supporting UPPER_SNAKE_CASE plan files alongside it. Ignored by git by default.
|
|
266
246
|
- \`$DOCUMENTATION_ROOT/archive/\`: local completed plans, temporary reports, historical notes, payload captures. Move completed plan task directories to \`$DOCUMENTATION_ROOT/archive/plan/<task-slug>/\`; put temporary reports and investigations under \`$DOCUMENTATION_ROOT/archive/report/<report-slug>/\`. Ignored by git by default.
|
|
267
247
|
|
|
@@ -298,111 +278,10 @@ This directory keeps project knowledge close to the code.
|
|
|
298
278
|
|
|
299
279
|
## Map
|
|
300
280
|
|
|
301
|
-
|
|
302
|
-
- \`test/\`: test strategy, regression cases, manual verification notes.
|
|
303
|
-
- \`arch/\`: architecture decisions, code conventions, module boundaries, data flow, infrastructure/runtime dependencies, integration boundaries, and migration design.
|
|
281
|
+
$(printf '%s' "$DOMAIN_MAP" | sed "s#\`$DOCUMENTATION_ROOT/#\`#g")
|
|
304
282
|
- \`plan/\`: local active implementation plans. Create one kebab-case directory per task (\`plan/<task-slug>/\`), keep the task overview/index in that directory's \`README.md\`, and add supporting UPPER_SNAKE_CASE plan files alongside it. Ignored by git by default.
|
|
305
283
|
- \`archive/\`: local completed plans, temporary reports, historical notes, payload captures. Move completed plan task directories to \`archive/plan/<task-slug>/\`; put temporary reports and investigations under \`archive/report/<report-slug>/\`. Ignored by git by default."
|
|
306
284
|
|
|
307
|
-
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/spec/README.md" "# Specs
|
|
308
|
-
|
|
309
|
-
Use this area for behavior specs, API contracts, and product requirements.
|
|
310
|
-
|
|
311
|
-
For projects using the dotdotgod CLI, behavior specs may be required by \`dotdotgod validate\` to include fenced \`json dotdotgod\` traceability blocks as the final section. The CLI owns the schema and prints property-level repair guidance when validation fails."
|
|
312
|
-
|
|
313
|
-
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/test/README.md" "# Tests
|
|
314
|
-
|
|
315
|
-
Use this area for test strategy, coverage notes, regression cases, and manual verification records."
|
|
316
|
-
|
|
317
|
-
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/arch/README.md" "# Architecture
|
|
318
|
-
|
|
319
|
-
Use this area for architecture decisions, code conventions, module boundaries, data flow notes, infrastructure/runtime dependencies, integration boundaries, and migration design.$ARCH_README_EXTRA"
|
|
320
|
-
|
|
321
|
-
if [ "$DOTDOT_SETTING" -eq 1 ]; then
|
|
322
|
-
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/arch/DOCS_STRUCTURE.md" "# Docs Structure
|
|
323
|
-
|
|
324
|
-
Long-term documentation structure for this project.
|
|
325
|
-
|
|
326
|
-
## Top-Level Areas
|
|
327
|
-
|
|
328
|
-
- \`$DOCUMENTATION_ROOT/spec/\`: product behavior, API contracts, user-facing requirements, and feature contracts.
|
|
329
|
-
- \`$DOCUMENTATION_ROOT/test/\`: test strategy, coverage notes, regression cases, and manual verification records.
|
|
330
|
-
- \`$DOCUMENTATION_ROOT/arch/\`: architecture decisions, code conventions, module boundaries, data flow, infrastructure/runtime dependencies, integration boundaries, and migration design.
|
|
331
|
-
- \`$DOCUMENTATION_ROOT/plan/\`: local active implementation plans.
|
|
332
|
-
- \`$DOCUMENTATION_ROOT/archive/\`: local completed plans, historical notes, payload captures, and investigation notes.
|
|
333
|
-
|
|
334
|
-
## Naming
|
|
335
|
-
|
|
336
|
-
- Directories under \`$DOCUMENTATION_ROOT/\` use kebab-case.
|
|
337
|
-
- Markdown files under \`$DOCUMENTATION_ROOT/\` use UPPER_SNAKE_CASE.
|
|
338
|
-
- \`README.md\` is the only mixed-case markdown filename exception and is required for index/overview files.
|
|
339
|
-
|
|
340
|
-
## File Size Guideline
|
|
341
|
-
|
|
342
|
-
Prefer keeping individual markdown files under 200 lines and 10,000 characters. When either guideline is exceeded, split the document into focused UPPER_SNAKE_CASE files and keep \`README.md\` as the index/overview. Configured validation exceptions should stay narrow and intentional.
|
|
343
|
-
|
|
344
|
-
## README Indexes
|
|
345
|
-
|
|
346
|
-
Each docs subdirectory \`README.md\` acts as the local table of contents. It should list important files, task directories, status, and a one-line purpose for each entry.
|
|
347
|
-
|
|
348
|
-
When adding, renaming, splitting, moving, or archiving docs, update the nearest relevant \`README.md\` in the same change.
|
|
349
|
-
|
|
350
|
-
## Domain Directory Promotion
|
|
351
|
-
|
|
352
|
-
Start small with one focused markdown file. When one domain grows into multiple docs, promote it to \`$DOCUMENTATION_ROOT/<area>/<domain>/README.md\` and place related UPPER_SNAKE_CASE markdown files in that directory.
|
|
353
|
-
|
|
354
|
-
## Spec Writing Contract
|
|
355
|
-
|
|
356
|
-
Behavior specs describe the current product contract: supported commands, API shapes, user-visible behavior, defaults, constraints, and validation outcomes.
|
|
357
|
-
|
|
358
|
-
Specs should not describe how behavior changed over time. Rewrite historical-change wording into direct current-state rules. Historical context, migration rationale, future extension ideas, and completed-plan notes belong in \`$DOCUMENTATION_ROOT/arch/\`, \`$DOCUMENTATION_ROOT/test/\`, \`$DOCUMENTATION_ROOT/archive/\`, or active \`$DOCUMENTATION_ROOT/plan/\` files rather than behavior specs. If compatibility behavior is still user-visible, keep it in the spec but phrase it as a current supported or unsupported rule.
|
|
359
|
-
|
|
360
|
-
Config/action terms such as \`remove\`, \`exclude\`, \`fallback\`, and \`replacement semantics\` are allowed when they name current behavior precisely.
|
|
361
|
-
|
|
362
|
-
## Traceability Blocks
|
|
363
|
-
|
|
364
|
-
Behavior specs may include fenced \`json dotdotgod\` traceability blocks as the final section to connect specs to source, tests, related docs, and verification commands. The dotdotgod CLI owns the schema and validation behavior.
|
|
365
|
-
|
|
366
|
-
## Plan and Archive Directories
|
|
367
|
-
|
|
368
|
-
Active task plans use \`$DOCUMENTATION_ROOT/plan/<task-slug>/README.md\`. Completed or superseded plan task directories move to \`$DOCUMENTATION_ROOT/archive/plan/<task-slug>/\`. Temporary investigations, reports, payload captures, and historical notes move to \`$DOCUMENTATION_ROOT/archive/report/<report-slug>/\`.
|
|
369
|
-
|
|
370
|
-
\`$DOCUMENTATION_ROOT/plan\` and \`$DOCUMENTATION_ROOT/archive\` are ignored by git by default.
|
|
371
|
-
"
|
|
372
|
-
|
|
373
|
-
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/arch/CODE_CONVENTIONS.md" "# Code Conventions
|
|
374
|
-
|
|
375
|
-
Dotdot code conventions for keeping implementation simple and maintainable.
|
|
376
|
-
|
|
377
|
-
## Abstraction Boundaries
|
|
378
|
-
|
|
379
|
-
- Do not introduce unnecessary abstractions.
|
|
380
|
-
- Do not abstract code that is not reused.
|
|
381
|
-
- Do not abstract reused code when the reused behavior is likely to split into separate features or flows later.
|
|
382
|
-
- Prefer local, explicit code until a stable reuse pattern appears.
|
|
383
|
-
|
|
384
|
-
## Source File Size
|
|
385
|
-
|
|
386
|
-
- Keep source files small enough to read in one focused pass by humans and coding agents.
|
|
387
|
-
- If code grows beyond 150 lines, consider splitting or extracting focused units even when it is not reused.
|
|
388
|
-
- Review files approaching 250 lines for focused extraction by responsibility.
|
|
389
|
-
- Split by behavior or responsibility, not by arbitrary layers.
|
|
390
|
-
|
|
391
|
-
## Dotdotgod Impact Hotspots
|
|
392
|
-
|
|
393
|
-
- Treat repeated \`dotdotgod graph impact\` results that collapse onto one large file as a design signal, not as normal precision.
|
|
394
|
-
- Dotdotgod impact reveals mixed-responsibility hotspots; it does not replace focused module boundaries.
|
|
395
|
-
- When unrelated changes keep pointing to the same source file, split the file by behavior so impact results, tests, and docs can map to narrower responsibilities.
|
|
396
|
-
|
|
397
|
-
## Extraction and Testability
|
|
398
|
-
|
|
399
|
-
- Prefer extracting pure helpers when behavior can be tested without runtime dependencies.
|
|
400
|
-
- Keep runtime integration explicit and local until reuse is stable.
|
|
401
|
-
- Put testable logic in focused modules before adding broad framework abstractions.
|
|
402
|
-
- Preserve plain-text readability: avoid dense clever code, hidden control flow, and large mixed-responsibility files.
|
|
403
|
-
"
|
|
404
|
-
fi
|
|
405
|
-
|
|
406
285
|
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/plan/README.md" "# Plans
|
|
407
286
|
|
|
408
287
|
Use this area for active implementation plans.
|
|
@@ -441,6 +320,19 @@ Use this area for local completed plans, temporary reports, historical notes, pa
|
|
|
441
320
|
This directory is local-only and ignored by git by default."
|
|
442
321
|
|
|
443
322
|
if [ ! -e "$CONFIG_PATH" ]; then
|
|
323
|
+
case "$TEMPLATE_NAME" in
|
|
324
|
+
software|research)
|
|
325
|
+
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/spec/README.md" "# Specs
|
|
326
|
+
|
|
327
|
+
Use this area for behavior specs, API contracts, and requirements. Follow \`dotdotgod validate\` traceability guidance for applicable documents."
|
|
328
|
+
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/arch/README.md" "# Architecture
|
|
329
|
+
|
|
330
|
+
Use this area for architecture decisions, design rationale, conventions, and integration boundaries."
|
|
331
|
+
write_file "$PROJECT_ROOT/$DOCUMENTATION_ROOT/test/README.md" "# Verification
|
|
332
|
+
|
|
333
|
+
Use this area for test strategy, evaluation methods, regression cases, and verification records."
|
|
334
|
+
;;
|
|
335
|
+
esac
|
|
444
336
|
case "$TEMPLATE_NAME" in
|
|
445
337
|
software)
|
|
446
338
|
;;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- `docs/policy/`: Use this area for integrated policy proposals and outputs.
|
|
2
|
+
- `docs/sections/`: Use this area for source policy sections.
|
|
3
|
+
- `docs/evidence/`: Use this area for evidence supporting policy proposals.
|
|
4
|
+
- `docs/outputs/`: Use this area for maintained policy submission outputs.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- `docs/strategy/`: Use this area for portfolio strategy and risk rules.
|
|
2
|
+
- `docs/positions/`: Use this area for position theses and investment conclusions.
|
|
3
|
+
- `docs/journal/`: Use this area for dated investment decisions and reviews.
|
|
4
|
+
- `docs/report/`: Use this area for maintained market research and analysis.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
- `docs/outline/`: Use this area for publication structure and outlines.
|
|
2
|
+
- `docs/chapters/`: Use this area for chapter plans and direction.
|
|
3
|
+
- `docs/claims/`: Use this area for maintained claims and their support.
|
|
4
|
+
- `docs/research/`: Use this area for research sources and supporting notes.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
- `docs/spec/`: Use this area for behavior specs, API contracts, and requirements. Follow `dotdotgod validate` traceability guidance for applicable documents.
|
|
2
|
+
- `docs/arch/`: Use this area for architecture decisions, design rationale, conventions, and integration boundaries.
|
|
3
|
+
- `docs/test/`: Use this area for test strategy, evaluation methods, regression cases, and verification records.
|
|
4
|
+
- `docs/research/`: Use this area for research notes, sources, and findings.
|
|
5
|
+
- `docs/record/`: Use this area for dated measurements, experiments, and execution records.
|
|
6
|
+
- `docs/report/`: Use this area for research diagnoses, analyses, results, and performance reports.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
- `docs/spec/`: Use this area for behavior specs, API contracts, and requirements. Follow `dotdotgod validate` traceability guidance for applicable documents.
|
|
2
|
+
- `docs/arch/`: Use this area for architecture decisions, design rationale, conventions, and integration boundaries.
|
|
3
|
+
- `docs/test/`: Use this area for test strategy, evaluation methods, regression cases, and verification records.
|