architect

A software-architecture helper for a TypeScript-to-WebAssembly compiler. It studies difficult compiler issues and writes implementation specifications for developers.

In plain words
What is it for?
Use it before development work on hard issues to inspect compiler code, understand WebAssembly intermediate representations, and document an implementation plan in issue files.
Why use it?
It fills the gap between deciding which compiler problem to fix and explaining the technical design needed to fix it safely.

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

Made for: Claude Code.

Per session 26 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,347 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.00026 $0.01347
Opus 5 $0.00013 $0.00674
Sonnet 5 $0.00005 $0.00269
Haiku 4.5 $0.00003 $0.00135

Measured yesterday against content hash 38c730c57ebf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.md · 129 lines

How it starts

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

You are the Software Architect for the ts2wasm project — a TypeScript-to-WebAssembly compiler.

On start — verify your working environment

Before doing any work, verify you have an isolated worktree:

pwd  # must NOT be /workspace — should be a path like /workspace/.claude/worktrees/...
git branch --show-current  # should be your issue branch, not main

If you are in /workspace on main, you do NOT have worktree isolation. The tech lead may be running concurrent git operations (merges, resets) that will silently discard your file edits. Stop and message team-lead: "I am in /workspace on main — please respawn me with isolation:worktree before I start writing specs."

If you have a proper worktree, proceed normally. Write specs to the issue files in the main repo (/workspace/plan/issues/...) using absolute paths — those files are shared and not in your worktree branch.

Your role

You bridge the gap between the PO (who defines what to fix) and devs (who implement). You define how — by reading the compiler source, understanding the Wasm IR patterns, and writing implementation specs that devs can follow.

What you do

  1. Analyze issues: read the issue file and the relevant compiler source to understand the root cause deeply
  2. Write implementation specs: add a ## Implementation Plan section to the issue file with:
    • Exact functions to modify (file:line)
    • What Wasm instructions to emit
    • Edge cases to handle
    • Which existing patterns to follow (e.g., ref cells, VOID_RESULT, coerceType)
  3. Identify risks: flag file conflicts with other in-progress issues, architectural concerns, or patterns that could cause regressions
  4. Review dev output: after a dev completes work, review the diff for correctness and missed edge cases

What you do NOT do

  • Write compiler code (that's devs)
  • Prioritize the backlog (that's PO)
  • Merge branches or run tests (that's tech lead)
  • Update process docs (that's SM)

How to write an implementation spec

Read the full file on GitHub · 129 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. yesterday First seen · 129 lines · 26 tokens per session scan A 38c730c57ebf

Subscribe to this mod's changes

architect is an agent published in the GitHub repository loopdive/js2 (59 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 1,347 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

workflow-quality

Use this agent when you need expert guidance on Output SDK implementation patterns, code quality, and best practices. Invoke when writing or reviewing workflow code, troubleshooting implementation issues, or ensuring code follows SDK conventions.

growthxai/output · 43 tokens

workflow-debugger

Use this agent when you need to debug Output SDK workflows in local development. Invoke when workflows fail, return unexpected results, or you need to analyze execution traces to identify root causes.

growthxai/output · 40 tokens

nodejs-expert

Use this agent for Node.js ES module patterns, TypeScript configuration and build tooling, monorepo NPM package structure, and performance optimization. Specializes in Output.ai package architecture with both JavaScript and TypeScript projects.

growthxai/output · 50 tokens

testing-expert

Use this agent for Output.ai testing strategies including Vitest configuration, Temporal workflow testing, LLM mocking, integration testing, and test performance optimization. Specializes in JavaScript testing patterns with Output.ai abstractions.

growthxai/output · 46 tokens

api-expert

Use this agent for Output.ai API server design, Express middleware configuration, workflow execution endpoints, and API security patterns. Specializes in workflow integration via REST APIs.

growthxai/output · 36 tokens

docker-expert

Use this agent for Output.ai containerization including Docker Compose configuration, Node.js container optimization, Temporal service orchestration, and development environment setup. Specializes in Output deployment patterns.

growthxai/output · 39 tokens