How dino-cosic/flagrm works
flagrm is a CLI that helps an AI coding agent remove feature flags without editing source itself. The workflow sets up agent guidance, captures a Git/build/test baseline, then verifies edits against recorded names, build and test results, dead-code diagnostics, and file coverage; a Claude Code Stop hook can block premature completion. Angular, .NET, and generic adapters provide stack-specific discovery and analysis. The graph reflects README-documented workflow and SOURCE INDEX references; unsampled implementations and their internal call paths are not inferred.
Main entry points: index.ts Verify orchestration · cli.ts CLI commands · baseline.ts Baseline capture · discover.ts Flag discovery
Components 22
CLI and setup
- CLI commands
src/cli.ts - Agent setup
src/core/install.ts - Stop hook
src/core/hook.ts - Project config
src/core/config.ts
Flag analysis
- Adapter contract
src/core/adapter.ts - Angular adapter
src/adapters/angular/flow.ts - .NET adapter
src/adapters/dotnet/flow.ts - Generic adapter
src/adapters/generic/discover.ts - Flag discovery
src/core/discover.ts - Flag inventory
src/core/inventory.ts - Source scanning
src/core/scan.ts
Baseline capture
- Baseline capture
src/core/baseline.ts - Git comparison
src/core/git.ts - Config snapshot
src/core/config-snapshot.ts - Test results
src/core/verify/test-results.ts
Verification
- Verify orchestration
src/core/verify/index.ts - Build and test checks
src/core/verify/commands.ts - Coverage check
src/core/verify/coverage.ts - Removed-test analysis
src/core/verify/removed-tests.ts - Test command runner
src/core/test-runner.ts - Results report
src/core/report.ts
Other components
- AI coding agent
Connections 28
- AI coding agent → Agent setup: requests setup
README.md - AI coding agent → CLI commands: runs commands
README.md - CLI commands → Agent setup: initializes tools
src/cli.ts - Agent setup → Project config: writes config
src/core/install.ts - CLI commands → Project config: loads settings
src/cli.ts - CLI commands → Flag discovery: lists candidates
src/cli.ts - Flag discovery → Source scanning: masks source
src/core/discover.ts - Flag discovery → Angular adapter: uses adapter
- Flag discovery → .NET adapter: uses adapter
- Flag discovery → Generic adapter: uses adapter
src/adapters/generic/discover.ts - Angular adapter → Adapter contract: implements contract
src/adapters/angular/flow.ts - .NET adapter → Adapter contract: implements contract
src/adapters/dotnet/flow.ts - Generic adapter → Adapter contract: implements contract
src/adapters/generic/discover.ts - CLI commands → Baseline capture: records baseline
src/cli.ts - Baseline capture → Flag inventory: builds inventory
src/core/baseline.ts - Flag inventory → Source scanning: scans references
src/core/inventory.ts - Baseline capture → Git comparison: records commit state
README.md - Baseline capture → Config snapshot: captures config
src/core/baseline.ts - Baseline capture → Test results: collects test results
src/core/baseline.ts - CLI commands → Verify orchestration: runs verification
src/cli.ts - Verify orchestration → Baseline capture: loads baseline
src/core/verify/index.ts - Verify orchestration → Build and test checks: runs checks
src/core/verify/index.ts - Verify orchestration → Coverage check: checks changed files
src/core/verify/index.ts - Verify orchestration → Removed-test analysis: analyzes test changes
src/core/verify/index.ts - Build and test checks → Test command runner: runs configured tests
- Verify orchestration → Results report: formats results
- Stop hook → Verify orchestration: guards completion
README.md - Verify orchestration → AI coding agent: returns pass or fail
README.md