Skip to content

fix(summary): key files are files, ranked by how often memory cites them - #35

Merged
riponcm merged 1 commit into
riponcm:mainfrom
bigfree:fix/key-files
Nov 20, 2026
Merged

riponcm merged 1 commit into
riponcm:mainfrom
bigfree:fix/key-files

Conversation

@bigfree

@bigfree bigfree commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

## Key files in summary.md is built by infer_file_mentions, which accepts any dotted token. On one of my projects (~3k events) 7 of the 20 entries were not files:

- `23.1.2`
- `1.4.30`
- `compilerOptions.paths`
- `7.x`
- `ts.readConfigFile`
- `6.0.3`

The list also kept src/auth.py:42 apart from src/auth.py, and it was ordered by first mention, which on an aged project means the files from the setup week.

Change

  • Every candidate goes through location_to_file, the helper precheck already uses: line suffixes are stripped, and a bare name counts only with a known source suffix. Event location values are now candidates too.
  • Paths under .projectmem/ are left out.
  • The list is ranked by the number of events that cite each file (ties keep first-mention order) and still shows 20.

On the same project the list now holds 20 real files and no version numbers. Nothing in events.jsonl changes.

Trade-off: a bare file name without a known suffix, such as .gitignore or Makefile, is no longer picked up from free text; with a directory (docker/Makefile) or as an event location it still is. That follows location_to_file's rule rather than adding a second one.

Tests

  • version numbers and identifiers produce no entry
  • pyproject.toml mentioned in text is kept
  • bcrypt and AuthService.login as locations produce no entry, src/auth.py does
  • src/auth.py:42 and src/auth.py:7 merge into src/auth.py
  • ranking by count, .projectmem/summary.md left out

test_summary_and_issue_file_are_regenerated now expects `auth/redirect.py` instead of `auth/redirect.py:88`. The full suite passes (383).

infer_file_mentions takes any dotted token, so Key files listed version
numbers and identifiers (7.x, 23.1.2, ts.readConfigFile) as files, kept
file:line spellings apart from the file, and ordered entries by first
mention, which on an aged project is the setup week.

Every candidate, now including event locations, goes through
location_to_file, as precheck does. Paths under .projectmem/ are left
out, and the list is ranked by the number of events citing each file.
@riponcm
riponcm merged commit dd89040 into riponcm:main Nov 20, 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