planning-architecture
Skill5 starsChanged 17 days agoMITView on GitHub
Plan new or redesigned system architecture - define components, boundaries, interactions, and technical decisions before implementation
In this repository50 other files it gives its agents.
- analyze-pr-commentsSkill
- architecture-analyzeSkill
- architecture-tradeoffSkill
- askSkill
- code-smellsSkill
- debugging-rocprof-sysSkill
- exploration-explore-codeSkill
- git-commitSkill
- git-gh-clientSkill
- git-prepare-pull-requestSkill
- git-pull-request-statusSkill
- gitSkill
- grill-meSkill
- library-amd-smiSkill
- notify-meSkill
- planning-baseSkill
- planning-bugfixSkill
- planning-docsSkill
- planning-featureSkill
- planning-refactorSkill
- programming-cmake-best-practicesSkill
- programming-cpp-constexprSkill
- programming-cpp-design-patternsSkill
- programming-cpp-naming-rulesSkill
- programming-cpp-policy-based-diSkill
- programming-cppSkill
- programming-cpp-stl-algorithmsSkill
- programming-pythonSkill
- pr-review-interactiveSkill
- pr-reviewSkill
- radisha-create-skillSkill
- radisha-helpSkill
- radisha-improve-skillSkill
- radisha-skillsSkill
- radisha-updateSkill
- refactoring-techniquesSkill
- review-architectureSkill
- rocprofsys-buildSkill
- rocprofsys-configureSkill
- rocprofsysSkill
- static-analysisSkill
- testing-gtest-gmockSkill
- testing-pytestSkill
- testing-testplanSkill
- therock-build-to-commitSkill
- therock-commit-in-buildSkill
- therock-first-build-with-commitSkill
- update-pr-descriptionSkill
- verify-pmc-metricsSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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
- Distinctive: line 8
Use this skill when designing NEW architecture or planning REDESIGN of existing architecture.
- Distinctive: line 13
Follow all base planning rules, plus the architecture-specific rules below.
- Very specific: line 32
Use AskUserQuestion to ask:
- Distinctive: line 38
Wait for answer before proceeding.
- Distinctive: line 42
Before designing the new architecture, understand what exists:
- Distinctive: line 46
Document the constraints: what cannot change (APIs, data formats, external dependencies)
- Distinctive: line 62
If the system is on a hot path or performance-critical, this changes the polymorphism strategy:
- Distinctive: line 72
Always ask whether the code is on a hot path.
- Distinctive: line 82
ALWAYS present at least 2 architectural alternatives.
- Distinctive: line 118
Ask: "Which direction do you prefer?
- Distinctive: line 124
After the user picks a direction, flesh out the design.
- Distinctive: line 156
If redesigning existing architecture:
≈ “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.
Files
Architecture Planning
Use this skill when designing NEW architecture or planning REDESIGN of existing architecture.
<IMPORTANT>
**Prerequisites:** Invoke `planning-base` skill first if not already loaded. It provides the core planning phases (0-5).Follow all base planning rules, plus the architecture-specific rules below.
Mandatory: Invoke programming-cpp-design-patterns during Phase 4 (detailing the architecture). Consider which patterns apply to the component interactions and extension points being designed.
Key distinction:
planning-architecture= design what WILL BE built (this skill)review-architecture= document what already EXISTS</IMPORTANT>
When to Use
- Designing a new system, module, or component from scratch
- Redesigning or migrating existing architecture
- Making decisions that affect multiple components or modules
- Choosing between architectural patterns or technologies
- Defining system boundaries, APIs, or integration points
Phase 1: Determine Scope
Use AskUserQuestion to ask:
"What kind of architecture work is this?"
- Greenfield - Design a new system or component from scratch
- Redesign - Change the architecture of something that already exists
Wait for answer before proceeding.
If Redesign: Understand Current State
Before designing the new architecture, understand what exists:
- Invoke
review-architectureorexploration-explore-codeto analyze the current system - Identify what works well (keep), what is broken (fix), and what is missing (add)
- Document the constraints: what cannot change (APIs, data formats, external dependencies)
Phase 2: Gather Requirements
Identify and confirm with the user:
| Category | Questions |
| Functional | What must the system do? What are the core capabilities? |
| Non-functional | Performance targets, scalability needs, reliability requirements |
| Performance | Is this on a hot path? How frequently is it called? Is latency critical? |
| Constraints | Technology stack, team expertise, timeline, budget, legacy compatibility |
| Integration | What external systems must it connect to? What protocols/formats? |
Performance-Sensitive Design
If the system is on a hot path or performance-critical, this changes the polymorphism strategy:
| Technique | Overhead | When to Use |
| Virtual interfaces | vtable indirection, heap allocation, cache-unfriendly | Rare calls, set of types unknown at compile time |
| std::variant + std::visit | Zero indirection, stack-allocated, cache-friendly | Fixed set of known types (preferred for hot paths) |
| Templates / Policy-based design | Zero overhead, resolved at compile time | Types known at compile time, maximum performance |
| CRTP | Zero overhead, compile-time polymorphism | Static dispatch with base class behavior |
<IMPORTANT>
Always ask whether the code is on a hot path. If yes, prefer compile-time polymorphism (templates, std::variant, CRTP) over virtual interfaces. Virtual dispatch has vtable indirection and prevents inlining — avoid it in performance-critical code.
</IMPORTANT>Present findings and ask: "Are these requirements complete, or should I add/change anything?"
Wait for answer before proceeding.
Phase 3: Propose Alternatives
<IMPORTANT>
ALWAYS present at least 2 architectural alternatives. Never propose a single solution without showing what was considered and rejected.
</IMPORTANT>For each alternative, describe:
| Aspect | What to Cover |
| Overview | High-level description of the approach |
| Components | What modules/services/layers exist |
| Interactions | How components communicate |
| Trade-offs | Pros and cons relative to requirements |
| Risk | What could go wrong, what is hard to change later |
| Effort | Relative complexity of implementation |
Present alternatives in a comparison table:
## Architectural Alternatives
### Alternative A: [Name]
[Description]
### Alternative B: [Name]
[Description]
### Comparison
| Criterion | Alternative A | Alternative B |
|-----------|---------------|---------------|
| Meets functional requirements | Yes/Partial/No | Yes/Partial/No |
| Performance | [assessment] | [assessment] |
| Complexity | [Low/Medium/High] | [Low/Medium/High] |
| Extensibility | [assessment] | [assessment] |
| Risk | [assessment] | [assessment] |Ask: "Which direction do you prefer? Or should I explore a different approach?"
Wait for answer before proceeding.
Phase 4: Detail the Chosen Architecture
After the user picks a direction, flesh out the design. Cover these sections one at a time, getting user approval between each:
4.1 Class Diagram
Generate a Mermaid class diagram showing all components, their interfaces, relationships, and ownership. Present it for user approval before continuing.
4.2 Component Breakdown
Define each component:
- Responsibility (what it does and does NOT do)
- Public interface (what it exposes to other components)
- Internal structure (sub-components if any)
- Ownership boundaries (what data/state it owns)
4.3 Interactions and Data Flow
For each pair of interacting components:
- Direction of communication (who calls whom)
- Protocol or mechanism (function call, message queue, API, event)
- Data exchanged (types, formats)
- Error handling (what happens when communication fails)
4.4 Extension Points
Where and how the system can be extended:
- Plugin interfaces or abstract base classes
- Configuration-driven behavior
- Feature flags or conditional compilation
- Module boundaries designed for future expansion
4.5 Migration Plan (Redesign Only)
If redesigning existing architecture:
- Incremental migration steps (never big-bang)
- What can be changed independently
- Backward compatibility during transition
- Rollback strategy for each step
- Data migration approach if applicable
<IMPORTANT>
Present each section (4.1-4.5) individually. Wait for user approval before moving to the next section. Revise if the user requests changes.
</IMPORTANT>Phase 5: Risk Analysis
Identify architectural risks:
| Risk | Impact | Likelihood | Mitigation |
| [risk description] | [High/Medium/Low] | [High/Medium/Low] | [how to address] |
Focus on:
- Decisions that are hard to reverse later
- Single points of failure
- Scalability bottlenecks
- Coupling that will make future changes expensive
- Technology bets that may not pay off
Phase 6: Create Implementation Roadmap
Break the architecture into implementable work items:
- Foundation first - Core abstractions, interfaces, base components
- Critical path next - The most important or risky pieces
- Incremental delivery - Each step produces something usable or testable
- Tests alongside - Each component should be testable in isolation
Map work items to PRs following planning-base PR size guidelines.
Plan File Format
Save to planning/architecture-<name>.md:
# Architecture: <System/Component Name>
## Goal
<What is being designed and why>
## Type
<Greenfield / Redesign>
## Requirements
### Functional
- <Requirement 1>
- <Requirement 2>
### Non-Functional
- <Requirement 1>
### Constraints
- <Constraint 1>
## Alternatives Considered
### Alternative A: <Name>
<Summary and why chosen/rejected>
### Alternative B: <Name>
<Summary and why chosen/rejected>
**Chosen:** Alternative <X> because <reason>
## Architecture Design
### Components
| Component | Responsibility | Interface |
|-----------|---------------|-----------|
| <name> | <what it does> | <what it exposes> |
### Interactions
| From | To | Mechanism | Data |
|------|----|-----------|------|
| <component> | <component> | <how> | <what> |
### Extension Points
- <Where and how the system can be extended>
## Migration Plan (if redesign)
- [ ] Step 1: <description>
- [ ] Step 2: <description>
## Risks
| Risk | Impact | Mitigation |
|------|--------|------------|
| <risk> | <level> | <how> |
## Implementation Roadmap
### PR 1: <Title>
**Scope:** <What's included>
- [ ] Task 1
- [ ] Task 2
### PR 2: <Title>
**Scope:** <What's included>
- [ ] Task 1
- [ ] Task 2
## Notes
<Decisions, trade-offs, open questions>Common Mistakes
| Mistake | Fix |
| Jumping to a single solution without alternatives | Always present at least 2 alternatives with trade-offs |
| Designing without understanding requirements | Gather and confirm requirements first |
| Big-bang migration plan | Break redesign into incremental steps with rollback |
| Over-engineering for hypothetical future needs | Design for known requirements, add extension points only where likely |
| Detailing all sections at once | Present one section at a time, get approval between each |
| Skipping risk analysis | Hard-to-reverse decisions need explicit risk assessment |
| Ignoring current state in redesign | Always analyze what exists before proposing changes |
Rationalizations to Reject
| Excuse | Reality |
| "The answer is obvious, no need for alternatives" | Even obvious choices benefit from documenting what was rejected and why |
| "We'll figure out migration later" | Migration is the hardest part of redesign. Plan it upfront. |
| "Requirements are clear from context" | Confirm anyway. Assumptions are the root of architectural drift. |
| "It's a small system, no need for formal planning" | Small systems grow. Early decisions are the hardest to change later. |
Integration with Other Skills
| Before This Skill | Use |
| Understanding existing code | exploration-explore-code |
| Documenting current architecture | review-architecture |
| After This Skill | Use |
| Implementing planned features | planning-feature |
| Refactoring toward new architecture | planning-refactor |
| Creating test plans | testing-testplan |
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.

