AGENT SKILL

agent-architect

Architect-level autonomous agent design — the loop and its termination, tool contracts and permission scope, memory and state, planning versus reacting, human approval gates, cost and step ceilings, and the containment that makes an agent safe to leave running. Use when a model will take multi-step actions with tools rather than answer once.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
agent-architect
license
MIT
metadata
{ "crusor-path": "ai-ml-architect/agent-architect/agent-architect", "crusor-domain": "ai-ml-architect", "crusor-origin": "original", "crusor-sources": "docs.anthropic.com/en/docs/build-with-claude/tool-use; modelcontextprotocol.io; arxiv.org/abs/2308.11432", "crusor-triggers": "agent, agentic, tool use, function calling, autonomy, multi step, mcp, orchestration, human in the loop, autonomous workflow", "crusor-verified-on": "2026-10-30" }
description
Architect-level autonomous agent design — the loop and its termination, tool contracts and permission scope, memory and state, planning versus reacting, human approval gates, cost and step ceilings, and the containment that makes an agent safe to leave running. Use when a model will take multi-step actions with tools rather than answer once.
compatibility
Any tool-calling model; MCP servers; sandboxed runtimes

03 SKILL.md 正文

Agent Architect

An agent is a loop with permissions. The architecture question is not what it can do, but what it cannot do, what stops it, and who finds out.

When to use

  • The task needs several steps whose path is unknown in advance.
  • Tools must be chosen at runtime.
  • A workflow must run unattended with human oversight at chosen points.

When NOT to use

  • The path is known: write a workflow or a script. A deterministic pipeline is cheaper, faster, and testable.
  • One model call suffices: that is llm-app-architect.
  • The action is irreversible and high-stakes with no approval step — do not ship it as autonomous.

Decision 1 — Loop and termination

  • Explicit state machine, not a free-running while-loop: think → act → observe, with a counter.
  • Terminate on: goal met, step limit, token/cost budget, wall-clock timeout, repeated identical action, or an unrecoverable tool error.
  • Every loop needs a cheap "am I making progress" check; loops that spin are the dominant cost failure.
  • Log the full trajectory (thought, action, observation) with ids for replay.

Decision 2 — Tool contracts

Contract element Rule
description states when to use and when not to
input schema strict typed, validated before execution
output bounded size, structured, errors as data
idempotency safe to retry with the same key
blast radius read / write / destructive, declared
  • Few, well-described tools beat many overlapping ones.
  • Truncate and summarise observations; a 100 KB tool output destroys the context window and the budget.
  • Tool errors return actionable text the agent can recover from, not stack traces.

Decision 3 — Permissions

  • Scoped credentials per tool, least privilege, short-lived — never the user's broad token in the agent's hands.
  • Separate read tools from write tools; write tools gated by approval or by an explicit policy (auto-approve below $50).
  • Destructive operations require confirmation with a summary of what will change.
  • Sandbox code execution: container, no network unless declared, resource caps.
  • Deny by default; allowlists for tools, domains, and paths.

Decision 4 — Memory and state

  • Short-term: the trajectory, trimmed or summarised as it grows.
  • Long-term: an external store with explicit write rules; do not let the agent silently accumulate facts.
  • Checkpoint state so a run can resume after failure without repeating effects.
  • Deduplicate actions by key to survive retries.

Decision 5 — Human in the loop

  • Approval gates at the irreversible step: payment, deletion, external comms, production deploy.
  • Show the diff, the cost, and the tool call being approved — not a vague "allow".
  • Define escalation: what the agent does when uncertain (ask, stop, fall back).
  • Every autonomous run has an owner and a kill switch.

Decision 6 — Observability and cost

  • Trace every step with tokens, latency, tool name, and cost.
  • Budget per run and per tenant, hard-capped.
  • Alert on step-limit hits, approval rejections, and repeated tool errors.
  • Replay a failed run from its trajectory in a test harness — that is the agent's regression suite.

Failure modes at scale

  • A loop that retries a failing tool forever, billing per attempt.
  • Broad credentials letting an agent touch unrelated systems.
  • Context filled with raw tool output until the goal is forgotten.
  • Approval fatigue: gates so frequent that reviewers click yes.
  • Two agents in a loop with each other, amplifying.

Verification receipts

  1. Per-run budget caps enforced, verified by a deliberately looping task.
  2. Tool inventory with declared blast radius and scoped credentials.
  3. Approval gate exercised: irreversible action blocked without approval.
  4. Kill switch tested mid-run; state left consistent.
  5. Replay of one failed trajectory reproducing the failure in a test.

04 同仓库更多 Skills

SriAkhilSJ
SriAkhilSJ/PulseAIRepo

interaction-patterns-architect

Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

design-system-ops-architect

Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

design-handoff-architect

Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

content-microcopy-architect

Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

ui-ux-implementation-architect

Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.

★ 0
SriAkhilSJ
SriAkhilSJ/PulseAIRepo

test-strategy-architect

Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.

★ 0