Skip to content

fix(nap): heading-aware archival#61

Closed
diberry wants to merge 1 commit intodevfrom
squad/22-heading-aware-archival
Closed

fix(nap): heading-aware archival#61
diberry wants to merge 1 commit intodevfrom
squad/22-heading-aware-archival

Conversation

@diberry
Copy link
Copy Markdown
Owner

@diberry diberry commented Mar 27, 2026

Extends archiveDecisions() parser to recognize ## section headings as boundaries. Preserves section structure during archival — ## preambles are kept as atomic units tied to their ### children.

Changes:

  • Entry parser now stops at both ## and ### headings (prevents ## headers from being swallowed into adjacent ### entry content)
  • Tracks ## section boundaries and maps each ### entry to its parent section
  • Reconstruction emits section preambles only when at least one child entry is present
  • Budget calculation accounts for section preamble overhead
  • 2 new tests: section heading preservation + orphan prevention

Working as EECOM (Core Dev)

Closes #22

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@diberry diberry changed the title feat: git staging hygiene rules for agents fix(nap): heading-aware archival Mar 27, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/22-heading-aware-archival branch from 8e189a4 to 419079f Compare March 27, 2026 02:52
@diberry
Copy link
Copy Markdown
Owner Author

diberry commented Mar 27, 2026

✅ Team Approved

Flight (Lead) and Coordinator reviewed and approved. 1 commit, 2 files (nap.ts + nap.test.ts), 44 tests pass (42 existing + 2 new). Parser correctly handles both ## and ### headings, preserves section structure atomically during archival. Ready to retarget upstream.

@diberry
Copy link
Copy Markdown
Owner Author

diberry commented Mar 27, 2026

Retargeted to bradygaster#650

@diberry diberry closed this Mar 27, 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