Skip to content

Commit 35bfa3c

Browse files
authored
refactor: organize generated/ into benchmarks/ and dogfood/ subdirs (#227)
Move benchmark reports to generated/benchmarks/ and dogfood reports to generated/dogfood/ for cleaner structure. Update all references: - benchmark.yml workflow (git diff/add paths) - 4 report update scripts (output paths + JSDoc) - README.md benchmark links - dogfood skill (reference, output, and commit paths)
1 parent 0a4c1bf commit 35bfa3c

14 files changed

+32
-32
lines changed

.claude/skills/dogfood/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allowed-tools: Bash, Read, Write, Glob, Grep, Task, Edit
1010
You are running a comprehensive dogfooding session for codegraph **v$ARGUMENTS**.
1111
Your goal is to install the published package, exercise every feature, compare engines, find bugs, and produce a structured report.
1212

13-
> **Reference:** Read `generated/DOGFOOD-REPORT-2.1.0.md` and `generated/DOGFOOD_REPORT_v2.2.0.md` (if present) for the format and depth expected. Match or exceed that quality.
13+
> **Reference:** Read `generated/dogfood/DOGFOOD-REPORT-2.1.0.md` and `generated/dogfood/DOGFOOD_REPORT_v2.2.0.md` (if present) for the format and depth expected. Match or exceed that quality.
1414
1515
---
1616

@@ -190,7 +190,7 @@ If the version does **not** match `$ARGUMENTS`:
190190

191191
1. Run all four from the codegraph source repo directory.
192192
2. Record the JSON output from each.
193-
3. Compare with the previous release's numbers in `generated/BUILD-BENCHMARKS.md` (build benchmark) and previous dogfood reports.
193+
3. Compare with the previous release's numbers in `generated/benchmarks/BUILD-BENCHMARKS.md` (build benchmark) and previous dogfood reports.
194194
4. Flag any regressions:
195195
- Build time per file >10% slower → investigate
196196
- Query latency >2x slower → investigate
@@ -361,7 +361,7 @@ This signals that v$ARGUMENTS has been manually verified end-to-end.
361361
362362
## Phase 9 — Report
363363
364-
Write the report to `generated/DOGFOOD_REPORT_v$ARGUMENTS.md` with this structure:
364+
Write the report to `generated/dogfood/DOGFOOD_REPORT_v$ARGUMENTS.md` with this structure:
365365
366366
```markdown
367367
# Dogfooding Report: @optave/codegraph@$ARGUMENTS
@@ -450,20 +450,20 @@ The dogfood report **must** be committed to the repository — do not leave it a
450450
1. **If bug-fix PRs were created during Phase 7:** Add the report to the **first** PR's branch:
451451
```bash
452452
git checkout <first-pr-branch>
453-
git add generated/DOGFOOD_REPORT_v$ARGUMENTS.md
453+
git add generated/dogfood/DOGFOOD_REPORT_v$ARGUMENTS.md
454454
git commit -m "docs: add dogfood report for v$ARGUMENTS"
455455
git push
456456
```
457457
458458
2. **If no PRs were created** (zero bugs / green path): Create a dedicated PR for the report:
459459
```bash
460460
git checkout -b docs/dogfood-report-v$ARGUMENTS main
461-
git add generated/DOGFOOD_REPORT_v$ARGUMENTS.md
461+
git add generated/dogfood/DOGFOOD_REPORT_v$ARGUMENTS.md
462462
git commit -m "docs: add dogfood report for v$ARGUMENTS"
463463
git push -u origin docs/dogfood-report-v$ARGUMENTS
464464
gh pr create --base main \
465465
--title "docs: add dogfood report for v$ARGUMENTS" \
466-
--body "Dogfooding report for v$ARGUMENTS. See generated/DOGFOOD_REPORT_v$ARGUMENTS.md for full details."
466+
--body "Dogfooding report for v$ARGUMENTS. See generated/dogfood/DOGFOOD_REPORT_v$ARGUMENTS.md for full details."
467467
```
468468
469469
3. **Verify** the report file appears in the PR diff before moving on.

.github/workflows/benchmark.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
VERSION_RE="${VERSION//./\\.}"
6363
if [ "$VERSION" = "dev" ]; then
6464
echo "skip=false" >> "$GITHUB_OUTPUT"
65-
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/BUILD-BENCHMARKS.md 2>/dev/null; then
65+
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/benchmarks/BUILD-BENCHMARKS.md 2>/dev/null; then
6666
echo "Benchmark for $VERSION already exists in BUILD-BENCHMARKS.md — skipping"
6767
echo "skip=true" >> "$GITHUB_OUTPUT"
6868
else
@@ -111,11 +111,11 @@ jobs:
111111
run: |
112112
CHANGED=false
113113
# Detect modified tracked files
114-
if ! git diff --quiet HEAD -- generated/BUILD-BENCHMARKS.md README.md 2>/dev/null; then
114+
if ! git diff --quiet HEAD -- generated/benchmarks/BUILD-BENCHMARKS.md README.md 2>/dev/null; then
115115
CHANGED=true
116116
fi
117117
# Detect newly created (untracked) files
118-
if [ -n "$(git ls-files --others --exclude-standard generated/BUILD-BENCHMARKS.md)" ]; then
118+
if [ -n "$(git ls-files --others --exclude-standard generated/benchmarks/BUILD-BENCHMARKS.md)" ]; then
119119
CHANGED=true
120120
fi
121121
echo "changed=$CHANGED" >> "$GITHUB_OUTPUT"
@@ -135,7 +135,7 @@ jobs:
135135
BRANCH="benchmark/build-v${VERSION}-$(date +%Y%m%d-%H%M%S)"
136136
fi
137137
git checkout -b "$BRANCH"
138-
git add generated/BUILD-BENCHMARKS.md README.md
138+
git add generated/benchmarks/BUILD-BENCHMARKS.md README.md
139139
git commit -m "docs: update build performance benchmarks (${VERSION})"
140140
git push origin "$BRANCH"
141141
@@ -193,7 +193,7 @@ jobs:
193193
VERSION_RE="${VERSION//./\\.}"
194194
if [ "$VERSION" = "dev" ]; then
195195
echo "skip=false" >> "$GITHUB_OUTPUT"
196-
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/EMBEDDING-BENCHMARKS.md 2>/dev/null; then
196+
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/benchmarks/EMBEDDING-BENCHMARKS.md 2>/dev/null; then
197197
echo "Benchmark for $VERSION already exists in EMBEDDING-BENCHMARKS.md — skipping"
198198
echo "skip=true" >> "$GITHUB_OUTPUT"
199199
else
@@ -256,11 +256,11 @@ jobs:
256256
run: |
257257
CHANGED=false
258258
# Detect modified tracked files
259-
if ! git diff --quiet HEAD -- generated/EMBEDDING-BENCHMARKS.md 2>/dev/null; then
259+
if ! git diff --quiet HEAD -- generated/benchmarks/EMBEDDING-BENCHMARKS.md 2>/dev/null; then
260260
CHANGED=true
261261
fi
262262
# Detect newly created (untracked) files
263-
if [ -n "$(git ls-files --others --exclude-standard generated/EMBEDDING-BENCHMARKS.md)" ]; then
263+
if [ -n "$(git ls-files --others --exclude-standard generated/benchmarks/EMBEDDING-BENCHMARKS.md)" ]; then
264264
CHANGED=true
265265
fi
266266
echo "changed=$CHANGED" >> "$GITHUB_OUTPUT"
@@ -280,7 +280,7 @@ jobs:
280280
BRANCH="benchmark/embedding-v${VERSION}-$(date +%Y%m%d-%H%M%S)"
281281
fi
282282
git checkout -b "$BRANCH"
283-
git add generated/EMBEDDING-BENCHMARKS.md
283+
git add generated/benchmarks/EMBEDDING-BENCHMARKS.md
284284
git commit -m "docs: update embedding benchmarks (${VERSION})"
285285
git push origin "$BRANCH"
286286
@@ -338,7 +338,7 @@ jobs:
338338
VERSION_RE="${VERSION//./\\.}"
339339
if [ "$VERSION" = "dev" ]; then
340340
echo "skip=false" >> "$GITHUB_OUTPUT"
341-
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/QUERY-BENCHMARKS.md 2>/dev/null; then
341+
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/benchmarks/QUERY-BENCHMARKS.md 2>/dev/null; then
342342
echo "Benchmark for $VERSION already exists in QUERY-BENCHMARKS.md — skipping"
343343
echo "skip=true" >> "$GITHUB_OUTPUT"
344344
else
@@ -387,11 +387,11 @@ jobs:
387387
run: |
388388
CHANGED=false
389389
# Detect modified tracked files
390-
if ! git diff --quiet HEAD -- generated/QUERY-BENCHMARKS.md 2>/dev/null; then
390+
if ! git diff --quiet HEAD -- generated/benchmarks/QUERY-BENCHMARKS.md 2>/dev/null; then
391391
CHANGED=true
392392
fi
393393
# Detect newly created (untracked) files
394-
if [ -n "$(git ls-files --others --exclude-standard generated/QUERY-BENCHMARKS.md)" ]; then
394+
if [ -n "$(git ls-files --others --exclude-standard generated/benchmarks/QUERY-BENCHMARKS.md)" ]; then
395395
CHANGED=true
396396
fi
397397
echo "changed=$CHANGED" >> "$GITHUB_OUTPUT"
@@ -411,7 +411,7 @@ jobs:
411411
BRANCH="benchmark/query-v${VERSION}-$(date +%Y%m%d-%H%M%S)"
412412
fi
413413
git checkout -b "$BRANCH"
414-
git add generated/QUERY-BENCHMARKS.md
414+
git add generated/benchmarks/QUERY-BENCHMARKS.md
415415
git commit -m "docs: update query benchmarks (${VERSION})"
416416
git push origin "$BRANCH"
417417
@@ -469,7 +469,7 @@ jobs:
469469
VERSION_RE="${VERSION//./\\.}"
470470
if [ "$VERSION" = "dev" ]; then
471471
echo "skip=false" >> "$GITHUB_OUTPUT"
472-
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/INCREMENTAL-BENCHMARKS.md 2>/dev/null; then
472+
elif grep -qP '"version":\s*"'"$VERSION_RE"'"' generated/benchmarks/INCREMENTAL-BENCHMARKS.md 2>/dev/null; then
473473
echo "Benchmark for $VERSION already exists in INCREMENTAL-BENCHMARKS.md — skipping"
474474
echo "skip=true" >> "$GITHUB_OUTPUT"
475475
else
@@ -518,11 +518,11 @@ jobs:
518518
run: |
519519
CHANGED=false
520520
# Detect modified tracked files
521-
if ! git diff --quiet HEAD -- generated/INCREMENTAL-BENCHMARKS.md 2>/dev/null; then
521+
if ! git diff --quiet HEAD -- generated/benchmarks/INCREMENTAL-BENCHMARKS.md 2>/dev/null; then
522522
CHANGED=true
523523
fi
524524
# Detect newly created (untracked) files
525-
if [ -n "$(git ls-files --others --exclude-standard generated/INCREMENTAL-BENCHMARKS.md)" ]; then
525+
if [ -n "$(git ls-files --others --exclude-standard generated/benchmarks/INCREMENTAL-BENCHMARKS.md)" ]; then
526526
CHANGED=true
527527
fi
528528
echo "changed=$CHANGED" >> "$GITHUB_OUTPUT"
@@ -542,7 +542,7 @@ jobs:
542542
BRANCH="benchmark/incremental-v${VERSION}-$(date +%Y%m%d-%H%M%S)"
543543
fi
544544
git checkout -b "$BRANCH"
545-
git add generated/INCREMENTAL-BENCHMARKS.md
545+
git add generated/benchmarks/INCREMENTAL-BENCHMARKS.md
546546
git commit -m "docs: update incremental benchmarks (${VERSION})"
547547
git push origin "$BRANCH"
548548

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ Codegraph also extracts symbols from common callback patterns: Commander `.comma
463463

464464
## 📊 Performance
465465

466-
Self-measured on every release via CI ([build benchmarks](generated/BUILD-BENCHMARKS.md) | [embedding benchmarks](generated/EMBEDDING-BENCHMARKS.md)):
466+
Self-measured on every release via CI ([build benchmarks](generated/benchmarks/BUILD-BENCHMARKS.md) | [embedding benchmarks](generated/benchmarks/EMBEDDING-BENCHMARKS.md)):
467467

468468
| Metric | Latest |
469469
|---|---|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)