NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev
A CLI tool and Dart library for static architecture analysis, Clean Architecture layer governance, circular dependency metrics, and graph visualization.
Latest stable
1.14.1
Last release 12 days ago
10 Nov 2026
Release timing varies
gaps range from 8 days to 2 months
Nearly every release is documented
notes for 22 of 22 stable releases
Nothing withdrawn
no release was ever pulled
3 months old
22 releases · first in 2026
Drag across the ruler to compare, or tap a release to open it.
Fix: links that arch_guard writes now open a page section that exists. The # Reference: line in an arch_guard.yaml generated by arch_guard init, and t
# Reference: line in an arch_guard.yaml generated by arch_guard init, and the help link of each SARIF rule, pointed at a README heading that was renamed. They now open the matching section of the docs site: layer, forbidden-package, metric, workspace and cycle-size rules link to their part of the configuration page, and circular-dependency links to Fix a cycle in the CLI reference. Configs generated earlier keep the old comment; nothing else changes.New: `arch_guard affected`. arch_guard affected --since origin/main prints the test files that the branch's changes can affect, one per line, so you c
Your coding agent can read these notes before it upgrades. Set up the MCP server →
One column per month.
arch_guard affected. arch_guard affected --since origin/main prints the test files that the branch's changes can affect, one per line, so you can run only those: t=$(arch_guard affected --since origin/main); [ -n "$t" ] && dart test $t. It scans lib/, test/ and integration_test/ of the root and each workspace member, and walks imports, exports and part directives backwards from each changed file, including ignored and conditional imports. A deleted, renamed or generated file (*.g.dart, *.mocks.dart) affects the files that import it. Tests in a workspace root without lib/ are scanned too. A changed pubspec.yaml or pubspec.lock affects its whole package (the root one affects everything). --print files and --print packages list affected files or package names instead (melos exec --scope=...). --json prints all lists. Changed non-Dart files are listed in a note on stderr. With nothing affected, stdout is empty and stderr says No affected tests. Exits 0, or 2 when git fails, or 64 without --since.arch_guard why. arch_guard why lib/domain flutter prints the shortest import path from a file or folder to a file, folder or package, one file:line import target line per step. Arguments can be a file, a folder, a file name that matches one file, package:x, a bare package name or dart:io. A package: URI into the project's own packages (package:app/data/api.dart) names those files. With no path it prints No import path from ... to .... and exits 1, so CI can assert that a path never appears. An unknown or ambiguous argument exits 64.--since sees renames. A file renamed on the branch now counts as changed under its old path too.--watch now rejects every subcommand (init, affected, why) with exit 64.Library: ProjectScanner.memberScanDirs, AffectedFiles, AffectedResult, ImportPath, ImportStep, PathTarget, FileTarget, PackageTarget.
New: `--watch`. arch_guard --watch runs the check, then runs it again whenever a scanned .dart file, arch_guard.yaml, a pubspec.yaml or the baseline c
--watch. arch_guard --watch runs the check, then runs it again whenever a scanned .dart file, arch_guard.yaml, a pubspec.yaml or the baseline changes, until Ctrl+C. Adding, moving, renaming or deleting a folder of Dart files counts too. Changes under build/ and dot folders (.dart_tool, .git) are ignored, so reports written into the project don't trigger a loop. Rapid saves are merged into one run (300 ms debounce), and a change during a run causes one more run after it. All other flags work as usual. It cannot be combined with --update-baseline, --explain or init (exit 64). Ctrl+C exits 0.Binaries for Linux, macOS and Windows are attached, with SHA256SUMS.txt. Install from pub.dev: dart pub global activate arch_guard 1.13.0.
Faster runs on large projects. A full run is 10–40% faster: 5,000 files went from 0.66 s to 0.40 s, and a 200-package workspace with 20,000 files from
ProjectScanner.excludeMatcher.unused_files: to the config to list scanned files that no entry point reaches through imports, exports or part directives, directly or indirectly. A group of files that only import each other is reported too. Entry points are lib/main.dart and lib/main_*.dart, bin/, test/, integration_test/, tool/, example/, *_test.dart and each package's lib/<name>.dart, in the root and in each workspace member, plus any globs under entry_points:. With fail: true unused files fail the run, otherwise they are only listed. A baseline records them, so only new unused files fail. With --since, only changed files are reported. When no file is an entry point, you get a warning instead of a list of every file. Reported in the terminal, JSON (unusedFiles), SARIF (rule unused-file) and Markdown. Off by default. It adds about 2 ms per 1,000 files. Library: UnusedFiles, ArchAnalysis.unusedFiles, newUnusedFiles, ArchGuardConfig.unusedFilesEnabled, unusedFileEntryPoints, failOnUnusedFiles, Baseline.unusedFiles, BaselineComparison.newUnusedFiles, knownUnusedFiles, fixedUnusedFileCount, SarifExporter.unusedFileRule.docs: add CLAUDE.md for Claude Code by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/25
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.10.1...v1.11.0
// ignore: arch_guard_lint/<code>. An import silenced in the IDE with // ignore: arch_guard_lint/layer_violation, forbidden_package or circular_dependency (or // ignore_for_file:) is now also left out by the CLI, CI and expectArchitecture(). Before, the IDE stayed quiet while CI still failed. The comment works as in the analyzer: alone on its line it applies to the next line, after code it applies to its own line. An ignore on an import of a barrel also hides the violation reported through it. In a conditional import, a comment above an if (...) 'uri' line applies to that URI, matching where the IDE reports it. An ignored circular_dependency import is left out of cycle detection, the Suggested fix: hint and --explain, but still appears in the JSON and graph exports. Library: IgnoreComments, GraphEdge.ignored, PackageImport.ignored, DependencyGraph.edges, ExtractedDirective.uriLine.docs(ai): set up arch_guard with an AI coding agent by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/23
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.10.0...v1.10.1
./ or a trailing slash now match. A root pubspec.yaml listing workspace: [./packages/a, packages/b/] skipped those members, so the scan found 0 files and reported no cycles. Entries are now normalized before matching.Warning: No Dart files were scanned. ... with the likely causes: run from the wrong folder, or members outside packages/ or apps/ that are not listed under workspace:. Before, it reported 0 cycles and passed silently.v1.10.1 Latest Marketplace
Latest
Marketplace
Compare
feat(layers): see through barrels, flag platform-only cycles (1.10.0) by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/22
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.9.2...v1.10.0
lib/exports.dart with export 'data/dto.dart';), the import is now checked against what the barrel re-exports. Chains of such barrels are followed. Before, the barrel was skipped, so domain -> exports.dart -> data passed. The violation reads ... -> [data] lib/data/dto.dart (via lib/exports.dart). With --since, a change to the barrel also reports it. Library: LayerViolation.via, viaSuffix; LayerValidator.checker takes via.Platform-specific (only through conditional imports: if (dart.library.io)) in the terminal, Markdown, SARIF and JSON (platformConditions). It still counts as a cycle. Edges from conditional imports carry their condition in the JSON export. Library: GraphEdge.condition, ExtractedDirective.condition, Cycle.platformConditions, isPlatformSpecific, platformNote.feat(baseline): flag shrunk cycles and dropped metrics (1.9.2) by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/21
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.9.1...v1.9.2
N cycle group(s) shrank / N metric value(s) dropped since the baseline. Run with --update-baseline to lock this in. in the terminal and Markdown report. Before, only problems that disappeared entirely were reported, so a shrunk cycle could quietly grow back to its saved size. Library: BaselineComparison.shrunkCycleCount, improvedMetricCount, improvements.feat(baseline): explain why a cycle is new (1.9.1) by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/20
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.9.0...v1.9.1
grew from a known 3-file cycle, adding lib/d.dart, merges 2 known cycles, or none of its files is in a baseline cycle. Library: BaselineComparison.newCycleReasons.a -> b -> c -> a, adding a -> c still passes. A test pins this down.ci: run the full matrix on PRs only, trim the OS x SDK matrix, cancel superseded runs, skip docs-only changes by @creatorpiyush in https://github.com/
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.8.0...v1.9.0
init handles hybrid layouts. When it picks riverpod or clean_architecture and also finds bloc/ or cubit/ folders, the generated config adds a bloc layer that may import what presentation may, and lets presentation import it. A bloc that imports UI code is still a violation. Library: LayoutDetection.blocFolders.fix(arch_guard_lint): check conditional import URIs, refresh on dep_graph by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/16
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.7.1...v1.8.0
ProjectScanner.scanSources(). Builds a ScanResult from in-memory file contents instead of the file system. The arch_guard_lint 0.2.0 plugin uses it for live cycle warnings that include unsaved editor changes.Fix/since output and config edge cases by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/15
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.7.0...v1.7.1
--since output:
pubspec.yaml, assets…). ArchAnalysis.changedFiles itself now holds only scanned files too, so deleted and non-Dart files are no longer in it. Filtering is unchanged.--since, the export now records since and changedFiles.--since now says it needs git 2.30+ instead of showing git's raw error.--no-workspace with workspace_rules now says the rules are ignored because of the flag, not that the project isn't a workspace.metrics: hotspots alone: a config with only hotspots (no limits) now lists the most coupled files in the terminal. New: ArchGuardConfig.metricsConfigured.workspace_rules: a rule whose allowed entries are all invalid globs is now skipped with a warning, so that member is unrestricted until the globs are fixed. Before, it silently forbade every import. An explicit allowed: [] still means "no other members".docs(arch_guard_lint): add example and library docs for full pub point by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/13
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.6.0...v1.7.0
scc.suggestedBreak). Library: CycleBreaker, CycleBreak.--since <git-ref>. Reports (and fails on) only problems touching files changed since the merge base with a ref, plus uncommitted and untracked files, while still analysing the whole project. Baseline "fixed" counts stay accurate. Also available as expectArchitecture(since:) and ArchAnalysis.run(since:). Needs full history in CI (fetch-depth: 0).example/example.md (pub.dev's Example tab) links to small projects in example/cases/: cycles, layers, presets, forbidden packages, metrics, workspace rules, baselines, --since, architecture tests and reports. Each README has the config, the command and its real output. example/example.dart covers the library API. The CLI and testing docs gain --since and cycle-fix recipes.ci: publish arch_guard_lint to pub.dev on arch_guard_lint-v* tags by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/11
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.5.0...v1.6.0
metrics: max_fan_out / max_fan_in fail the run when a file imports, or is imported by, too many project files. Baselines ratchet: a known file that gets worse fails again. Reports list the most coupled files (hotspots, default 10) in Markdown and JSON, and in the terminal when limits are set. SARIF rule metric-limit. Library: FileMetrics, MetricValidator.workspace_rules. In a Dart workspace or packages//apps/ monorepo, declare which members may import which (apps/* → packages/*, never the reverse). Violations point at the import line, fail the run, and work with baselines, SARIF (workspace-dependency), Markdown and JSON. Library: WorkspaceValidator, WorkspaceViolation, ScanResult.packages.metricViolations and workspaceViolations lists. Older baselines still load.Feat/forbidden packages test helpers ide plugin by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/10
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.4.1...v1.5.0
forbidden_packages. Rule out packages and core libraries for the whole project (top-level key) or per layer (e.g. domain may not import flutter or dart:io). Entries are package names or globs (firebase_*). Violations fail the run, point at the import line, and work with baselines, SARIF (forbidden-package rule), Markdown and JSON reports.PackageValidator, PackageViolation, PackageImport and ScanResult.packageImports; LayerValidator.layerResolver() is now public.packageViolations list. Older baselines still load.arch_guard.yaml (ignore, layer patterns, forbidden_packages) are reported as warnings and skipped instead of crashing the run. defaultExcludePatterns is now exported.expectArchitecture() in package:arch_guard/testing.dart runs the same checks as the CLI inside dart test / flutter test and fails with a readable list of problems. Works with any test runner; no extra dependencies.ArchAnalysis.run() runs a full analysis (scan, cycles, layer and package rules, baseline) in one call; the CLI now uses it.ArchGuardConfig.loadWith() loads configuration through a custom file reader, and LayerValidator.checker() checks a single import. Both are used by the new arch_guard_lint analyzer plugin.docs: documentation site, README refresh, API docs and community files (v1.4.1) by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.4.0...v1.4.1
arch_guard instead of the old "Dependency Graph Visualizer" name.pubspec.yaml links the documentation and issue tracker.feat: arch_guard init, layer presets and actionable violation messages (v1.4.0) by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.3.0...v1.4.0
arch_guard init. Detects the project layout (Clean Architecture, Riverpod, Bloc or feature-first folders), writes a starter arch_guard.yaml, and previews the first scan: files per layer, violations, cycles, and the suggested next step. Options: --preset <name|auto|none>, --dry-run, --force.preset: clean_architecture | feature_first | bloc | riverpod in the config expands to predefined layers. Entries under layers: override a preset layer key by key (for example only allowed_imports) or add new layers. feature_first discovers features from lib/features/* (or lib/modules/*) on every run, so each feature may import only itself and shared code.Rule: `presentation` may only import `core`, `domain`, `presentation`.) and the output ends with how to fix it. SARIF and Markdown reports include the rule too; LayerViolation gains allowedImports, rule and suggestion, and the JSON report includes allowedImports.ArchGuardConfig.parse() reads configuration from a string; LayerCoverage.layerFileCounts counts files per layer; LayerPresets and LayoutDetector are exported.arch_guard init now prints the init usage instead of the main one.feat: baselines, SARIF and Markdown reports, GitHub Action and pre-commit hook (v1.3.0) by @creatorpiyush in https://github.com/creatorpiyush/arch_gua
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.2.1...v1.3.0
--update-baseline records today's circular dependencies and layer violations in arch_guard_baseline.json. When that file exists, later runs fail only on new problems: a known cycle may shrink, but one that grows or merges with another counts as new. Fixed entries are reported so the baseline can be tightened. Use --baseline <path> for a different location. Library users get Baseline and BaselineComparison.-f sarif) writes arch_guard.sarif (SARIF 2.1.0) for GitHub Code Scanning, Azure DevOps and SARIF viewers in IDEs. Results point at the offending import line, use paths relative to the git repository root, and carry baselineState when a baseline is in use.-f markdown) writes arch_guard_report.md: new problems first, then a collapsible Mermaid graph of the cycles. Ready for PR comments and CI job summaries.uses: creatorpiyush/arch_guard@v1.3.0 downloads the checksum-verified release binary, writes the Markdown summary to the job summary, keeps one up-to-date PR comment, and can upload SARIF to Code Scanning..pre-commit-hooks.yaml, and the README has recipes for pre-commit, lefthook and plain git hooks.--version flag and the packageVersion constant.LayerViolation.line, GraphEdge.line, ExtractedDirective.line); the JSON report includes it.-f all now also writes the SARIF and Markdown reports.plan.md, IDE files, build/) are no longer included in the published package.chore: release v1.2.1 - lower SDK floor to 3.8, cross-platform CI, standalone release binaries by @creatorpiyush in https://github.com/creatorpiyush/a
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.2.0...v1.2.1
arch_guard as a dev dependency.SHA256SUMS.txt, so CI pipelines can run arch_guard without installing the Dart SDK..metadata file from the repository.Fix/scan scope and workspace discovery by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/5
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.1.3...v1.2.0
--scan-dir was ignored whenever workspace discovery was on (the default). A single-package project is no longer treated as a workspace, and in workspace mode the root package honours --scan-dir.workspace: list, only packages/ and apps/ are searched, and example/, test/ and tool/ packages are skipped. Previously example/ apps and test fixtures were scanned and could report false cycles. Monorepos with other layouts should declare a workspace: list.max_scc_size is enforced: any circular-dependency group larger than the limit fails the run (exit code 1), even with --no-fail-on-cycle.allowed_imports naming unknown layers, layers that match no files, files that belong to no layer, and unreadable source files are now reported on stderr instead of being silently ignored. LayerValidator.coverage(), ArchGuardConfig.warnings and ScanResult.skippedFiles expose the same data to library users.part directives produce library -> part edges (type part, drawn dotted in DOT/Mermaid/HTML); FileNode.parts lists them.// or /* inside URIs or comments, nested block comments, annotations and import-like text inside later string literals no longer cause wrong results.<, > and & in the embedded JSON.DepGraphConfig is now ArchGuardConfig (the old name remains as a deprecated alias). The legacy dep_graph.yaml file and dep_graph_visualizer: pubspec key still work but emit a deprecation warning; the example now uses arch_guard.yaml.example/sample_project/build/.feat: update the package name to make it more explicit by @creatorpiyush in https://github.com/creatorpiyush/arch_guard/pull/3
Full Changelog: https://github.com/creatorpiyush/arch_guard/compare/v1.1.2...v1.1.3
LayerValidator): Layer glob patterns such as lib/domain/** were silently never matching workspace-prefixed file paths (e.g. packages/auth_pkg/lib/domain/entity.dart). The validator now also tests the lib/… suffix of each path, making single-package and workspace arch_guard.yaml configs interchangeable with no user-side changes required.ImportReader.resolveUri): p.normalize(p.join(…)) could produce backslash-separated paths on Windows, causing all resolved edge targets to silently miss the forward-slash-keyed filesMap and disappear from the graph. All three return paths now force / separators.TextReporter): The Workspace Pkgs: line was missing a space before the count, producing misaligned output (e.g. Workspace Pkgs:3 instead of Workspace Pkgs: 3).feat(exporter): add offline vis-network bundling and mermaid ID sanitization by @creatorpiyush in https://github.com/creatorpiyush/dep_graph_visualize
Full Changelog: https://github.com/creatorpiyush/dep_graph_visualizer/compare/v1.1.1...v1.1.2
--offline HTML Support: Inlined Base64-encoded vis-network.min.js (v10.1.0 UMD) asset and system font fallbacks when --offline flag is specified.stabilizationIterationsDone event listener to freeze Vis-Network force calculation after stabilization to eliminate CPU background spin.a-b.dart vs a_b.dart) and quote label sanitization (#quot;).THIRD_PARTY_NOTICES.md for bundled vis-network Apache-2.0/MIT software licensing.