Draft the container-glob breadth guidance (rule-quality test amendment) #55

Closed
opened 2026-07-15 16:01:43 +00:00 by jared · 1 comment
Owner

Map: #49

Question

Finalize the exact wording of a new rule-quality test (lifecycle-spec.md §8 "Rule-quality tests") plus the matching judge-prompt line, covering container-glob breadth. The principle is already decided at charting — this ticket is wording + sign-off.

The decided principle: when the near-miss check reveals sibling artifacts, ENUMERATE conventional prefixes rather than widening to the container. A container-claiming glob (dir/*/, dir/**) mortgages the directory's entire future — nothing keep-worthy can ever live there without a counter-rule. Container globs are justified only when the directory is wholly machine-owned.

Worked example (real, from calibration pass #1):

  • haiku nominated autoresearch/classic-*/; the near-miss check showed it missing autoresearch/improve-260710-1057/.
  • WRONG response (what happened): widen to autoresearch/*/ — now a future autoresearch/methodology-notes.md or any keep-worthy subdir is claimed by a deletion rule.
  • RIGHT response: enumerate autoresearch/classic-*/ + autoresearch/improve-*/. A future autoresearch/foo-*/ flavor gets its own entry next pass — too-narrow fails safe and self-heals (#45's own argument).
  • Legitimate container glob for contrast: plugins/*/.pytest_cache/ — wholly machine-owned, nothing keep-worthy can appear inside.

Deliverable: the spec-text addition verbatim + the judge-prompt addition verbatim, presented for human sign-off (fold into #49's assemble ticket once approved).

Map: #49 ## Question Finalize the exact wording of a new rule-quality test (lifecycle-spec.md §8 "Rule-quality tests") plus the matching judge-prompt line, covering container-glob breadth. The principle is already decided at charting — this ticket is wording + sign-off. **The decided principle:** when the near-miss check reveals sibling artifacts, ENUMERATE conventional prefixes rather than widening to the container. A container-claiming glob (`dir/*/`, `dir/**`) mortgages the directory's entire future — nothing keep-worthy can ever live there without a counter-rule. Container globs are justified only when the directory is wholly machine-owned. **Worked example (real, from calibration pass #1):** - haiku nominated `autoresearch/classic-*/`; the near-miss check showed it missing `autoresearch/improve-260710-1057/`. - WRONG response (what happened): widen to `autoresearch/*/` — now a future `autoresearch/methodology-notes.md` or any keep-worthy subdir is claimed by a deletion rule. - RIGHT response: enumerate `autoresearch/classic-*/` + `autoresearch/improve-*/`. A future `autoresearch/foo-*/ ` flavor gets its own entry next pass — too-narrow fails safe and self-heals (#45's own argument). - Legitimate container glob for contrast: `plugins/*/.pytest_cache/` — wholly machine-owned, nothing keep-worthy can appear inside. **Deliverable:** the spec-text addition verbatim + the judge-prompt addition verbatim, presented for human sign-off (fold into #49's assemble ticket once approved).
jared added the
wayfinder:grilling
label 2026-07-15 16:01:43 +00:00
jared self-assigned this 2026-07-15 16:20:25 +00:00
Author
Owner

Resolution — approved wording (human sign-off 2026-07-15). Deliverable turned out to be two additions plus two corrective edits: the current judge workflow encourages the exact anti-pattern this test bans (step 2 says "consider amending to a broader glob"; the output example widens autoresearch/run-*/ to autoresearch/*/).

Deliberate choice baked in (approved): enumerated siblings become separate rule entries, not one brace/alternation glob — matches the rulebook's one-glob-per-rule shape and the self-healing story.

All four items fold into the assemble ticket #58; nothing is edited in the working tree by this ticket.


1. Spec-text addition — lifecycle-spec.md §8 "Rule-quality tests the report enforces" (third bullet, after the tie-breaker)

- **Enumerate siblings — never widen to the container.** When the near-miss
  boundary check reveals sibling artifacts a glob misses, the fix is to
  ENUMERATE the conventional prefixes as separate rule entries
  (`autoresearch/classic-*/` + `autoresearch/improve-*/`), never to widen to
  the container (`autoresearch/*/`, `autoresearch/**`). A container-claiming
  glob mortgages the directory's entire future: nothing keep-worthy can ever
  live there without a counter-rule (a future
  `autoresearch/methodology-notes.md` would be claimed by a deletion rule). A
  sibling flavor that can't be named yet fails safe — it gets its own entry
  next pass, the same self-healing property the narrower-glob tie-breaker
  relies on. Container globs are justified ONLY when the directory is wholly
  machine-owned (`plugins/*/.pytest_cache/`), where nothing keep-worthy can
  appear inside.

2. Judge-prompt addition — judge.md step 4 rule-quality checks (third bullet)

   - **Enumerate siblings, never widen to the container**: when the near-miss
     check (step 2) reveals sibling artifacts, `amend` by ENUMERATING the
     conventional prefixes as separate rules (`autoresearch/classic-*/` plus
     `autoresearch/improve-*/`), NOT by widening to the container
     (`autoresearch/*/`). A container glob claims the directory's entire
     future — a later keep-worthy file (e.g.
     `autoresearch/methodology-notes.md`) would sit under a deletion rule. A
     sibling flavor you cannot yet name fails safe: it gets its own rule next
     round. Widening to a container is allowed ONLY when the directory is
     wholly machine-owned (`plugins/*/.pytest_cache/`) so nothing keep-worthy
     can ever appear inside it.

3. Corrective edit — judge.md step 2 (near-miss check)

Current (judge.md:35-37): "If the glob is too narrow, consider amending it to a broader (but still class-not-path-safe) glob that catches the sibling too."

Replacement:

   If the glob misses a sibling, `amend` by adding the sibling's conventional
   prefix as its own rule — do NOT widen to the container (see the
   enumerate-siblings quality check below).

4. Corrective edit — judge.md output example (lines 83-92)

Replace the first example entry (which amends to autoresearch/*/ — the anti-pattern) with:

{
  "cluster_key": "autoresearch::run-#",
  "verdict": "amend",
  "rule": {
    "glob": "autoresearch/improve-*/",
    "lifetime": "temporary",
    "retain_recent": 3,
    "max_age_days": 3
  },
  "reasoning": "Haiku's glob (autoresearch/run-*/) named a prefix that does not occur; the live tree has autoresearch/classic-*/ and autoresearch/improve-*/ runs. Enumerated each conventional prefix as its own rule rather than widening to autoresearch/*/, which would claim the whole directory's future."
}

…with a companion autoresearch/classic-*/ entry, so the example also SHOWS enumeration producing two rules from one cluster.

**Resolution — approved wording (human sign-off 2026-07-15).** Deliverable turned out to be two additions plus two corrective edits: the current judge workflow encourages the exact anti-pattern this test bans (step 2 says "consider amending to a broader glob"; the output example widens `autoresearch/run-*/` to `autoresearch/*/`). Deliberate choice baked in (approved): enumerated siblings become **separate rule entries**, not one brace/alternation glob — matches the rulebook's one-glob-per-rule shape and the self-healing story. All four items fold into the assemble ticket #58; nothing is edited in the working tree by this ticket. --- ## 1. Spec-text addition — lifecycle-spec.md §8 "Rule-quality tests the report enforces" (third bullet, after the tie-breaker) ```markdown - **Enumerate siblings — never widen to the container.** When the near-miss boundary check reveals sibling artifacts a glob misses, the fix is to ENUMERATE the conventional prefixes as separate rule entries (`autoresearch/classic-*/` + `autoresearch/improve-*/`), never to widen to the container (`autoresearch/*/`, `autoresearch/**`). A container-claiming glob mortgages the directory's entire future: nothing keep-worthy can ever live there without a counter-rule (a future `autoresearch/methodology-notes.md` would be claimed by a deletion rule). A sibling flavor that can't be named yet fails safe — it gets its own entry next pass, the same self-healing property the narrower-glob tie-breaker relies on. Container globs are justified ONLY when the directory is wholly machine-owned (`plugins/*/.pytest_cache/`), where nothing keep-worthy can appear inside. ``` ## 2. Judge-prompt addition — judge.md step 4 rule-quality checks (third bullet) ```markdown - **Enumerate siblings, never widen to the container**: when the near-miss check (step 2) reveals sibling artifacts, `amend` by ENUMERATING the conventional prefixes as separate rules (`autoresearch/classic-*/` plus `autoresearch/improve-*/`), NOT by widening to the container (`autoresearch/*/`). A container glob claims the directory's entire future — a later keep-worthy file (e.g. `autoresearch/methodology-notes.md`) would sit under a deletion rule. A sibling flavor you cannot yet name fails safe: it gets its own rule next round. Widening to a container is allowed ONLY when the directory is wholly machine-owned (`plugins/*/.pytest_cache/`) so nothing keep-worthy can ever appear inside it. ``` ## 3. Corrective edit — judge.md step 2 (near-miss check) Current (judge.md:35-37): "If the glob is too narrow, consider `amend`ing it to a **broader** (but still class-not-path-safe) glob that catches the sibling too." Replacement: ```markdown If the glob misses a sibling, `amend` by adding the sibling's conventional prefix as its own rule — do NOT widen to the container (see the enumerate-siblings quality check below). ``` ## 4. Corrective edit — judge.md output example (lines 83-92) Replace the first example entry (which amends to `autoresearch/*/` — the anti-pattern) with: ```json { "cluster_key": "autoresearch::run-#", "verdict": "amend", "rule": { "glob": "autoresearch/improve-*/", "lifetime": "temporary", "retain_recent": 3, "max_age_days": 3 }, "reasoning": "Haiku's glob (autoresearch/run-*/) named a prefix that does not occur; the live tree has autoresearch/classic-*/ and autoresearch/improve-*/ runs. Enumerated each conventional prefix as its own rule rather than widening to autoresearch/*/, which would claim the whole directory's future." } ``` …with a companion `autoresearch/classic-*/` entry, so the example also SHOWS enumeration producing two rules from one cluster.
jared closed this issue 2026-07-15 16:29:39 +00:00
Sign in to join this conversation.
No description provided.