agentleFS
learner0408learner0408/Skills/architecture-driven-coding/SKILL.md

architecture-driven-coding

Skill0 starsChanged 3 months agoMITView on GitHub

Use when asked to implement, build, add, or write NEW code and features. Verifies ARCHITECTURE.md exists at the project root first — if missing, stops and asks the user to create it before any code is written. Enforces CONVENTIONS.md. Skip for fixing bugs or debugging existing code, refactoring, config or file edits, docs-only work, scratch code, or when the user explicitly says to skip architecture.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If ARCHITECTURE.md is missing, halt immediately.

    line 25
  2. Distinctive:

    If a request maps ambiguously to a module, or the architecture does not cover it, ask before inventing structure

    line 26
  3. Distinctive:

    Never design architecture on the fly — the project's architecture file is the only source of truth

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Instructions

  1. Read conventions — project-local CONVENTIONS.md if present, else ~/.config/opencode/CONVENTIONS.md
  2. Locate ARCHITECTURE.md at the project root (walk up from the current directory if needed)
  3. If missing — STOP. Do not write any code. Follow "Stop and Ask" below
  4. Read and internalize ARCHITECTURE.md before writing anything
  5. Map the request to the architecture — identify the modules, files, and data flow the feature touches; state the file-by-file plan before editing
  6. Write the code conforming to both ARCHITECTURE.md and CONVENTIONS.md
  7. Basic syntax verification — run scripts/syntax-check.sh on every file you wrote; fix anything it flags
  8. Report — list files created/modified and note any deviation from the architecture

Stop and Ask

  • If ARCHITECTURE.md is missing, halt immediately. Explain that code is not written until the architecture exists, present references/architecture-template.md, and ask the user to create or approve the architecture first
  • If a request maps ambiguously to a module, or the architecture does not cover it, ask before inventing structure
  • Never design architecture on the fly — the project's architecture file is the only source of truth

Out of Scope

  • Fixing bugs, debugging, or repairing existing code
  • Refactoring
  • Detailed test-case verification (handled by a separate skill)
  • Config edits, docs-only changes, scratch scripts

Example

Input: "Add a user profile page that shows account settings." With ARCHITECTURE.md present: map to the frontend/user module, plan pages/settings.tsx, components/ProfileForm.tsx, api/user.ts, then write each file and run scripts/syntax-check.sh on them.

Without ARCHITECTURE.md: stop, present the template, ask the user to write it first, and write nothing.

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.