Skip to content

chore: add docs/llm-guide.md to version sync checks - #614

Merged
jackgranatowski merged 2 commits into
mainfrom
claude/llm-guide-version-0615-hao7n0
Jul 14, 2026
Merged

jackgranatowski merged 2 commits into
mainfrom
claude/llm-guide-version-0615-hao7n0

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends the version synchronization system to include docs/llm-guide.md, ensuring the version header in the LLM guide stays in sync with package.json alongside existing checks for docs/roadmap.md and configurator files.

Updates both the checker (check-version-sync.js) and syncer (version-sync.js) scripts, adds corresponding test coverage, and bumps the guide version to 0.7.16 to reflect the current framework version.

Type

  • chore / tooling

Checklist

  • Conventional Commit messages (feat:, fix:, docs:, …) — enforced by commitlint
  • npm run lint:css passes (stylelint)
  • npm run build rebuilds dist/ (bundles are git-ignored; CI rebuilds and stamps headers)
  • npm test passes (unit + Playwright e2e)
  • Version references in sync if any version-related file changed (npm run check:version)
  • Generated artifacts regenerated, not hand-edited (npm run check:macros, check:registry, audit:check)

Notes

  • Added version check for docs/llm-guide.md matching the pattern Version: **X.Y.Z**
  • Updated CLAUDE.md to document the new sync requirement
  • All existing tests pass; new tests verify both version mismatch and missing version header scenarios

https://claude.ai/code/session_01RX7TYJhAFYCMf7i9cDxMzH

Summary by CodeRabbit

  • Documentation

    • Updated the LLM guide to version 0.7.16.
    • Documented the guide as a version-synchronized artifact.
  • Bug Fixes

    • Added validation to detect when the LLM guide’s version differs from the application version.
    • Automatic version synchronization now updates the LLM guide consistently.
  • Tests

    • Added coverage for mismatched and missing version headers in the LLM guide.

The llm-guide.md "Version" header had drifted to 0.6.15 while every other
version artifact was at 0.7.16, because version-sync.js and
check-version-sync.js never touched it. Bring it in line with
package.json and fold it into the sync/check pipeline so it can't
drift silently again.
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7cbb614a-520f-4b42-8ed3-c2bdfdbad2f2

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd273b and cb344c8.

📒 Files selected for processing (6)
  • CLAUDE.md
  • docs/llm-guide.md
  • scripts/check-version-sync.js
  • scripts/version-sync.js
  • tests/check-version-sync.test.js
  • tests/version-sync.test.js

📝 Walkthrough

Walkthrough

The version-sync tooling now updates and validates docs/llm-guide.md against package.json, with documentation and tests covering synchronization, mismatches, and missing version headers.

Changes

Version synchronization

Layer / File(s) Summary
Synchronize the LLM guide
CLAUDE.md, docs/llm-guide.md, scripts/version-sync.js, tests/version-sync.test.js
Adds the LLM guide to the mandatory sync artifacts, updates its version to 0.7.16, and verifies automated propagation of package versions.
Validate version drift
scripts/check-version-sync.js, tests/check-version-sync.test.js
Checks the LLM guide’s Version: header against package.json and tests mismatched or missing headers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: codex

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding docs/llm-guide.md to the version sync checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/llm-guide-version-0615-hao7n0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR extends the version synchronisation system to cover docs/llm-guide.md, ensuring its Version: **X.Y.Z** header is kept in lock-step with package.json by both the checker and the syncer scripts, with matching test coverage added for each.

  • scripts/check-version-sync.js gains a new check (item Add uploaded files #3) using /Version:\s*\*\*([^*]+)\*\*/ to detect drift in docs/llm-guide.md, and scripts/version-sync.js gains a corresponding sync() call using the shared SEMVER_RE to rewrite it.
  • Tests cover both the mismatch and missing-header failure paths in the checker, and the happy-path write in the syncer.
  • docs/llm-guide.md is bumped from 0.6.15 to 0.7.16, and CLAUDE.md's version-sync table is updated — though the accompanying prose still references "first five rows" instead of the now-correct "first six rows".

Confidence Score: 4/5

Safe to merge after fixing the stale row-count sentence in CLAUDE.md; all script and test logic is correct.

The checker regex, syncer replacement pattern, and test fixtures all agree and correctly cover mismatch and missing-header scenarios. The only error is that CLAUDE.md's prose still says "first five rows" after a sixth row was added to the table — a developer or AI agent consulting the guide would get an incorrect count of which rows require manual syncing.

CLAUDE.md — the "first five rows" sentence needs updating to "first six rows".

Important Files Changed

Filename Overview
CLAUDE.md Added docs/llm-guide.md row to version sync table, but the prose below the table still says "first five rows" when it should now say "first six rows".
scripts/check-version-sync.js Added check #3 for docs/llm-guide.md Version header; regex and error messages are consistent with the roadmap.md check pattern.
scripts/version-sync.js Added sync block for docs/llm-guide.md using the shared SEMVER_RE; capture groups and replacement template match the roadmap.md pattern correctly.
tests/check-version-sync.test.js Added fixture file and two new failure-case tests (mismatched version, missing header); fixture format matches the real llm-guide.md pattern.
tests/version-sync.test.js Added fixture and two assertions (version updated, old version absent) covering the sync writer for llm-guide.md.
docs/llm-guide.md Version header bumped from 0.6.15 to 0.7.16 to align with current package.json.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[npm version bump] --> B[package.json\nsource of truth]
    B --> C[npm run version-sync]
    C --> D[docs/roadmap.md\nCurrent version: **X.Y.Z**]
    C --> E[docs/llm-guide.md\nVersion: **X.Y.Z**]
    C --> F[configurator/package.json]
    C --> G[configurator/package-lock.json]
    B --> H[npm run check:version]
    H --> I{All refs match?}
    I -- yes --> J[CI passes]
    I -- no --> K[CI fails\ncheck-version-sync exits 1]
    style E fill:#d4edda,stroke:#28a745
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[npm version bump] --> B[package.json\nsource of truth]
    B --> C[npm run version-sync]
    C --> D[docs/roadmap.md\nCurrent version: **X.Y.Z**]
    C --> E[docs/llm-guide.md\nVersion: **X.Y.Z**]
    C --> F[configurator/package.json]
    C --> G[configurator/package-lock.json]
    B --> H[npm run check:version]
    H --> I{All refs match?}
    I -- yes --> J[CI passes]
    I -- no --> K[CI fails\ncheck-version-sync exits 1]
    style E fill:#d4edda,stroke:#28a745
Loading

Comments Outside Diff (1)

  1. CLAUDE.md, line 20 (link)

    P1 Now that docs/llm-guide.md has been added to the version sync table, there are six manually-synced rows, not five. The sentence on line 20 is now inaccurate and could mislead a contributor (or an AI agent reading this file) into thinking the last three entries in the table are build-derived when only the last two are.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "fix: sync docs/llm-guide.md version head..." | Re-trigger Greptile

Greptile review on #614 caught it: adding docs/llm-guide.md made six
manually-synced rows, but the prose still said five.
@coderabbitai coderabbitai Bot added the codex label Jul 14, 2026
@jackgranatowski
jackgranatowski merged commit b3baa7b into main Jul 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants