@dotdotgod/claude-code 0.2.6 → 0.2.7

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.
@@ -12,56 +12,13 @@ Initialize or normalize a repository with dotdotgod project memory and the compl
12
12
 
13
13
  Arguments: `$ARGUMENTS`
14
14
 
15
- ## Overview
15
+ ## Goal
16
16
 
17
- Create a conservative dotdotgod project baseline shared by AI coding agents:
18
-
19
- - `AGENTS.md` is the canonical project instruction file.
20
- - `CLAUDE.md` and `CODEX.md` are thin agent-specific entrypoints.
21
- - `docs/` contains concise indexes for specs, tests, architecture, active plans, and archives.
22
- - `dotdotgod.config.json` materializes the complete editable default project policy.
23
- - `.gitignore` keeps `docs/plan`, `docs/archive`, and `.dotdotgod` local by default.
24
-
25
- Under `docs/`, directories use kebab-case and markdown file names use UPPER_SNAKE_CASE, including `README.md`.
26
-
27
- ## CLI and Fallback
28
-
29
- Prefer the CLI initializer:
30
-
31
- ```bash
32
- dotdotgod init <project-root>
33
- ```
34
-
35
- Use the bundled fallback when the CLI is unavailable:
36
-
37
- ```bash
38
- sh "${CLAUDE_PLUGIN_ROOT}/skills/project-initializer/scripts/init_project.sh" <project-root>
39
- ```
40
-
41
- Both paths create the same baseline file set and canonical config while preserving existing files. Use `--dry-run` for unfamiliar repositories and `--dotdot-setting` for the optional documentation and code-convention guidance.
17
+ Create a non-destructive dotdotgod baseline with canonical agent instructions, thin agent entrypoints, documentation indexes, project config, and local-memory ignore rules.
42
18
 
43
19
  ## Workflow
44
20
 
45
- 1. Inspect the project root.
46
- - Check `AGENTS.md`, `AGENT.md`, `CLAUDE.md`, `CODEX.md`, `README.md`, `.gitignore`, `docs/`, and `dotdotgod.config.json`.
47
- - Preserve project-specific instructions and unrelated user work.
48
- - Keep `AGENTS.md` canonical when both `AGENT.md` and `AGENTS.md` exist.
49
- 2. Run the initializer.
50
- - Use the CLI when available; otherwise use the bundled fallback.
51
- - Existing files are always preserved and skipped.
52
- 3. Review and validate.
53
- - Fill project-specific placeholders in `AGENTS.md` when the required context is known.
54
- - Keep `CLAUDE.md` and `CODEX.md` thin.
55
- - Preserve the generated complete memory-area set; do not replace it with a partial hand-written list.
56
- - Run `dotdotgod validate <project-root>` after creating or changing config when the CLI is available.
57
- - Inspect `dotdotgod config <project-root> --json` when validation fails or resolved policy needs review.
58
- 4. Report the result.
59
- - List created, updated, and skipped files, plus validation failures.
60
- - Report when CLI validation was unavailable.
61
- - Identify existing instructions that still require manual consolidation.
62
-
63
- ## Bundled Resources
64
-
65
- - `scripts/init_project.sh`: POSIX fallback initializer.
66
- - `templates/dotdotgod.config.json`: generated canonical config template used by the fallback.
67
- - `references/agent-docs.md`: shared agent-document naming and content model.
21
+ 1. Inspect existing agent instructions, documentation, config, and ignore rules; preserve existing files and unrelated user work.
22
+ 2. Run `dotdotgod init <project-root>` when available; otherwise run `sh "${CLAUDE_PLUGIN_ROOT}/skills/project-initializer/scripts/init_project.sh" <project-root>`. Existing files must be skipped, not replaced.
23
+ 3. Validate the initialized project with `dotdotgod validate <project-root>` when available.
24
+ 4. Report created and skipped files, validation failures, and unresolved instruction conflicts.
@@ -14,46 +14,16 @@ User focus, if provided: `$ARGUMENTS`
14
14
 
15
15
  ## Goal
16
16
 
17
- Load the current repository's dotdotgod project memory without modifying source, documentation, or project config. A focused query may refresh ignored `.dotdotgod/vectors/` data and the runtime's user-level model cache. Use a full load for an explicit project overview and a compact load to refresh an already-loaded session. Treat free-form arguments as query text, not as mode switches.
17
+ Load the repository's dotdotgod project memory without modifying maintained files. Treat free-form arguments as query text, not mode switches.
18
18
 
19
19
  ## Workflow
20
20
 
21
- 1. Identify the repository root and current state.
22
- - Check the current directory and, when Git is available, the repository root, branch, and dirty worktree status.
23
- - Mention user changes and avoid reverting or cleaning them.
24
- 2. Read baseline memory only when it is not already clear from loaded context.
25
- - Start with `AGENTS.md`, the current adapter entrypoint when present, `README.md`, and `docs/README.md`.
26
- - Do not run scaffold, config-writing, or source-modifying commands during a load.
27
- 3. Build the shared documentation map.
28
- - Discover Markdown files under `docs/` after applying `load.documentationSummary.exclude`, which excludes `docs/plan` and `docs/archive` by default.
29
- - Render repository-relative paths as a prefix-compressed tree. Count `docs/` as directory depth 1.
30
- - Without arguments, expand through directory depth 5. At the boundary, summarize deeper descendants with exact directory and Markdown-file counts.
31
- 4. Use query routing only when arguments are present.
32
- - Run `dotdotgod query <root> "<arguments>" --limit 30 --json` when the command is available.
33
- - Show the best-ranked chunk from each of at most 30 distinct Markdown files and render the documentation tree through directory depth 3.
34
- - If query is unavailable, continue from the tree, README indexes, and targeted reads.
35
- 5. Read document bodies selectively.
36
- - Follow README indexes as maintained tables of contents.
37
- - Prefer query results, explicit paths, and the current request before broader search.
38
- - Use `grep` or `find` only when targeted reads do not provide enough evidence.
39
- 6. Read local memory only when relevant.
40
- - For active plans, list `docs/plan` entries first and read only relevant plan files.
41
- - Use `docs/archive/README.md` as the history map. Do not scan archive bodies by default.
42
- 7. Avoid broad reads of generated outputs, dependencies, databases, caches, secrets, and `.env*` contents.
43
-
44
- ## Output Shape
45
-
46
- For a full load, respond concisely with:
47
-
48
- - Project narrative and purpose
49
- - Key working rules
50
- - Relevant documentation and verification routes
51
- - Relevant active plans or archive history only when needed
52
- - Questions surfaced by loaded material
53
-
54
- For a compact load, respond with:
55
-
56
- - Compact project-memory status
57
- - Relevant documentation routes
58
- - Relevant active plan hints only when needed
59
- - A short bounded list of next reads, or a note that none are needed
21
+ 1. Identify the repository root.
22
+ 2. When baseline context is missing, read `AGENTS.md`, the adapter entrypoint, `README.md`, and `docs/README.md` when present.
23
+ 3. Build a prefix-compressed tree of `docs/**/*.md` after `load.documentationSummary.exclude`. Count `docs/` as depth 1; without arguments, expand through depth 5 and summarize deeper descendants with exact directory and Markdown-file counts.
24
+ 4. With arguments, run `dotdotgod query <root> "<arguments>" --limit 30 --json` when available, return at most 30 distinct Markdown files, and render the tree through depth 3. Fall back to the tree and README indexes when query is unavailable.
25
+ 5. Read bodies selectively from query results, explicit paths, and README indexes. Read relevant active plans only when needed, use `docs/archive/README.md` as the history map, and avoid broad generated, dependency, cache, or secret reads.
26
+
27
+ ## Output
28
+
29
+ Report the project purpose, key rules, relevant documentation routes, and only the active-plan or next-read hints needed for the request. Keep compact loads to a brief refresh.
@@ -14,74 +14,23 @@ Task request: `$ARGUMENTS`
14
14
 
15
15
  ## Goal
16
16
 
