Skip to content

Commit 0323a1f

Browse files
docs: fact-check sweep — align docs and CLI help with shipped behavior (#145)
* docs: lifecycle sweep — retire P1 agent-surface plans, fact-check references P1 agent-surface plans are complete; lift status to roadmap and fix stale schema, MCP, validate, and index-path claims across docs and agent templates. * docs: second sweep — type_heritage, MCP metadata, index paths Add type_heritage to served rule and roadmap substrate inventory, align MCP tool/resource descriptions and CLI help with index.db paths and validate behavior. * docs: third sweep — recipe catalog is bundled + project-local Align agent templates, README, packaging, glossary, and MCP metadata with recipes-loader behavior; fix Tier 11 glossary anchor suffix. * docs: fourth sweep — agent strings, paths, index.db comments Fix MCP tool/resource descriptions, CLI help/JSDoc, audit cache comments, research doc relative paths, and non-goals MCP resource citation. * docs: fifth sweep — complete MCP/HTTP help, recency write paths List all 17 tools and mcp-instructions in cmd-mcp/cmd-serve help, fix schema cache wording, recipe_recency write-path docs, and skill assembly cache notes. * docs: sixth sweep — CLI help, audit --ci, resource cache split Fix bundled-only recipe help text, audit --ci exit behavior, default-ON watch wording, and skill resource freshness contract. * docs: seventh sweep — README MCP line, schema.gen cache note Align README quick-start comments and schema.gen fallback with 17-tool MCP surface and codemap://schema lazy-cache behavior. * docs: final sweep — audit archive extract, in-process watcher Replace stale worktree/co-process wording with git archive + tar -x audit cache semantics and in-process chokidar watch behavior. * docs: eighth sweep — audit seam, HTTP shipped, error strings Fix architecture audit wiring cross-ref, non-goals transport wording, stale MCP-only HTTP JSDoc, and user-facing audit error messages. * docs: ninth sweep — transport envelopes, state-dir paths, audit --ci Fact-check passes 9–19: per-tool JSON shapes (not uniform query --json), no-CLI-verb tools on MCP+HTTP, audit-cache vs state-dir, query --ci quiet split, assembled resources, and related CLI/help string fixes. * docs: address CodeRabbit PR #145 — MCP wiring, anchor, JSON example Fact-checked 4/5 bot comments; push back on false-positive GitHub capitalization (Actions expression github.base_ref is correct).
1 parent 1dd422d commit 0323a1f

45 files changed

Lines changed: 305 additions & 436 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bun add @stainless-code/codemap
4747
```bash
4848
codemap # incremental index (run once per session)
4949
codemap dead-code --json # outcome alias → query --recipe untested-and-dead
50-
codemap query --json --recipe fan-out # bundled SQL via recipe id (alias: -r)
50+
codemap query --json --recipe fan-out # recipe SQL by id (alias: -r)
5151
codemap query --json "SELECT name, file_path FROM symbols WHERE name = 'foo'" # ad-hoc SQL
5252
codemap --files src/a.ts src/b.tsx # targeted re-index after edits
5353
codemap validate --json # detect stale / missing / unindexed files
@@ -124,11 +124,11 @@ codemap audit --baseline base --files-baseline hotfix-files # mixed — auto
124124
codemap audit --baseline base --no-index # skip the auto-incremental-index prelude (frozen-DB CI)
125125
codemap audit --base origin/main --json # ad-hoc — archive+reindex against any committish; no --save-baseline needed
126126
codemap audit --base origin/main --format sarif # emit SARIF 2.1.0 directly (Code Scanning); also: --ci alias
127-
codemap audit --base origin/main --ci # CI shortcut: --format sarif + non-zero exit on additions + quiet
127+
codemap audit --base origin/main --ci # CI shortcut: --format sarif + non-zero exit on additions
128128
codemap audit --base v1.0.0 --files-baseline pre-release-files # mix --base with per-delta override
129129
# --base materialises <ref> via `git archive | tar -x` to .codemap/audit-cache/<sha>/, reindexes into
130-
# a temp DB, then diffs. Cache hit on second run against same sha is sub-100ms. Requires git;
131-
# non-git projects get a clean `--base requires a git repository` error.
130+
# a cached `.codemap/index.db` at that sha, then diffs. Cache hit on second run against same sha is sub-100ms. Requires git;
131+
# non-git projects get a clean `codemap audit: --base requires a git repository.` error.
132132
# Recipes that define per-row action templates append "actions" hints (kebab-case verb +
133133
# description) in --json output; ad-hoc SQL never carries actions. Inspect via --recipes-json.
134134
# --format <text|json|sarif|annotations|mermaid|diff|diff-json> — pipe results into GitHub Code Scanning
@@ -169,7 +169,7 @@ codemap serve --port 7878 # default-ON watcher
169169
codemap watch --quiet # standalone (decoupled from a transport)
170170
codemap mcp --no-watch # opt out for one-shot fire-and-forget calls
171171
CODEMAP_WATCH=0 codemap mcp # env-var opt-out (mirrors --no-watch)
172-
# List bundled recipes as JSON, or print one recipe's SQL (no DB required)
172+
# List recipe catalog (bundled + project-local) as JSON, or print one recipe's SQL (no DB required)
173173
codemap query --recipes-json
174174
codemap query --print-sql fan-out
175175
# `components-by-hooks` ranks by hook count without SQLite JSON1 (comma-based count on the stored JSON array).
@@ -221,12 +221,12 @@ codemap skill # full codemap S
221221
codemap rule # full codemap rule markdown to stdout
222222

223223
# MCP server (Model Context Protocol) — for agent hosts (Claude Code, Cursor, Codex, generic MCP clients)
224-
codemap mcp # JSON-RPC on stdio; one tool per CLI verb plus query_batch
225-
# Tools (17): query, query_batch (MCP-only), query_recipe, audit, save_baseline,
224+
codemap mcp # JSON-RPC on stdio (17 tools; watcher default-ON)
225+
# Tools (17): query, query_batch (no CLI verb), query_recipe, audit, save_baseline,
226226
# list_baselines, drop_baseline, context, validate, show, snippet, impact,
227227
# affected, trace, explore, node, apply
228-
# MCP-only (no CLI verb): query_batch, trace, explore, node. Other tools mirror a CLI --json envelope.
229-
# Resources: codemap://schema, codemap://skill, codemap://rule (lazy-cached);
228+
# No CLI verb (MCP + HTTP): query_batch, trace, explore, node. Other tools mirror a CLI --json envelope.
229+
# Resources: codemap://schema, codemap://skill, codemap://rule, codemap://mcp-instructions (lazy-cached);
230230
# codemap://recipes, codemap://recipes/{id} (live read-per-call — recency fields stay fresh);
231231
# codemap://files/{path}, codemap://symbols/{name} (live read-per-call)
232232
# Output shape verbatim from `--json` envelopes (no re-mapping). Snake_case throughout.

docs/README.md

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

docs/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ codemap agents init --no-git-hooks # remove codemap hook blocks
3737

3838
## Git and `.gitignore`
3939

40-
Codemap maintains its own self-managed **`<state-dir>/.gitignore`** (default `.codemap/.gitignore`) — a blacklist of generated artifacts (`index.db` + WAL/SHM, `audit-cache/`) reconciled to canonical on every codemap boot via `ensureStateGitignore` (`src/application/state-dir.ts`). Project-tracked sources (`recipes/`, `config.{ts,js,json}`) default to tracked.
40+
Codemap maintains its own self-managed **`<state-dir>/.gitignore`** (default `.codemap/.gitignore`) — a blacklist of generated artifacts (`index.db` + WAL/SHM, `audit-cache/` entry in the canonical list) reconciled to canonical on every codemap boot via `ensureStateGitignore` (`src/application/state-dir.ts`). **`audit --base` cache** physically lives at `<projectRoot>/.codemap/audit-cache/` (hardcoded; does not follow `--state-dir`). Project-tracked sources (`recipes/`, `config.{ts,js,json}`) default to tracked.
4141

4242
The user's root **`.gitignore`** is no longer touched by `codemap agents init`. Future codemap versions can add new generated artifacts to the canonical blacklist; every consumer's project repairs itself on the next `codemap` invocation. **The setup logic IS the migration** (per plan §D11).
4343

@@ -79,7 +79,7 @@ Append alone would duplicate on every run — markers + replace are what prevent
7979

8080
## Live fetch surface (CLI + MCP + HTTP)
8181

82-
Once `agents init` has written the pointer templates, the consumer's disk holds 12–20 lines per file. The actual content is served live:
82+
Once `agents init` has written the pointer templates, the consumer's disk holds ~16-line SKILL + ~23-line rule. The actual content is served live:
8383

8484
| Surface | Skill | Rule |
8585
| ---------------------- | -------------------------------------------------------- | ------------------------------------------------------- |

0 commit comments

Comments
 (0)