Analysis workflows

Apply Code Buster views to exploration, review, remediation, and baselines.

Code Buster commands are repository views over shared discovery, parsing, graph, rule, and reporting stages. Choose the narrowest view that answers the current question.

Understand an unfamiliar repository

cb summary
cb quality --structure
cb graph
cb duplication
cb quality --hotspots

Start with coverage in summary. Use the structure view and duplication for package shape, graph for dependency wiring, and the hotspots view for concentrated risk.

Investigate dependencies

cb inspect --related path/to/file
cb inspect --why path/to/file
cb inspect --path source/file target/file
cb dead

The inspect views rank neighboring code, explain reachability, and find a dependency route. dead reports production code unreachable from configured or inferred entry points.

Review a change

cb review
cb review --changed-base main
cb config --files

Use changed-line analysis for pull requests and local work. The selected-files view and run manifest record what was selected and whether processing completed cleanly; a short report without complete coverage is not equivalent to a clean repository.

Plan remediation

cb quality --complexity
cb duplication
cb quality --score
cb quality
cb review --format plan
cb review --format actions

Complexity and duplication provide focused evidence. Scores and quality gates summarize policy. Review plans and actions prioritize remediation without rewriting source automatically.

Use it alongside existing analyzers

Code Buster is a static analyzer, not a replacement for a language compiler, type checker, formatter, linter, test suite, or specialist security scanner. Keep those tools in the verification pipeline; they usually understand their own language or domain more deeply.

Code Buster adds one local interface for repository-level and cross-file evidence across supported languages, including dependency structure, architecture policy, reachability, duplication, and focused change review. Analysis depth varies by language and rule family, and a clean report does not prove behavioral correctness.

Good prompts, project instructions, and focused context remain the proactive first step for AI-assisted work. Static analysis supplies an independent, repeatable check because neither instructions nor experience guarantee correct code on the first attempt.

Use Code Buster with AI coding assistants

Code Buster gives an AI coding assistant a compact, repository-aware feedback signal without sending source code to an AI provider. Code Buster itself consumes no model tokens; the assistant still consumes tokens when it reads the findings, inspects relevant source, and changes code. Run the narrowest relevant command before, during, or after a task to catch duplicate functions, repeated blocks, dependency problems, architecture drift, and other supported issues.

cb review --format json
cb duplication --format json
cb review --format actions

Pass the relevant findings - not necessarily the entire report - to the assistant and ask it to explain the evidence before proposing a change. This can use less model context than sending broad sections of the repository, but the actual token use depends on the agent and the source it must inspect.

Code Buster does not make AI-generated code correct by itself. Models vary: one may apply a recommendation blindly, another may ignore an important finding, and neither Code Buster nor the model knows your complete product intent. A reported duplication may be deliberate, a suggested abstraction may be worse than repetition, and a clean report does not prove that behavior is correct.

Treat the workflow as a proactive feedback loop:

  1. Let the assistant make a focused change.
  2. Run the narrowest relevant Code Buster command during the task.
  3. Ask the assistant to evaluate relevant findings against the intended behavior.
  4. Let it iterate, then review the proposed remediation and resulting diff yourself.
  5. Run the project’s tests and exercise the changed behavior before completion.

Code Buster has been used successfully as feedback for AI-assisted development, particularly for identifying duplication and recurring implementation risks. It improves the evidence available to the model; it does not remove the developer from design, verification, or accountability.

Baselines and reproducibility

Use stable finding fingerprints and machine reports to compare reviewed runs. Keep repository configuration, tool version, source revision, selected coverage, and processing diagnostics with any baseline. Never treat missing or partial analysis as zero findings.

Safe fixes

cb fix previews conservative whitespace and supported mechanical changes. Review the preview before applying it. Semantic remediation remains a source change owned by the developer because rule evidence cannot prove the intended design.