Skip to content

Trim Open Knowledge AGENTS.md and pin it at 31,700 bytes (#7074) - #42

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Oct 20, 2026
Merged

inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

* Trim Open Knowledge AGENTS.md and pin it at 33,000 bytes

Open Knowledge's AGENTS.md loads into every agent session that works in the
subtree. It sat 30 bytes under its 39,950-byte pin, and an audit found false
and stale statements, restated passages and rules that checks already
enforce. Every line was audited and each of the 92 proposed changes was
verified cold; the owner approved them, with the class C changes named one
by one, on 2026-10-20.

This applies them: the file goes from 39,920 to 32,754 bytes. Two Layers
rows now run turbo through pnpm exec, as the third already did. The caps row
and the subtree's twin guard pin the file at 33,000 with a soft warning at
32,900, and the row records why.

Copies of the corrected claims outside the file are fixed to match: the
injected subtree rules and the cwd hook in all three synced copies, the
cross-harness manifest and the Cursor rule it generates, the shadcn lint
message, PRECEDENTS.md, six READMEs, CM6-ELEMENTS.md, md-audit's surface
list, two skills, and two comments in the desktop Playwright config that
cited a deleted line, removed under the subtree's comment policy.
PRECEDENTS.md also drops its sync rule for the jump index the trim removes.

The audit, ledger, verification and the owner's decisions are in
public/open-knowledge/reports/2026-10-20-agents-md-trim-audit/.

* Apply the write-skill review's class A and B changes to OK AGENTS.md

A cold write-skill review read the trimmed file as the base skill every
Open Knowledge agent loads, and cold verifiers held each change it
proposed. This applies the ones that keep the file's meaning or sharpen
how an agent reads a line, among them the depth line, the push pin and
the changeset link, the Layers network row, the fuzz snapshot path, how
pnpm dev serves this subtree, the STOP preamble and sweep rule, and the
MCP subagent line. The file goes from 32,754 to 32,385 bytes, still under
its 33,000 pin.

The bridge-correctness residual measurements schema still gave the fuzz
snapshots' old path, so it gets a post-ship corrigendum breadcrumb.

Five changes that drop or narrow a rule wait for the owner; the report's
owner ledger lists them. The review and its verification are in
public/open-knowledge/reports/2026-10-20-agents-md-trim-audit/.

* Apply the owner's class C answers to OK AGENTS.md, pin at 31,700

The owner answered the write-skill review's five class C calls on
2026-10-20. Four lines go: the TypeScript settings line and the md-audit
line, which checks already enforce with the fix in their messages, the
ConfigSchema registration-order rule, and the .ok symlink exception, which
the STOP marker on checkSymlinkLeaf and its test carry where the work
happens. The fs-traced.ts rule now covers new server-side writes only,
since many existing server files write with raw node:fs and nothing checks
the rule. A cold check of the result reworded the rest of that line so it
cannot be read as covering every raw write.

The registration-order rule was wrong as well as unenforced: registering
before .nullable() is what keeps project-local keys in the published
project schema, and the coverage test cannot see the order. Its failure
message repeated the hint, so it now names the singleton instead; the test
itself is unchanged. The internal-surface-areas skill carried the same
claim and now says what the coverage test checks.

The file goes from 32,385 to 31,479 bytes. The caps row and the twin guard
pin it at 31,700 with the soft warning at 31,600, by the rule the owner set
for this pin.

INTENT.md in the report folder gives reviewers the reasoning, the checks
and where the reasoning may be wrong.

* Name this PR in the internal-surface-areas changelog entry

The skill's changelog entry for this change was written before the pull
request existed. It now names inkeep/agents-private#7074.

* Fix remaining copies of the OTel and perf-gate claims in OK READMEs

Review of this PR found copies of two claims the trims corrected in
AGENTS.md that still said the old thing.

The server README said OTel is off by default and only emits spans when
OTEL_SDK_DISABLED=false. initTelemetry builds a tracer whenever a local
sink is passed (telemetry.ts:44-49), and bootServer passes one by
default (boot.ts:200-216, local-sink-resolver.ts:88), so it now says
OTLP export is opt-in while ok start and the desktop app write spans to
.ok/local/telemetry/ by default. The otel-dev README's "Is it actually
off by default?" answer now scopes its "yes" to OTLP export, and its
table says no traces or metrics are exported over OTLP rather than that
none leave the process, since the sink writes them to disk.

The perf README still assumed a CI run of the R4 gate in four places,
though its own line 3 says no workflow runs it. The runner-class note
drops the claim that CI will block once a class baseline exists, the
"Gate passes locally, fails in CI" troubleshooting entry goes, and two
tier-2 references and a "keep CI time bounded" reason go too. The only
perf step in CI is the comparator's unit suite
(public-open-knowledge-validation.yml:1502).

* Correct the rename-spine and OTel rows in internal-surface-areas

Review of this PR found two rows of the Open Knowledge catalog that
still carried claims the trims corrected elsewhere.

The "Managed rename spine" row named applyManagedRename, which does not
exist in packages/server/src. It now names _performManagedRenameForDocs,
as AGENTS.md, PRECEDENTS.md, the server README and md-audit's
surfaces.ts do, and lists api-extension.ts, which defines it (:2888).
apply-managed-rename.ts stays listed because the spine calls its
buildRenameMap and applyRenameMap.

The "OTel telemetry" row called server OpenTelemetry opt-in. Only OTLP
export is; bootServer writes spans to the local file sink by default.

The skill's one changelog entry for this PR now names both rows.

* Name the oxlint rule as the UI primitives enforcer in the Cursor rule

The Open Knowledge Cursor rule, generated from the line this PR already
rewrites in scripts/cross-harness/manifest.ts, still said a
no-raw-html-interactive-element GritQL plugin enforces the shadcn
primitives directive. That plugin was deleted when the subtree's lint
rules moved to oxlint (#4222); the rule is ok/no-raw-html-interactive-element,
loaded through oxlint's jsPlugins and enabled as an error in
public/open-knowledge/oxlint.config.ts. The subtree hooks and AGENTS.md
already name it that way. Regenerated with sync-cross-harness-config.ts.

* Scope the server README's span list to /api/ HTTP requests

The OTel line this PR rewrites said every HTTP request emits a span.
The request span is started only for URLs under /api/: the pipeline
returns before startActiveSpan for any other path
(packages/server/src/http/api-pipeline.ts:315-322).

GitOrigin-RevId: 51088c919b7e5afdb8b84242424129366577f41f
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 2d9fbc8 into main Oct 20, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch October 20, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant