Skip to content

Enhance: codebase-guardian - Dependency graphs & boundary checks #7

@spences10

Description

@spences10

Summary

Add dependency visualization and boundary enforcement to existing devops tooling. Could extend techdebt-finder or be new skill.

Problem

  • Vibe coding causes dependency leakage
  • No visual way to understand control flow
  • Architecture drift goes unnoticed
  • Build warnings pollute agent context

Proposed Addition

Name: codebase-guardian
Plugin: devops-skills
Triggers: "dependency graph", "package boundaries", "architecture drift", "zero warnings"

Core Content

Dependency Graph Visualization

Build SVG diagrams of codebase dependencies:

  • ~500 lines, diffable
  • Pass to agents as image OR diff
  • Catch dependency leaks in PRs
# Example: Check dependency changes
git diff dependency-graph.svg

Tools: graphviz, d3, mermaid

Pre-commit Boundary Hooks

// Example: compiler packages can only be imported by specific modules
if (isCompilerPackage(source)) {
  allowImports(['compiler/*', 'lsp/*', 'core-project'])
} else {
  denyImports(['compiler/*'])  // CI error
}

Zero-Warning Enforcement

# Treat warnings as errors
tsc --noEmitOnError
cargo build --deny warnings
eslint --max-warnings 0

Why: Every warning = context bloat for agents

Integration with Agents

  • SVG is diffable → show Claude the dependency diff
  • SVG as image → Claude can "see" architecture
  • Pre-commit blocks bad patterns before agent sees them

Relationship to Existing

Could be:

  1. New skill in devops-skills
  2. Extension to techdebt-finder (add --dependencies flag)
  3. References added to existing skills

References

  • [rework/04-team-practices.md] - Vibov's dependency graph approach

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions