Skip to content

0.3.1

Choose a tag to compare

@snaga snaga released this 21 Oct 14:28
· 14 commits to main since this release

AST-Digger v0.3.1 Release Notes

AST-Digger v0.3.1 introduces Semantic Change Impact Analysis, Docstring Auditing, and Intent Verification (change-impact)! 🎉
AI coding agents and developers can now evaluate code modifications by AST syntax statements and cyclomatic complexity deltas (eliminating false positives from comments or blank lines), audit docstring completeness on changed symbols, and receive repository-agnostic advisories for documentation and ADR synchronization with built-in self-healing guardrails.


✨ What's New

  • 🔍 Semantic Change Impact & Intent Verification (change-impact):

    • AST Statement & Cyclomatic Complexity Deltas:
      • Implemented AST-aware statement counting and branching complexity analysis (internal/impact/analyzer.go) across Golang, Python, TypeScript, Rust, Java, and SQL.
      • Classifies change scale into 4 semantic tiers (MINOR, MODERATE, SIGNIFICANT, EXTREME).
    • Diff-Aware Symbol Extraction & Docstring Auditing:
      • Maps modified lines from git unified diff to AST symbols (internal/impact/symbols.go), identifying added, modified, and deleted symbols.
      • Safely excludes deleted symbols from docstring auditing and audits docstring coverage according to visibility (public / private) and scope (--require-doc=exported|all|none).
    • Repository-Agnostic Documentation Advisories:
      • Analyzes module boundaries and cross-cutting changes (internal/impact/advisory.go) to generate contextual advisories (documentation_advisory), reminding agents to update architecture decision records (ADR) or module-level specifications without assuming specific file conventions.
    • Self-Healing Guardrails for AI Agents:
      • Added --max-statements <N> and --fail-on-missing-doc guardrails returning exit code 2 on violations.
      • Engineered a "report-first" design: complete text or JSON reports are streamed to stdout before exiting with code 2, empowering AI agents to inspect missing docstrings or oversized modules and self-correct autonomously.
    • Agent-Native Structured JSON:
      • Full JSON output support (--json) conforming to the ChangeImpactReport schema for CI/CD and multi-agent pipelines.
  • ⚡ Zero-Disk-IO In-Memory Parsing:

    • Extended internal/parser.Parser interface with ParseBytes(source []byte, filePath string) across all supported language parsers.
    • Git tree objects (git show base:file) and working tree buffers are parsed directly in memory without writing temporary files to disk.
    • Added unified parser factory internal/parser.ForPath.
  • 🏛️ Architecture Decision Record (ADR):

    • Recorded ADR-0006: doc/adr/0006-semantic-change-impact-and-intent-verification.md formalizing the semantic impact analysis architecture, AST delta heuristics, and report-first guardrail design.

🌐 CLI & Agent-Context Integration

  • Registered change-impact into agent-context live command discovery (CLI now offers 9 full-featured subcommands).
  • Updated README.md and SKILL.md with detailed command syntax, guardrail examples, JSON schema samples, and the 6-step agent workflow.