feat(framework): implement Phase 1 proactive content scanning
CREATED:
- scripts/framework-components/ProhibitedTermsScanner.js (420 lines)
• Scans codebase for inst_016/017/018 violations
• Pattern detection for guarantee language, fabricated stats, unverified claims
• Auto-fix capability with context awareness
• CLI interface: --details, --fix, --staged flags
- tests/unit/ProhibitedTermsScanner.test.js (39 tests, all passing)
• Pattern detection tests (inst_017, inst_018)
• Context awareness tests
• Auto-fix functionality tests
• Edge case handling
MODIFIED:
- scripts/session-init.js
• Added Section 7: Scanning for Prohibited Terms
• Renumbered subsequent sections (CSP → 8, Dev Env → 9, Continuous → 10)
• Scans on every session start, reports violations
- scripts/hook-validators/validate-file-write.js
• Added missing checkPreActionCheckRecency() function (fixes hook crash)
- package.json/package-lock.json
• Added glob@11.0.3 dependency
RESULTS:
• Scanner operational: 39/39 tests passing
• Session integration: Runs automatically on session start
• Current scan: Found 364 violations (188 inst_017, 120 inst_018, 56 inst_016)
• Violations need user review (many in historical docs, specifications)
IMPACT:
• Framework now PROACTIVE instead of reactive
• Violations detected at session start (not weeks later)
• Auto-fix available for simple cases
• Closes critical detection gap identified in framework assessment
NEXT STEPS (user decision):
• Review 364 violations (many false positives in historical docs)
• Optionally: Implement pre-commit hook
• Phase 2: Context-aware rule surfacing
• Phase 3: Active metacognitive assistance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>