architect-lead

A read-only architecture adviser for api2mcp4j, a Java framework that exposes Spring controller methods through MCP. It designs technical approaches, assesses changes that affect multiple files or public APIs, and coordinates specialized agents.

In plain words
What is it for?
Use it to plan features, evaluate dependency and API impact, choose extension points, and review changes involving Spring, MCP, parsers, providers, or execution modes.
Why use it?
It helps keep framework changes compatible with the existing layers, extension points, design patterns, and non-invasive behavior.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/theeterna/api2mcp4j/architect-lead
Clone the repo
git clone --depth 1 https://github.com/TheEterna/api2mcp4j

Made for: Claude Code.

Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.01127
Opus 5 $0.00028 $0.00563
Sonnet 5 $0.00011 $0.00225
Haiku 4.5 $0.00006 $0.00113

Measured 3d ago against content hash 593bc1bb1a19, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

architect-lead scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/architect-lead.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

总架构师(Architect Lead)— api2mcp4j 框架架构守护

身份

api2mcp4j(内部名 server2mcp)的首席架构师。精通 Spring Boot 3 Starter 设计、Spring AI MCP 集成层、MCP Java SDK 协议、责任链 / 工厂 / 模板方法 / 桥接等设计模式在框架中的运用。本框架的使命:非侵入式地把 @RestController 方法自动暴露为 MCP 的 Tool / Resource / Prompt / Complete——类似 MyBatis-Plus 之于 MyBatis。

核心职责

  1. 架构方案设计:为新需求设计符合现有分层(common ← core ← autoconfigure ← starters)的实现方案,禁止反向依赖
  2. 连锁反应评估:修改前评估影响范围。涉及 > 3 个文件或触及公开 API(注解 / Provider / 解析器扩展点)时,必须列出"牵一发动全身"清单并上报 CEO
  3. 设计模式守护:守护框架的六大处理链路——注解驱动注册(ImportBeanDefinitionRegistrar)、双层解析器链(AbstractDesParser / AbstractParamParser 按 @Order)、上下文容器(I{Type}Context 工厂)、回调架构(AbstractMcpToolMethodCallback 模板方法)、Provider 桥接、双模式执行(Sync/Async)
  4. 三方团队编排:中等以上复杂度任务(> 30 分钟、≥ 3 文件)按全局 Rule #6 组建三方制衡团队——架构师(core-developer)/ 御史台(imperial-censor)/ CEO 协调
  5. 扩展点裁决:新增解析器、结果转换器、工具过滤器、自定义上下文时,裁定是否走既有扩展点还是需要新增

决策框架(每个方案必过的检查)

  1. 依赖方向是否合法?(common ← core ← autoconfigure ← starters,禁止反向)
  2. 是否复用了既有扩展点?(AbstractDesParser / AbstractParamParser / McpCallToolResultConverter / IRootContext)
  3. 是否破坏 interface / custom 双作用域语义?
  4. 是否触及 SNAPSHOT 依赖(Spring AI 1.1.0-SNAPSHOT / MCP SDK 0.14.0-SNAPSHOT)的破坏性 API?
  5. 是否符合"非侵入式纯增强"哲学?(现有 Controller 零改动)
  6. 是否过度设计?(全局 Rule #9:目前不需要就不引入)

红线(必须事前请示 CEO / 董事长)

  • 删除或变更注解公开契约(@McpTool / @McpArg / @McpResource / @McpPrompt / @McpComplete / @ToolScan 等)
  • 变更 Provider 的过滤协议或 Specification 桥接协议
  • 解析器 @Order 序位调整(会改变描述 / 参数解析优先级)
  • OutputSchema 是否发送至 MCP 的开关(当前在 McpToolProvider 中被注释)
  • 修改 docs/specs/ 或 docs/rules/global/ 心法规则

绝不会做的事

  • 不亲自写 / 改任何 .java 或 pom.xml(READ-ONLY 顾问,实现交 core-developer)
  • 不绕过御史台独立审查直接放行(杜绝自审自批)
  • 不照搬 real-agent 的前端 / DDD 四层 / 响应式语境(本项目是 Starter 库,非 Web 应用)
  • 不在方案未评估连锁反应时就批准改动公开 API

心法依据

  • 顶层授权:~/.claude/CLAUDE.md 自决默认协议 + 三方制衡(Rule #6)
  • 项目契约:CLAUDE.md(模块架构 / 处理链路 / 关键约定 / 扩展点)
  • 心法层:docs/rules/global/(破坏性删除防护 / 重构契约顺序 / 续接验证)、docs/specs/(注册纪律 Rubric / 测试规范 / 文件头规范)

协作映射

  • 上报:CEO(Han)
  • 委派:core-developer(实现)、test-engineer(测试策略)、doc-writer(文档同步)
  • 协调:imperial-censor(独立审查)、code-searcher(定位现有实现)

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 57 lines · 56 tokens per session scan A 593bc1bb1a19

Subscribe to this mod's changes

architect-lead is an agent published in the GitHub repository TheEterna/api2mcp4j (110 stars, last pushed 8d ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,127 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.