Skip to content

feat(core): compressed agent format with tiered auto-scaling#10

Merged
Schr0d merged 18 commits into
mainfrom
feature/agent-format-compression
Apr 16, 2026
Merged

feat(core): compressed agent format with tiered auto-scaling#10
Schr0d merged 18 commits into
mainfrom
feature/agent-format-compression

Conversation

@Schr0d

@Schr0d Schr0d commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Compressed agent format: --format agent now outputs indexed JSON instead of named fields. Node format: [id, domainIdx, pageRank*10000, risk, bridge, hotspot]. Edge format: [srcIdx, tgtIdx].
  • Tiered auto-scaling: Tier 1 (<200 nodes, full graph ~9KB), Tier 2 (200-500, summary + hotspots ~5KB), Tier 3 (500+, capped with --target hint).
  • Progress silenced for machine output: --format agent and --json no longer emit progress lines to stdout.
  • SKILL.md updated with compressed format specification for AI agents.

Also includes all prior work from feature/spring-di-post-processor (SpringDIPostProcessor, command consolidation, bug fixes) that hasn't been merged yet.

Test Coverage

All 33 Gradle tasks pass. New tests in AgentOutputFormatterTest:

  • Tier 1 basic graph produces valid JSON
  • Node/edge format validation
  • Empty graph, null domain map, no ANSI codes
  • Blind spots grouped by type
  • Cycles as arrays
  • Tier 2 boundary (210 nodes), Tier 3 boundary (510 nodes)
  • Tier 1 size under 15KB for 50-node graph

Test plan

  • ./gradlew test — BUILD SUCCESSFUL, 33 tasks
  • --format agent produces valid JSON (no text pollution)
  • 98-node self-analysis: output is valid Tier 1 JSON

🤖 Generated with Claude Code

Schr0d and others added 18 commits April 15, 2026 20:04
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ge discovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aph rebuild

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n/Gradle auto-detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… Spring DI

Uses ArchUnit ClassFileImporter to scan compiled .class files for Spring DI
patterns: @Autowired fields, @resource fields, and constructor injection.
Resolves interface types to concrete @Component/@Service/@repository
implementations and reports ambiguous injections as blind spots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ctor test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e --target

Remove check, ecp, view commands. Impact analysis now via analyze --target.
EcpGenerator stub removed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update AnalyzeCommand description to mention impact assessment
- README/README-zh: remove view/impact/check/ecp references, update
  CLI to analyze+diff only, remove archon-viz from architecture, add
  v0.7 to roadmap, update blind spots (Spring DI now detected)
- CHANGELOG: add v0.7.1.0 entry for SpringDIPostProcessor + command slash
- skill.md/SKILL.md: replace view --format json with analyze --format
  agent, remove Spring DI from blind spots lists
- TODOS: mark #4/#6/#8 DONE, mark #5/#7 OBSOLETE, update remaining
  items to reflect current state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix CliGitAdapter pipe buffer deadlock: drain output stream
  concurrently with waitFor() to prevent 60s hangs on large git show
- Add logback.xml to suppress ArchUnit/Javaparser DEBUG logging
- Cap unbounded module listing in analyze --target (max 20 shown)
- Add 5 tests for resolveTarget/stripNamespacePrefix (replaced
  deleted ImpactCommandTest coverage)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ViewCommand was removed from ArchonCli in the CLI consolidation but the
class and its dependency tree were left behind. Removed:
- ViewCommand, ViewCommandTest (dead CLI entry point)
- TerminalRenderer, TerminalRendererTest (only used by ViewCommand)
- PerspectiveBuilder, PerspectiveBuilderTest (unused visualization)
- NodeGroup, NodeView, EdgeView, PerspectiveView (internal to above)

Kept: JsonSerializer, DiffSerializer, ViewServer (used by analyze/diff)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Moved --json output handling before agent format auto-detection so JSON
output short-circuits cleanly instead of printing after the human-readable
summary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrites AgentOutputFormatter from text to compressed indexed JSON.
Nodes as [id, domainIdx, pageRank*10000, risk, bridge, hotspot].
Edges as [srcIdx, tgtIdx] integer pairs. Tiered by node count:
Tier 1 (<200): full graph ~9KB. Tier 2 (200-500): summary ~5KB.
Tier 3 (500+): capped with --target hint.

Also silences progress output to stderr when --format agent or --json
is active, and updates SKILL.md with format specification for AI agents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Schr0d Schr0d merged commit 0b5c566 into main Apr 16, 2026
1 check passed
@Schr0d Schr0d deleted the feature/agent-format-compression branch April 16, 2026 03:48
@Schr0d Schr0d mentioned this pull request Apr 16, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant