Skip to content

Commit f07f05e

Browse files
reid-spencerclaude
andcommitted
Add BAST FORMAT_REVISION rule to CLAUDE.md
Document that FORMAT_REVISION must be incremented whenever BASTWriter output becomes incompatible with previous BASTReader. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 53ecd90 commit f07f05e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,13 @@ Items below are NOT duplicated elsewhere in this file.
667667
1. **Always check sbt-ossuminc version** - API may have changed
668668
2. **BAST version is single integer** - `VERSION: Int = 1`,
669669
stays at 1 until schema finalized for users
670-
3. **BAST location comparisons use offsets** - Compare
670+
3. **BAST FORMAT_REVISION must be incremented** whenever a
671+
change to BASTWriter produces output that a previous
672+
BASTReader cannot correctly read. This includes: new
673+
statement subtypes, changed wire formats (added/removed
674+
bytes), new node tags, or reordered fields. The constant
675+
is in `language/shared/.../bast/package.scala`.
676+
4. **BAST location comparisons use offsets** - Compare
671677
offset/endOffset, not line/col
672678
4. **FileBuilder requires PlatformContext** - `trait
673679
FileBuilder(using PlatformContext)` — all subclasses must

0 commit comments

Comments
 (0)