
Archsteer
io.github.einvoice-dev1由 GitHub 帳號 einvoice-dev1 發布v0.10.0更新於 Oct 24, 2026
Architecture governance for AI agents: query the live model, get target patterns, check files.
發布方自己的服務:Invoicehub
概覽
讓助理查詢由程式碼推導出的架構模型、取得適用於某個檔案的規則,並檢查剛編輯的檔案是否符合規範。
- 可以做什麼
- ArchSteer 透過 stdio 執行本機 MCP 伺服器,讀取其 init、map 與 govern 指令寫入 .archsteer 目錄的產物。它提供三個工具:current_architecture 回傳元件與分層數量、符合度與漂移情況以及宣告的目標;get_target_pattern 回傳寫入檔案前適用的限制;check_file 用於在不必等待 CI 的情況下檢查剛編輯的檔案是否符合規範。底層模型由原始碼推導,並儲存為單一 JSON 檔案。
- 適用情境
- 適用於助理在已宣告架構規則的程式碼儲存庫中修改程式碼的情境,使其在寫入前了解適用限制,並在寫入後驗證符合度。最適合已經執行 ArchSteer 對應與治理流程的團隊,或希望助理遵循目標模式而非區域慣例的團隊。
- 執行需求
- 需要本機 Python 執行環境;該套件透過 uvx 執行(或使用 PATH 中既有的 archsteer)。儲存庫需先執行初始化與對應,使 .archsteer 目錄存在。未宣告需要帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Archsteer,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ArchSteer
[ArchSteer conformance] [PyPI] [License: MIT]
Living Architecture Control Plane for the AI-Dev Era.
AI agents now write code faster than any architect can review, document, or govern it. Docs rot instantly, the real architecture is invisible, structural decisions get made silently, and intended architecture drifts with every edit. ArchSteer is the always-current architecture system of record + governance plane: it derives the real architecture from code, keeps living docs and ADRs auto-built, surfaces every major decision for the architect to ratify, enforces declared intent as code-level fitness functions, and steers AI agents to conform instead of replicating local slop.
Everything is a projection of one code-derived model — .archsteer/model.json.
Local by default: the X-ray and governance workflow runs locally and never uploads or
executes your repository's source code. It needs no account, API key, or configuration
before the first scan; cloud snapshot publishing is a separate, explicit push command.
Install
As a Claude Code plugin (recommended if you use Claude Code):
This installs the bundled MCP server (current_architecture, get_target_pattern,
check_file — via uvx, no separate pip install needed) plus a skill that teaches
the agent when to x-ray, check, and steer on its own, and /xray / /check commands.
See .claude-plugin/plugin.json for the manifest.
As a CLI (works with any editor/agent, or standalone):
(Since 0.4.1 the MCP server ships in the base install; pip install "archsteer[mcp]" still
works as a no-op alias.)
Languages: JavaScript / TypeScript (Next.js App Router-aware, including
tsconfig.json path-alias resolution — @/lib/x resolves to a real internal
edge, not a phantom third-party dependency), Python, Java (Spring-aware),
and Salesforce Apex (SOQL/DML + trigger/handler/selector conventions).
Layer detection uses in-source signals first — Spring stereotype annotations,
Apex class-name conventions, Next.js reserved filenames (page.tsx →
page, layout.tsx → layout, route.ts → api, regardless of directory)
— then directory names.
Quickstart
For the fastest proof, run this in a repository and open the generated
.archsteer/report.html:
Then add the controls you need:
init auto-detects your stack and seeds a matching baseline rule pack — edit
.archsteer/architecture.yaml to fit your conventions, or pick one explicitly:
A repo with next as a dependency and an app/ directory gets the App Router
pack; a package.json with express (even one migrating to Next) gets the
migration pack instead — those are different problems with different rules.
Every starter pack ships a security baseline — no hardcoded credentials/API keys/tokens anywhere in source, and all outbound third-party calls confined to the service layer — so day-one governance covers architecture and the two security smells AI agents introduce most often.
The three design guarantees
- Ratchet, not freeze.
archsteer checkblocks only net-new violations against a baseline — teams keep shipping features while debt can only shrink. - Conservative, architect-in-the-loop ADRs. Two narrow sources, both opt-in review —
never auto-committed. Across time: external-boundary changes (new dependency, new
datastore, new layer) — never internal reshuffles. Within a snapshot: a rule violated
in 3+ components — a genuine pattern worth ratifying or relaxing, not a one-off left to
check/govern. Drafts are idempotent; re-running never duplicates one already on disk. - Sharp agent steering. Guardrails injected into
CLAUDE.md,AGENTS.md, and.cursor/rules/archsteer.mdc(an always-on Cursor rule) are scoped to the files in play and point at the governing ADR — they don't dump the whole model into the context window.
Declaring intent — .archsteer/architecture.yaml
Rule types: required_layer_for_data_access, forbidden_import, forbidden_data_access,
forbidden_layer_edge, forbidden_security_finding (hardcoded secrets), and
required_layer_for_external_call (confine outbound HTTP/SDK calls to a layer).
Using with AI agents (MCP)
archsteer mcp runs a local MCP server over stdio — spawned by your own editor/agent,
never hosted by us. It reads only what init/map/govern already wrote to .archsteer/
on disk, so there's no network call and nothing leaves your machine. It exposes three tools:
current_architecture— component/layer counts, conformance/drift, the declared target.get_target_pattern— the invariants that apply to a file, before you write to it.check_file— whether a file you just edited conforms, without waiting for CI.
Using the Claude Code plugin above? This is already wired up — skip to Quickstart. The rest of this section is for every other client.
Add it to Cursor with one click: Install in Cursor →
Add it to Claude Code by hand (instead of the plugin), or any other MCP-compatible client:
Or in JSON config directly:
(Already have archsteer on PATH via pip/pipx? {"command": "archsteer", "args": ["mcp"]}
works identically — uvx just means no install step at all.)
Also published to the official MCP registry as
io.github.einvoice-dev1/archsteer.
CI / pre-commit / pre-push
- GitHub Action:
.github/workflows/archsteer.yml(maps, drafts ADRs, runs the net-new gate, uploadsreport.html). - Local pre-push hook:
archsteer install-hookswiresarchsteer checkinto.git/hooks/pre-push— an architecture conformance score printed on every push, blocking only NET-NEW error violations (the same ratchet as CI, just earlier feedback).archsteer map/checkcache per-file parse results in.archsteer/parse_cache.json, so a push that only touches a handful of files re-parses just those files, not the whole repo. Uninstall witharchsteer install-hooks --uninstall. - Already using husky, pre-commit, or lefthook? Add
archsteer checkas a step instead of the raw git hook, e.g. a.husky/pre-pushcontainingarchsteer check.
Conformance badge
If your repo pushes snapshots to the situation room (archsteer push), its latest
conformance score is a live badge — the one at the top of this README is this repo
governing itself:
Replace YOUR-REPO with the repo name archsteer push reports. Green at ≥90%, grey while
you're still x-ray-only (no architecture.yaml declared yet).
Try the demo
Roadmap
- Shipped — cloud control plane (Next.js + Supabase): multi-repo situation room with
drift/decision time-series.
archsteer mcp: a local MCP server so agents query the live model + intent mid-edit. An org-wide, hosted MCP server (Team tier) so agents can ask cross-repo questions against the situation room — "what's our drift index," "which repos have pending ADRs" — the same data as the dashboard, over MCP. A Claude Code plugin (skill + commands + the MCP server, one install). A dedicated Next.js App Router pack (layers frompage.tsx/layout.tsx/route.ts,tsconfig.jsonpath-alias resolution, Supabase/Prisma-aware data-access detection).archsteer install-hooks: the same net-new conformance ratchet as CI, wired into a local git pre-push hook. - Later — a VS Code extension (inline diagnostics, status-bar score — the CLI/MCP already work in any editor today), auth, org/repo model, billing.
Development
Found a surprising edge, a false positive, or a stack ArchSteer should understand better? Open an issue with the language, framework, and smallest reproducible example. Builder feedback directly shapes the detectors and starter rule packs.
來源:README.md,提交 3cf6267
工具
0版本歷史
1- v0.10.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分