agentleFS
AgentiveStackAgentiveStack/skills/architect/SKILL.md

architect

Skill72 starsChanged 7 months agoMITView on GitHub

Surface architectural friction in the codebase and design better module interfaces. Uses parallel sub-agents to explore radically different interface designs. Based on "deep modules" philosophy — small interfaces hiding significant complexity. Use when code feels tangled, hard to test, or hard to navigate.

95 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use figure-it-out, setup-pstack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • finograficSkill

    figure-it-out

    Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for /figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies.

    Also in 22 projects that use this

  • shishivSkill

    setup-pstack

    Configure pstack delegation against the active Pi host. Use for /skill:setup-pstack, "configure pstack models", or checking delegation readiness.

    Also in 15 projects that use this

  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 8 projects that use this

  • jtarorehSkill

    Poteto Mode

    poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

    Also in 5 projects that use this

  • TheOnlyFusionCubeSkill

    principle-attack-the-premise

    Inventory who actually owns or exhibits the imbalance, then challenge the shared premise before writing another patch. Use when two or more fixes that share one premise have failed the same gate.

    Also in 11 projects that use this

  • TheOnlyFusionCubeSkill

    principle-test-behavior-not-implementation

    Call the system the way its consumer does and assert meaningful observable output; avoid mocks or assertions that only mirror internal calls. Use when when writing or evaluating tests.

    Also in 11 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 88 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user: "Which of these would you like to explore?"

    line 50
  2. Very specific:

    If it warrants implementation → save as a spec in docs/contexts/<name>/specs/

    line 95
  3. Very specific:

    If it's a significant architectural decision → consider an ADR in docs/contexts/<name>/adrs/

    line 96
  4. Very specific:

    Update docs/contexts/<name>/CONTEXT.md if ownership or contracts change

    line 97

“Common” is measured: kept by at least 6 in 10 of the 88 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Improvement

Explore the codebase to surface architectural friction, then design deep module interfaces using parallel sub-agents. A deep module (Ousterhout) has a small interface hiding a large implementation — more testable, more navigable, more resilient to change.

Process

1. Discover project context

Read domain documentation:

  1. docs/CONTEXT_MAP.md — bounded contexts and relationships
  2. docs/contexts/*/CONTEXT.md — ownership, invariants, contracts
  3. docs/UBIQUITOUS_LANGUAGE.md — canonical terminology

2. Explore the codebase

Navigate organically, noting friction:

  • Where does understanding one concept require bouncing between many small files?
  • Where are modules so shallow that the interface is nearly as complex as the implementation?
  • Where have pure functions been extracted "for testability" but the real bugs hide in how they're called?
  • Where do tightly-coupled modules create integration risk at the seams?
  • Which parts are untested or hard to test?
  • Where do bounded context boundaries leak? (one context directly accessing another's internals)

The friction you experience IS the signal.

3. Present candidates

Present a numbered list of deepening opportunities:

1. [Cluster Name]
   Modules: [which modules/concepts are involved]
   Coupling: [why they're coupled — shared types, call patterns, co-ownership]
   Dependency type: [in-process | local-substitutable | remote-owned | true-external]
   Test impact: [what tests would be replaced by boundary tests]
   Context: [which bounded context(s)]

2. ...

Ask the user: "Which of these would you like to explore?"

4. Frame the problem space

For the chosen candidate, write a user-facing explanation:

  • The constraints any new interface would need to satisfy
  • The dependencies it relies on
  • A rough illustrative code sketch (NOT a proposal — just grounding)

Show this to the user, then proceed to design.

5. Design multiple interfaces

Spawn 3+ sub-agents in parallel. Each must produce a radically different interface:

  • Agent 1: "Minimize the interface — 1-3 entry points max"
  • Agent 2: "Maximize flexibility — support many use cases and extension"
  • Agent 3: "Optimize for the most common caller — make the default case trivial"
  • Agent 4 (if applicable): "Ports & adapters — inject all external dependencies"

Each agent outputs:

  1. Interface signature (types, methods, params)
  2. Usage example
  3. What complexity it hides internally
  4. Dependency strategy
  5. Trade-offs

6. Compare and recommend

Present designs sequentially, then compare in prose:

  • Interface simplicity (fewer methods, simpler params = better)
  • General-purpose vs specialized
  • Implementation efficiency
  • Depth (small interface + deep implementation = good)
  • Ease of correct use vs ease of misuse

Give your recommendation. Be opinionated — the user wants a strong read.

7. Capture the decision

Based on user's choice:

  • If it warrants implementation → save as a spec in docs/contexts/<name>/specs/
  • If it's a significant architectural decision → consider an ADR in docs/contexts/<name>/adrs/
  • Update docs/contexts/<name>/CONTEXT.md if ownership or contracts change

Dependency categories

CategoryDescriptionTest strategy
In-processPure computation, no I/OMerge and test directly
Local-substitutableHas local test stand-in (e.g., SQLite for Postgres)Test with substitute
Remote but ownedYour own services across network boundaryPort + adapter pattern, in-memory adapter for tests
True externalThird-party services (Stripe, OpenAI)Mock at boundary

Testing principle

Replace, don't layer. Once boundary tests exist for a deepened module, delete the old shallow unit tests. Tests assert on observable outcomes through the public interface, not internal state.

Related skills

  • /domain — stress-test the chosen design against the domain model
  • /spec — formalize the improvement into a spec
  • /slice — break the refactor into vertical slices
  • /holistic — understand the broader system before refactoring

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.