Skip to content

Commit 105a6f5

Browse files
committed
test(agent-context): always-on size gate (<= 120 lines)
1 parent 52f7617 commit 105a6f5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// test/agent-context/size-gate.test.ts
2+
import { test, expect } from "bun:test";
3+
import { join } from "node:path";
4+
import { assemble } from "../../src/agent-context/assemble.js";
5+
import { makeStack } from "../../src/agent-context/resolve.js";
6+
7+
const CONTENT_ROOT = join(import.meta.dir, "../../../../../../agent-context");
8+
9+
test("the always-on body stays <= 120 lines (cheap to import into a root CLAUDE.md)", () => {
10+
const files = assemble({ contentRoot: CONTENT_ROOT, stack: makeStack(["typescript"], ["react", "tanstack"]) });
11+
const agents = files.find((f) => f.path === ".metaobjects/AGENTS.md")!;
12+
const lines = agents.contents.split("\n").length;
13+
expect(lines).toBeLessThanOrEqual(120);
14+
});

0 commit comments

Comments
 (0)