Skip to content

docs: factory discipline index — agent-visible in-repo rule pointer (Otto-230 fix-b)#368

Merged
AceHack merged 2 commits intomainfrom
docs/factory-discipline-index-otto-232
Apr 24, 2026
Merged

docs: factory discipline index — agent-visible in-repo rule pointer (Otto-230 fix-b)#368
AceHack merged 2 commits intomainfrom
docs/factory-discipline-index-otto-232

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented Apr 24, 2026

Summary

Stop-gap fix (b) for the Otto-230 subagent-fresh-session
quality-gap debug. Mirrors session-captured Otto-NN disciplines
into the repo at docs/FACTORY-DISCIPLINE.md so dispatched
subagents can Read them without needing access to the
out-of-repo ~/.claude/projects/<slug>/memory/ store.

What it covers

  • Append-only audit-trail (Otto-229)
  • Code comments explain code, not history (Otto-220)
  • Name-attribution role references
  • Verbatim-preserve vs factory-authored sections
  • Glass-halo first-party vs third-party PII tiers (Otto-231)
  • Auto-merge-always at PR-open-time (Otto-224)
  • Drain loop has three axes — threads + CI + DIRTY (Otto-228)
  • Hot-file cascade → bulk-close-as-superseded (Otto-232)
  • Subagent fresh-session quality gap (Otto-230 itself)
  • Serial PR open + parallel thread drain (Otto-225 + Otto-226)
  • Post-drain AceHack-first routing (Otto-223)
  • Branch-protection strict=false + strict-API PATCH (Otto-223)
  • Cross-harness skill discovery (Otto-227)
  • Three-outcome review-thread model (Otto-226 + Otto-227)

Each entry is one paragraph + pointer at the authoritative
memory file.

Why

Subagents dispatched via the Agent tool have CLAUDE.md +
their dispatch prompt + Read access to the repo. They do
NOT have access to the factory-personal memory store where
recently-captured corrections live. When a subagent on
PR #364 normalised "May-01" → "2026-05-01" in a prior
tick-history row — violating the file's own append-only
discipline — the root cause was that the append-only rule
was captured in memory only, not yet in the repo. This file
closes that specific gap.

What it's not

  • Not authoritative. The memory files are. This is a
    forwarding pointer.
  • Not auto-maintained. Manual updates from memory writes
    until the memory-sync mechanism (fix-a) lands.
  • Not a full rule list. Stable BP-NN rules stay in
    docs/AGENT-BEST-PRACTICES.md. This is session-captured
    corrections distilled for subagent dispatch.

Upstream

The memory-sync mechanism (fix-a) is already tracked at
elevated P1 priority in docs/BACKLOG.md ("Ongoing memory-
sync mechanism" row per Otto-114). When that ships,
subagents read the authoritative memory directly; this file
becomes a short-form index.

Test plan

  • Doc renders in markdown preview
  • Pointers to memory file names are consistent with the
    Otto-NN identifiers used in-session
  • Next drain-subagent dispatch includes "Read
    docs/FACTORY-DISCIPLINE.md" in its pre-edit workflow
    so we can measure whether discipline-compliance
    improves

Copilot AI review requested due to automatic review settings April 24, 2026 14:17
@AceHack AceHack enabled auto-merge (squash) April 24, 2026 14:17
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d0b6ccef2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an in-repo “FACTORY-DISCIPLINE” index so dispatched subagents can read key session-captured operational disciplines without access to the per-user memory store.

Changes:

  • Introduces docs/FACTORY-DISCIPLINE.md as a stop-gap discipline index with short rule summaries.
  • Adds pointers from each discipline to the (intended) authoritative memory entries.
  • Documents a recommended read-order for subagents (CLAUDE.md → this index → file-local headers).

Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Comment thread docs/FACTORY-DISCIPLINE.md Outdated
Comment thread docs/FACTORY-DISCIPLINE.md
AceHack added 2 commits April 24, 2026 11:06
Stop-gap fix (b) of Otto-230 subagent-fresh-session quality-gap
debug: `docs/FACTORY-DISCIPLINE.md` mirrors session-captured
Otto-NN disciplines into the repo so dispatched subagents can
`Read` them. Subagents have no access to the out-of-repo
memory store where durable corrections accumulate in-session;
without this file, each dispatch has to hand-carry every
applicable rule or hope the subagent discovers them from the
target file's header.

Content: short-form index of active disciplines, each with a
one-paragraph statement + pointer at the authoritative memory
file. Covers append-only audit-trail, code-comments-not-history,
name-attribution role refs, verbatim-preserve vs factory-authored,
glass-halo PII tiers, auto-merge-always, three-axis drain,
hot-file cascade bulk-close, subagent quality-gap, serial PR
opening + parallel thread drain, post-drain AceHack routing,
branch-protection strict=false, cross-harness skill discovery,
three-outcome model per review thread.

Stop-gap: the upstream fix (sync memory store → in-repo
`memory/` on every tick) is in docs/BACKLOG.md at elevated P1
priority per Otto-230 "Ongoing memory-sync mechanism" row.
When that lands, subagents read the authoritative memory
directly; this file becomes a short-form index on top.

Not authoritative — memory files are. This file is a
forwarding pointer. Updates here track memory writes manually
until the memory-sync mechanism lands.
Drain 7 unresolved review threads on PR #368:

1. Codex P1 — reverse source-of-truth framing: in-repo
   `memory/` is canonical per GOVERNANCE.md §18 and
   memory/README.md; per-maintainer `~/.claude/.../memory/`
   is factory-personal staging that syncs INTO the in-repo
   tree. Explain the direction-reversal caused by the
   memory-sync mechanism landing.
2. Copilot — name-attribution section's own examples now
   use role references (no direct contributor/agent names)
   to match the rule the section defines.
3. Copilot — `memory/MEMORY.md` relabeled "in-repo"
   (canonical index), not "out-of-repo".
4. Copilot MD032 line 56 — reworded line-leading `+` to
   `and` so it isn't parsed as a list item.
5. Copilot MD032 line 89 — blank line before glass-halo
   bullet list.
6. Copilot MD032 line 164 — reworded line-leading `+` to
   `and`.
7. Copilot MD032 line 196 — blank line before "Placement:"
   bullet list.

Also scrubbed two incidental name references in the
glass-halo section (first-party PII framing now uses "the
human maintainer" instead of a specific name) and updated
the subagent-fresh-session-quality-gap section to reflect
that the in-repo `memory/` tree is now reachable by
subagents via `Read` (post memory-sync).

markdownlint-cli2 docs/FACTORY-DISCIPLINE.md — clean.
@AceHack AceHack force-pushed the docs/factory-discipline-index-otto-232 branch from 8d0b6cc to 2e680ce Compare April 24, 2026 15:09
@AceHack AceHack merged commit 2577c07 into main Apr 24, 2026
10 checks passed
@AceHack AceHack deleted the docs/factory-discipline-index-otto-232 branch April 24, 2026 15:11
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e680ce141

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

earlier row, never edit existing rows in place — not for typos,
date normalisation, column alignment, or "consistency".

**Source:** `memory/feedback_tick_history_append_only_never_edit_prior_rows_otto_229_*.md`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace dead source pointers with existing memory entries

This index is meant to route subagents to authoritative memory/feedback_*.md records, but the referenced pattern here (and the similar Otto-tagged patterns in other sections) does not resolve to any file in the repo, so a subagent cannot follow the pointer for deeper context and will fall back to the summary text only. That undermines the file’s stated purpose of preventing fresh-session rule loss and makes future updates unverifiable because the cited source artifacts are missing.

Useful? React with 👍 / 👎.

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.

2 participants