Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reports

Boundary produces reports in three formats: plain text (default), JSON, and Markdown.

boundary analyze . --format text      # default — coloured terminal output
boundary analyze . --format json      # machine-readable
boundary analyze . --format markdown  # suitable for wikis and PR comments

Markdown Format

The Markdown report is designed to be pasted into GitHub PR descriptions, wikis, Confluence pages, or any Markdown renderer. Every section that has data is rendered; sections with no data are omitted.

boundary analyze . --format markdown
boundary analyze . --format markdown > architecture.md

Sections

Scores

Overall architecture score and each sub-dimension, rendered as a table.

## Scores

| Metric                  | Score        |
|-------------------------|--------------|
| **Overall**             | **78.0/100** |
| Structural Presence     | 100.0/100    |
| Layer Conformance       | 85.0/100     |
| Dependency Compliance   | 72.0/100     |
| Interface Coverage      | 60.0/100     |

Summary

Total component and dependency counts.

Metrics

Components by layer, components by kind, dependency depth, and classification coverage.

Package Metrics

Robert C. Martin’s package-level coupling metrics — Instability (I), Abstractness (A), and Distance from the main sequence (D) — for each package in the project.

## Package Metrics

| Package        | A    | I    | D    | Zone        |
|----------------|------|------|------|-------------|
| domain         | 0.50 | 0.00 | 0.50 | —           |
| application    | 0.00 | 1.00 | 0.00 | —           |
| infrastructure | 0.00 | 1.00 | 0.00 | —           |
| common         | 0.00 | 0.00 | 1.00 | ⚠ Pain      |

The Zone column is populated when a package is far from the main sequence (D > 0.5):

ZoneConditionMeaning
⚠ PainA < 0.5 and I < 0.5Concrete and stable — rigid, hard to change
⚠ UselessnessA > 0.5 and I > 0.5Abstract and unstable — unused abstractions
otherwiseOn or near the main sequence

See scoring concepts for the full metric definitions.

Pattern Detection

The detected architectural pattern and confidence scores for all five patterns.

## Pattern Detection

Top Pattern: **ddd-hexagonal** (78% confidence)

| Pattern        | Confidence |
|----------------|------------|
| ddd-hexagonal  | 78%        |
| service-layer  | 35%        |
| anemic-domain  | 20%        |
| flat-crud      | 5%         |
| active-record  | 0%         |

Confidence values are independent — they do not sum to 100%. A codebase in transition may show meaningful confidence for multiple patterns simultaneously.

Violations

All violations in a table, with rule ID, severity, rule name, location, and message.

| Rule | Severity | Name | Location | Message |
|------|----------|------|----------|---------|
| L001 | ERROR | domain-depends-on-infrastructure | domain/user.go:10 | Domain depends on infra |
| PA001 | WARN | missing-port-interface | infrastructure/repo.go:5 | No matching port |

See Rules & Rule IDs for the full rule catalog.


JSON Format

JSON output includes every field, suitable for programmatic processing, dashboards, or saving snapshots.

boundary analyze . --format json | jq '.score.overall'
boundary analyze . --format json | jq '.violations[] | select(.severity == "error")'
boundary analyze . --format json | jq '.package_metrics[] | select(.zone != null)'

Top-level fields in the JSON output:

FieldDescription
scoreArchitecture score dimensions (omitted if pattern confidence < 0.5)
violationsArray of all violations
component_countTotal number of real components
dependency_countTotal number of dependency edges
files_analyzedNumber of source files analyzed
metricsDetailed metrics breakdown
package_metricsArray of per-package A/I/D metrics
pattern_detectionPattern confidence distribution

Each violation object includes:

FieldDescription
ruleStable rule ID (e.g. L001, PA001, D001)
rule_nameHuman-readable rule name (e.g. domain-depends-on-infrastructure)
kindViolation kind with structured details
severityerror, warning, or info
locationFile path, line, and column
messageHuman-readable description
suggestionFix suggestion (when available)

Filter violations by rule ID with jq:

boundary analyze . --format json | jq '.violations[] | select(.rule == "L001")'

Text Format

The default terminal output with colour highlighting. Designed for developer workflows and CI log readability.

boundary analyze .         # coloured output
boundary analyze . --compact  # single-line JSON, no colour (useful for piping)