Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Architect?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/arjitj2-architect)
---
name: architect
description: "Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape."
---
# Architect
Before writing code, trace every system the change touches. Then sketch at least two structurally different shapes for it (types, signatures, class shapes, and module boundaries, with `not implemented` bodies and pseudocode). Pick the shape where each piece of state has one owner, each task has one way to do it, and callers need to know least. Redesign instead of patching when workarounds repeat.
**Dispatch contract.** Architect's Arena uses the centralized provider routing in [`provider-dispatch.md`](../poteto-mode/references/provider-dispatch.md). Configured entries are descriptors, not native model slugs. On Codex, resolve remaining Claude tool names via [`codex-tools.md`](../poteto-mode/references/codex-tools.md).
## Phase A: Ground the problem
Trace each subsystem the new code touches and write an architectural explanation of it. Naming a file isn't grounding. If the design redefines ownership or layering, run the **why** skill on the existing shape so its rationale becomes a constraint, not a guess. Skip Phase A only for greenfield work with no surrounding system to integrate.
## Phase B: Sketch
Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt.
Take the runners from the `architect runners` line in the current harness's pstack model sheet, in place of the `arena runners` line. If the sheet or that line is missing, use `codex:gpt-5.6-sol@max`, `grok:grok-4.7@xhigh`, `claude:opus@max`. Alias, chain, and dropout entries follow the runner rules in the **arena** skill's Phase A, including the saved fallback state machine.
Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. They are whole-shape alternatives, not point fixes inside one shape, per the **exhaust-the-design-space** principle skill.
Screen every candidate against [`references/design-red-flags.md`](references/design-red-flags.md) before synthesis. Assume the next contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Prefer the design where a change that looks right from one file is right for the whole repo. Among viable candidates, prefer one owner per piece of state, one way per task, and the deeper interface that hides more complexity behind a smaller public surface.
Arena returns one synthesized design package. Its synthesis decision fills the rationale's "Synthesis decision" section.
## Phase C: Agree (opt-in)
By default, proceed to implementation with the synthesized design. Pause for sign-off only when the invoker explicitly asks, as in "/architect with checkpoint" or "stop and show me before implementing".
The synthesis can ship as its own commit, the "scaffold first" mode of the **foundational-thinking** principle skill. Planned and scoped breakage during fill-in is fine, per the **outcome-oriented-execution** principle skill. For adversarial pressure before implementing, run the **interrogate** skill on the synthesized sketch. Treat pushback on the shape, in a checkpoint or later, as grounding evidence. Re-ground and re-run Phase B before writing more code.
## Phase D: Implement against the sketch
Replace `not implemented` bodies with code and pseudocode with logic. The synthesized sketch is the contract. Surface a deviation instead of absorbing it. When a function needs a parameter the sketch didn't anticipate, decide whether the sketch was wrong, the requirement was missed, or the implementation is overreaching.
## Phase E: Scrap when the architecture is wrong
Throw the sketch out when the friction is a pattern, per the **redesign-from-first-principles** and **fix-root-causes** principle skills. The tells are the same workaround across unrelated code, unrelated edge cases that each need a special branch, types that need escape hatches (`any`, casts, optional fields always set in practice), a lock the sketch said was unnecessary, callers that must know the abstraction's internal rules, and two or more independent Phase D deviations of the same shape. A few edge cases don't condemn an architecture. Complexity in the data is not complexity in the design.
To scrap, trace what has been built. Redesign as if the new constraints had been day-one assumptions. Subtract before adding, per the **subtract-before-you-add** principle skill, so the new sketch starts smaller than the old one. Then return to Phase B and re-run arena.
## Outputs
The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes. Module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision.