@dotdotgod/cli 0.1.36 → 0.1.41

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.
Files changed (2) hide show
  1. package/README.md +79 -55
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,42 +2,45 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@dotdotgod/cli.svg)](https://www.npmjs.com/package/@dotdotgod/cli) [![GitHub](https://img.shields.io/badge/GitHub-dotdotgod%2Fdotdotgod--kit-181717?logo=github)](https://github.com/dotdotgod/dotdotgod-kit/tree/main/packages/cli) [![License: Elastic 2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)](../../LICENSE)
4
4
 
5
- > **Change a file, know what else must be checked.**
5
+ Command-line tools for dotdotgod project memory.
6
+
7
+ Use this package when you want to initialize a docs-first project scaffold, validate project-memory docs, build a local graph/cache, load bounded context snapshots, expand project references, or ask what should be checked after a file changes.
8
+
9
+ ## Start Here
10
+
11
+ Run one command without installing globally:
6
12
 
7
13
  ```bash
8
- $ dotdotgod graph impact . --changed packages/cli/src/core.mjs --compact
14
+ npx @dotdotgod/cli validate .
9
15
  ```
10
16
 
11
- ```text
12
- docs:
13
- - docs/spec/REFERENCE_EXPANSION.md (91; incoming:implemented_by, semantic_similarity)
14
- - docs/test/REFERENCE_EXPANSION.md (65.3; verified_by, semantic_similarity)
15
- - docs/spec/LOAD_PROJECT.md (35.8; related_doc, semantic_similarity)
16
-
17
- tests:
18
- - packages/cli/test/core.test.mjs (78.6; semantic_similarity, incoming:semantic_similarity, verified_by)
19
- - packages/cli/test/e2e.test.mjs (51.4; verified_by)
17
+ Install only if you want a persistent `dotdotgod` command:
20
18
 
21
- files:
22
- - packages/cli/src/core.mjs (100; changed-file)
23
- - packages/pi/extensions/plan-mode/index.ts (45; implemented_by, semantic_similarity)
19
+ ```bash
20
+ npm install -g @dotdotgod/cli
24
21
  ```
25
22
 
26
- `graph impact` ranks the specs, tests, architecture notes, config docs, and source files most likely to matter for a change. `--compact` keeps a short text summary, `--yml`/`--yaml` returns a compact structured agent-facing summary, and `--json` returns machine-readable detail. It uses the project-memory graph built from Markdown links, README routes, headings, traceability blocks, package metadata, memory areas, and deterministic routing hints.
23
+ Common first commands:
27
24
 
28
- Command-line tools for dotdotgod project memory. The CLI turns explicit, maintained project links into a local graph/cache: README routes, Markdown links, traceability blocks, memory areas, package metadata, commands, tests, and deterministic routing hints. That maintained graph powers `graph impact`, while the initialized docs surface keeps agent load context high signal.
25
+ ```bash
26
+ dotdotgod init .
27
+ dotdotgod validate .
28
+ dotdotgod load-snapshot .
29
+ dotdotgod graph impact . --changed <path> --compact
30
+ ```
29
31
 
30
- ## Why Use It?
32
+ ## What It Does
31
33
 
32
- - Initialize `AGENTS.md`, thin agent entrypoints, docs indexes, active-plan space, archive map, and local cache ignores with `dotdotgod init`.
33
- - Replace ad-hoc docs checks with `dotdotgod validate`.
34
- - Keep generated Markdown traceability links synchronized with `dotdotgod traceability links`.
35
- - Validate executable active plans with `dotdotgod plan validate docs/plan/<task-slug>/README.md`.
36
- - Build `.dotdotgod/` as a local ignored cache of file fingerprints and compact graph shards derived from maintained project links.
37
- - Use `load-snapshot` as a bounded first-pass map for high-quality agent loading.
38
- - Resolve explicit `[[...]]` references or high-signal fuzzy references before broad text search.
39
- - Query safe review scope for a changed file with grouped, bounded impact reports.
40
- - Inspect or initialize project config with `dotdotgod config` and `dotdotgod config init`.
34
+ - `init` creates `AGENTS.md`, thin agent entrypoints, docs indexes, active-plan space, archive map, and local cache ignores.
35
+ - `validate` checks the dotdotgod docs/project-memory structure, local links, traceability blocks, config validity, and optional index freshness.
36
+ - `index` builds `.dotdotgod/manifest.json` and compact graph shards from maintained project files.
37
+ - `load-snapshot` returns a bounded first-pass project map for AI agents.
38
+ - `resolve` and `expand` map explicit or high-signal prompt references to project files.
39
+ - `graph impact` ranks likely related specs, tests, docs, commands, and source files for a changed path.
40
+ - `traceability links` checks or repairs generated Markdown traceability-link sections.
41
+ - `plan validate` validates active plan artifacts and simplified Plan Generator checkpoints before execution.
42
+ - `plan stage create` creates an internal `.dotdotgod-plan/NN_STAGE_NAME.md` checkpoint for a simplified Plan Generator stage.
43
+ - `trello sync` plans or writes Trello linked-doc metadata from configured docs paths.
41
44
 
42
45
  ## Commands
43
46
 
@@ -58,61 +61,82 @@ dotdotgod expand . "PLAN_MODE 수정하자" --fuzzy
58
61
  dotdotgod traceability links . --check
59
62
  dotdotgod traceability links . --write
60
63
  dotdotgod plan validate docs/plan/<task-slug>/README.md
64
+ dotdotgod plan validate docs/plan/<task-slug>/README.md --stage 04
65
+ dotdotgod plan stage create 02 docs/plan/<task-slug>/README.md
61
66
  dotdotgod graph impact . --changed <path>
62
67
  dotdotgod graph impact . --changed <path> --compact
63
68
  dotdotgod graph impact . --changed <path> --yml
64
69
  dotdotgod graph communities .
65
70
  ```
66
71
 
67
- `--help`, `-h`, and `help` print usage to stdout. Command-specific help is available with `dotdotgod <command> --help`, including nested commands such as `dotdotgod graph impact --help`, `dotdotgod config init --help`, and `dotdotgod traceability links --help`.
72
+ `--help`, `-h`, and `help` print usage to stdout. Command-specific help is available with `dotdotgod <command> --help`, including nested commands such as `dotdotgod graph impact --help`, `dotdotgod config init --help`, `dotdotgod plan stage create --help`, and `dotdotgod traceability links --help`.
68
73
 
69
- ## Validation and Verification Boundaries
74
+ ## Which Command Should I Use?
70
75
 
71
- | Command | Responsibility |
76
+ | Need | Command |
72
77
  | --- | --- |
73
- | `dotdotgod validate <root>` | Checks dotdotgod docs/project-memory structure, local links, traceability blocks, generated traceability-link drift, config validity, and optional index freshness. |
74
- | `dotdotgod traceability links <root> --check` | Runs only the generated traceability-link and compact JSON drift check. |
75
- | `dotdotgod traceability links <root> --write` | Repairs generated traceability-link sections and rewrites canonical `json dotdotgod` blocks as compact JSON. |
76
- | `dotdotgod plan validate <plan-readme>` | Checks canonical eight-stage active-plan structure, required Markdown sections, role/area workstreams, decision/assumption blockers, and atomic-task verification before execution. |
77
- | `pnpm run verify` | Runs the repository-level quality gate: generated-resource checks, package verify contracts, tests, typecheck, and docs validation where each package defines it. |
78
+ | Add the dotdotgod scaffold to a repository | `dotdotgod init .` |
79
+ | Check docs, links, config, traceability, and optional index freshness | `dotdotgod validate . --check-index` |
80
+ | Refresh the local graph/cache | `dotdotgod index .` |
81
+ | Give an agent a bounded project map | `dotdotgod load-snapshot .` |
82
+ | Resolve `[[...]]` references from a prompt | `dotdotgod expand . "Update [[PLAN_MODE]]"` |
83
+ | Repair generated traceability-link sections | `dotdotgod traceability links . --write` |
84
+ | Validate an active plan before execution | `dotdotgod plan validate docs/plan/<task>/README.md` |
85
+ | Create an internal Plan Generator stage checkpoint | `dotdotgod plan stage create 03 docs/plan/<task>/README.md` |
86
+ | See what else to inspect after a change | `dotdotgod graph impact . --changed <path> --compact` |
87
+ | Preview Trello linked-doc updates | `dotdotgod trello sync . --dry-run` |
88
+
89
+ ## Changed-File Impact
78
90
 
79
- Most users start with `validate`. Use `traceability links --write` only when generated traceability output needs repair, and use `verify` before release-style handoff.
91
+ ```bash
92
+ $ dotdotgod graph impact . --changed packages/cli/src/core.mjs --compact
93
+ ```
80
94
 
81
- ## Graph, Cache, and Impact
95
+ ```text
96
+ docs:
97
+ - docs/spec/REFERENCE_EXPANSION.md (91; incoming:implemented_by, semantic_similarity)
98
+ - docs/test/REFERENCE_EXPANSION.md (65.3; verified_by, semantic_similarity)
82
99
 
83
- The cache uses `.dotdotgod/manifest.json` plus graph shards under `.dotdotgod/graph/`. `status` is read-only. `load-snapshot`, `resolve`, `expand`, and `graph` commands lazily refresh missing or stale cache data before returning agent-facing output.
100
+ files:
101
+ - packages/cli/src/core.mjs (100; changed-file)
102
+ - packages/pi/extensions/plan-mode/index.ts (45; implemented_by, semantic_similarity)
103
+ ```
84
104
 
85
- `graph impact` requires `--changed <path>` so ranking has a seed file. Raw JSON is useful for diagnostics; `--compact` returns a smaller text summary; `--yml`/`--yaml` returns structured compact groups for agents. Related nodes include scores, reasons, and retrieval metadata, and output stays bounded with omitted counts.
105
+ `graph impact` needs `--changed <path>` so ranking has a seed file. Use `--compact` for short text, `--yml` or `--yaml` for compact structured agent-facing output, and `--json` for machine-readable detail.
86
106
 
87
- `graph communities` runs Leiden community detection through `leiden-ts` with a deterministic fallback for tiny or invalid graphs.
107
+ The graph is built from maintained project files: Markdown links, README routes, headings, traceability blocks, package metadata, memory areas, imports, exports, commands, tests, and deterministic routing hints.
88
108
 
89
- ## Reference Expansion
109
+ ## Validation and Verification Boundaries
90
110
 
91
- `resolve` maps one project-memory reference such as `PLAN_MODE` or `docs/spec/PLAN_MODE.md` to ranked graph candidates. `expand` scans prompt text for `[[refs]]`, resolves each target, and can include compact impact context with `--with-impact`.
111
+ | Command | Responsibility |
112
+ | --- | --- |
113
+ | `dotdotgod validate <root>` | Checks dotdotgod docs/project-memory structure, local links, traceability blocks, generated traceability-link drift, config validity, and optional index freshness. |
114
+ | `dotdotgod traceability links <root> --check` | Runs only the generated traceability-link and compact JSON drift check. |
115
+ | `dotdotgod traceability links <root> --write` | Repairs generated traceability-link sections and rewrites canonical `json dotdotgod` blocks as compact JSON. |
116
+ | `dotdotgod plan validate <plan-readme>` | Checks active-plan structure, required Markdown sections, decision/assumption blockers, atomic-task verification, and simplified Plan Generator checkpoints when present. |
117
+ | `pnpm run verify` | Runs this repository's quality gate: generated-resource checks, package verify contracts, tests, typecheck, and docs validation where each package defines it. |
92
118
 
93
- Use `expand --fuzzy` for high-signal natural prompt references such as uppercase identifiers, path-like mentions, quoted phrases, and strong indexed aliases. Fuzzy low-signal terms use built-in defaults and can be adjusted in `dotdotgod.config.json` with `referenceExpansion.fuzzy.lowSignal.add` and `remove`. Archive bodies are excluded by default unless `--include-archive` is passed.
119
+ Most users start with `validate`. Use `traceability links --write` only when generated traceability output needs repair, and use `verify` before release-style handoff in this repository.
94
120
 
95
121
  ## Memory, Specs, and Config
96
122
 
97
- The default docs scaffold gives files explicit project-memory meaning:
98
-
99
- - `docs/spec/**`: stable shared/fresh product truth and, by default, the traceability-enforced behavior-spec path.
100
- - `docs/arch/**`: stable shared/fresh architecture rationale.
101
- - `docs/test/**`: stable shared/fresh verification knowledge.
102
- - `docs/plan/**`: local fresh active-task intent.
103
- - `docs/archive/README.md`: local stale archive map included by default.
104
- - `docs/archive/**`: local stale archive bodies excluded by default.
123
+ The default scaffold gives docs explicit roles:
105
124
 
106
- Those roles are configurable but separate. Use `memory.areas` to customize memory classification and retrieval priority. Use `traceability.required` / `traceability.exclude` to customize which markdown paths must end with `json dotdotgod` traceability blocks. Use `validation.markdown`, `impactRanking`, and `referenceExpansion` to tune size budgets, impact scoring, and fuzzy prompt matching.
125
+ - `docs/spec/**`: product behavior and requirements. This path is traceability-enforced by default.
126
+ - `docs/arch/**`: architecture rationale, boundaries, conventions, and decisions.
127
+ - `docs/test/**`: verification strategy, regression coverage, fixtures, and commands.
128
+ - `docs/plan/**`: local active-task intent.
129
+ - `docs/archive/README.md`: local archive map included by default.
130
+ - `docs/archive/**`: local archive bodies excluded by default unless targeted.
107
131
 
108
- See the [root README](../../README.md), [GitHub repository](https://github.com/dotdotgod/dotdotgod-kit), [`docs/concept/CONTEXT_CURATION.md`](../../docs/concept/CONTEXT_CURATION.md), [`docs/concept/CONTEXT_MECHANICS.md`](../../docs/concept/CONTEXT_MECHANICS.md), [`docs/spec/MEMORY_AREA_CONFIG.md`](../../docs/spec/MEMORY_AREA_CONFIG.md), and [`docs/spec/TRACEABILITY_CONFIG.md`](../../docs/spec/TRACEABILITY_CONFIG.md) for the deeper model.
132
+ Use `memory.areas` to customize memory classification and retrieval priority. Use `traceability.required` and `traceability.exclude` to customize which Markdown paths need `json dotdotgod` traceability blocks. Use `validation.markdown`, `impactRanking`, and `referenceExpansion` to tune size budgets, impact scoring, and fuzzy prompt matching.
109
133
 
110
134
  ## Indexing Scope
111
135
 
112
- `dotdotgod index` is gitignore-aware by default. It uses `git ls-files --cached --others --exclude-standard` when possible, then filters to supported text, source, script, config, web, and infrastructure files. In non-git contexts it falls back to a conservative directory walk.
136
+ `dotdotgod index` is gitignore-aware by default. It uses `git ls-files --cached --others --exclude-standard` when possible, then filters to supported text, source, script, config, web, and infrastructure files.
113
137
 
114
138
  Default exclusions include dependency, generated, cache, and secret-like paths such as `.git/`, `.dotdotgod/`, `node_modules/`, `dist/`, `build/`, `coverage/`, `.next/`, `target/`, `vendor/`, `.venv/`, and `.env`. Example env templates such as `.env.example` remain indexable.
115
139
 
116
- ## Compared with Graphify-Style Reports
140
+ ## Learn More
117
141
 
118
- The CLI is not designed to make agents read a giant graph report. The full graph stays local; agent-facing output is bounded. The strength is explicit project-maintained links before extraction: docs areas, README indexes, traceability blocks, package metadata, commands, tests, and memory policy tell agents which files are behavior truth, architecture rationale, verification, current intent, or historical memory before they read source.
142
+ See the [root README](../../README.md), [GitHub repository](https://github.com/dotdotgod/dotdotgod-kit), [Context curation](../../docs/concept/CONTEXT_CURATION.md), [Context mechanics](../../docs/concept/CONTEXT_MECHANICS.md), [Memory area config](../../docs/spec/MEMORY_AREA_CONFIG.md), and [Traceability config](../../docs/spec/TRACEABILITY_CONFIG.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotdotgod/cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.41",
4
4
  "description": "CLI for dotdotgod validation, project memory snapshots, and graph indexing.",
5
5
  "type": "module",
6
6
  "license": "Elastic-2.0",