fix: sentinel awareness, fmt normalization, lifecycle-scaled scoring#76
Merged
stackbilt-admin merged 1 commit intomainfrom Mar 30, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.- - - X→X), strips HTML comments and markdown tables from ADF bodies..ai/modules exist. Audit scales trailer weight by commit count (20% at ≤20 commits → 50% at ≥100).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 thattidyanddoctortreated as user-authored bloat, creating a self-ingestion loop.Test plan
charter adf migratethencharter adf tidyon a repo with module index — verify no re-ingestioncharter doctoron greenfield repo with thin pointer + populated .ai/ — verify no cold-start infocharter auditon <20 commit repo — verify trailer weight is 20%, not 50%charter adf fmt --writeon ADF file with duplicate list markers — verify normalization🤖 Generated with Claude Code