Skip to content

fix: sentinel awareness, fmt normalization, lifecycle-scaled scoring#76

Merged
stackbilt-admin merged 1 commit intomainfrom
fix/sentinel-awareness-lifecycle-scoring
Mar 30, 2026
Merged

fix: sentinel awareness, fmt normalization, lifecycle-scaled scoring#76
stackbilt-admin merged 1 commit intomainfrom
fix/sentinel-awareness-lifecycle-scoring

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

  • Sentinel detection layer — new stripCharterSentinels() prevents charter from re-ingesting its own output (module index tables between <!-- charter:*:start/end --> sentinels). Wired into markdown parser, tidy bloat scanner, and doctor keyword scanner.
  • Structural normalization in fmt — collapses duplicate list markers (- - - XX), strips HTML comments and markdown tables from ADF bodies.
  • Lifecycle-aware scoring — doctor suppresses cold-start for validated thin pointers when .ai/ modules exist. Audit scales trailer weight by commit count (20% at ≤20 commits → 50% at ≥100).
  • WSL2 install guidance in README

Issues resolved

Closes #70, #71, #72, #73, #74, #75

Root cause analysis

Issues #70, #71, #75 shared a single root cause: charter's pipeline didn't recognize its own rendered output. The module index table (generated by migrate) contains trigger keywords that tidy and doctor treated as user-authored bloat, creating a self-ingestion loop.

Test plan

  • Full test suite: 310/310 pass (2 pre-existing WSL2 integration timeouts unrelated)
  • Build clean
  • Run charter adf migrate then charter adf tidy on a repo with module index — verify no re-ingestion
  • Run charter doctor on greenfield repo with thin pointer + populated .ai/ — verify no cold-start info
  • Run charter audit on <20 commit repo — verify trailer weight is 20%, not 50%
  • Run charter adf fmt --write on ADF file with duplicate list markers — verify normalization

🤖 Generated with Claude Code

Three root fixes for 6 issues:

1. Charter sentinel detection (#70, #71, #75) — new stripCharterSentinels()
   utility prevents charter from re-ingesting its own output (module index
   tables). Wired into markdown parser, tidy bloat scanner, and doctor
   keyword density scanner.

2. Structural normalization in fmt (#75) — formatter now collapses duplicate
   list markers (- - - X → X), strips HTML comments and markdown tables
   from ADF section bodies.

3. Lifecycle-aware scoring (#72, #73) — doctor suppresses cold-start info
   when .ai/ modules exist (pointer IS doing its job). Audit scales trailer
   weight by commit count: 20% at ≤20 commits → 50% at ≥100 commits.

Also adds WSL2 install guidance to README (#74).

Closes #70, #71, #72, #73, #74, #75

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stackbilt-admin stackbilt-admin merged commit 6f921bf into main Mar 30, 2026
3 checks passed
@stackbilt-admin stackbilt-admin deleted the fix/sentinel-awareness-lifecycle-scoring branch March 30, 2026 06:51
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.

adf migrate produces malformed core.adf with duplicate list markers and structural artifacts

1 participant