Skip to content

Pre-commit hook adds ADR-017-violating sections to memory indexes #910

@rjmurillo

Description

@rjmurillo

Problem

The pre-commit memory cross-reference hook automatically adds ## Related sections to memory index files in .serena/memories/. However, ADR-017 specifies that index files should contain ONLY table content - no additional sections.

This creates a circular validation problem:

  1. Developer updates memory observation file
  2. Pre-commit hook runs and adds ## Related section to index
  3. Pre-commit validation runs and fails because of the non-table content
  4. Developer must use git commit --no-verify to bypass

Expected Behavior

Memory cross-reference hook should either:

  1. NOT add ## Related sections to index files (preferred), OR
  2. ADR-017 validation should allow ## Related sections in indexes

Actual Behavior

Hook adds sections that violate the validation rules enforced by the same commit process.

Impact

  • Forces developers to bypass pre-commit validation with --no-verify
  • Reduces confidence in validation process
  • Creates inconsistent index file formats

Reproduction

  1. Edit any file in .serena/memories/ that's referenced in an index
  2. Run git add and git commit
  3. Observe hook adds ## Related section
  4. Observe validation fails on the added section

Related

  • ADR-017: Memory index format specification
  • Pre-commit hook: Memory cross-reference automation
  • Validation script: Validate-MemoryIndex.ps1

Metadata

Metadata

Labels

agent-memoryContext persistence agentarea-infrastructureBuild, CI/CD, configurationbugSomething isn't workingpriority:P1Important: Affects user experience significantly, high business value

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions