Developers often begin implementing a code change before understanding what else in the repository may be affected. A seemingly small modification can propagate through imports, dependent modules, tests, and transitive dependencies, creating unexpected regressions and increasing debugging and review effort. CodePreFlight addresses this problem by acting as a pre-flight analysis step before implementation. It is a TypeScript static-analysis CLI that examines a Git repository and produces a structured impact and risk report. The workflow is: Propose a change → Analyze the repository → Review impact and risk → Implement → Run tests → Verify CodePreFlight first parses the Git diff to identify changed files. It then builds a reverse import graph and uses breadth-first traversal to identify files affected through dependency relationships. A test matcher identifies potentially relevant tests using project conventions and import relationships. Finally, a heuristic risk scorer highlights risk signals such as directly changed files, missing associated test matches, barrel/index files, and larger changes. The resulting report can be displayed through the CLI or exported as JSON or HTML. It shows affected files, dependency depth, test relationships, risk levels, and the reasons behind those risk levels. The primary target users are software developers working on JavaScript or TypeScript repositories who want better visibility into the consequences of a change before modifying code. The creative aspect of CodePreFlight is applying the idea of an aviation pre-flight check to software changes: evidence first, implementation second, verification third. Instead of treating implementation as the first step, the developer gets a map of the potential blast radius before proceeding. For this hackathon, IBM Bob is part of the broader workflow. CodePreFlight provides the analysis and evidence, the developer reviews the proposed change, and IBM Bob assists with implementation and testing. This creates a practical human-in-the-loop workflow where analysis informs implementation rather than replacing developer judgment.
Category tags: