design-architecture
Skill45 starsChanged 4 days agoMITView on GitHub
This skill should be used when the user asks to design system architecture, make architectural decisions, or translate PRD into technical design
4 other projects use a version of this.
Adopted by
Most recently taken up by
- foryouself83/harness-tiertheir own version, first seen Oct 13, 2026
- Omerfaruk-aydn/Agent_OStheir own version, first seen Jul 20, 2026
- evgenii-studitskikh/Claude-Code-SaaS-Studiotheir own version, first seen Jun 10, 2026
- SenolIsci/mykgtheir own version, first seen May 27, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- SenolIsci/mykg★ 81same name
- foryouself83/harness-tier★ 10same name
- evgenii-studitskikh/Claude-Code-SaaS-Studio★ 1same name
- Omerfaruk-aydn/Agent_OS★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- build-unplannedSkill
- check-specs-alignmentSkill
- create-tasksSkill
- debugSkill
- design-it-twiceSkill
- design-productSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- finalize-taskSkill
- groundwork-checkSkill
- groundwork-helpSkill
- handoffSkill
- implement-taskSkill
- instrument-observabilitySkill
- just-do-itSkill
- just-do-it-swarmingSkill
- plan-taskSkill
- review-prSkill
- select-projectSkill
- setup-repoSkill
- shipSkill
- skillsSkill
- source-architecture-from-codeSkill
- source-product-specs-from-codeSkill
- source-ux-design-from-codeSkill
- split-architectureSkill
- split-specsSkill
- staged-rolloutSkill
- statuslineSkill
- swarm-debugSkill
- swarm-design-architectureSkill
- task-validation-loopSkill
- test-driven-developmentSkill
- understanding-feature-requestsSkill
- use-git-worktreeSkill
- using-groundworkSkill
- ux-designSkill
- validateSkill
- vertical-sliceSkill
- work-on-next-taskSkill
- work-onSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
45 rules. 0 are common, 31 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
31
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Load Context: - Read PRD and understand requirements
- Distinctive: line 21
Document: - Write architecture with full decision records
- Very specific: line 32
If effort is low or medium (i.e.
- Distinctive: line 33
If you are not Opus (1M context), you MUST show the recommendation prompt - regardless of effort level.
- Distinctive: line 51
If the user selects "Cancel — I'll switch first": output the switching commands above and stop.
- Very specific: line 58
If yes → Is {{project_name}} non-empty?
- Very specific: line 59
If empty → Invoke Skill(skill="groundwork:select-project") to select a project, then restart this skill.
- Very specific: line 60
If set → Project is {{project_name}}, specs at {{specs_dir}}/.
- Distinctive: line 61
If no → Continue to item 3.
- Distinctive: line 64
If CWD is the repo root → fine, proceed.
- Very specific: line 65
Check which project's path CWD falls inside (compare against all projects in .groundwork.yml).
- Distinctive: line 66
If CWD is inside the selected project's path → fine, proceed.
- Very specific: line 67
If CWD is inside a different project's path → warn via AskUserQuestion:
- Very specific: line 71
If the user switches, invoke Skill(skill="groundwork:select-project").
- Distinctive: line 72
If CWD doesn't match any project → proceed without warning (shared directory).
- Distinctive: line 74
If yes → Single-project repo, proceed normally.
- Distinctive: line 75
If no → Ask the user: "Is this a single-project repo or a monorepo with multiple projects?"
- Distinctive: line 81
Read the product specs (may be single file or directory) and extract:
- Very specific: line 86
Detection: Check for {{specs_dir}}/product_specs.md first (single file), then {{specs_dir}}/product_specs/ directory.
- Very specific: line 88
If PRD doesn't exist, prompt user to run /groundwork:design-product first.
- Distinctive: line 117
Before presenting decision options, gather research on relevant technologies.
- Distinctive: line 138
Use research findings to:
- Distinctive: line 140
Add version recommendations to options
- Distinctive: line 146
When presenting options in Step 4, incorporate research findings:
- Distinctive: line 147
Add "(stable: X.Y, latest: A.B)" to technology names
- Distinctive: line 185
Prefer multiple-choice follow-up questions when gathering constraints
- Distinctive: line 189
When presenting options, ask questions to surface hidden constraints:
- Distinctive: line 198
Before recording a decision, check for conflicts with earlier decisions:
- Distinctive: line 218
If user agrees: Record decision and move to next
- Distinctive: line 219
If user has concerns: Discuss, possibly add new options
- Distinctive: line 220
If user wants to defer: Note as open question, continue
- Distinctive: line 221
If conflict identified: Resolve before proceeding
- Distinctive: line 226
Prefer simple solutions that can evolve over pre-designed extensibility
- Distinctive: line 227
When in doubt, choose the option with fewer moving parts
- Distinctive: line 228
Ask: "What's the cost of adding this later vs.
- Very specific: line 238
When all major decisions are made, create the architecture document using template in …
- Distinctive: line 248
Before writing the architecture document, validate it against the PRD:
- Very specific: line 268
If verdict is request-changes:
- Distinctive: line 281
After writing the architecture document, check whether it should be split:
- Distinctive: line 286
If lines >= 500 OR decision records >= 10:
- Very specific: line 288
After the split completes, note in your confirmation: "The architecture doc has been split into directory format at …
- Distinctive: line 290
If neither threshold is crossed, continue silently.
- Distinctive: line 294
After successfully updating the architecture document, ask what should be the next workflow step:
- Very specific: line 318
Design UX: Run /groundwork:ux-design to create UX designs
- Very specific: line 319
Create tasks: Run /groundwork:create-tasks to create a list of executable tasks
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Architecture Design Skill
Interactive workflow for translating product requirements into architecture through iterative decision-making.
File Locations
- Input:
{{specs_dir}}/product_specs.md(PRD with EARS requirements) - Output:
{{specs_dir}}/architecture.md(architecture document with decisions)
Workflow Overview
- Load Context - Read PRD and understand requirements
- Identify Decisions - List architectural decisions to make
- Iterate Decisions - For each decision: present options → discuss → decide
- Document - Write architecture with full decision records
Design Principles
Anchor decisions on the named principles in ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — favor deep modules (simple interface, substantial functionality), minimize the surface Hyrum's Law will freeze into a contract, and design it twice before committing to a module boundary. When a decision passes the decision-record gate (in the principles file), record it using the Decision Record Format (ADR-lite) below. Sharpen the shared vocabulary with [[domain-modeling]].
Pre-flight: Model Recommendation
Your current effort level is {{effort_level}}.
Skip this step silently if effort is high, xhigh, or max (the scale is low < medium < high < xhigh < max, so xhigh and max are already above high) AND you are Opus (1M context).
If effort is low or medium (i.e. below high), you MUST show the recommendation prompt — regardless of model.
If you are not Opus (1M context), you MUST show the recommendation prompt - regardless of effort level.
Otherwise → use AskUserQuestion:
{
"questions": [{
"question": "Do you want to switch? Cross-decision conflict detection and trade-off synthesis across NFRs benefit from deeper reasoning.\n\nTo switch: cancel, run `/model opus[1m]` and `/effort high`, then re-invoke this skill.",
"header": "Recommended: Opus (1M context) at high effort",
"options": [
{ "label": "Continue" },
{ "label": "Cancel — I'll switch first" }
],
"multiSelect": false
}]
}If the user selects "Cancel — I'll switch first": output the switching commands above and stop. Do not proceed with the skill.
Step 0: Resolve Project Context
Before anything else, resolve the project context:
- Monorepo check: Does
.groundwork.ymlexist at the repo root?- If yes → Is
{{project_name}}non-empty?- If empty → Invoke
Skill(skill="groundwork:select-project")to select a project, then restart this skill. - If set → Project is
{{project_name}}, specs at{{specs_dir}}/.
- If empty → Invoke
- If no → Continue to item 3.
- If yes → Is
- CWD mismatch check (monorepo only):
- Skip if not in monorepo mode or if the project was just selected in item 1 above.
- If CWD is the repo root → fine, proceed.
- Check which project's path CWD falls inside (compare against all projects in
.groundwork.yml). - If CWD is inside the selected project's path → fine, proceed.
- If CWD is inside a different project's path → warn via
AskUserQuestion:"You're working from
<cwd>(inside [cwd-project]), but the selected Groundwork project is [selected-project] ([selected-project-path]/). What would you like to do?"- "Switch to [cwd-project]"
- "Stay with [selected-project]"
If the user switches, invoke
Skill(skill="groundwork:select-project").
- If CWD doesn't match any project → proceed without warning (shared directory).
- Check
{{specs_dir}}/: Does a specs directory exist?- If yes → Single-project repo, proceed normally.
- If no → Ask the user: "Is this a single-project repo or a monorepo with multiple projects?"
- Single project → Proceed normally (specs will be created at
{{specs_dir}}/) - Monorepo → Invoke
Skill(skill="groundwork:setup-repo")to create.groundwork.yml, then continue.
- Single project → Proceed normally (specs will be created at
Step 1: Load Context
Read the product specs (may be single file or directory) and extract:
- Non-functional requirements (latency, scale, security, compliance)
- Feature list and EARS requirements
- Implicit constraints (budget, team size, timeline if mentioned)
Detection: Check for {{specs_dir}}/product_specs.md first (single file), then {{specs_dir}}/product_specs/ directory. When reading a directory, aggregate all .md files recursively with _index.md first, then numerically-prefixed files, then alphabetically.
If PRD doesn't exist, prompt user to run /groundwork:design-product first.
Summarize key architectural drivers:
"Based on your PRD, the key architectural drivers are:
- [Driver 1 from NFRs]
- [Driver 2 from features] I'll need to make decisions about [list 3-5 major areas]. Let's start with [most foundational one]."
Step 2: Identify Decision Areas
Common architectural decision categories:
| Category | Example Decisions |
| Compute | Serverless vs containers vs VMs, orchestration |
| Data | Database type, multi-tenancy strategy, caching |
| API | REST vs GraphQL, gateway pattern, versioning |
| Frontend | SPA vs SSR, framework choice, state management |
| Auth | Identity provider, token strategy, authorization model |
| Integration | Sync vs async, message queues, event sourcing |
| Infrastructure | Cloud provider, IaC approach, environments |
| Observability | Logging, metrics, tracing, alerting |
| Security | Encryption, network isolation, secrets management |
| Cost | Pricing model alignment, reserved vs on-demand |
Prioritize decisions by dependency (foundational first).
Step 3: Research Technologies
Before presenting decision options, gather research on relevant technologies.
For each decision area identified:
- Identify the primary technologies/frameworks being considered
- Invoke the researcher agent:
Agent( subagent_type="groundwork:researcher:researcher", prompt="Research Topic: [technology] Research Questions: - What is the stable vs latest version? - What is the recommended ecosystem for [use case]? - What are common architectural pitfalls? - What has been deprecated recently? Project Context: [from PRD] Constraints: [from user/PRD]" ) - Use research findings to:
- Inform pros/cons in option presentations
- Add version recommendations to options
- Include ecosystem compatibility in trade-offs
- Surface pitfalls in cons sections
- Reference sources for credibility
Research Integration: When presenting options in Step 4, incorporate research findings:
- Add "(stable: X.Y, latest: A.B)" to technology names
- Include ecosystem compatibility in pros/cons
- Note known pitfalls in cons sections
- Cite sources when making specific claims
Step 4: Iterate on Each Decision
For each decision point, present 2-4 options using this format:
## Decision: [Decision Name]
**Context:** [Why this decision matters, link to PRD requirements]
### Option A: [Name]
**Description:** [1-2 sentences]
**Pros:**
- [Pro 1, ideally linked to PRD requirement]
- [Pro 2]
**Cons:**
- [Con 1, note if it conflicts with PRD requirement]
- [Con 2]
**Cost implications:** [Rough estimate if relevant]
### Option B: [Name]
[Same structure]
### Option C: [Name] (if applicable)
[Same structure]
**My recommendation:** [Option X] because [reasoning tied to PRD].
What are your thoughts? Any constraints I should know about?Presentation style:
- Present one decision at a time, wait for resolution before moving on
- For complex options, break explanation into digestible chunks (200-300 words)
- Prefer multiple-choice follow-up questions when gathering constraints
Exploratory Questions
When presenting options, ask questions to surface hidden constraints:
- "What's your team's experience with [technology X vs Y]?"
- "Are there constraints I should know about? (existing systems, team skills, budget, timeline)"
- "What would you regret in 2 years if we chose wrong here?"
- "Is there organizational momentum toward any particular approach?"
- "What's the cost of changing this decision later if it proves wrong?"
Decision Conflict Detection
Before recording a decision, check for conflicts with earlier decisions:
Check against existing decisions:
- Does this decision contradict or undermine a previous DR?
- Are we choosing a technology incompatible with earlier choices?
- Does this create inconsistency in the architecture?
If conflict detected:
"This decision may conflict with DR-NNN:
- DR-NNN chose [X] for [reason]
- This decision would require [Y], which is incompatible because [explanation]
Options:
- Proceed with new decision and update DR-NNN
- Modify this decision to align with DR-NNN
- Accept both and document the exception
Which approach?"
After user input:
- If user agrees: Record decision and move to next
- If user has concerns: Discuss, possibly add new options
- If user wants to defer: Note as open question, continue
- If conflict identified: Resolve before proceeding
YAGNI for Architecture
- Challenge decisions that add complexity "for future flexibility"
- Prefer simple solutions that can evolve over pre-designed extensibility
- When in doubt, choose the option with fewer moving parts
- Ask: "What's the cost of adding this later vs. building it now?"
Step 4.5: Design It Twice (module interfaces)
Steps 3–4 chose what to build with. For any non-trivial new module, service boundary, or public API in this design, also decide how the interface is shaped — and your first shape is rarely the best.
Invoke Skill(skill="groundwork:design-it-twice"): frame the problem, generate 2–3 divergent designs (parallel Agent fan-out when available, sequential otherwise — no agent teams needed), compare them on depth / locality / seam, and carry an opinionated recommendation into the decision records. Skip for designs with no non-trivial new interface.
Step 5: Document Architecture
When all major decisions are made, create the architecture document using template in ${CLAUDE_PLUGIN_ROOT}/references/architecture/architecture-template.md.
Output location: {{specs_dir}}/architecture.md (single file by default)
Critical: Include ALL decision records with discarded options and reasoning. This is essential for future maintainers to understand why choices were made.
Present the complete document for review before writing.
Architecture Validation
Before writing the architecture document, validate it against the PRD:
- Invoke the prd-architecture-checker agent with draft architecture content and PRD content:
Agent( subagent_type="groundwork:prd-architecture-checker:prd-architecture-checker", prompt="Validate architecture against PRD Architecture Draft: [full draft content] PRD Content: [product_specs.md content] Feature List: [extracted features] NFR List: [extracted NFRs] Constraints: [budget, timeline, team from PRD]" ) - If verdict is
request-changes:- Present findings to user with specific gaps identified
- Address critical and major findings by updating the architecture
- Re-validate until approved
- If verdict is
approve:- Proceed to write
{{specs_dir}}/architecture.md - Note any minor findings as suggestions for documentation improvement
- Proceed to write
Step 5a: Auto-Split Check
Skip this step if the architecture doc is already in directory mode.
After writing the architecture document, check whether it should be split:
- Count lines:
wc -l {{specs_dir}}/architecture.md - Count decision records: number of
### DR-\d+headings in the file
If lines >= 500 OR decision records >= 10:
- Invoke
Skill(skill="groundwork:split-architecture")— this runs automatically with no user input needed. - After the split completes, note in your confirmation: "The architecture doc has been split into directory format at
{{specs_dir}}/architecture/for easier navigation."
If neither threshold is crossed, continue silently.
Step 6: Suggest Next Step
After successfully updating the architecture document, ask what should be the next workflow step:
{
"questions": [{
"question": "What would you like to do next?",
"header": "Next step",
"options": [
{
"label": "Design UX",
"description": "Plan user experience designs and flows"
},
{
"label": "Create tasks",
"description": "Break product/architecture/UX down into tasks"
}
],
"multiSelect": false
}]
}Handle the response:
- Design UX: Run
/groundwork:ux-designto create UX designs - Create tasks: Run
/groundwork:create-tasksto create a list of executable tasks
Decision Record Format (ADR-lite)
Record a decision only when it passes the decision-record gate (${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md): hard to reverse, surprising without context, and a real trade-off — otherwise just implement it. Each qualifying decision is captured inline in the architecture doc (no separate ADR files — housekeeper keeps these current) using this format:
### DR-NNN: [Decision Title]
**Status:** Accepted | Superseded by DR-XXX | Deprecated
**Date:** YYYY-MM-DD
**Context:** [Why this decision was needed]
**Options Considered:**
1. **[Option A]** - [Brief description]
- Pros: [list]
- Cons: [list]
2. **[Option B]** - [Brief description]
- Pros: [list]
- Cons: [list]
**Decision:** [Chosen option]
**Rationale:** [Why this option was selected, referencing PRD requirements]
**Consequences:**
- [Implication 1]
- [Implication 2]Clarifying Questions by Category
Compute & Scaling
- What's your expected load profile? (steady, spiky, predictable growth)
- Any constraints on cold start latency?
- Team's experience with containers/K8s vs serverless?
Data
- What consistency guarantees do you need? (eventual OK vs strong)
- Expected data volume and growth rate?
- Any existing database expertise on the team?
Cost
- Is there a monthly infrastructure budget target?
- Preference for predictable costs vs pay-per-use?
- Any existing cloud commitments or credits?
Team & Operations
- Team size and composition (backend/frontend/devops)?
- On-call expectations?
- Deployment frequency target?
Reference Files
${CLAUDE_PLUGIN_ROOT}/references/architecture/architecture-template.md- Template for architecture document${CLAUDE_PLUGIN_ROOT}/references/architecture/decision-examples.md- Example decision records from real projects
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
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.

