You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: consolidate hub and golden queries; clarify API docs and incremental git
- Add golden-queries doc, remove superseded plan; refresh docs hub and links
- Restore multi-line JSDoc on public API and CLI query surfaces
- Document getChangedFiles strategy and git status porcelain path slicing
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Then open a PR on GitHub into **`main`**.
38
38
-**Public API** — Anything exported from the package entry (`src/index.ts` → `src/api.ts`, `config.ts`, shared types) should have **JSDoc** that reads well in hovers and in published typings.
39
39
-**Layers** — Keep boundaries clear: [architecture.md](../docs/architecture.md) (`cli` → `application` → infrastructure). Don’t let CLI concerns leak into parsers or the DB layer.
40
40
-**Before you open / update a PR** — `bun run check` (or at least `bun run test` + `bun run typecheck` while iterating).
41
-
-**Golden queries (Tier A)** — If you change `fixtures/minimal/` or schema/query behavior expected by [fixtures/golden/](../fixtures/golden/), run `bun scripts/query-golden.ts --update`, review diffs, and commit updated JSON under `fixtures/golden/minimal/`. Prefer **fixing the indexer** when output changes for the wrong reason; only refresh goldens when the new rows are correct. See [docs/plan-query-golden-scenarios.md](../docs/plan-query-golden-scenarios.md).
41
+
-**Golden queries (Tier A)** — If you change `fixtures/minimal/` or schema/query behavior expected by [fixtures/golden/](../fixtures/golden/), run `bun scripts/query-golden.ts --update`, review diffs, and commit updated JSON under `fixtures/golden/minimal/`. Prefer **fixing the indexer** when output changes for the wrong reason; only refresh goldens when the new rows are correct. See [docs/golden-queries.md](../docs/golden-queries.md).
42
42
-**Golden queries (Tier B)** — Against a **local** clone, use `bun run test:golden:external` with `CODEMAP_ROOT` / `--root`. Copy [fixtures/golden/scenarios.external.example.json](../fixtures/golden/scenarios.external.example.json) to `scenarios.external.json` if you need custom scenarios; goldens under `fixtures/golden/external/` are gitignored — do not commit snapshots from proprietary trees.
43
43
-**Style** — Match Oxfmt/Oxlint; prefer **straight-line code** and extracted helpers over long nested blocks.
|[plan-query-golden-scenarios.md](./plan-query-golden-scenarios.md)| Golden `query`snapshots + Tier B external corpus — **implementation plan** (runner: [scripts/query-golden.ts](../scripts/query-golden.ts); not LLM eval)|
14
-
|[fixtures/golden/](../fixtures/golden/)|[scenarios.json](../fixtures/golden/scenarios.json) + [minimal/](../fixtures/golden/minimal/) — **`bun run test:golden`**; Tier B: [scenarios.external.example.json](../fixtures/golden/scenarios.external.example.json) + **`bun run test:golden:external`** ([benchmark § Fixtures](./benchmark.md#fixtures)) |
15
-
|[fixtures/benchmark/](../fixtures/benchmark/)| Tracked [scenarios.example.json](../fixtures/benchmark/scenarios.example.json) — copy to `*.local.json` (gitignored) for [`CODEMAP_BENCHMARK_CONFIG`](./benchmark.md#custom-scenarios-codemap_benchmark_config)|
16
-
|[fixtures/qa/](../fixtures/qa/)|[prompts.external.template.md](../fixtures/qa/prompts.external.template.md) — optional chat QA prompts for an external index (`*.local.md` gitignored) |
17
-
|[packaging.md](./packaging.md)|**`CHANGELOG.md` / `dist/` / `templates/`** on npm, **engines**, [**Node vs Bun**](./packaging.md#node-vs-bun), [**Releases**](./packaging.md#releases) (Changesets) |
18
-
|[roadmap.md](./roadmap.md)| Forward-looking backlog (not a `src/` inventory) |
|[golden-queries.md](./golden-queries.md)| Golden `query`**design & policy** (Tier A/B, no proprietary trees); runner: [scripts/query-golden.ts](../scripts/query-golden.ts)|
14
+
|[fixtures/golden/](../fixtures/golden/)|[scenarios.json](../fixtures/golden/scenarios.json) + [minimal/](../fixtures/golden/minimal/) — **`bun run test:golden`**; Tier B: [scenarios.external.example.json](../fixtures/golden/scenarios.external.example.json) + **`bun run test:golden:external`** ([benchmark § Fixtures](./benchmark.md#fixtures)) |
15
+
|[fixtures/benchmark/](../fixtures/benchmark/)| Tracked [scenarios.example.json](../fixtures/benchmark/scenarios.example.json) — copy to `*.local.json` (gitignored) for [`CODEMAP_BENCHMARK_CONFIG`](./benchmark.md#custom-scenarios-codemap_benchmark_config)|
16
+
|[fixtures/qa/](../fixtures/qa/)|[prompts.external.template.md](../fixtures/qa/prompts.external.template.md) — optional chat QA prompts for an external index (`*.local.md` gitignored) |
17
+
|[packaging.md](./packaging.md)|**`CHANGELOG.md` / `dist/` / `templates/`** on npm, **engines**, [**Node vs Bun**](./packaging.md#node-vs-bun), [**Releases**](./packaging.md#releases) (Changesets) |
18
+
|[roadmap.md](./roadmap.md)| Forward-looking backlog (not a `src/` inventory) |
19
19
20
20
## Single source of truth (do not duplicate)
21
21
@@ -26,7 +26,7 @@ Technical docs for **[@stainless-code/codemap](https://github.com/stainless-code
26
26
|**`codemap agents init`**: **`--force`** on **`.agents/`** in **consumer projects** (template file paths only), IDE matrix, per-file symlink/copy, **`templates/agents`**|[agents.md](./agents.md)| Link here; do not paste the integration table into README or packaging |
27
27
|**`CLAUDE.md` / `AGENTS.md` / `GEMINI.md` / Copilot** — managed **`codemap-pointer`** sections, merge vs **`--force`**|[agents.md § Pointer files](./agents.md#pointer-files)| Link here; do not duplicate the situation table |
28
28
| End-user CLI (index, **`query --json`**, agents, flags, env) — query has no row cap; use SQL **`LIMIT`**|[../README.md § CLI](../README.md#cli)|[architecture § CLI usage](./architecture.md#cli-usage) summarizes and links back |
29
-
| Golden query regression (`test:golden`, `test:golden:external`, `--update`) |[plan-query-golden-scenarios.md](./plan-query-golden-scenarios.md)| CONTRIBUTING § Golden queries; [benchmark § Fixtures](./benchmark.md#fixtures)|
29
+
| Golden query regression (`test:golden`, `test:golden:external`, `--update`) |[golden-queries.md](./golden-queries.md)| CONTRIBUTING § Golden queries; [benchmark § Fixtures](./benchmark.md#fixtures)|
30
30
|**`CODEMAP_BENCHMARK_CONFIG`** (per-repo benchmark JSON) |[benchmark § Custom scenarios](./benchmark.md#custom-scenarios-codemap_benchmark_config)|[fixtures/benchmark/scenarios.example.json](../fixtures/benchmark/scenarios.example.json) only |
31
31
|`bun run qa:external` — index + disk checks + `benchmark.ts` on **`CODEMAP_*`**|[.github/CONTRIBUTING.md](../.github/CONTRIBUTING.md)|[scripts/qa-external-repo.ts](../scripts/qa-external-repo.ts) (invocation only) |
Copy file name to clipboardExpand all lines: docs/benchmark.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ bun run benchmark
206
206
207
207
**CI:** the workflow **Benchmark (fixture)** runs the same steps with `CODEMAP_ROOT=$GITHUB_WORKSPACE/fixtures/minimal`.
208
208
209
-
**Correctness (golden queries):**`bun run test:golden` indexes `fixtures/minimal`, runs SQL against [fixtures/golden/scenarios.json](../fixtures/golden/scenarios.json), and compares to [fixtures/golden/minimal/](../fixtures/golden/minimal/). See [plan-query-golden-scenarios.md](./plan-query-golden-scenarios.md). Refresh goldens after intentional fixture or schema changes: `bun scripts/query-golden.ts --update`.
209
+
**Correctness (golden queries):**`bun run test:golden` indexes `fixtures/minimal`, runs SQL against [fixtures/golden/scenarios.json](../fixtures/golden/scenarios.json), and compares to [fixtures/golden/minimal/](../fixtures/golden/minimal/). See [golden-queries.md](./golden-queries.md). Refresh goldens after intentional fixture or schema changes: `bun scripts/query-golden.ts --update`.
210
210
211
211
**Tier B (local tree, not in default CI):**`bun run test:golden:external` (or `bun scripts/query-golden.ts --corpus external`) indexes **`CODEMAP_ROOT`**, **`CODEMAP_TEST_BENCH`**, or **`--root`**, loads [fixtures/golden/scenarios.external.json](../fixtures/golden/scenarios.external.json) if present else [scenarios.external.example.json](../fixtures/golden/scenarios.external.example.json), and writes/compares goldens under `fixtures/golden/external/` (gitignored). Use **`match`** in scenarios for subset checks (`minRows`, `everyRowContains`); use **`budgetMs`** with optional **`--strict-budget`** for perf warnings. Do not commit proprietary paths or goldens from private apps.
0 commit comments