@dotdotgod/claude-code 0.2.6 → 0.2.8
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/README.md +0 -4
- package/commands/dd/init.md +6 -49
- package/commands/dd/load.md +10 -40
- package/commands/dd/plan.md +9 -60
- package/package.json +2 -2
- package/skills/doc-first-planning/SKILL.md +9 -60
- package/skills/project-initializer/SKILL.md +6 -49
- package/skills/project-load/SKILL.md +10 -40
- package/commands/dd/plan-goal.md +0 -173
- package/skills/plan-goal/SKILL.md +0 -169
- package/skills/plan-goal/agents/openai.yaml +0 -4
package/README.md
CHANGED
|
@@ -23,7 +23,6 @@ Then use the bundled `/dd:*` commands in your repository:
|
|
|
23
23
|
/dd:init
|
|
24
24
|
/dd:load
|
|
25
25
|
/dd:plan Update the API migration plan.
|
|
26
|
-
/dd:plan-goal Add the new export API to the auth module.
|
|
27
26
|
/dd:impact
|
|
28
27
|
```
|
|
29
28
|
|
|
@@ -40,12 +39,9 @@ claude --plugin-dir /path/to/dotdotgod/packages/claude-code
|
|
|
40
39
|
| `/dd:init` | Start a repository with dotdotgod conventions. | Creates or normalizes shared agent files, docs indexes, local-memory areas, and the complete default project config. |
|
|
41
40
|
| `/dd:load` | Load project memory without changing maintained project files. | Renders the shared Markdown tree and uses `dotdotgod query` when focus text is provided; query may refresh ignored caches. |
|
|
42
41
|
| `/dd:plan` | Plan before implementation. | Writes or updates durable task intent in `docs/plan/<task-slug>/README.md`. |
|
|
43
|
-
| `/dd:plan-goal` | Run 5-stage structured planning before implementation. | Produces durable checkpoint files in `docs/plan/<task>/.dotdotgod-plan/` and a plan README. |
|
|
44
42
|
| `/dd:impact` | Review changed files before verification or handoff. | Uses `dotdotgod graph impact` to identify likely related docs, tests, commands, and source files. |
|
|
45
43
|
| `document-clarify` | Improve docs wording without changing behavior contracts. | Clarifies README/spec/test/arch/plan/archive docs using memory-area roles. |
|
|
46
44
|
|
|
47
|
-
The package also includes matching skills for init, load, planning, plan-goal, and impact-review workflows.
|
|
48
|
-
|
|
49
45
|
## Shared Project-Memory Contract
|
|
50
46
|
|
|
51
47
|
- `AGENTS.md` remains canonical.
|
package/commands/dd/init.md
CHANGED
|
@@ -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
|
-
##
|
|
15
|
+
## Goal
|
|
16
16
|
|
|
17
|
-
Create a
|
|
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
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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.
|
package/commands/dd/load.md
CHANGED
|
@@ -14,46 +14,16 @@ User focus, if provided: `$ARGUMENTS`
|
|
|
14
14
|
|
|
15
15
|
## Goal
|
|
16
16
|
|
|
17
|
-
Load the
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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.
|
package/commands/dd/plan.md
CHANGED
|
@@ -14,74 +14,23 @@ Task request: `$ARGUMENTS`
|
|
|
14
14
|
|
|
15
15
|
## Goal
|
|
16
16
|
|
|
17
|
-
Create implementation
|
|
17
|
+
Create an implementation plan from maintained repository documentation before substantial source or configuration changes.
|
|
18
18
|
|
|
19
|
-
|
|
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.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Claude Code adapter for dotdotgod project memory workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Elastic-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"url": "https://github.com/dotdotgod/dotdotgod-kit/issues"
|
|
39
39
|
},
|
|
40
40
|
"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/
|
|
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')\"",
|
|
42
42
|
"pack:dry-run": "pnpm pack --dry-run --json"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -10,71 +10,20 @@ version: 1.0.0
|
|
|
10
10
|
|
|
11
11
|
## Goal
|
|
12
12
|
|
|
13
|
-
Create implementation
|
|
13
|
+
Create an implementation plan from maintained repository documentation before substantial source or configuration changes.
|
|
14
14
|
|
|
15
|
-
|
|
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.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
##
|
|
11
|
+
## Goal
|
|
12
12
|
|
|
13
|
-
Create a
|
|
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
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.
|
package/commands/dd/plan-goal.md
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Create a durable staged plan using dotdotgod 5-stage pipeline
|
|
3
|
-
argument-hint: <task or change request>
|
|
4
|
-
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- Generated from packages/shared resources by scripts/generate-adapters.mjs. Do not edit this file directly; edit the shared source and run `pnpm run generate`. -->
|
|
8
|
-
|
|
9
|
-
# /dd:plan-goal - Staged Planning
|
|
10
|
-
|
|
11
|
-
Run the dotdotgod 5-stage planning pipeline.
|
|
12
|
-
|
|
13
|
-
Task request: `$ARGUMENTS`
|
|
14
|
-
|
|
15
|
-
## Goal
|
|
16
|
-
|
|
17
|
-
Create a durable staged plan using the dotdotgod 5-stage pipeline before changing source or config files. Each stage produces a checkpoint file under `.dotdotgod-plan/` and updates the durable plan artifact at `docs/plan/<task>/README.md`.
|
|
18
|
-
|
|
19
|
-
Tip: set `/goal "docs/plan/<task>/.dotdotgod-plan/05_WORKSTREAM_HANDOFF.md Status: completed"` before running this command to let Claude track completion automatically across turns. Omit `/goal` when you want to review and approve each stage manually.
|
|
20
|
-
|
|
21
|
-
## Pipeline Overview
|
|
22
|
-
|
|
23
|
-
| Stage | ID | Checkpoint | Required Sections |
|
|
24
|
-
|-------|----|------------|------------------|
|
|
25
|
-
| Intake | `01-intake` | `01_INTAKE.md` | Request Summary, Goal, Scope, Non-goals, Constraints, Assumptions |
|
|
26
|
-
| Context Load | `02-context-load` | `02_CONTEXT_LOAD.md` | Memory Reads, Impact Candidates, Related Files |
|
|
27
|
-
| Discovery | `03-discovery` | `03_DISCOVERY.md` | Findings, Risks, Open Questions |
|
|
28
|
-
| Plan | `04-plan` | `04_PLAN.md` | Implementation Design, Code Touchpoints, Data/State Flow, Edge Cases, Atomic Tasks, Test Design, Validation Plan, Resume Point |
|
|
29
|
-
| Workstream Handoff | `05-workstream-handoff` | `05_WORKSTREAM_HANDOFF.md` | Workstream Handoff, Workstream Map, Shared Context, Workstreams, Integration Sequence, Todo Contract |
|
|
30
|
-
|
|
31
|
-
## Checkpoint Format
|
|
32
|
-
|
|
33
|
-
Write each checkpoint to `docs/plan/<task>/.dotdotgod-plan/NN_STAGE_NAME.md`:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Stage: <stage-id>
|
|
37
|
-
Status: completed
|
|
38
|
-
Updated: <ISO timestamp>
|
|
39
|
-
|
|
40
|
-
## <Required Section 1>
|
|
41
|
-
[content]
|
|
42
|
-
|
|
43
|
-
## Stage 0N Construction Checklist
|
|
44
|
-
- [x] Category: evidence
|
|
45
|
-
- [x] Category: evidence description
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Use `Status: blocked` when a user decision blocks the stage. Use only canonical checklist rows: `- [x] Category: evidence`. Do not use tables, `completed - [x]`, or `Category: completed - [x]` shorthand.
|
|
49
|
-
|
|
50
|
-
## Resume Logic
|
|
51
|
-
|
|
52
|
-
When the argument is a task path such as `docs/plan/<task>/README.md` or a task slug:
|
|
53
|
-
|
|
54
|
-
1. Resolve the README path from the argument.
|
|
55
|
-
2. Scan `.dotdotgod-plan/` for existing checkpoint files.
|
|
56
|
-
3. Reverse-scan to find the last checkpoint where `Status:` is not `completed`.
|
|
57
|
-
4. Resume from that stage. If all checkpoints show `Status: completed`, report the plan as already complete and stop.
|
|
58
|
-
5. If no checkpoints exist, start from Stage 01.
|
|
59
|
-
6. Load the found checkpoint content as stage context before generating the next stage message.
|
|
60
|
-
|
|
61
|
-
## Stage Instructions
|
|
62
|
-
|
|
63
|
-
### Stage 01: Intake
|
|
64
|
-
|
|
65
|
-
Create the initial planning context for the durable plan request.
|
|
66
|
-
|
|
67
|
-
Include in the durable plan and checkpoint:
|
|
68
|
-
- **Request Summary** — restate the user's request in your own words.
|
|
69
|
-
- **Goal** — the intended durable plan goal.
|
|
70
|
-
- **Scope** — what is in scope.
|
|
71
|
-
- **Non-goals** — what is explicitly out of scope.
|
|
72
|
-
- **Constraints** — known constraints and guardrails.
|
|
73
|
-
- **Assumptions** — assumptions made where information is incomplete.
|
|
74
|
-
|
|
75
|
-
Construction checklist categories: Requirements, Constraints, Failure paths, Data shape, Verification, Integration impact.
|
|
76
|
-
|
|
77
|
-
Do not edit source code. Do not advance beyond Stage 01.
|
|
78
|
-
|
|
79
|
-
### Stage 02: Context Load
|
|
80
|
-
|
|
81
|
-
Use the Stage 01 context, then update the durable plan artifact and checkpoint.
|
|
82
|
-
|
|
83
|
-
Include in the durable plan and checkpoint:
|
|
84
|
-
- **Memory Reads** — agent docs, README indexes, specs, architecture notes, test docs, and active plans consulted. Use `dotdotgod expand <root> "<request>" --json` when the request contains `[[...]]` refs; use `--fuzzy` for high-signal doc names before broad grep/find.
|
|
85
|
-
- **Impact Candidates** — collect the likely target files and run one bounded multi-seed `dotdotgod graph impact <root> --changed <path-a> --changed <path-b> --compact` command for up to 20 unique paths, splitting only larger sets into ordered batches. Record the combined ranking and each seed's non-seed top-five specs, tests, scores, and reasons. Fall back to README indexes and traceability blocks when the CLI is unavailable.
|
|
86
|
-
- **Related Files** — source, config, and doc files identified as relevant.
|
|
87
|
-
|
|
88
|
-
Construction checklist categories: Memory reads, Impact candidates, Related files, Boundary risk.
|
|
89
|
-
|
|
90
|
-
Do not edit source code. Do not advance beyond Stage 02.
|
|
91
|
-
|
|
92
|
-
### Stage 03: Discovery
|
|
93
|
-
|
|
94
|
-
Use the Stage 02 context, then update the durable plan artifact and checkpoint with actual findings from inspected code and docs — not just a list of files to inspect.
|
|
95
|
-
|
|
96
|
-
Include in the durable plan and checkpoint:
|
|
97
|
-
- **Findings** — concrete observations from reading source, config, and docs.
|
|
98
|
-
- **Risks** — identified risks and failure paths.
|
|
99
|
-
- **Open Questions** — research gaps the agent can resolve by reading project context. Do not silently carry unresolved user decisions forward. If a missing choice requires the user to decide scope, behavior, product policy, risk acceptance, or implementation direction, stop and ask the user a concrete question with options. Record machine-readable blockers with `DecisionOwner: user` and `DecisionState: unresolved`, or `BlockerType: user-decision` and `Status: blocked`. Do not use prose keywords such as "TBD" or "undecided" as machine-readable state.
|
|
100
|
-
|
|
101
|
-
Construction checklist categories: Findings, Risks, Open questions, Extension points.
|
|
102
|
-
|
|
103
|
-
Do not edit source code. Do not advance beyond Stage 03.
|
|
104
|
-
|
|
105
|
-
### Stage 04: Plan
|
|
106
|
-
|
|
107
|
-
Use the Stage 03 context, then update the durable plan artifact and checkpoint with an implementation design — not a generic project plan.
|
|
108
|
-
|
|
109
|
-
Include in the durable plan and checkpoint:
|
|
110
|
-
- **Implementation Design** — design overview.
|
|
111
|
-
- **Code Touchpoints** — exact files, functions, types, classes, and commands to change.
|
|
112
|
-
- **Data/State Flow** — how data and state change through the implementation.
|
|
113
|
-
- **Edge Cases** — failure paths, empty/missing data, invalid input, interrupted/resumed state, idempotency, retry behavior, and integration boundaries.
|
|
114
|
-
- **Atomic Tasks** — each task must name concrete code touchpoints; no vague verbs such as "update logic" without a named target. A different agent must be able to implement the task without this chat history.
|
|
115
|
-
- **Test Design** — unit, integration, or E2E tests for each atomic task.
|
|
116
|
-
- **Validation Plan** — verification commands and review checks.
|
|
117
|
-
- **Resume Point** — current resume state for long-running tasks.
|
|
118
|
-
|
|
119
|
-
When the implementation design has multiple independent parts, split the durable plan into task-local support markdown files under `docs/plan/<task>/`. Keep `README.md` as the overview/index, and link each support file with a one-line purpose. Use support files for implementation-part detail such as CLI changes, extension or runtime changes, tests, docs, migration, or rollout. Do not put final user-facing plan content only in `.dotdotgod-plan/`.
|
|
120
|
-
|
|
121
|
-
Apply `dotdotgod graph impact` evidence from Stage 02 to strengthen Code Touchpoints, Edge Cases, and Validation Plan. For Claude Code and Codex plans, include a concrete `dd:impact` or `impact-review` step before broad verification or final handoff when source, config, or docs files will change.
|
|
122
|
-
|
|
123
|
-
Do not silently carry unresolved user decisions forward. Stop and ask if scope, behavior, risk acceptance, or implementation direction is missing.
|
|
124
|
-
|
|
125
|
-
Construction checklist categories: Implementation design, Code touchpoints, Data/State flow, Edge cases, Atomic tasks, Test design, Validation plan, Resume point.
|
|
126
|
-
|
|
127
|
-
Do not edit source code. Do not advance beyond Stage 04.
|
|
128
|
-
|
|
129
|
-
### Stage 05: Workstream Handoff
|
|
130
|
-
|
|
131
|
-
Use the Stage 04 context, then update the durable plan artifact and checkpoint with a phase-based, subagent-ready Workstream Handoff Contract.
|
|
132
|
-
|
|
133
|
-
Include in the durable plan and checkpoint:
|
|
134
|
-
- **Workstream Handoff** — state `Split decision: yes` or `Split decision: no`. When no split is needed, include `No-split rationale:` and a concrete Todo Contract as the implementation handoff contract.
|
|
135
|
-
- **Workstream Map** — when split is needed: at least two `Workstream ID:` entries, each with owner or role, exact primary handoff file, target files and functions, dependencies, and whether it can run in parallel. Include an execution phase map with phase names, dependency gates, sequencing constraints, and parallelization notes.
|
|
136
|
-
- **Shared Context** — everything every downstream agent needs to work without this chat history.
|
|
137
|
-
- **Workstreams** — per-workstream contracts with structured fields: `Workstream ID:`, `Purpose:`, `Required context:`, `Allowed edits:`, `Forbidden edits:`, `Tasks:`, `Validation:`, `Handoff output:`, `Dependencies:`. Each split-workstream subagent must receive exactly one primary handoff file and be able to work from that file alone. Each primary handoff file must include role, phase, dependency gates, summarized context, exact target files and functions, allowed edits, forbidden edits, tasks, validation, expected handoff output, dependencies, and integration notes. Use UPPER_SNAKE_CASE markdown files under the task directory and README index links for large split contracts.
|
|
138
|
-
- **Integration Sequence** — how to combine workstream outputs after phase gates pass: `Step:`, `Validation:`, `Handoff:`.
|
|
139
|
-
- **Todo Contract** — aggregated implementation todos across workstreams and phases.
|
|
140
|
-
|
|
141
|
-
The `.dotdotgod-plan/05_WORKSTREAM_HANDOFF.md` file is internal stage state context and validation evidence. Write final user-facing handoff instructions to `README.md` or task-local support files outside `.dotdotgod-plan/`.
|
|
142
|
-
|
|
143
|
-
Construction checklist categories: Handoffs, Do-not rules, Focused verification, Chat-independent context.
|
|
144
|
-
|
|
145
|
-
Do not edit source code. Do not advance beyond Stage 05.
|
|
146
|
-
|
|
147
|
-
## Stage Evaluation
|
|
148
|
-
|
|
149
|
-
After writing each stage output, self-evaluate before advancing:
|
|
150
|
-
|
|
151
|
-
- **pass** — the durable plan artifact has enough human-readable content and the matching checkpoint has all required sections, a completed construction checklist, and no unresolved user decisions. Advance to the next stage.
|
|
152
|
-
- **retry** — the output is repairable without user input. Rewrite the stage (maximum 5 retries). Repair the durable plan artifact as well as the checkpoint.
|
|
153
|
-
- **blocked** — a user decision about scope, behavior, risk acceptance, or implementation direction is required. Stop, surface the concrete question with options, and wait for user input before proceeding. Do not pass a stage that records unresolved choices as "TBD" or "undecided".
|
|
154
|
-
|
|
155
|
-
## Completion: Document Clarify
|
|
156
|
-
|
|
157
|
-
After Stage 05 passes, run a final `document-clarify` pass before implementation:
|
|
158
|
-
|
|
159
|
-
- Use the `document-clarify` skill.
|
|
160
|
-
- Clarify `docs/plan/<task>/README.md` and any task-local support or workstream handoff markdown files referenced by that README.
|
|
161
|
-
- Preserve scope, user decisions, validation requirements, workstream dependencies, Todo Contract, and handoff contracts.
|
|
162
|
-
- Do not execute implementation work. Do not edit source or config files.
|
|
163
|
-
- Treat `docs/plan/<task>/.dotdotgod-plan/*.md` files as internal checkpoint state and validation evidence, not user-facing documentation to polish.
|
|
164
|
-
- Do not weaken acceptance criteria, verification commands, do-not rules, or blocker descriptions.
|
|
165
|
-
- Stop after reporting the clarified plan path and any remaining blockers.
|
|
166
|
-
|
|
167
|
-
## Quality Rules
|
|
168
|
-
|
|
169
|
-
- Prefer documented facts over inference; label inference explicitly.
|
|
170
|
-
- Checkpoint files are internal validation evidence; final plan content belongs in `README.md` or task-local support files.
|
|
171
|
-
- Validation steps must be executable commands or concrete review checks.
|
|
172
|
-
- Do not silently carry unresolved user decisions across stages.
|
|
173
|
-
- Do not begin source or config implementation until the user explicitly asks to execute the plan.
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan-goal
|
|
3
|
-
description: Use this skill when the user asks Claude Code to run a staged planning pipeline, create a durable plan with checkpoint files, or use dotdotgod plan-goal stages (intake, context-load, discovery, plan, workstream-handoff); when dd:plan-goal or staged planning is mentioned.
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- Generated from packages/shared resources by scripts/generate-adapters.mjs. Do not edit this file directly; edit the shared source and run `pnpm run generate`. -->
|
|
8
|
-
|
|
9
|
-
# Staged Planning
|
|
10
|
-
|
|
11
|
-
## Goal
|
|
12
|
-
|
|
13
|
-
Create a durable staged plan using the dotdotgod 5-stage pipeline before changing source or config files. Each stage produces a checkpoint file under `.dotdotgod-plan/` and updates the durable plan artifact at `docs/plan/<task>/README.md`.
|
|
14
|
-
|
|
15
|
-
Tip: set `/goal "docs/plan/<task>/.dotdotgod-plan/05_WORKSTREAM_HANDOFF.md Status: completed"` before running this command to let Claude track completion automatically across turns. Omit `/goal` when you want to review and approve each stage manually.
|
|
16
|
-
|
|
17
|
-
## Pipeline Overview
|
|
18
|
-
|
|
19
|
-
| Stage | ID | Checkpoint | Required Sections |
|
|
20
|
-
|-------|----|------------|------------------|
|
|
21
|
-
| Intake | `01-intake` | `01_INTAKE.md` | Request Summary, Goal, Scope, Non-goals, Constraints, Assumptions |
|
|
22
|
-
| Context Load | `02-context-load` | `02_CONTEXT_LOAD.md` | Memory Reads, Impact Candidates, Related Files |
|
|
23
|
-
| Discovery | `03-discovery` | `03_DISCOVERY.md` | Findings, Risks, Open Questions |
|
|
24
|
-
| Plan | `04-plan` | `04_PLAN.md` | Implementation Design, Code Touchpoints, Data/State Flow, Edge Cases, Atomic Tasks, Test Design, Validation Plan, Resume Point |
|
|
25
|
-
| Workstream Handoff | `05-workstream-handoff` | `05_WORKSTREAM_HANDOFF.md` | Workstream Handoff, Workstream Map, Shared Context, Workstreams, Integration Sequence, Todo Contract |
|
|
26
|
-
|
|
27
|
-
## Checkpoint Format
|
|
28
|
-
|
|
29
|
-
Write each checkpoint to `docs/plan/<task>/.dotdotgod-plan/NN_STAGE_NAME.md`:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
Stage: <stage-id>
|
|
33
|
-
Status: completed
|
|
34
|
-
Updated: <ISO timestamp>
|
|
35
|
-
|
|
36
|
-
## <Required Section 1>
|
|
37
|
-
[content]
|
|
38
|
-
|
|
39
|
-
## Stage 0N Construction Checklist
|
|
40
|
-
- [x] Category: evidence
|
|
41
|
-
- [x] Category: evidence description
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Use `Status: blocked` when a user decision blocks the stage. Use only canonical checklist rows: `- [x] Category: evidence`. Do not use tables, `completed - [x]`, or `Category: completed - [x]` shorthand.
|
|
45
|
-
|
|
46
|
-
## Resume Logic
|
|
47
|
-
|
|
48
|
-
When the argument is a task path such as `docs/plan/<task>/README.md` or a task slug:
|
|
49
|
-
|
|
50
|
-
1. Resolve the README path from the argument.
|
|
51
|
-
2. Scan `.dotdotgod-plan/` for existing checkpoint files.
|
|
52
|
-
3. Reverse-scan to find the last checkpoint where `Status:` is not `completed`.
|
|
53
|
-
4. Resume from that stage. If all checkpoints show `Status: completed`, report the plan as already complete and stop.
|
|
54
|
-
5. If no checkpoints exist, start from Stage 01.
|
|
55
|
-
6. Load the found checkpoint content as stage context before generating the next stage message.
|
|
56
|
-
|
|
57
|
-
## Stage Instructions
|
|
58
|
-
|
|
59
|
-
### Stage 01: Intake
|
|
60
|
-
|
|
61
|
-
Create the initial planning context for the durable plan request.
|
|
62
|
-
|
|
63
|
-
Include in the durable plan and checkpoint:
|
|
64
|
-
- **Request Summary** — restate the user's request in your own words.
|
|
65
|
-
- **Goal** — the intended durable plan goal.
|
|
66
|
-
- **Scope** — what is in scope.
|
|
67
|
-
- **Non-goals** — what is explicitly out of scope.
|
|
68
|
-
- **Constraints** — known constraints and guardrails.
|
|
69
|
-
- **Assumptions** — assumptions made where information is incomplete.
|
|
70
|
-
|
|
71
|
-
Construction checklist categories: Requirements, Constraints, Failure paths, Data shape, Verification, Integration impact.
|
|
72
|
-
|
|
73
|
-
Do not edit source code. Do not advance beyond Stage 01.
|
|
74
|
-
|
|
75
|
-
### Stage 02: Context Load
|
|
76
|
-
|
|
77
|
-
Use the Stage 01 context, then update the durable plan artifact and checkpoint.
|
|
78
|
-
|
|
79
|
-
Include in the durable plan and checkpoint:
|
|
80
|
-
- **Memory Reads** — agent docs, README indexes, specs, architecture notes, test docs, and active plans consulted. Use `dotdotgod expand <root> "<request>" --json` when the request contains `[[...]]` refs; use `--fuzzy` for high-signal doc names before broad grep/find.
|
|
81
|
-
- **Impact Candidates** — collect the likely target files and run one bounded multi-seed `dotdotgod graph impact <root> --changed <path-a> --changed <path-b> --compact` command for up to 20 unique paths, splitting only larger sets into ordered batches. Record the combined ranking and each seed's non-seed top-five specs, tests, scores, and reasons. Fall back to README indexes and traceability blocks when the CLI is unavailable.
|
|
82
|
-
- **Related Files** — source, config, and doc files identified as relevant.
|
|
83
|
-
|
|
84
|
-
Construction checklist categories: Memory reads, Impact candidates, Related files, Boundary risk.
|
|
85
|
-
|
|
86
|
-
Do not edit source code. Do not advance beyond Stage 02.
|
|
87
|
-
|
|
88
|
-
### Stage 03: Discovery
|
|
89
|
-
|
|
90
|
-
Use the Stage 02 context, then update the durable plan artifact and checkpoint with actual findings from inspected code and docs — not just a list of files to inspect.
|
|
91
|
-
|
|
92
|
-
Include in the durable plan and checkpoint:
|
|
93
|
-
- **Findings** — concrete observations from reading source, config, and docs.
|
|
94
|
-
- **Risks** — identified risks and failure paths.
|
|
95
|
-
- **Open Questions** — research gaps the agent can resolve by reading project context. Do not silently carry unresolved user decisions forward. If a missing choice requires the user to decide scope, behavior, product policy, risk acceptance, or implementation direction, stop and ask the user a concrete question with options. Record machine-readable blockers with `DecisionOwner: user` and `DecisionState: unresolved`, or `BlockerType: user-decision` and `Status: blocked`. Do not use prose keywords such as "TBD" or "undecided" as machine-readable state.
|
|
96
|
-
|
|
97
|
-
Construction checklist categories: Findings, Risks, Open questions, Extension points.
|
|
98
|
-
|
|
99
|
-
Do not edit source code. Do not advance beyond Stage 03.
|
|
100
|
-
|
|
101
|
-
### Stage 04: Plan
|
|
102
|
-
|
|
103
|
-
Use the Stage 03 context, then update the durable plan artifact and checkpoint with an implementation design — not a generic project plan.
|
|
104
|
-
|
|
105
|
-
Include in the durable plan and checkpoint:
|
|
106
|
-
- **Implementation Design** — design overview.
|
|
107
|
-
- **Code Touchpoints** — exact files, functions, types, classes, and commands to change.
|
|
108
|
-
- **Data/State Flow** — how data and state change through the implementation.
|
|
109
|
-
- **Edge Cases** — failure paths, empty/missing data, invalid input, interrupted/resumed state, idempotency, retry behavior, and integration boundaries.
|
|
110
|
-
- **Atomic Tasks** — each task must name concrete code touchpoints; no vague verbs such as "update logic" without a named target. A different agent must be able to implement the task without this chat history.
|
|
111
|
-
- **Test Design** — unit, integration, or E2E tests for each atomic task.
|
|
112
|
-
- **Validation Plan** — verification commands and review checks.
|
|
113
|
-
- **Resume Point** — current resume state for long-running tasks.
|
|
114
|
-
|
|
115
|
-
When the implementation design has multiple independent parts, split the durable plan into task-local support markdown files under `docs/plan/<task>/`. Keep `README.md` as the overview/index, and link each support file with a one-line purpose. Use support files for implementation-part detail such as CLI changes, extension or runtime changes, tests, docs, migration, or rollout. Do not put final user-facing plan content only in `.dotdotgod-plan/`.
|
|
116
|
-
|
|
117
|
-
Apply `dotdotgod graph impact` evidence from Stage 02 to strengthen Code Touchpoints, Edge Cases, and Validation Plan. For Claude Code and Codex plans, include a concrete `dd:impact` or `impact-review` step before broad verification or final handoff when source, config, or docs files will change.
|
|
118
|
-
|
|
119
|
-
Do not silently carry unresolved user decisions forward. Stop and ask if scope, behavior, risk acceptance, or implementation direction is missing.
|
|
120
|
-
|
|
121
|
-
Construction checklist categories: Implementation design, Code touchpoints, Data/State flow, Edge cases, Atomic tasks, Test design, Validation plan, Resume point.
|
|
122
|
-
|
|
123
|
-
Do not edit source code. Do not advance beyond Stage 04.
|
|
124
|
-
|
|
125
|
-
### Stage 05: Workstream Handoff
|
|
126
|
-
|
|
127
|
-
Use the Stage 04 context, then update the durable plan artifact and checkpoint with a phase-based, subagent-ready Workstream Handoff Contract.
|
|
128
|
-
|
|
129
|
-
Include in the durable plan and checkpoint:
|
|
130
|
-
- **Workstream Handoff** — state `Split decision: yes` or `Split decision: no`. When no split is needed, include `No-split rationale:` and a concrete Todo Contract as the implementation handoff contract.
|
|
131
|
-
- **Workstream Map** — when split is needed: at least two `Workstream ID:` entries, each with owner or role, exact primary handoff file, target files and functions, dependencies, and whether it can run in parallel. Include an execution phase map with phase names, dependency gates, sequencing constraints, and parallelization notes.
|
|
132
|
-
- **Shared Context** — everything every downstream agent needs to work without this chat history.
|
|
133
|
-
- **Workstreams** — per-workstream contracts with structured fields: `Workstream ID:`, `Purpose:`, `Required context:`, `Allowed edits:`, `Forbidden edits:`, `Tasks:`, `Validation:`, `Handoff output:`, `Dependencies:`. Each split-workstream subagent must receive exactly one primary handoff file and be able to work from that file alone. Each primary handoff file must include role, phase, dependency gates, summarized context, exact target files and functions, allowed edits, forbidden edits, tasks, validation, expected handoff output, dependencies, and integration notes. Use UPPER_SNAKE_CASE markdown files under the task directory and README index links for large split contracts.
|
|
134
|
-
- **Integration Sequence** — how to combine workstream outputs after phase gates pass: `Step:`, `Validation:`, `Handoff:`.
|
|
135
|
-
- **Todo Contract** — aggregated implementation todos across workstreams and phases.
|
|
136
|
-
|
|
137
|
-
The `.dotdotgod-plan/05_WORKSTREAM_HANDOFF.md` file is internal stage state context and validation evidence. Write final user-facing handoff instructions to `README.md` or task-local support files outside `.dotdotgod-plan/`.
|
|
138
|
-
|
|
139
|
-
Construction checklist categories: Handoffs, Do-not rules, Focused verification, Chat-independent context.
|
|
140
|
-
|
|
141
|
-
Do not edit source code. Do not advance beyond Stage 05.
|
|
142
|
-
|
|
143
|
-
## Stage Evaluation
|
|
144
|
-
|
|
145
|
-
After writing each stage output, self-evaluate before advancing:
|
|
146
|
-
|
|
147
|
-
- **pass** — the durable plan artifact has enough human-readable content and the matching checkpoint has all required sections, a completed construction checklist, and no unresolved user decisions. Advance to the next stage.
|
|
148
|
-
- **retry** — the output is repairable without user input. Rewrite the stage (maximum 5 retries). Repair the durable plan artifact as well as the checkpoint.
|
|
149
|
-
- **blocked** — a user decision about scope, behavior, risk acceptance, or implementation direction is required. Stop, surface the concrete question with options, and wait for user input before proceeding. Do not pass a stage that records unresolved choices as "TBD" or "undecided".
|
|
150
|
-
|
|
151
|
-
## Completion: Document Clarify
|
|
152
|
-
|
|
153
|
-
After Stage 05 passes, run a final `document-clarify` pass before implementation:
|
|
154
|
-
|
|
155
|
-
- Use the `document-clarify` skill.
|
|
156
|
-
- Clarify `docs/plan/<task>/README.md` and any task-local support or workstream handoff markdown files referenced by that README.
|
|
157
|
-
- Preserve scope, user decisions, validation requirements, workstream dependencies, Todo Contract, and handoff contracts.
|
|
158
|
-
- Do not execute implementation work. Do not edit source or config files.
|
|
159
|
-
- Treat `docs/plan/<task>/.dotdotgod-plan/*.md` files as internal checkpoint state and validation evidence, not user-facing documentation to polish.
|
|
160
|
-
- Do not weaken acceptance criteria, verification commands, do-not rules, or blocker descriptions.
|
|
161
|
-
- Stop after reporting the clarified plan path and any remaining blockers.
|
|
162
|
-
|
|
163
|
-
## Quality Rules
|
|
164
|
-
|
|
165
|
-
- Prefer documented facts over inference; label inference explicitly.
|
|
166
|
-
- Checkpoint files are internal validation evidence; final plan content belongs in `README.md` or task-local support files.
|
|
167
|
-
- Validation steps must be executable commands or concrete review checks.
|
|
168
|
-
- Do not silently carry unresolved user decisions across stages.
|
|
169
|
-
- Do not begin source or config implementation until the user explicitly asks to execute the plan.
|