Skip to main content
Glama

Architecture Viewer

AI 写完代码后,查看结构变化与风险提示,由工程师确认后提交。

本地版交付边界: 本轮结构变更报告、可定位源码的结构总览,以及人工核实的风险提示。六视图降为兼容功能,不再是默认交付或卖点。绿灯不保证没有漏报;分析不完整不是通过。支持范围、离线模式与已知局限见随包交付的 首发交付范围。AI 精修、扩展、多仓和 SaaS 不在首发质量承诺内。

当前试点版:0.12.2-rc.3(npm 标签 nextlatest 仍为 0.12.1)。 接入请钉 arch-viewer@0.12.2-rc.3@next,不要与工作区源码或 latest 混用。源提交 81e6c43;发布记录见 docs/commercial/npm-publish.md。这是有明确边界的本地试点候选,不是稳定商用版。

装一次 → 说话改代码 → 对话看灯 → git commit。 CLI / MCP / 网页 / PR 评论四端可用。免费开源(Apache-2.0),零配置、秒级出图,不依赖 LLM。

定位:AI 改码后的增量架构验收门,不是全量架构治理平台。

能力边界(先说清楚不做什么)

  • 不判断业务逻辑正确性——不替代测试、类型检查、安全审查或人工 Code Review。

  • 不做全量架构治理——需要组织级架构看板、Git 历史热点、多仓聚合时看 Sonargraph / CodeScene。

  • 不做 AI 泛审查——不审查代码风格、性能、安全漏洞;只做可复核的结构事实:本轮改了哪些实体、有没有跨层违规、波及谁。

与其他工具的关系

工具

它做什么

和 AV 的关系

dependency-cruiser(开源)

JS/TS 架构规则、违规基线、--affected 影响范围

免费替代,部分重叠——depcruise 已覆盖"本轮影响谁"的核心需求;AV 的差异在多语言、会话内 verdict、影响面 BFS

Import Linter(开源)

Python import 契约、CI 硬阻断

免费替代,部分重叠——AV builtin 已吸收其契约评估能力

Zügel(商业)

面向 AI Agent 的 MCP 架构约束检查

直接竞品——经 MCP 检查架构约束、识别依赖环

CodeScene MCP(开源)

本地代码健康分析、提交前检查、基线对比

直接竞品——"本地 + MCP + 增量验收"组合并非 AV 独有

CodeRabbit(商业)

AI PR 审查、Agent 工作流、MCP

预算竞争——争夺同一笔工具预算(~$24/开发者/月)

Sonargraph / CodeScene(商业)

企业级全量架构治理、热点、质量门

重型替代/迁移目标——团队长大、需要正式治理流程时迁移过去

差异化假设(待验证):①接入成本低于竞品组合;②只报本轮相关、噪音低;③每条结论附路径/依赖链/规则,可人工复核;④原生在 Agent 会话内出结论,不是又一个看板。

demo

落地页(定价 / 60 秒成片 / 安装):本地 npm run webhttp://127.0.0.1:3847/ ;部署见 docs/commercial/landing-deploy.md。成片:docs/demos/demo.mp4。文档总索引:docs/README.md

English: README.en.md

新手入门:不太懂术语?先看 小白图文攻略。 接到任意新项目:装一次、说话、看灯、commit → Quickstart

实战文用 AI 自动生成架构图,还能在 PR 里抓漂移 · 60 秒 Demo 分镜

痛点:AI 编码会话一次改动几十个文件,合入前没人说得清架构到底变了什么—— 删了哪个被广泛依赖的类型?有没有跨层调用?新引入了哪些第三方包?谁会被波及? Architecture Viewer 在会话结束时给出 Before/After 架构对比和风险分级,关键结论需对照源码核实。


四种用法

1. 一键接入 AI 工具(推荐 · Cursor / Claude / DeepSeek)

npx arch-viewer setup              # 用户级 MCP
npx arch-viewer setup . --project  # 本仓 hooks + 跨宿主规则(停手时自动跑结构门)
npx arch-viewer uninstall .        # 对称卸载本仓接入(其它 MCP 不动)
# 连全局包一起卸:npx arch-viewer uninstall . --npm
# 再清会话报告/快照(仍保留 .av/layers.json):加 --purge

自动检测已安装的 AI 编程工具(Cursor、Claude、DeepSeek Harness),写入 MCP。 之后对 AI 说「改完用架构门检查一下」即可。Agent 应调用 av_guard;对话里回最多 3 行 verdict。 有 git 时对照 HEADcommit 即接受当前结构。不必先拍照、不必默认打开 HTML。 升级:先 uninstall(需要时 --npm),再装新版本后 setup / setup . --project

2. CLI 结构门(脚本 / CI / 无 MCP)

npx arch-viewer session report     # 对照 git HEAD(无 git 时用快照基线)
npx arch-viewer session guard --adapter generic   # hooks / CI 通用结构门

日常不必 session start。无 git 的仓,av_guard / session guard 会自动补快照。 完整 Before/After HTML(.av/session-report.html)是可选深挖。 高风险时退出码为 1。session report / check / diff 共用:0 通过 · 1 架构门未通过 · 2 参数配置错 · 3 扫描解析失败 · 4 基线不存在或失效。详见 Quickstart §6.3

拍照仪式(session start → 开 HTML → 再 session start)见 Quickstart 附录

3. PR 自动评论(GitHub Actions)

每个 PR 自动贴一条架构影响面评论;同一 PR 重复 push 只更新原评论,不刷屏:

# .github/workflows/architecture-diff.yml
name: Architecture Diff
on:
  pull_request:
    types: [opened, synchronize, reopened]
permissions:
  contents: read
  pull-requests: write
jobs:
  impact-comment:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - name: Checkout PR base
        run: git worktree add --detach /tmp/av-base "${{ github.event.pull_request.base.sha }}"
      - name: Post architecture impact comment
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: npx --yes arch-viewer@latest pr-comment /tmp/av-base . --post

评论内容:变更计数表、新增/移除第三方依赖清单、🔴🟠 风险发现、影响面 Top N(反向依赖)。 本仓 dogfood 工作流见 .github/workflows/architecture-diff.yml


Related MCP server: Code-Oracle

Install

npm i -g arch-viewer        # CLI 全局安装
# 或免安装直接用:npx arch-viewer <command>

要求 Node.js ≥ 18。支持语言:JavaScript / TypeScript(含 Vue、Svelte)、Python、Go、Java (tree-sitter 解析,内置六平台 prebuild,安装无需编译)。

Quick Start(30 秒)

最省事的方式(推荐)——装一次,之后只说话:

npx arch-viewer setup
# 本仓要强制停手检查:npx arch-viewer setup . --project

然后对 AI 说:「改完用架构门检查一下」。把对话里的 verdict(最多 3 行)当验收: 绿灯 → git commit(即接受);红灯 → 先修或解释,可用 av_explain_finding

无 MCP 时用 CLI:

npx arch-viewer session report .       # 对照 HEAD;加 --open 才打开对比图

不懂技术术语? 基线 = 对照物(有 git 就是 HEAD)。verdict = 对话里那几行灯。红灯 = 可能改坏了,绿灯 = 结构上没问题。详见 Quickstart 术语速查

其他常用命令:

arch-viewer extract <repo> --out graph.json      # 导出代码结构图谱
arch-viewer diff <base-dir> <head-dir> --json    # 结构 diff(JSON)
arch-viewer impact <base-dir> <head-dir>         # 影响面文本报告
arch-viewer pr-comment <base-dir> <head-dir>     # PR 评论 Markdown(--post 直接发)
arch-viewer workspace ...                         # 多仓基线管理
arch-viewer auth login [email]                    # 邮箱验证码登录(Pro 账号)
arch-viewer auth whoami                           # 查看当前登录邮箱与 Pro 状态

风险分级与影响面怎么算

  • 风险发现lib/risk-rules.js):跨层依赖违规、层级穿透(controller 直连 storage)、 类型删除(按下游数量升降级)、新增外部依赖、高扇出变更、孤儿新实体。

  • 影响面lib/impact.js):从被改实体出发,沿 import/extends/implements/calls 等 wiring 边反向 BFS(base 与 head 反向边取并集,穿透被改实体集群), 报告集群边界之外的直接/间接受害者。归属关系边(declared-in)不参与。

分层识别:零配置,也可锁定

跨层违规检测依赖「每个文件属于哪一层」。0.9 起分层由四个信号交叉推断, 不需要手写配置:

  1. .av/layers.json 用户配置(最高优先)——{ "目录名": "分层名" }

  2. import 框架语义——import 了 sqlalchemy/gorm/JpaRepository → storage, flask/express/gin/@RestController → controller,@Entity → domain 等;

  3. 目录名/文件名约定——services/*Controller.javadata_collection/ 等;

  4. 结构位置兜底——被很多模块依赖且自己不依赖别人 → domain,只出不进 → controller。

每次 session report / extract 后,推断结果会写入 .av/layers.suggested.json (按目录聚合,含置信度和判定依据;import 信号与目录名冲突的文件会单列)。 审阅没问题就不用管;想锁定或纠正,复制为 .av/layers.json 即可——它永远优先、 不会被覆盖。实测 246 文件的 Python 爬虫仓分层覆盖率从 57% 提升到 92%。

经典能力:PR 漂移红灯

新模块 / 服务 / 入口没画进六视图时 CI 失败,坏图进不了主干。 (粒度是目录与部署单元,不是每一个新文件;文件级变化看 session report。)

npx arch-viewer init .
npx arch-viewer generate .
npx arch-viewer check architecture_viewer --filled --drift --repo .   # 漂移即 exit ≠ 0
npx arch-viewer check . --rules architecture-rules.example.yaml       # 团队制图规范(命名 / 跨层 / Rel 白名单)

CI 模板:

规则写法见 architecture-rules.example.yaml:复制为仓库根或套件目录的 architecture-rules.yaml 即可;check 未传 --rules 时会自动读取该文件。

网页版(分享 / 评审)

npm run web    # http://127.0.0.1:3847 — 粘贴仓库 URL 生成六视图,/p/<id> 内联分享

新叙事落地页:docs/demos/landing-new.html(浏览器直接打开)。 新手跟做:小白图文攻略 · Quickstart §10npm run demo:beginner)。


目录

├── lib/                              # 扫描 / diff / 影响面 / 风险规则 / 报告 / 遥测(CLI · MCP · Web 共用)
│   └── pro/                          # Pro 核心:账号 / 权益 / 存储 / CLI auth client
├── src/extension*.js                 # VS Code 扩展:会话命令 + 状态栏 + Webview(暂缓)
├── scripts/build-vsix.js             # 扩展打包 vsce(暂缓)
├── scripts/pr-comment.js             # CI 评论入口(架构 diff)
├── scripts/ci-drift-action.mjs       # CI:漂移 / 规范检查 + PR 评论
├── architecture-rules.example.yaml   # 团队制图规范示例
├── web/                              # 落地页 + API + /p/<id> 分享页 + Pro 路由
├── .github/workflows/                # check 红灯 + diff 评论 + drift 规范评论
├── .gitee/workflows/                 # Gitee 等价 drift pipeline
├── templates/                        # 可复制的套件与 CI 模板
├── docs/                             # 文档(见 docs/README.md:guides / demos / commercial / plans …)
└── eval/                             # 多语言解析夹具与评测

Pro 账号

arch-viewer auth login you@example.com    # 输入邮箱,收到 6 位验证码,输入后登录
arch-viewer auth whoami                  # 查看当前登录邮箱与 Pro 状态
arch-viewer auth logout                  # 退出登录
arch-viewer pro refine                   # 云端精修(需登录;未登录会提示升级 + 定价页)
arch-viewer pro sync                     # 增量同步占位(同上)

首次登录自动建档为 7 天 Pro 试用。token 存于 ~/.config/arch-viewer/auth.json(权限 0600), 重启终端仍登录。generate / check / session / --refine(自带 Key)属 Community,永不要求登录。详见 lib/pro/README.mdCOMMERCIAL.md

隐私与遥测

CLI 遥测默认关闭,企业友好。开启方式:

export ARCH_TELEMETRY=1    # 开启
# 或设 DO_NOT_TRACK=1 永久关闭(优先级最高)

开启后仅记录:事件名(CLI 命令名)、耗时(毫秒)、退出码、CLI 版本、操作系统类型。 不记录:文件路径、代码内容、仓库名/URL、用户邮箱。数据落本地 ~/.config/arch-viewer/telemetry.log(JSONL),可随时查看或删除。

定价摘要(验证期定价)

档位

价格

要点

Community

¥0

CLI 会话门 + 自托管 Actions(漂移红灯 + PR 评论)

Pro

¥29/月

托管 PR 评论 + 本机文件夹检查 + 邮箱账号

Team

¥99/人/月

早期采用者计划,不主推——组织规范 + 门禁托管

以下数字均为验证期定价,未经付费数据支撑。详见 COMMERCIAL.md

Available Tools

8 tools
av_archify_exportA

人工确认后,把本轮结构 diff 导出为 Archify IR 稀疏图(Before/After JSON + sidecar)。默认不导出、不自动出图。必须先核对证据再传 confirm=true。scope=changed(默认)只含变更文件;过密或纯新增时降级为 layers。validate=true 时若本机有 archify 会顺带校验;返回 validation.status=validated|validate_failed|not_validated|not_requested,未校验/失败不得当成已验证成品。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。
scopeNo导出范围:changed=变更文件(默认),violations=只看违规边,layers=层摘要图
confirmNo必填为 true。表示已人工核对会话报告中的节点/边证据,同意导出讲解图。
validateNo是否顺带运行 archify validate(需要本机有 archify CLI,默认 false)

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden and does so well: it discloses the opt-in gate, the scope downgrade behavior, the optional external CLI validation, the exact validation.status outcome set, and the critical caveat that unvalidated/failed results must not be treated as verified artifacts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause and every sentence carries operational content, with little filler. It is somewhat dense as a single run-on block and could be organized more scanably, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even without an output schema, the description names the artifacts produced (Before/After JSON + sidecar) and the validation status contract, and it covers the required repo path and confirm gate. An agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all four parameters and the baseline is 3. The description adds genuine semantics beyond the schema: the density/additive condition that triggers a downgrade to layers, and the meaning of validation.status values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (export) and resource (this round's structural diff as an Archify IR sparse graph, delivered as Before/After JSON + sidecar), and its default-off behavior clearly distinguishes it from read-only siblings like av_session_report and av_status. An agent can tell what this produces without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the precondition (human must verify evidence before passing confirm=true), the default posture (no export, no auto-graphing), and the conditional route (scope=changed by default, downgrade to layers when too dense or purely additive). These are concrete when/when-not rules rather than implied guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_check_layeringA

检查当前仓库快照(不使用基线,包含历史存量,不能归因于本轮变更)。分层违规、其他结构问题、分析提示分别计数;现有依赖/体量/孤立实体另列 inventory,不算分层违规。不执行本轮变更专用规则。日常验收用 av_guard / av_session_report。返回实际运行包及分析源码摘要。完全离线。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden and does so well: it discloses the no-baseline/whole-snapshot semantics, that results are not attributable to the current change, that change-specific rules are skipped, that it is fully offline, and that it returns the actual execution bundle plus an analyzed source summary. It stops short of permission/rate-limit or failure-mode details, so not a full 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the snapshot semantics before the routing and return notes, and every clause carries information. It is dense and somewhat run-on, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema or annotations, the description is nearly complete: it covers scope, attribution caveat, excluded rules, offline behavior, return summary, and the required absolute-path argument. Minor gaps around failure behavior keep it from 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single required param, so the schema already documents 'repo'. The description only reinforces that the workspace absolute path must be passed explicitly, adding marginal meaning beyond the schema — the baseline 3 for high-coverage cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource matrix: it checks the current repository snapshot for layering violations, other structural issues, and analysis hints, and explicitly distinguishes what does not count as a violation (dependencies/size/orphan entities, listed separately in inventory). It also names siblings (av_guard / av_session_report) so an agent can tell it apart from the daily-acceptance tools without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is scoped explicitly: it does not use a baseline, includes historical backlog, and cannot be attributed to this round of changes, and it does not run change-specific rules. The description routes the agent to av_guard / av_session_report for daily acceptance, giving an explicit alternative and the condition that selects it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_explain_findingA

解释某条 finding 的结构化边证据与修复建议。默认与 av_check_layering 使用同一仓库快照口径和 findings 索引(不含 inventory)。from=session 时只读本轮报告,找不到就报错,不会静默改扫全楼。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
fromNo从会话报告取本轮红灯;报告不存在或 findings 为空时返回 NO_SESSION_FINDING,绝不改扫全楼
repoYes必填。当前工作区根目录的绝对路径。
ruleNo规则名(cross-layer-violation, layer-skip, removed-type, new-external-dep, public-surface-changed, schema-touched, invariant-broken, intent-mismatch, behavior-untested)
indexNo问题列表中的序号(从0开始)

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations the description carries the full burden, and it does disclose non-obvious behavior: the shared snapshot/index basis, session mode being read-only against the current round only, hard-error rather than silent full rescan, and repo being mandatory. It still omits what the returned evidence/fix structure looks like or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences that front-load the core action before the snapshot/session caveats and the required-parameter note. No padding, though the repo reminder is somewhat redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a finding-explanation tool with no output schema, the description covers inputs, snapshot semantics, and failure behavior adequately. A brief note on what the explanation contains would close the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description reinforces that repo must be an absolute workspace path and that from=session restricts the lookup, but both points are already stated in the schema, adding little beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (解释) and resource (某条 finding), plus what it returns conceptually — 结构化边证据与修复建议. It names av_check_layering to establish lineage, but does not sharply contrast itself with the other siblings (av_session_report, av_status), so sibling differentiation is partial.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains default behavior (same snapshot/index as av_check_layering, excluding inventory) and when the from=session path applies, including that a missing report errors instead of falling back to a full rescan. It does not explicitly tell the agent when to prefer this over av_check_layering or av_session_report.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_guardA

日常结构验收(跨 Cursor / Claude / DeepSeek Harness 等):无基线时自动 ensure,有 git 对照 HEAD,返回 ≤3 行 verdict。宣称完成前优先调这个。HTML 详情可选。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。
editDirNo可选。正在改代码的目录;与 repo 冲突时中止。
confirmRepoNo可选。确认检查 repo(当 cwd 是另一个 Git 根时)。

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose meaningful behavior: it auto-runs 'ensure' when no baseline exists, compares against git HEAD otherwise, caps output at a ≤3-line verdict, and offers optional HTML detail. It does not state whether the auto-ensure step mutates the workspace or what permissions are needed, which is a notable gap for a check that can create baselines.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the core purpose and packed into a few dense clauses with no filler. The trade-off is density – several distinct facts (baseline logic, HEAD comparison, output format, path requirement) are compressed into a single run-on span.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter check tool with no output schema, it covers the essentials: what it does, when to call it, how baselines are handled, and the shape of the return (≤3-line verdict). Missing only the side-effect/permission posture of the automatic ensure step.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters already have documentation, making 3 the baseline. The description only reiterates the required 'repo' absolute-path constraint already stated in the schema, adding no new syntax or behavioral nuance for editDir or confirmRepo.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific capability – a daily structural acceptance check ('日常结构验收') that returns a short verdict, and notes cross-harness support (Cursor/Claude/DeepSeek). The verb+resource are identifiable, though the jargon term 'structural acceptance' is abstract enough that it doesn't cleanly separate this from siblings like av_check_layering or av_status without context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear timing guidance – 'prefer calling this before claiming completion' ('宣称完成前优先调这个') – which establishes a concrete trigger. However, it never names an alternative tool or a when-not condition, so the agent must still infer how it differs from the many av_* siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_session_changesA

轻量检查"有没有架构变更"——不生成文件、秒回。若 status=analyzing,看 remainingSec;不想等请直接调 av_session_report 或 av_guard(会取消防抖立即重算)。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。
editDirNo可选。正在改代码的目录;与 repo 冲突时中止。
confirmRepoNo可选。确认检查 repo(当 cwd 是另一个 Git 根时)。

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose meaningful behavior: no files are generated, the call returns instantly, and the sibling tools cancel the debounce to force an immediate recompute. It does not explicitly state permission requirements or whether it mutates session state, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph, front-loaded with the purpose and its distinguishing traits. It is efficient, though the status/remainingSec and sibling-routing details make it slightly busier than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description usefully references the returned status=analyzing field and remainingSec to guide interpretation of the result. For a lightweight read-only check, this is nearly complete, with only permissions/mutation semantics left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all three parameters including the required absolute-path repo. The description's '必须显式传当前工作区绝对路径 repo' largely restates the schema, adding emphasis but no new semantic detail. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: a lightweight check for whether architecture changes exist, plus the key traits (no file generation, instant return). It also names the sibling tools it routes away from, though the purpose statement is intertwined with usage guidance rather than cleanly separated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly covers when to use it and what to do instead: if status=analyzing check remainingSec, and if you don't want to wait, call av_session_report or av_guard instead. Conditions and alternatives are both named, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_session_reportA

看本轮结构验收结论(对话内 verdict:灯色 + 风险计数 + 最严重 1 条)与完整报告。有 git 时默认对照 HEAD,不必先 av_session_start。日常可用 av_guard(会自动 ensure)。有进行中的防抖时会取消并立即重算。默认写出内置 HTML(Before/Delta/After)。HTML 为可选深挖。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
fromNo可选:从会话报告取数据
repoYes必填。当前工作区根目录的绝对路径。
editDirNo可选。正在改代码的目录;与 repo 冲突时中止。
confirmRepoNo可选。确认检查 repo(当 cwd 是另一个 Git 根时)。

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations the description carries the full burden, and it does disclose real behavior: it cancels an in-progress debounce and immediately recomputes, it writes built-in HTML by default (Before/Delta/After), and HTML is optional. It does not discuss permissions or reversibility, but the key side effects and defaults are surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the verdict content, which is good, but then strings together several loosely related clauses (HEAD default, av_guard, debounce cancellation, HTML output, required repo) in dense run-on sentences. Nothing is wasted, but it reads as an accumulation of notes rather than a structured definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by describing the return payload (verdict components plus full report and HTML). Combined with 100% schema coverage of inputs, an agent has enough to call it correctly, though the side-effect ordering is only lightly explained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all four parameters. The description only reiterates that repo must be explicitly passed as an absolute workspace path, matching the schema, and adds no new meaning for from/editDir/confirmRepo. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: it returns the structural acceptance verdict (light color + risk count + most severe item) plus the full report. It also names sibling tools (av_guard, av_session_start) and distinguishes when those apply, though the exact relationship to av_session_report is a little tangled.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete routing guidance: with git it defaults to comparing against HEAD so av_session_start is unnecessary, and it points to av_guard for day-to-day use. That covers context and alternatives clearly, though it stops short of explicit when-NOT-to-use exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_session_startA

改代码之前拍一张"改之前"的照片(记录当前结构)。MCP 长期进程还会开启自动监听(默认约 8 秒防抖);CLI 不会持续监听,改完需手动 report。日常优先 av_guard。必须显式传当前工作区绝对路径 repo;务必回显返回的 path.checking。完全离线。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前 IDE 工作区根目录的绝对路径。不要写死主仓路径——worktree 场景会拍错照片。
intentNo可选。本次改动意图,例如「只修分层,不改 /todos」。报告会对照对外表面,不对齐只黄灯/信息,不阻断。
editDirNo可选。正在改代码的目录绝对路径;与 repo 不是同一 Git 根时中止。
confirmRepoNo可选。当 MCP cwd 与 repo 不是同一 Git 根、但你确认就要检查 repo 时,传入与 repo 相同的绝对路径。

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does well: it discloses auto-monitoring with an ~8s debounce under MCP, that the CLI does not continuously monitor, the need to echo the returned path.checking, and that the tool is fully offline. It stops short of describing what the snapshot records or any failure/abort behavior beyond the editDir mismatch noted in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and every clause carries operational weight (monitoring, offline, required path echo). It is somewhat crammed into a few dense sentences, but there is no filler to cut.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a session-start tool with no annotations and no output schema, the description supplies the behavioral context an agent needs (monitoring semantics, offline mode, required echo of output). Only minor gaps remain around what the snapshot contains or how failures surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all four parameters are already documented with descriptions including the worktree warning and the Git-root constraint. The description reinforces that repo must be the workspace absolute path, but adds no format or syntax beyond the schema, matching the baseline-3 rule.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a concrete action and metaphor (take a 'before' snapshot recording current structure) and the tool name plus sibling reference make the resource clear. It is identifiable as a session-initialization tool distinct from the report/changes siblings, though the purpose statement is interleaved with operational caveats rather than cleanly separated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to run before editing code, notes the daily-priority alternative (av_guard), and distinguishes MCP-backed auto-monitoring from the CLI path that requires a manual report. When-to-use, when-to-prefer-a-sibling, and the environment-dependent difference are all stated without inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

av_statusB

给使用者看的会话状态:基线在哪、watcher 是否在跑、监听哪个仓、报告是缓存还是过期、实时指纹有没有变。必须显式传当前工作区绝对路径 repo。

ParametersJSON Schema
NameRequiredDescriptionDefault
repoYes必填。当前工作区根目录的绝对路径。
editDirNo可选。正在改代码的目录;与 repo 冲突时中止。
confirmRepoNo可选。确认检查 repo(当 cwd 是另一个 Git 根时)。

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It helpfully discloses the content of the report (baseline, watcher state, fingerprint change), which substitutes for the missing output schema, but never states that this is a non-mutating read or mentions permissions, repo-validation failure modes, or what the (repo, editDir) conflict abort means in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact sentence lists the reported fields, then a second sentence front-loads the mandatory parameter. No filler, no repetition; the only slight weakness is that the field list is dense prose rather than structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description compensates by naming the returned status elements, which is the key information an agent needs. It is close to complete, with only the read-only nature and error behavior left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents repo, editDir, and confirmRepo in detail. The description only restates the required-repo rule, which is redundant with the schema's own '必填' note, adding no new syntax or format meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description enumerates exactly what the tool reports (baseline location, watcher liveness, watched repo, cached vs stale report, live fingerprint change), which is a specific, verifiable purpose. It is clear this is a status/inspection tool, though it does not explicitly distinguish itself from siblings like av_session_report or av_session_changes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a hard requirement (must explicitly pass the workspace absolute path) but gives no when-to-use context and no comparison to the sibling status/report tools. An agent must infer the usage scenario from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv0.12.2-rc.3
    • First observedav_archify_export
    • First observedav_check_layering
    • First observedav_explain_finding
    • First observedav_guard
    • First observedav_session_changes
    • First observedav_session_report
    • First observedav_session_start
    • First observedav_status

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Tools are mostly distinct, but av_guard, av_session_report, av_session_changes, and av_check_layering all deal with architecture verification and could be confused by an agent unfamiliar with the daily vs session vs snapshot distinction. Descriptions provide guidance, reducing but not eliminating overlap.

Naming Consistency5/5

All tool names use the av_ prefix and snake_case, with predictable action-oriented suffixes. The convention is uniform across the set.

Tool Count5/5

Eight tools is a well-scoped set for an architecture verification/viewer server, covering session lifecycle, checks, and export without redundancy.

Completeness4/5

The surface covers start, change detection, reporting, status, guard, finding explanation, layering check, and export. Minor gaps might include direct finding listing or configuration, but core workflows are present.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers