knowledge: 10 insights — write-time limit guards must admit shrinking writes, project-local layer over shared agent guidance (2 new pages, 4 pending-duplicate drops of #207, 3 project-specific drops) - #208
Open
choiyounggi wants to merge 1 commit into
Conversation
…oject-local layer over shared guidance (2 new pages, 7 drops)
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Knowledge flush — 10 insight(s)
Claimed queue ids:
7c319808918cb315,f2d90d5048826870,fb7d73874bac6eaa,5f3e5eb58ec373e4,6e83a02b449a8dff,7e13d1306fbf40c8,e44a20b606874813,70fdb728c543e55f,1f52714ea33570c4,f4fc1622470f60bb.One is a session
★ Insight; nine are plan-gap rows fromskills/wiki-plan/scripts/emit-gaps.sh. Result: 2 new pages (3 rowsingested), 4 rows dropped as pending duplicates of #207, 3 rows dropped as
project-specific.
Verified best-practice
7c319808918cb315— a write-time limit guard must let a shrinking writethrough when the state is already over the limit. Confidence: verified
(the mechanism — charge or reject only what a write adds — is implemented by
the sources below; the page's two-condition predicate is its statement of that
mechanism, and the Sources section marks rules 2–5 as field evidence).
deltaUsage := quota.SubtractWithNonNegativeResult(inputUsage, prevUsage), thenquota.RemoveZeros, then "if there is no remaining non-zero usage, short-circuit and return". Scope, found by the independent reviewer and now stated on the page: the delta applies per quota only whenevaluator.Matchesthe previous object; an update that newly enters a quota's scope is charged in fullThe candidate's own evidence (bats cases starting from a 12000-byte over-budget
file in
groundwork'shabits-budget-guard.sh) is recorded on the page asfield evidence. All seven cited URLs returned HTTP 200 on 2026-09-17 and each
quoted phrase was grepped out of the fetched body, not taken from a summary.
e44a20b606874813(D1 fixed local-layer path) and70fdb728c543e55f(D5local wins on the same trigger), t4-local-layer — merged into one general
page about layering project-local guidance over a shared body. Confidence:
field-tested. The precedence directives are confirmed by the three tool
documents below, but the no-knob path rule, the delta rule and the env-var /
ignored-directory rows rest only on the t4-local-layer planning context (the
plan lives in a task worktree, not in this repository), and a page carries one
confidence value — so it takes the weaker one. The Sources section says which
rule rests on what.
git-config.adoc+ live page grepped: "The files are read in the order given above, with last value found taking precedence over values read earlier."Correction made during verification: the candidates cited thenewstack.io, a
Karpathy gist and a hackernoon post. None was needed and none is cited; the
page rests on the three primary tool documents above.
f2d90d5048826870,fb7d73874bac6eaa,5f3e5eb58ec373e4,6e83a02b449a8dff(t3-status) — nothing to verify again: identical hashes were verified and
ingested by #207 (see Open-PR check). The rows are a re-emit (
harvestedAt05:04Z; the 04:58Z copies are in
.processed.jsonlasingested).7e13d1306fbf40c8(t8-index module layout),1f52714ea33570c4(t4 D6 localpage schema/ids),
f4fc1622470f60bb(t4 D8 routing test for wiki-ingest andknowledge-flush) — not best-practice claims. Each directive names this
repository's own files and steps (
scripts/wiki-index.py,wiki-mcp.py,templates/page.md,wiki-structure-checks.js, wiki-ingest step 3,INGEST_REPORT section names). They are design rulings that land through their
own tasks (t8-index, t4-local-layer) in AGENTS.md and the skills; no external
source can confirm or refute them and no transferable trigger remains once the
repo names are removed beyond "keep one copy of shared code". Dropped.
Existing-layer check
Routed via
INDEX.md→ infrastructure (ci-cd, config, agent-orchestration),backend (common/llm, common/change-impact) and qa (process, document-verification).
Pages read: backend-common-change-impact-corpus-sweep-before-a-rejection-rule, infrastructure-ci-cd-changed-files-only-gates, backend-common-llm-binding-instructions-for-agents, backend-common-llm-progressive-disclosure-artifacts, infrastructure-config-environment-config, qa-process-release-gates, infrastructure-agent-orchestration-escape-hatch-uses-as-a-knowledge-gap-signal
grep -rliE "ratchet|quota|over budget|shrink|…" wiki/→ 14files, none about a write-time limit guard (hits are rate limiting, memory
budgets, flex-shrink, clock monotonicity).
grep -rlE "PreToolUse|pre-commit|admission"→ 5 files, none on a deny predicate. Nearest neighbour
corpus-sweep-before-a-rejection-rule covers introducing a rejection rule
over an existing corpus, not the predicate of a limit guard over an
over-limit state → new page
wiki/infrastructure/ci-cd/write-time-limit-guards.md(87 lines), with a pointer to the neighbour in "When this applies".
git grep -liE "knowledge base|shared (wiki|knowledge)|project-specific|AGENTS\.md|CLAUDE\.md" origin/main -- wiki/→ 8 files (5 without the
knowledge basealternative); binding-instructions-for-agents (how to word a rule) andprogressive-disclosure-artifacts (tiering one corpus) are adjacent, neither
covers a second layer or precedence between layers → new page
wiki/backend/common/llm/project-local-layer-over-shared-guidance.md(76 lines).Two rows (D1, D5) merged into it rather than two pages.
the commit: 6 findings, all applied — Kubernetes claim scoped to quotas the
previous object matched, violation-set row rewritten (a count misses a
swapped violation), occurrence-count condition added to the replace-all
approximation, local-layer page downgraded verified → field-tested, this
report's grep count corrected.
changed-files-only-gates, session-completion-gates ↔ write-time-limit-guards;
binding-instructions-for-agents, progressive-disclosure-artifacts,
environment-config ↔ project-local-layer-over-shared-guidance.
wiki/infrastructure/index.mdci-cd table +1 row;wiki/backend/index.mdllm table +1 row;
log.md+1 ingest entry.node scripts/wiki-structure-checks.js wiki→pages 280 / indexes 13 / findings 0;
node scripts/wiki-lint-prohibitions.js wiki→ directives 75, violations 0 (bats pin unchanged at 75);
bats tests/wiki-structure-checks.bats tests/wiki-lint-prohibitions.bats tests/wiki-lint-model-era.bats→
1..34, 0not ok.Open-PR check
Open
knowledge/*heads listed 2026-09-17: #207, #205, #191, #190, #189, #188,#187, #186, #185, #183, #182, #181, #180, #179. For every head,
git diff origin/main...origin/<head> -- wiki/added lines were grepped forthe quota terms (
ratchet|quota|over budget|over limit|shrink|admission controller)and the layering terms (
project-local|local layer|closer file|nearest|last value|layered|AGENTS.override|shared knowledge).Hits were read one by one: #189 (benchmark delta "shrinks"), #188 (the word
"quotation"), #185 (OKLCH "shrinking ratios"), #181 (
flex-shrink), #187("nearest heading", "nearest attractor") — all unrelated. #207 is the only
real overlap, by exact queue hash.
7c319808918cb315(limit guard must admit shrinking writes)e44a20b606874813(fixed local-layer path)70fdb728c543e55f(local wins on the same trigger)f2d90d5048826870(log verb for supersede/retire)fb7d73874bac6eaa(ingest third case)5f3e5eb58ec373e4(status vs. confidence)6e83a02b449a8dff(template optional status lines)7e13d1306fbf40c8(t8-index module layout)1f52714ea33570c4(local page schema/ids)f4fc1622470f60bb(routing test in wiki-ingest/knowledge-flush)Note for the reviewer: the four t3-status rows were emitted twice (04:58Z and
05:04Z) and the second copies entered the queue although the same hashes are
in
.processed.jsonl, so an already-processed hash can re-enter the queue. That is a harvester behaviour worth an issue; it is notaddressed in this PR.
Routing decision
7c319808918cb315→infrastructure / ci-cd / write-time-limit-guards(newpage, existing category). The candidate's domain hint was infrastructure;
ci-cd already owns the other "what does this gate actually decide" page
(changed-files-only-gates). No new category needed.
e44a20b606874813+70fdb728c543e55f→backend / common/llm / project-local-layer-over-shared-guidance(new page, existing category). Thellm category is where the root index routes "authoring agent-facing
artifacts"; infrastructure/config was considered and kept as a related link
because its pages are about per-environment service settings.