17
- Create implementation plans from the repository's documented design sources before changing source/config files when the work needs durable coordination. Treat substantial planning as a managed artifact under `docs/plan`.
17
+ Create an implementation plan from maintained repository documentation before substantial source or configuration changes.
18
18
 
19
- Do not start substantial implementation until the plan has a clear evidence trail and the user has asked to execute it. Treat the written plan file as the durable review artifact for large, risky, multi-file, behavior-changing, architecture-changing, CLI/API-affecting, source/config-heavy, or resumable work. For obvious bounded work, a short in-chat checklist is enough unless the user asks for a saved plan.
20
-
21
- ## Source Order
22
-
23
- Prefer live repository docs in this order:
24
-
25
- 1. `AGENTS.md`, `CLAUDE.md`, `CODEX.md`, `README.md`, and `docs/README.md` for working rules and project map.
26
- 2. `docs/spec/` for behavior, domain rules, API contracts, and acceptance criteria.
27
- 3. `docs/test/` for verification strategy, regression cases, fixtures, and manual checks.
28
- 4. `docs/arch/` for architecture decisions, module boundaries, integration constraints, and runtime assumptions.
29
- 5. `docs/plan/README.md` and matching active plans under `docs/plan/`.
30
- 6. Relevant completed plans under `docs/archive/plan/` or reports under `docs/archive/report/` only when directly useful.
19
+ Use `docs/plan/<task-slug>/README.md` for substantial, risky, or resumable work; otherwise use a short in-chat checklist unless the user requests a saved plan.
31
20
 
32
21
  ## Workflow
33
22
 
34
- 1. Establish current state.
35
- - Check git status.
36
- - Locate relevant docs and active plans.
37
- - Preserve user edits and unrelated dirty worktree changes.
38
- - If the session is long or noisy, suggest a user-initiated planning-focused compaction before writing or revising the plan; do not compact automatically because compaction is lossy.
39
- 2. Gather evidence before planning.
40
- - When the request contains explicit project-memory refs such as `[[PLAN_MODE]]`, run `dotdotgod expand <root> "<request>" --json` before broad `grep` or `find` scans, then read the resolved candidates selectively.
41
- - When the request uses high-signal natural refs such as `PLAN_MODE`, `docs/spec/PLAN_MODE.md`, or quoted doc names, run `dotdotgod expand <root> "<request>" --fuzzy --json`; skip fuzzy expansion for generic low-signal words alone and respect configured fuzzy low-signal add/remove terms.
42
- - Search docs by domain terms from the user request.
43
- - Read nearest README indexes and relevant focused docs.
44
- - For behavior changes, prefer specs with CLI-enforced fenced `json dotdotgod` traceability blocks in the final section; use their source, test, related-doc, and verification-command mappings before editing code.
45
- - When the dotdotgod CLI is available and likely target files are known, run one bounded multi-seed `dotdotgod graph impact <root> --changed <path-a> --changed <path-b> --yml` command for up to 20 unique files, splitting only larger sets into ordered batches. Use the combined ranking and per-seed top-five related specs, tests, docs, commands, scores, and reasons to strengthen target files, risks, and verification steps. If impact lookup fails or the CLI is unavailable, continue with README-index and traceability fallback evidence.
46
- - For Claude Code and Codex, add an explicit post-edit impact-review step to the plan when the task will change source/config files, because those adapters do not have Pi's automatic pending-impact reminder or `/impact-check` enforcement.
47
- - During planning, treat these dotdotgod commands as bounded context/status helpers: `status`, `query`, `resolve`, `expand`, `graph impact`, `graph communities`, read-only `config`, and `index`. Do not run mutating scaffold/config commands such as `init` or `config init` unless the user explicitly asks for initialization or config creation.
48
- - Use `grep` or `find` after reference expansion, impact, and targeted reads when the task needs fallback discovery or raw source text search.
49
- - Read code only after docs identify likely module boundaries, impact output points to relevant files, or docs are missing/stale.
50
- 3. Create or update an active plan at this path when durable planning is needed:
51
-
52
- ```text
53
- docs/plan/<task-slug>/README.md
54
- ```
55
-
56
- Skip the saved plan for obvious bounded work such as typos, single-file documentation clarifications, targeted test/validation runs, or one-file fixes with an unambiguous implementation path.
57
- 4. For durable active plans that will be executed, keep the user-facing plan in `docs/plan/<task-slug>/README.md`. If `/plan-goal` staged planning is useful, it may record internal checkpoints under `docs/plan/<task-slug>/.dotdotgod-plan/NN_STAGE_NAME.md`; do not make legacy stage directories such as `01-intake/README.md` the required plan product.
58
- 5. Use UPPER_SNAKE_CASE support files in the task directory only when they improve resume quality, such as `ROLE_AREA_WORKSTREAMS.md`, `ATOMIC_TASKS.md`, `PROGRESS_LOG.md`, or `VERIFICATION_EVIDENCE.md`.
59
- 6. For long-running durable tasks, use concise README sections or optional support files for chronological progress, durable decisions, resume state, and task-specific verification checklists. `.dotdotgod-plan/` checkpoints are `/plan-goal` state, not a general Plan Mode requirement.
60
- 7. When a durable plan is created, include:
61
- - scope and current status
62
- - target files and rationale
63
- - impact-derived related files/checks when available
64
- - implementation steps
65
- - risks and edge cases when useful
66
- - verification method
67
- - current resume state when useful
68
- - final housekeeping step to move completed work to `docs/archive/plan/<task-slug>/`
69
- - for Claude Code/Codex plans, a concrete `dd:impact` or `impact-review` step before broad verification or final handoff when source/config/docs files changed
70
- 8. Before executing a durable active plan, ensure the user has explicitly asked to execute it and resolve any plan-local Discussion Queue items that block execution review. Plan Mode does not require `dotdotgod plan validate` before execution; `/plan-goal` and manual/non-Plan-Mode workflows may still use the CLI plan-validation contract when appropriate.
71
- 9. Update `docs/plan/README.md` if the repository keeps active plan entries there.
72
- 10. Use repository-local package manager evidence for verification commands. In this repository, prefer `pnpm run verify`, `pnpm run pack:dry-run`, and `.husky/pre-push` when applicable.
73
- 11. After creating or updating behavior specs, run project validation when possible. For dotdotgod projects, `dotdotgod validate` enforces machine-readable `json dotdotgod` traceability blocks as the final section in specs. Use `dotdotgod validate --check-index` when you need to confirm markdown fingerprints match the graph index. If validation fails, use the schema, property guidance, and example shown in the validation error to repair the spec.
74
- 12. Stop after presenting the plan unless the user explicitly asks for execution.
75
- 13. During implementation in Claude Code or Codex, use `/dd:impact`, `dd:impact`, or the `impact-review` skill after edits and before broad verification, commits, pushes, publishing, or final handoff.
76
- 14. After implementation and verification, archive completed or superseded plan directories under `docs/archive/plan/<task-slug>/`; remove stale local plan artifacts only when the project policy allows plan/archive housekeeping.
23
+ 1. Check for a matching active plan.
24
+ 2. Reuse loaded memory and the documentation map, then use focused query and README indexes to select maintained docs and verify conclusions in them.
25
+ 3. Inspect the source needed to confirm targets and constraints.
26
+ 4. Run impact review on likely changed files and refine targets, risks, and verification.
27
+ 5. For durable work, write and present the task README with scope, targets, executable steps, verification, and required completion gates.
28
+ 6. Resolve blocking decisions and stop until the user asks to execute the plan.
77
29
 
78
30
  ## Quality Rules
79
31
 
80
32
  - Prefer documented facts over inference; label inference explicitly.
81
- - Keep plans concise and maintainable.
82
- - Use local repository terminology and existing module names.
83
- - Validation steps must be executable commands or concrete review checks.
84
- - Avoid turning explanatory numbered lists into executable implementation plans. Use concrete action-oriented `Plan:` steps only when a real active plan artifact is being created or updated.
33
+ - Keep plans concise, executable, and maintainable.
85
34
 
86
35
  ## Execution Rule
87
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdotgod/claude-code",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Claude Code adapter for dotdotgod project memory workflows.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",
@@ -10,71 +10,20 @@ version: 1.0.0
10
10
 
11
11
  ## Goal
12
12
 
13
- Create implementation plans from the repository's documented design sources before changing source/config files when the work needs durable coordination. Treat substantial planning as a managed artifact under `docs/plan`.
13
+ Create an implementation plan from maintained repository documentation before substantial source or configuration changes.
14
14
 
15
- Do not start substantial implementation until the plan has a clear evidence trail and the user has asked to execute it. Treat the written plan file as the durable review artifact for large, risky, multi-file, behavior-changing, architecture-changing, CLI/API-affecting, source/config-heavy, or resumable work. For obvious bounded work, a short in-chat checklist is enough unless the user asks for a saved plan.
16
-
17
- ## Source Order
18
-
19
- Prefer live repository docs in this order:
20
-
21
- 1. `AGENTS.md`, `CLAUDE.md`, `CODEX.md`, `README.md`, and `docs/README.md` for working rules and project map.
22
- 2. `docs/spec/` for behavior, domain rules, API contracts, and acceptance criteria.
23
- 3. `docs/test/` for verification strategy, regression cases, fixtures, and manual checks.
24
- 4. `docs/arch/` for architecture decisions, module boundaries, integration constraints, and runtime assumptions.
25
- 5. `docs/plan/README.md` and matching active plans under `docs/plan/`.
26
- 6. Relevant completed plans under `docs/archive/plan/` or reports under `docs/archive/report/` only when directly useful.
15
+ Use `docs/plan/<task-slug>/README.md` for substantial, risky, or resumable work; otherwise use a short in-chat checklist unless the user requests a saved plan.
27
16
 
28
17
  ## Workflow
29
18
 
30
- 1. Establish current state.
31
- - Check git status.
32
- - Locate relevant docs and active plans.
33
- - Preserve user edits and unrelated dirty worktree changes.
34
- - If the session is long or noisy, suggest a user-initiated planning-focused compaction before writing or revising the plan; do not compact automatically because compaction is lossy.
35
- 2. Gather evidence before planning.
36
- - When the request contains explicit project-memory refs such as `[[PLAN_MODE]]`, run `dotdotgod expand <root> "<request>" --json` before broad `grep` or `find` scans, then read the resolved candidates selectively.
37
- - When the request uses high-signal natural refs such as `PLAN_MODE`, `docs/spec/PLAN_MODE.md`, or quoted doc names, run `dotdotgod expand <root> "<request>" --fuzzy --json`; skip fuzzy expansion for generic low-signal words alone and respect configured fuzzy low-signal add/remove terms.
38
- - Search docs by domain terms from the user request.
39
- - Read nearest README indexes and relevant focused docs.
40
- - For behavior changes, prefer specs with CLI-enforced fenced `json dotdotgod` traceability blocks in the final section; use their source, test, related-doc, and verification-command mappings before editing code.
41
- - When the dotdotgod CLI is available and likely target files are known, run one bounded multi-seed `dotdotgod graph impact <root> --changed <path-a> --changed <path-b> --yml` command for up to 20 unique files, splitting only larger sets into ordered batches. Use the combined ranking and per-seed top-five related specs, tests, docs, commands, scores, and reasons to strengthen target files, risks, and verification steps. If impact lookup fails or the CLI is unavailable, continue with README-index and traceability fallback evidence.
42
- - For Claude Code and Codex, add an explicit post-edit impact-review step to the plan when the task will change source/config files, because those adapters do not have Pi's automatic pending-impact reminder or `/impact-check` enforcement.
43
- - During planning, treat these dotdotgod commands as bounded context/status helpers: `status`, `query`, `resolve`, `expand`, `graph impact`, `graph communities`, read-only `config`, and `index`. Do not run mutating scaffold/config commands such as `init` or `config init` unless the user explicitly asks for initialization or config creation.
44
- - Use `grep` or `find` after reference expansion, impact, and targeted reads when the task needs fallback discovery or raw source text search.
45
- - Read code only after docs identify likely module boundaries, impact output points to relevant files, or docs are missing/stale.
46
- 3. Create or update an active plan at this path when durable planning is needed:
47
-
48
- ```text
49
- docs/plan/<task-slug>/README.md
50
- ```
51
-
52
- Skip the saved plan for obvious bounded work such as typos, single-file documentation clarifications, targeted test/validation runs, or one-file fixes with an unambiguous implementation path.
53
- 4. For durable active plans that will be executed, keep the user-facing plan in `docs/plan/<task-slug>/README.md`. If `/plan-goal` staged planning is useful, it may record internal checkpoints under `docs/plan/<task-slug>/.dotdotgod-plan/NN_STAGE_NAME.md`; do not make legacy stage directories such as `01-intake/README.md` the required plan product.
54
- 5. Use UPPER_SNAKE_CASE support files in the task directory only when they improve resume quality, such as `ROLE_AREA_WORKSTREAMS.md`, `ATOMIC_TASKS.md`, `PROGRESS_LOG.md`, or `VERIFICATION_EVIDENCE.md`.
55
- 6. For long-running durable tasks, use concise README sections or optional support files for chronological progress, durable decisions, resume state, and task-specific verification checklists. `.dotdotgod-plan/` checkpoints are `/plan-goal` state, not a general Plan Mode requirement.
56
- 7. When a durable plan is created, include:
57
- - scope and current status
58
- - target files and rationale
59
- - impact-derived related files/checks when available
60
- - implementation steps
61
- - risks and edge cases when useful
62
- - verification method
63
- - current resume state when useful
64
- - final housekeeping step to move completed work to `docs/archive/plan/<task-slug>/`
65
- - for Claude Code/Codex plans, a concrete `dd:impact` or `impact-review` step before broad verification or final handoff when source/config/docs files changed
66
- 8. Before executing a durable active plan, ensure the user has explicitly asked to execute it and resolve any plan-local Discussion Queue items that block execution review. Plan Mode does not require `dotdotgod plan validate` before execution; `/plan-goal` and manual/non-Plan-Mode workflows may still use the CLI plan-validation contract when appropriate.
67
- 9. Update `docs/plan/README.md` if the repository keeps active plan entries there.
68
- 10. Use repository-local package manager evidence for verification commands. In this repository, prefer `pnpm run verify`, `pnpm run pack:dry-run`, and `.husky/pre-push` when applicable.
69
- 11. After creating or updating behavior specs, run project validation when possible. For dotdotgod projects, `dotdotgod validate` enforces machine-readable `json dotdotgod` traceability blocks as the final section in specs. Use `dotdotgod validate --check-index` when you need to confirm markdown fingerprints match the graph index. If validation fails, use the schema, property guidance, and example shown in the validation error to repair the spec.
70
- 12. Stop after presenting the plan unless the user explicitly asks for execution.
71
- 13. During implementation in Claude Code or Codex, use `/dd:impact`, `dd:impact`, or the `impact-review` skill after edits and before broad verification, commits, pushes, publishing, or final handoff.
72
- 14. After implementation and verification, archive completed or superseded plan directories under `docs/archive/plan/<task-slug>/`; remove stale local plan artifacts only when the project policy allows plan/archive housekeeping.
19
+ 1. Check for a matching active plan.
20
+ 2. Reuse loaded memory and the documentation map, then use focused query and README indexes to select maintained docs and verify conclusions in them.
21
+ 3. Inspect the source needed to confirm targets and constraints.
22
+ 4. Run impact review on likely changed files and refine targets, risks, and verification.
23
+ 5. For durable work, write and present the task README with scope, targets, executable steps, verification, and required completion gates.
24
+ 6. Resolve blocking decisions and stop until the user asks to execute the plan.
73
25
 
74
26
  ## Quality Rules
75
27
 
76
28
  - Prefer documented facts over inference; label inference explicitly.
