diff --git a/dist/cli.cjs b/dist/cli.cjs index b677085..689010b 100644 --- a/dist/cli.cjs +++ b/dist/cli.cjs @@ -14511,7 +14511,7 @@ var import_yaml = __toESM(require_dist(), 1); var GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY."; var CLAUDE_CONTENT = "@AGENTS.md\n"; var WARNING_BYTES = 26624; -var MAX_BYTES = 30720; +var MAX_BYTES = 32e3; var SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; var HarnessError = class extends Error { constructor(message) { diff --git a/dist/index.cjs b/dist/index.cjs index ba938f1..6fb30ed 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -14527,7 +14527,7 @@ var import_yaml = __toESM(require_dist(), 1); var GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY."; var CLAUDE_CONTENT = "@AGENTS.md\n"; var WARNING_BYTES = 26624; -var MAX_BYTES = 30720; +var MAX_BYTES = 32e3; var SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; var HarnessError = class extends Error { constructor(message) { diff --git a/docs/composition.md b/docs/composition.md index 2d0c297..f8c495b 100644 --- a/docs/composition.md +++ b/docs/composition.md @@ -121,7 +121,7 @@ Use UTF-8 without BOM, LF line endings, and exactly one trailing newline. Refuse Codex uses a 32 KiB default combined project-instruction limit. To leave room for possible nested guidance: - Warn when generated `AGENTS.md` exceeds 26 KiB (26,624 bytes). -- Fail when it exceeds 30 KiB (30,720 bytes). +- Fail when it exceeds 32,000 bytes, leaving 768 bytes below Codex's default 32 KiB combined limit. - Never solve an overflow by truncating content. Shorten or split the source rules deliberately. ## Commands diff --git a/src/harness.ts b/src/harness.ts index 59a4513..5071338 100644 --- a/src/harness.ts +++ b/src/harness.ts @@ -23,7 +23,7 @@ import { parseDocument, stringify as stringifyYaml } from "yaml"; const GENERATED_MARKER = "GENERATED BY KRI AGENT HARNESS. DO NOT EDIT DIRECTLY."; const CLAUDE_CONTENT = "@AGENTS.md\n"; const WARNING_BYTES = 26_624; -const MAX_BYTES = 30_720; +const MAX_BYTES = 32_000; const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; export class HarnessError extends Error { diff --git a/tests/harness.test.mjs b/tests/harness.test.mjs index 478f2e6..1ec79a5 100644 --- a/tests/harness.test.mjs +++ b/tests/harness.test.mjs @@ -357,11 +357,11 @@ stack: test("fails instead of truncating output above the hard size limit", async (t) => { const { harnessRoot, appRoot } = await createFixture(t); - await writeText(path.join(appRoot, ".agent", "project.md"), `## Project Rule\n\n${"x".repeat(31_000)}\n`); + await writeText(path.join(appRoot, ".agent", "project.md"), `## Project Rule\n\n${"x".repeat(33_000)}\n`); await assert.rejects( () => planProject(harnessRoot, "sample-front"), - /exceeds the 30720-byte limit/, + /exceeds the 32000-byte limit/, ); });