Skip to content

enhancement: surface full circular dependency cycle chains in context bomb #72

@claude

Description

@claude

Currently the circular dependency cycle count is stored in Stats.CircularDependencyCycles (cmd/run.go:302) but the actual cycle chains from CircularDependencyResponse.Cycles are discarded. The context bomb only shows a count warning like 2 circular dependency cycles detected without identifying which files form the cycles.

This means developers cannot act on the warning without running a separate tool to find the cycles.

Request: Store the []CircularDependencyCycle slice in ProjectGraph (alongside the existing count in Stats) and surface the specific cycle paths in the context bomb template. The data is already fetched from the API via GetCircularDependencies it just needs to be preserved through to the rendered output.

Relevant files:

  • internal/api/client.go: CircularDependencyResponse and CircularDependencyCycle types are already defined
  • cmd/run.go line 302: only len(cr.circDeps.Cycles) is stored
  • internal/api/client.go ProjectGraph struct: add a Cycles field
  • internal/template/render.go: surface cycles in the template

@claude please implement this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions