@dotdotgod/codex 0.1.15 → 0.1.17

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/hooks/README.md CHANGED
@@ -68,6 +68,27 @@ Use validation hooks only by explicit opt-in. They are useful for docs-heavy ses
68
68
 
69
69
  A `UserPromptSubmit` hook can add a reminder for implementation-like prompts. Keep the command fast and non-mutating. Prefer reminders over automatic planning because `dd:plan` and the planning skill are the explicit durable workflow.
70
70
 
71
+ For planning-like prompts, use an advisory reminder that asks Codex to resolve explicit `[[...]]` project-memory refs with `dotdotgod expand`, identify the complete target file list, and run graph impact checks for every target file before finalizing the plan:
72
+
73
+ ```json
74
+ {
75
+ "hooks": {
76
+ "UserPromptSubmit": [
77
+ {
78
+ "matcher": "plan|planning|플랜|계획",
79
+ "hooks": [
80
+ {
81
+ "type": "command",
82
+ "command": "printf '%s\\n' 'dotdotgod: advisory reminder only. If the prompt contains [[...]] refs, run dotdotgod expand . \"<prompt>\" --json before broad grep/find. For planning work, identify the complete target file list, run dotdotgod graph impact . --changed <path> --compact for every target file, and use impact output to strengthen related docs, risks, and verification steps.'",
83
+ "timeout": 10
84
+ }
85
+ ]
86
+ }
87
+ ]
88
+ }
89
+ }
90
+ ```
91
+
71
92
  ## Strict Plan Safety Pattern
72
93
 
73
94
  Strict safety belongs in a local script, not a generic package default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdotgod/codex",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Codex adapter for dotdotgod project memory workflows.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,15 +16,15 @@
16
16
  "project-memory",
17
17
  "planning"
18
18
  ],
19
+ "scripts": {
20
+ "verify": "node -e \"const fs=require('fs'); const req=['.codex-plugin/plugin.json','skills/project-load/SKILL.md','skills/doc-first-planning/SKILL.md','skills/project-initializer/SKILL.md','skills/project-initializer/scripts/init_project.sh','hooks/README.md']; JSON.parse(fs.readFileSync('.codex-plugin/plugin.json','utf8')); for (const f of req) { if (!fs.existsSync(f)) throw new Error('missing '+f); } console.log('codex adapter ok')\"",
21
+ "pack:dry-run": "pnpm pack --dry-run --json"
22
+ },
19
23
  "files": [
20
24
  ".codex-plugin",
21
25
  "skills",
22
26
  "hooks",
23
27
  "README.md",
24
28
  "LICENSE"
25
- ],
26
- "scripts": {
27
- "verify": "node -e \"const fs=require('fs'); const req=['.codex-plugin/plugin.json','skills/project-load/SKILL.md','skills/doc-first-planning/SKILL.md','skills/project-initializer/SKILL.md','skills/project-initializer/scripts/init_project.sh','hooks/README.md']; JSON.parse(fs.readFileSync('.codex-plugin/plugin.json','utf8')); for (const f of req) { if (!fs.existsSync(f)) throw new Error('missing '+f); } console.log('codex adapter ok')\"",
28
- "pack:dry-run": "pnpm pack --dry-run --json"
29
- }
30
- }
29
+ ]
30
+ }
@@ -30,10 +30,14 @@ Prefer live repository docs in this order:
30
30
  - Preserve user edits and unrelated dirty worktree changes.
31
31
  - 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.
32
32
  2. Gather evidence before planning.
33
+ - 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.
34
+ - 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.
33
35
  - Search docs by domain terms from the user request.
34
36
  - Read nearest README indexes and relevant focused docs.
35
37
  - 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.
36
- - Read code only after docs identify likely module boundaries, or when docs are missing/stale.
38
+ - When the dotdotgod CLI is available and likely target files are known, run `dotdotgod graph impact <root> --changed <path> --compact --json` for a small bounded set of those files. Use the 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.
39
+ - Use `grep` or `find` after reference expansion, impact, and targeted reads when the task needs fallback discovery or raw source text search.
40
+ - Read code only after docs identify likely module boundaries, impact output points to relevant files, or docs are missing/stale.
37
41
  3. Create or update the active plan at:
38
42
 
39
43
  ```text
@@ -44,6 +48,7 @@ Prefer live repository docs in this order:
44
48
  5. Include:
45
49
  - scope and current status
46
50
  - target files and rationale
51
+ - impact-derived related files/checks when available
47
52
  - implementation steps
48
53
  - risks and edge cases when useful
49
54
  - verification method
@@ -17,10 +17,13 @@ Do not modify files during the load pass unless the user explicitly asks for edi
17
17
  - Check current directory, git root, branch, and dirty worktree status.
18
18
  - Mention user changes and avoid reverting or cleaning them.
19
19
  2. Prefer the bounded CLI snapshot when available.
20
+ - If the user prompt contains explicit project-memory refs such as `[[PLAN_MODE]]`, run `dotdotgod expand <root> "<prompt>" --json` before broad `grep` or `find` scans, then read the resolved candidates selectively.
21
+ - If the prompt has high-signal natural refs such as `PLAN_MODE`, `docs/spec/PLAN_MODE.md`, or quoted doc names, use `dotdotgod expand <root> "<prompt>" --fuzzy --json` before broad scans; avoid fuzzy expansion for low-signal generic words alone and respect configured fuzzy low-signal add/remove terms.
20
22
  - If `dotdotgod` is installed or available in the repository, run `dotdotgod load-snapshot <root> --json`.
21
23
  - If the local environment allows package execution but no `dotdotgod` binary is available, optionally run `npx @dotdotgod/cli load-snapshot <root> --json`.
22
24
  - Treat the snapshot as the first-pass project-memory map for cache status, graph size, memory areas, related communities, and archive inclusion policy.
23
25
  - Use `dotdotgod graph impact <root> --changed <path> --compact --json` as a task-focused impact map when the user identifies a likely source/config/doc file.
26
+ - Use `grep` or `find` after `expand`, impact, and targeted reads when the task needs fallback discovery or raw source text search.
24
27
  - Fall back to raw `dotdotgod graph impact <root> --changed <path> --json` only when diagnostics need the full payload.
25
28
  - When graph impact surfaces traceability relations, inspect the related specs, tests, and docs before editing source.
26
29
  - Related behavior docs: [load project](../../../docs/spec/LOAD_PROJECT.md), [cross-agent support](../../../docs/spec/CROSS_AGENT_SUPPORT.md), and [cross-agent architecture](../../../docs/arch/CROSS_AGENT_ARCHITECTURE.md).