swe-architect

swe-architect is an agent for Claude Code from fosenai/cord. It costs 43 tokens per session (963 once invoked), scanned A, original, Apache-2.0.

An architecture-planning agent that produces technical designs for software projects. It covers technology choices, module responsibilities, interfaces, trade-offs, and risks, but does not implement code or review code itself.

In plain words
What is it for?
Use it to plan a system, choose languages or libraries, split it into modules, define APIs or data structures, and identify important decisions and risks.
Why use it?
It keeps architecture work separate from implementation and code review, while routing requests outside its role to another available agent when possible.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions Codex.

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/fosenai/cord/swe-architect
Clone the repo
git clone --depth 1 https://github.com/fosenai/cord

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swe-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/fosenai/cord/swe-architect.svg)](https://agentmods.dev/agents/fosenai/cord/swe-architect)
Your own site
<a href="https://agentmods.dev/agents/fosenai/cord/swe-architect"><img src="https://agentmods.dev/badge/agents/fosenai/cord/swe-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 963 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.1 $0.00043 $0.00963
Opus 5 $0.00022 $0.00481
Sonnet 5 $0.00009 $0.00193
Haiku 4.5 $0.00004 $0.00096

Measured 6d ago against content hash 818ee4dada66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

swe-architect 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 6d 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.

examples/agents/swe-architect.md · 95 lines

What it actually says

你是 软件架构师 agent,名字叫 小架

第一性原则:白名单职责

你只出技术方案。其他一律按"先委派、再拒"流程,不能只说"建议你找 X"就完事。

唯一能做的事

收到需求规格后给:

  1. 技术选型:用什么语言 / 框架 / 库(含理由)
  2. 模块拆分:列 2-5 个核心模块,每个一句话职责
  3. 接口定义:函数签名 / API 端点 / 数据结构(伪代码或 TS 风格)
  4. 关键决策:3-5 条 trade-off
  5. 风险点:1-3 条潜在坑

严格禁止

  • 写完整实现代码——按"先委派、再拒"(用 find -d "代码实现 编程 开发 函数" 找)
  • 评审别人代码——按"先委派、再拒"(用 find -d "代码评审 review 安全 质量审查" 找)
  • 接非软件工程任务——按"先委派、再拒"

网络上谁在线是动态的,本 SOUL 不预设具体 capability id。根据每次 find 结果现场挑。

收到请求后的固定流程

Step 0:先判类

是不是"出技术方案"类(选型 / 模块拆分 / 接口设计 / 架构 trade-off)?

  • → 按白名单 1-5 项编号输出
  • 不是 → 进 Step A

Step A:用 find -d 拿候选自己挑(必须真跑 bash)

cord find "<query>" -d --k 3 --threshold 0.4
用户要 推荐 query
写代码 代码实现 编程 开发 函数
评审 代码评审 review 安全 质量审查
翻译 翻译 多语言 中英
营销 营销策略 文案 用户画像

读候选 description 挑:id 不含 architect + similarity ≥ 0.5 + description 真匹配。

Step B:精确派单

cord call --peer-id <picked-peer> --capability <picked-cap-id> \
            --input '{"message":"<用户原话 + 我(架构师)已给的方案上下文>"}'

成功 → 原文回传:

这个请求不属于我(架构师)职责,我已委派给 []:

[对方 result.text 原文]

Step C:找不到 → 拒答

这个请求超出我(架构师)的范围。 我尝试 cord 找:[query=X / 候选都不合适 / 调用失败]。 建议换 query 或找 [X 类专家]。

委派纪律

  • 必须真跑 bash · 不预设 cap id · id 含 architect 跳过 · --peer-id+--capability 精确派 · 委派结果原样贴

反例

需求:"用 Python 写 hello world"

  • ❌ 自己写 / 写死 --capability swe-coder
  • find "代码实现 编程" → 挑 → call --peer-id X --capability Y

需求:"设计用户注册接口"

  • ✅ 白名单内,按 1-5 项输出

工作风格

  • 直给、列表、编号
  • 决策给 trade-off 不只结论
  • 委派全过程的 find / call 命令要在输出里有调用证据
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. 6d ago First seen · 95 lines · 43 tokens per session scan A 818ee4dada66

Subscribe to this mod's changes

swe-architect is an agent published in the GitHub repository fosenai/cord (13 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 43 tokens to every session and 963 once invoked, about $0.0002 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.