77
- - Keep plans concise and maintainable.
78
- - Use local repository terminology and existing module names.
79
- - Validation steps must be executable commands or concrete review checks.
80
- - Avoid turning explanatory numbered lists into executable implementation plans. Use concrete action-oriented `Plan:` steps only when a real active plan artifact is being created or updated.
29
+ - Keep plans concise, executable, and maintainable.
@@ -8,56 +8,13 @@ version: 1.0.0
8
8
 
9
9
  # Project Initializer
10
10
 
11
- ## Overview
11
+ ## Goal
12
12
 
13
- Create a conservative dotdotgod project baseline shared by AI coding agents:
14
-
15
- - `AGENTS.md` is the canonical project instruction file.
16
- - `CLAUDE.md` and `CODEX.md` are thin agent-specific entrypoints.
17
- - `docs/` contains concise indexes for specs, tests, architecture, active plans, and archives.
18
- - `dotdotgod.config.json` materializes the complete editable default project policy.
19
- - `.gitignore` keeps `docs/plan`, `docs/archive`, and `.dotdotgod` local by default.
20
-
21
- Under `docs/`, directories use kebab-case and markdown file names use UPPER_SNAKE_CASE, including `README.md`.
22
-
23
- ## CLI and Fallback
24
-
25
- Prefer the CLI initializer:
26
-
27
- ```bash
28
- dotdotgod init <project-root>
29
- ```
30
-
31
- Use the bundled fallback when the CLI is unavailable:
32
-
33
- ```bash
34
- sh "${CLAUDE_PLUGIN_ROOT}/skills/project-initializer/scripts/init_project.sh" <project-root>
35
- ```
36
-
37
- Both paths create the same baseline file set and canonical config while preserving existing files. Use `--dry-run` for unfamiliar repositories and `--dotdot-setting` for the optional documentation and code-convention guidance.
13
+ Create a non-destructive dotdotgod baseline with canonical agent instructions, thin agent entrypoints, documentation indexes, project config, and local-memory ignore rules.
38
14
 
39
15
  ## Workflow
40
16
 
41
- 1. Inspect the project root.
42
- - Check `AGENTS.md`, `AGENT.md`, `CLAUDE.md`, `CODEX.md`, `README.md`, `.gitignore`, `docs/`, and `dotdotgod.config.json`.
43
- - Preserve project-specific instructions and unrelated user work.
44
- - Keep `AGENTS.md` canonical when both `AGENT.md` and `AGENTS.md` exist.
45
- 2. Run the initializer.
46
- - Use the CLI when available; otherwise use the bundled fallback.
47
- - Existing files are always preserved and skipped.
48
- 3. Review and validate.
49
- - Fill project-specific placeholders in `AGENTS.md` when the required context is known.
50
- - Keep `CLAUDE.md` and `CODEX.md` thin.
51
- - Preserve the generated complete memory-area set; do not replace it with a partial hand-written list.
52
- - Run `dotdotgod validate <project-root>` after creating or changing config when the CLI is available.
53
- - Inspect `dotdotgod config <project-root> --json` when validation fails or resolved policy needs review.
54
- 4. Report the result.
55
- - List created, updated, and skipped files, plus validation failures.
56
- - Report when CLI validation was unavailable.
57
- - Identify existing instructions that still require manual consolidation.
58
-
59
- ## Bundled Resources
60
-
61
- - `scripts/init_project.sh`: POSIX fallback initializer.
62
- - `templates/dotdotgod.config.json`: generated canonical config template used by the fallback.
63
- - `references/agent-docs.md`: shared agent-document naming and content model.
17
+ 1. Inspect existing agent instructions, documentation, config, and ignore rules; preserve existing files and unrelated user work.
18
+ 2. Run `dotdotgod init <project-root>` when available; otherwise run `sh "${CLAUDE_PLUGIN_ROOT}/skills/project-initializer/scripts/init_project.sh" <project-root>`. Existing files must be skipped, not replaced.
19
+ 3. Validate the initialized project with `dotdotgod validate <project-root>` when available.
20
+ 4. Report created and skipped files, validation failures, and unresolved instruction conflicts.
@@ -10,46 +10,16 @@ version: 1.0.0
10
10
 
11
11
  ## Goal
12
12
 
13
- Load the current repository's dotdotgod project memory without modifying source, documentation, or project config. A focused query may refresh ignored `.dotdotgod/vectors/` data and the runtime's user-level model cache. Use a full load for an explicit project overview and a compact load to refresh an already-loaded session. Treat free-form arguments as query text, not as mode switches.
13
+ Load the repository's dotdotgod project memory without modifying maintained files. Treat free-form arguments as query text, not mode switches.
14
14
 
15
15
  ## Workflow
16
16
 
17
- 1. Identify the repository root and current state.
18
- - Check the current directory and, when Git is available, the repository root, branch, and dirty worktree status.
19
- - Mention user changes and avoid reverting or cleaning them.
20
- 2. Read baseline memory only when it is not already clear from loaded context.
21
- - Start with `AGENTS.md`, the current adapter entrypoint when present, `README.md`, and `docs/README.md`.
22
- - Do not run scaffold, config-writing, or source-modifying commands during a load.
23
- 3. Build the shared documentation map.
24
- - Discover Markdown files under `docs/` after applying `load.documentationSummary.exclude`, which excludes `docs/plan` and `docs/archive` by default.
25
- - Render repository-relative paths as a prefix-compressed tree. Count `docs/` as directory depth 1.
26
- - Without arguments, expand through directory depth 5. At the boundary, summarize deeper descendants with exact directory and Markdown-file counts.
27
- 4. Use query routing only when arguments are present.
28
- - Run `dotdotgod query <root> "<arguments>" --limit 30 --json` when the command is available.
29
- - Show the best-ranked chunk from each of at most 30 distinct Markdown files and render the documentation tree through directory depth 3.
30
- - If query is unavailable, continue from the tree, README indexes, and targeted reads.
31
- 5. Read document bodies selectively.
32
- - Follow README indexes as maintained tables of contents.
33
- - Prefer query results, explicit paths, and the current request before broader search.
34
- - Use `grep` or `find` only when targeted reads do not provide enough evidence.
35
- 6. Read local memory only when relevant.
36
- - For active plans, list `docs/plan` entries first and read only relevant plan files.
37
- - Use `docs/archive/README.md` as the history map. Do not scan archive bodies by default.
38
- 7. Avoid broad reads of generated outputs, dependencies, databases, caches, secrets, and `.env*` contents.
39
-
40
- ## Output Shape
41
-
42
- For a full load, respond concisely with:
43
-
44
- - Project narrative and purpose
45
- - Key working rules
46
- - Relevant documentation and verification routes
47
- - Relevant active plans or archive history only when needed
48
- - Questions surfaced by loaded material
49
-
50
- For a compact load, respond with:
51
-
52
- - Compact project-memory status
53
- - Relevant documentation routes
54
- - Relevant active plan hints only when needed
55
- - A short bounded list of next reads, or a note that none are needed
17
+ 1. Identify the repository root.
18
+ 2. When baseline context is missing, read `AGENTS.md`, the adapter entrypoint, `README.md`, and `docs/README.md` when present.
19
+ 3. Build a prefix-compressed tree of `docs/**/*.md` after `load.documentationSummary.exclude`. Count `docs/` as depth 1; without arguments, expand through depth 5 and summarize deeper descendants with exact directory and Markdown-file counts.
20
+ 4. With arguments, run `dotdotgod query <root> "<arguments>" --limit 30 --json` when available, return at most 30 distinct Markdown files, and render the tree through depth 3. Fall back to the tree and README indexes when query is unavailable.
21
+ 5. Read bodies selectively from query results, explicit paths, and README indexes. Read relevant active plans only when needed, use `docs/archive/README.md` as the history map, and avoid broad generated, dependency, cache, or secret reads.
22
+
23
+ ## Output
24
+
25
+ Report the project purpose, key rules, relevant documentation routes, and only the active-plan or next-read hints needed for the request. Keep compact loads to a brief refresh.