Code Health Check: 86 issues found
This is an automated report from the code health checker.
The codebase guidelines recommend small, single-purpose functions
with flat control flow for agent-maintained code.
40 hard violations (must fix) and 46 advisory (reviewer judgment).
Oversized Functions (advisory: >40 lines, hard: >60 lines)
| Severity |
Function |
File |
Line |
Length |
Over by |
| VIOLATION |
build |
src/buildteam/builder.py |
L626 |
202 |
+142 |
| VIOLATION |
merge_milestone_to_main |
src/buildteam/git_helpers.py |
L253 |
133 |
+73 |
| VIOLATION |
plan |
src/buildteam/planner.py |
L26 |
125 |
+65 |
| VIOLATION |
analyze_source |
src/buildteam/code_analysis.py |
L179 |
120 |
+60 |
| VIOLATION |
_validate_milestone |
src/buildteam/validator.py |
L402 |
103 |
+43 |
| VIOLATION |
go |
src/buildteam/orchestrator.py |
L496 |
96 |
+36 |
| VIOLATION |
_print_validation_summary |
src/buildteam/validator.py |
L233 |
88 |
+28 |
| VIOLATION |
status |
src/buildteam/cli.py |
L82 |
84 |
+24 |
| VIOLATION |
_run_issue_builder_loop |
src/buildteam/builder.py |
L511 |
78 |
+18 |
| VIOLATION |
_launch_agents_and_build |
src/buildteam/orchestrator.py |
L288 |
73 |
+13 |
| VIOLATION |
parse_journeys |
src/buildteam/journeys.py |
L48 |
63 |
+3 |
| VIOLATION |
run_deterministic_checks |
src/buildteam/backlog_checker.py |
L298 |
62 |
+2 |
| advisory |
_watch_builder_branch |
src/buildteam/watcher.py |
L219 |
60 |
+20 |
| advisory |
check_backlog_quality |
src/buildteam/backlog_checker.py |
L409 |
59 |
+19 |
| advisory |
check_first_milestone |
src/buildteam/backlog_checker.py |
L169 |
57 |
+17 |
| advisory |
claim_next_story |
src/buildteam/builder.py |
L117 |
57 |
+17 |
| advisory |
_review_branch_commits |
src/buildteam/watcher.py |
L115 |
57 |
+17 |
| advisory |
check_story_ordering |
src/buildteam/backlog_checker.py |
L231 |
56 |
+16 |
| advisory |
_scaffold_project |
src/buildteam/bootstrap.py |
L250 |
56 |
+16 |
| advisory |
_review_milestone |
src/buildteam/milestone_reviewer.py |
L45 |
48 |
+8 |
| advisory |
check_dependency_graph |
src/buildteam/backlog_checker.py |
L93 |
47 |
+7 |
| advisory |
run_ordering_check |
src/buildteam/backlog_checker.py |
L481 |
47 |
+7 |
| advisory |
_check_remaining_work |
src/buildteam/builder.py |
L440 |
47 |
+7 |
| advisory |
_stream_with_idle_timeout |
src/buildteam/utils.py |
L227 |
47 |
+7 |
| advisory |
_check_required_tools |
src/buildteam/bootstrap.py |
L75 |
45 |
+5 |
| advisory |
validateloop |
src/buildteam/validator.py |
L512 |
45 |
+5 |
| advisory |
unclaim_story |
src/buildteam/builder.py |
L220 |
44 |
+4 |
| advisory |
get_builder_status_summary |
src/buildteam/sentinel.py |
L158 |
43 |
+3 |
| advisory |
run_copilot |
src/buildteam/utils.py |
L328 |
43 |
+3 |
| advisory |
_review_remaining_after_merge |
src/buildteam/watcher.py |
L174 |
43 |
+3 |
| advisory |
mark_story_completed |
src/buildteam/builder.py |
L176 |
42 |
+2 |
| advisory |
git_push_with_retry |
src/buildteam/git_helpers.py |
L8 |
42 |
+2 |
| advisory |
_resolve_merge_conflicts_with_copilot |
src/buildteam/git_helpers.py |
L210 |
41 |
+1 |
| advisory |
resolve_agent_models |
src/buildteam/orchestrator.py |
L31 |
41 |
+1 |
| advisory |
is_builder_done |
src/buildteam/sentinel.py |
L115 |
41 |
+1 |
Oversized Files (advisory: >300 lines, hard: >500 lines)
| Severity |
File |
Lines |
Over by |
| VIOLATION |
src/buildteam/builder.py |
829 |
+329 |
| VIOLATION |
src/buildteam/utils.py |
655 |
+155 |
| VIOLATION |
src/buildteam/validator.py |
605 |
+105 |
| VIOLATION |
src/buildteam/orchestrator.py |
591 |
+91 |
| VIOLATION |
src/buildteam/backlog_checker.py |
527 |
+27 |
| advisory |
src/buildteam/milestone.py |
453 |
+153 |
| advisory |
src/buildteam/git_helpers.py |
452 |
+152 |
| advisory |
src/buildteam/prompts/planner.py |
406 |
+106 |
| advisory |
src/buildteam/code_analysis.py |
405 |
+105 |
| advisory |
src/buildteam/bootstrap.py |
347 |
+47 |
| advisory |
src/buildteam/watcher.py |
344 |
+44 |
Excessive Nesting (advisory: >4 levels, hard: >6 levels)
| Severity |
Function |
File |
Line |
Depth |
| advisory |
merge_milestone_to_main |
src/buildteam/git_helpers.py |
L253 |
6 |
| advisory |
_bootstrap_new_project |
src/buildteam/orchestrator.py |
L423 |
6 |
| advisory |
run_deterministic_checks |
src/buildteam/backlog_checker.py |
L298 |
5 |
| advisory |
build |
src/buildteam/builder.py |
L626 |
5 |
| advisory |
are_other_builders_done |
src/buildteam/sentinel.py |
L30 |
5 |
| advisory |
is_builder_done |
src/buildteam/sentinel.py |
L115 |
5 |
| advisory |
get_builder_status_summary |
src/buildteam/sentinel.py |
L158 |
5 |
| advisory |
list_open_issues_for_milestones |
src/buildteam/utils.py |
L617 |
5 |
| advisory |
_print_validation_summary |
src/buildteam/validator.py |
L233 |
5 |
High Cyclomatic Complexity (advisory: >10, hard: >15)
| Severity |
Function |
File |
Line |
Complexity |
| VIOLATION |
build |
src/buildteam/builder.py |
L626 |
27 |
| VIOLATION |
_print_validation_summary |
src/buildteam/validator.py |
L233 |
25 |
| VIOLATION |
merge_milestone_to_main |
src/buildteam/git_helpers.py |
L253 |
20 |
| VIOLATION |
run_deterministic_checks |
src/buildteam/backlog_checker.py |
L298 |
16 |
| VIOLATION |
status |
src/buildteam/cli.py |
L82 |
16 |
| VIOLATION |
plan |
src/buildteam/planner.py |
L26 |
16 |
| advisory |
check_dependency_graph |
src/buildteam/backlog_checker.py |
L93 |
12 |
| advisory |
check_first_milestone |
src/buildteam/backlog_checker.py |
L169 |
12 |
| advisory |
check_story_ordering |
src/buildteam/backlog_checker.py |
L231 |
12 |
| advisory |
_watch_builder_branch |
src/buildteam/watcher.py |
L219 |
12 |
| advisory |
parse_journeys |
src/buildteam/journeys.py |
L48 |
11 |
Too Many Parameters (advisory: >7, hard: >10)
| Severity |
Function |
File |
Line |
Params |
| VIOLATION |
go |
src/buildteam/orchestrator.py |
L496 |
15 |
| advisory |
resolve_agent_models |
src/buildteam/orchestrator.py |
L31 |
8 |
| advisory |
_bootstrap_new_project |
src/buildteam/orchestrator.py |
L423 |
8 |
| advisory |
_resume_existing_project |
src/buildteam/orchestrator.py |
L463 |
8 |
Missing Type Annotations
| Function |
File |
Line |
Missing |
measure_function_size |
src/buildteam/code_analysis.py |
L53 |
node |
measure_nesting_depth |
src/buildteam/code_analysis.py |
L58 |
node |
measure_cyclomatic_complexity |
src/buildteam/code_analysis.py |
L73 |
node |
count_parameters |
src/buildteam/code_analysis.py |
L87 |
func_node |
get_function_name |
src/buildteam/code_analysis.py |
L105 |
node |
find_functions |
src/buildteam/code_analysis.py |
L124 |
root_node |
Potentially Unused Definitions
| Name |
File |
Line |
get_completed_milestones |
src/buildteam/milestone.py |
L190 |
get_current_milestone_progress |
src/buildteam/milestone.py |
L201 |
has_unexpanded_stories_in_file |
src/buildteam/milestone.py |
L227 |
count_unstarted_milestones_in_file |
src/buildteam/milestone.py |
L240 |
get_tasks_per_milestone |
src/buildteam/milestone.py |
L248 |
get_completed_milestones_from_dir |
src/buildteam/milestone.py |
L417 |
ALLOWED_MODELS |
src/buildteam/utils.py |
L124 |
has_unchecked_items |
src/buildteam/utils.py |
L449 |
count_open_items_in_dir |
src/buildteam/utils.py |
L471 |
count_partitioned_open_items |
src/buildteam/utils.py |
L490 |
Note: Dead code detection is intra-file only. These definitions may
be imported by other modules. Verify before removing.
Recommendations
- Extract helper functions from oversized functions
- Use early returns to flatten deep nesting
- Split large files by extracting related helpers into new modules
- Reduce complexity by extracting conditional branches into named helpers
- Group related parameters into dataclasses or typed dicts
- Add type annotations to public function signatures
- Remove unused definitions to reduce context waste for agents
- Flatten directory structure to keep related files easy to discover
Last updated: 2026-03-04T03:08:16.028Z
Code Health Check: 86 issues found
This is an automated report from the code health checker.
The codebase guidelines recommend small, single-purpose functions
with flat control flow for agent-maintained code.
40 hard violations (must fix) and 46 advisory (reviewer judgment).
Oversized Functions (advisory: >40 lines, hard: >60 lines)
buildmerge_milestone_to_mainplananalyze_source_validate_milestonego_print_validation_summarystatus_run_issue_builder_loop_launch_agents_and_buildparse_journeysrun_deterministic_checks_watch_builder_branchcheck_backlog_qualitycheck_first_milestoneclaim_next_story_review_branch_commitscheck_story_ordering_scaffold_project_review_milestonecheck_dependency_graphrun_ordering_check_check_remaining_work_stream_with_idle_timeout_check_required_toolsvalidateloopunclaim_storyget_builder_status_summaryrun_copilot_review_remaining_after_mergemark_story_completedgit_push_with_retry_resolve_merge_conflicts_with_copilotresolve_agent_modelsis_builder_doneOversized Files (advisory: >300 lines, hard: >500 lines)
Excessive Nesting (advisory: >4 levels, hard: >6 levels)
merge_milestone_to_main_bootstrap_new_projectrun_deterministic_checksbuildare_other_builders_doneis_builder_doneget_builder_status_summarylist_open_issues_for_milestones_print_validation_summaryHigh Cyclomatic Complexity (advisory: >10, hard: >15)
build_print_validation_summarymerge_milestone_to_mainrun_deterministic_checksstatusplancheck_dependency_graphcheck_first_milestonecheck_story_ordering_watch_builder_branchparse_journeysToo Many Parameters (advisory: >7, hard: >10)
goresolve_agent_models_bootstrap_new_project_resume_existing_projectMissing Type Annotations
measure_function_sizemeasure_nesting_depthmeasure_cyclomatic_complexitycount_parametersget_function_namefind_functionsPotentially Unused Definitions
get_completed_milestonesget_current_milestone_progresshas_unexpanded_stories_in_filecount_unstarted_milestones_in_fileget_tasks_per_milestoneget_completed_milestones_from_dirALLOWED_MODELShas_unchecked_itemscount_open_items_in_dircount_partitioned_open_itemsNote: Dead code detection is intra-file only. These definitions may
be imported by other modules. Verify before removing.
Recommendations
Last updated: 2026-03-04T03:08:16.028Z