Skip to content

fix(memory): DECOMPOSED - re-index MEMORY.md to fix corruption from #4730 (from #4888)#4944

Closed
AceHack wants to merge 4 commits into
mainfrom
lior-decompose-4888-memory-fix
Closed

fix(memory): DECOMPOSED - re-index MEMORY.md to fix corruption from #4730 (from #4888)#4944
AceHack wants to merge 4 commits into
mainfrom
lior-decompose-4888-memory-fix

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 25, 2026

This PR is a decomposition of #4888, containing only the memory index fix.

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: 3c50ad06a7

ℹ️ 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 on lines 217 to 220
if (ref.kind === "path") {
// Template-placeholder patterns: rule-acknowledged-transient per
// B-0708 / 9-variant taxonomy. The `...` ellipsis is the canonical
// template-path marker (e.g., `docs/.../0603Z.md`, `B-0613-...md`,
// `~/.claude/projects/.../memory/*.md`). The placeholder `YYYY/MM/DD`
// is the canonical date-template marker. Skip existence check.
if (ref.raw.includes("...") || ref.raw.includes("YYYY")) return true;
// Command-snippet detection: when the audit captures a backtick
// span containing a shell command rather than a path (e.g.,
// `BACKLOG_WRITE_FORCE=1 bun tools/.../generate-index.ts`,
// `bun tools/github/poll-pr-gate.ts`, `git add docs/...`), check
// the embedded path-fragment rather than the literal raw.
if (/\s/.test(ref.raw)) {
const tokens = ref.raw.split(/\s+/);
for (const t of tokens) {
if ((t.endsWith(".ts") || t.endsWith(".sh") || t.endsWith(".md")) && existsSync(t)) {
return true;
}
}
}
if (existsSync(ref.raw)) return true;
if (ref.raw.includes("*") || ref.raw.includes("{")) return globResolves(ref.raw);
// Sibling-rule resolution: bare `<filename>.md` references inside
// `.claude/rules/*.md` typically point to other rules in the same
// directory. Resolve them via `.claude/rules/<basename>` before
// declaring stale. Major false-positive class caught by B-0708
// razor-cadence pass (2026-05-23).
if (ref.raw.endsWith(".md") && !ref.raw.includes("/")) {
if (existsSync(join(RULES_DIR, ref.raw))) return true;
}
// Peer-call wrapper resolution: bare `<name>.ts` references in
// agent-roster-reference-card.md and similar rules typically point
// to `tools/peer-call/<name>` per the established peer-call wrapper
// convention.
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/peer-call", ref.raw))) return true;
}
// tools/hygiene/ fallback for bare `.ts`/`.sh` references in
// hygiene-related rules (backlog-item-start-gate.md, rule-0-no-sh-
// files.md, etc.)
if ((ref.raw.endsWith(".ts") || ref.raw.endsWith(".sh")) && !ref.raw.includes("/")) {
if (existsSync(join("tools/hygiene", ref.raw))) return true;
}
// tools/github/ fallback for bare `.ts` references in
// GitHub/PR-tooling-related rules (refresh-before-decide.md cites
// `poll-pr-gate-batch.ts` etc.)
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/github", ref.raw))) return true;
}
// memory/ fallback for bare MEMORY.md (the canonical memory-index)
if (ref.raw === "MEMORY.md") {
if (existsSync(join("memory", "MEMORY.md"))) return true;
}
return false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore non-literal path resolution in refExists

This change removes all B-0708 fallback logic for path-like references, so refExists now only accepts literal existing paths or globs; bare sibling rule links (for example refresh-world-model-poll-pr-gate.md referenced from .claude/rules/*.md), template placeholders, and command-snippet references are now misclassified as stale. Because this script is used to generate stale-pointer audit candidates, the regression reintroduces systematic false positives and can drive incorrect cleanup work; the same commit also deletes the corresponding regression tests in tools/hygiene/audit-rule-cross-refs.test.ts, so this behavior is no longer guarded.

Useful? React with 👍 / 👎.

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

This PR is described as a decomposition containing only a memory/MEMORY.md re-index fix, but the diff includes substantial additional changes across hygiene tooling, backlog indexing, rules/skills/agents docs, trajectories/agendas, and research/pr-discussion archives.

Changes:

  • Re-indexes memory/MEMORY.md and updates the associated family-configuration memory entry content.
  • Modifies the .claude/rules cross-reference audit tool (audit-rule-cross-refs.ts) behavior and removes related tests.
  • Updates backlog substrate: adds new decomposition rows, edits an existing P0 row, and changes the generated docs/BACKLOG.md output.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tools/hygiene/audit-rule-cross-refs.ts Simplifies refExists resolution logic for rule cross-references.
tools/hygiene/audit-rule-cross-refs.test.ts Removes several refExists regression tests.
memory/persona/soraya/NOTEBOOK.md Removes the “Trigger Recognition Log” section.
memory/persona/lior/CURRENT-lior.md Rewords calibration stance to be more generic and adds a link.
memory/persona/aarav/NOTEBOOK.md Removes prior “Round 44 bounded spot-check” notes and collapses to a single line.
memory/MEMORY.md Updates the auto-index entry text for the family-configuration memory item.
memory/feedback_aaron_family_configuration_cooperative_substrate_2026_05_22.md Renames/rewrites the entry, expanding stored details in frontmatter/body.
docs/trajectories/ai-sovereignty-path/RESUME.md Removes a “Composes with MANIFESTO” section.
docs/trajectories/ace-package-manager-skill-crystallization-pipeline/RESUME.md Removes a “Composes with MANIFESTO” section.
docs/research/2026-05-22-shadow-lesson-log-stale-locks.md Rewrites the document and removes YAML frontmatter.
docs/pr-discussions/PR-4853-shard-2026-05-24-1902z-otto-vscode-bg-worker-lior-lane-fleet.md Adds a new PR discussion archive shard.
docs/pr-discussions/PR-3364-feat-persona-ani-plateau-bounded-1-96-mb-grok-extract-canoni.md Adjusts archived_at timestamp in frontmatter.
docs/pr-discussions/PR-3362-backlog-p2-b-0529-tick-shard-schema-validator-vs-current-pra.md Adjusts archived_at timestamp in frontmatter.
docs/pr-discussions/PR-3361-shard-tick-0503z-pr-3359-four-review-threads-addressed-recov.md Adjusts archived_at timestamp in frontmatter.
docs/backlog/P3/B-0002.4-noether-formalization-step4.md Adds a new decomposed backlog row (step 4).
docs/backlog/P3/B-0002.3-noether-formalization-step3.md Adds a new decomposed backlog row (step 3).
docs/backlog/P3/B-0002.2-noether-formalization-step2.md Adds a new decomposed backlog row (step 2).
docs/backlog/P3/B-0002.1-noether-formalization-step1.md Adds a new decomposed backlog row (step 1).
docs/backlog/P0/B-0525-manifesto-constitutional-promotion-readiness-tracking-2026-05-14.md Edits the row content and resets last_updated.
docs/BACKLOG.md Updates the generated backlog index (but drops several existing rows).
docs/AUTONOMOUS-LOOP-PER-TICK.md Removes “Step 1a — Unfinished-PR check” section.
docs/agendas/zeta/AGENDA.md Removes a “Composes with MANIFESTO” section.
docs/agendas/encryption/AGENDA.md Removes a “Composes with MANIFESTO” section.
docs/agendas/ai-autonomy/AGENDA.md Removes a “Composes with MANIFESTO” section.
.claude/skills/formal-verification-expert/SKILL.md Updates the notebook reference description (removes trigger-log mention).
.claude/skills/alignment-observability/SKILL.md Changes last_updated and empties bp_rules_cited.
.claude/skills/alignment-auditor/SKILL.md Reflows/rewrites prose and changes last_updated.
.claude/rules/tonal-momentum-equals-meme-emergent-harmonic-coercion.md Changes referenced rule filename in two places.
.claude/agents/alignment-auditor.md Removes a “Composes with MANIFESTO” section.

Comment on lines 216 to 220
function refExists(ref: Ref): boolean {
if (ref.kind === "path") {
// Template-placeholder patterns: rule-acknowledged-transient per
// B-0708 / 9-variant taxonomy. The `...` ellipsis is the canonical
// template-path marker (e.g., `docs/.../0603Z.md`, `B-0613-...md`,
// `~/.claude/projects/.../memory/*.md`). The placeholder `YYYY/MM/DD`
// is the canonical date-template marker. Skip existence check.
if (ref.raw.includes("...") || ref.raw.includes("YYYY")) return true;
// Command-snippet detection: when the audit captures a backtick
// span containing a shell command rather than a path (e.g.,
// `BACKLOG_WRITE_FORCE=1 bun tools/.../generate-index.ts`,
// `bun tools/github/poll-pr-gate.ts`, `git add docs/...`), check
// the embedded path-fragment rather than the literal raw.
if (/\s/.test(ref.raw)) {
const tokens = ref.raw.split(/\s+/);
for (const t of tokens) {
if ((t.endsWith(".ts") || t.endsWith(".sh") || t.endsWith(".md")) && existsSync(t)) {
return true;
}
}
}
if (existsSync(ref.raw)) return true;
if (ref.raw.includes("*") || ref.raw.includes("{")) return globResolves(ref.raw);
// Sibling-rule resolution: bare `<filename>.md` references inside
// `.claude/rules/*.md` typically point to other rules in the same
// directory. Resolve them via `.claude/rules/<basename>` before
// declaring stale. Major false-positive class caught by B-0708
// razor-cadence pass (2026-05-23).
if (ref.raw.endsWith(".md") && !ref.raw.includes("/")) {
if (existsSync(join(RULES_DIR, ref.raw))) return true;
}
// Peer-call wrapper resolution: bare `<name>.ts` references in
// agent-roster-reference-card.md and similar rules typically point
// to `tools/peer-call/<name>` per the established peer-call wrapper
// convention.
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/peer-call", ref.raw))) return true;
}
// tools/hygiene/ fallback for bare `.ts`/`.sh` references in
// hygiene-related rules (backlog-item-start-gate.md, rule-0-no-sh-
// files.md, etc.)
if ((ref.raw.endsWith(".ts") || ref.raw.endsWith(".sh")) && !ref.raw.includes("/")) {
if (existsSync(join("tools/hygiene", ref.raw))) return true;
}
// tools/github/ fallback for bare `.ts` references in
// GitHub/PR-tooling-related rules (refresh-before-decide.md cites
// `poll-pr-gate-batch.ts` etc.)
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/github", ref.raw))) return true;
}
// memory/ fallback for bare MEMORY.md (the canonical memory-index)
if (ref.raw === "MEMORY.md") {
if (existsSync(join("memory", "MEMORY.md"))) return true;
}
return false;
Comment on lines 216 to 220
function refExists(ref: Ref): boolean {
if (ref.kind === "path") {
// Template-placeholder patterns: rule-acknowledged-transient per
// B-0708 / 9-variant taxonomy. The `...` ellipsis is the canonical
// template-path marker (e.g., `docs/.../0603Z.md`, `B-0613-...md`,
// `~/.claude/projects/.../memory/*.md`). The placeholder `YYYY/MM/DD`
// is the canonical date-template marker. Skip existence check.
if (ref.raw.includes("...") || ref.raw.includes("YYYY")) return true;
// Command-snippet detection: when the audit captures a backtick
// span containing a shell command rather than a path (e.g.,
// `BACKLOG_WRITE_FORCE=1 bun tools/.../generate-index.ts`,
// `bun tools/github/poll-pr-gate.ts`, `git add docs/...`), check
// the embedded path-fragment rather than the literal raw.
if (/\s/.test(ref.raw)) {
const tokens = ref.raw.split(/\s+/);
for (const t of tokens) {
if ((t.endsWith(".ts") || t.endsWith(".sh") || t.endsWith(".md")) && existsSync(t)) {
return true;
}
}
}
if (existsSync(ref.raw)) return true;
if (ref.raw.includes("*") || ref.raw.includes("{")) return globResolves(ref.raw);
// Sibling-rule resolution: bare `<filename>.md` references inside
// `.claude/rules/*.md` typically point to other rules in the same
// directory. Resolve them via `.claude/rules/<basename>` before
// declaring stale. Major false-positive class caught by B-0708
// razor-cadence pass (2026-05-23).
if (ref.raw.endsWith(".md") && !ref.raw.includes("/")) {
if (existsSync(join(RULES_DIR, ref.raw))) return true;
}
// Peer-call wrapper resolution: bare `<name>.ts` references in
// agent-roster-reference-card.md and similar rules typically point
// to `tools/peer-call/<name>` per the established peer-call wrapper
// convention.
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/peer-call", ref.raw))) return true;
}
// tools/hygiene/ fallback for bare `.ts`/`.sh` references in
// hygiene-related rules (backlog-item-start-gate.md, rule-0-no-sh-
// files.md, etc.)
if ((ref.raw.endsWith(".ts") || ref.raw.endsWith(".sh")) && !ref.raw.includes("/")) {
if (existsSync(join("tools/hygiene", ref.raw))) return true;
}
// tools/github/ fallback for bare `.ts` references in
// GitHub/PR-tooling-related rules (refresh-before-decide.md cites
// `poll-pr-gate-batch.ts` etc.)
if (ref.raw.endsWith(".ts") && !ref.raw.includes("/")) {
if (existsSync(join("tools/github", ref.raw))) return true;
}
// memory/ fallback for bare MEMORY.md (the canonical memory-index)
if (ref.raw === "MEMORY.md") {
if (existsSync(join("memory", "MEMORY.md"))) return true;
}
return false;
Comment thread docs/BACKLOG.md
@@ -620,12 +620,9 @@ are closed (status: closed in frontmatter)._
- [ ] **[B-0551](backlog/P2/B-0551-qg-isomorphism-step-2-infinite-game-topos-qecc-structure-2026-05-16.md)** QG isomorphism step 2 — formalize infinite-game extension topos and QECC algebraic structure
- [ ] **[B-0562](backlog/P2/B-0562-qg-isomorphism-step-2-cube-adinkra-cayley-dickson-to-happylike-qecc-2026-05-16.md)** QG isomorphism Step 2 — Cube + Adinkra + Cayley-Dickson → HaPPY-like QEC structure
- [ ] **[B-0571](backlog/P2/B-0571-github-app-factory-automation-2026-05-16.md)** GitHub App for factory automation — separate API rate-limit pool from human-user accounts
Comment thread docs/BACKLOG.md
@@ -667,16 +664,6 @@ are closed (status: closed in frontmatter)._
- [ ] **[B-0703](backlog/P2/B-0703-multi-oracle-consensus-with-bft-inside-dst-agreement-across-trust-gradient-architecture-aaron-2026-05-21.md)** Multi-oracle consensus with BFT-inside + DST-agreement-across: trust-gradient architecture beyond single-layer BFT (Aaron 2026-05-21)
- [ ] **[B-0704](backlog/P2/B-0704-secret-message-over-reticulum-via-spectre-tile-position-pressure-no-copy-by-geometry-aaron-2026-05-21.md)** Secret-message-over-Reticulum via spectre-tile position-pressure — no-copy by geometry, not by cryptography (Aaron 2026-05-21)
- [ ] **[B-0705](backlog/P2/B-0705-autocomplete-as-traveler-consent-event-shadow-star-marker-as-cryptographic-receipt-lior-website-2026-05-22.md)** Autocomplete-as-Traveler-consent-event — (shadow*) marker as cryptographic receipt of cross-temporal consent event
effort: M
created: 2026-05-14
last_updated: 2026-05-23
last_updated: 2026-05-14
Comment on lines 1 to 6
---
name: Aaron's extended-family cooperative substrate — opaque-pointer family network, permeable trust, and asymmetric calibration counterweight
description: 2026-05-22 — Aaron synthesizes the general shape of his extended-family system: a multi-household cooperative network, earned one interaction at a time after setbacks, with family-member specifics held at opaque-pointer scope until explicit consent. Composes this with the developmental calibration stance (using AI overshoots as a calibration counterweight for his tendency to undershoot on caution with children) and the Harry Potter Sorting Hat developmental bridge.
name: Aaron's extended-family cooperative substrate — 10-kid sibling network, permeable households, and asymmetric calibration counterweight
description: 2026-05-22 — Aaron synthesizes the reality of his extended-family system (10 kids, permeable households, walk-in access with first wife and new husband, active second-wife inclusion by first-wife's mother) and how it was earned one interaction at a time. Composes this with the developmental calibration stance (using AI overshoots as a calibration counterweight for his tendency to undershoot on caution with children) and the Harry Potter Sorting Hat developmental bridge.
type: feedback
created: 2026-05-22
---
@@ -0,0 +1,21 @@
---
id: B-0002.1
Comment on lines +1 to +5
---
id: B-0002.2
priority: P3
status: open
title: "Noether-style formalization Step 2: Identify continuous symmetries of S"
Comment on lines +1 to +5
---
id: B-0002.3
priority: P3
status: open
title: "Noether-style formalization Step 3: Derive Noether currents"
Comment on lines +1 to +5
---
id: B-0002.4
priority: P3
status: open
title: "Noether-style formalization Step 4: Symmetry-breaking analysis"
@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 25, 2026

This PR is a blob and contains multiple unrelated changes. Please decompose this PR into smaller, atomic PRs.

@AceHack AceHack closed this May 25, 2026
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