Get the FREE Ultimate OpenClaw Setup Guide →

mvp-design

npx machina-cli add skill Dqz00116/skill-lib/mvp-design --openclaw
Files (1)
SKILL.md
5.7 KB

MVP Design Skill

Design minimal, production-ready code prototypes with clear architecture and self-documenting code.

When to Use

Use this skill when you need to:

  • Design a new module or subsystem from scratch
  • Create a minimal viable prototype (MVP) for rapid iteration
  • Establish coding patterns and architectural decisions
  • Plan implementation before writing actual code
  • Design replacement systems alongside existing ones

Core Principles

1. Code as Documentation

  • Code itself is readable - clear naming, simple structure
  • Minimal comments - code explains itself
  • Self-documenting functions - verb-based naming, obvious parameters

2. Documentation as Design

  • No code in documentation - code lives in the project
  • Document "why", not "how" - architectural decisions and rationale
  • Focus on design patterns - data flow, component interaction
  • Interface contracts - what goes in, what comes out

3. Minimal Viable Scope

  • 5-6 files maximum - forces focus on essentials
  • 500 lines of code - small enough to complete quickly
  • Core functionality only - defer edge cases to later phases

4. Architectural Alignment

  • Use existing infrastructure - leverage project's patterns
  • Follow established conventions - naming, structure, serialization
  • Zero-intrusive design - parallel development, not replacement

Workflow

Phase 1: Architecture Definition

  1. Identify Core Data Structure

    • What is the fundamental entity?
    • Example: MissionInstance (id, kind, status, progress, target)
  2. Define Primary Operations

    • What actions can be performed?
    • Example: Participate, AddProgress, AcceptReward
  3. Map Infrastructure Dependencies

    • What existing systems to leverage?
    • Example: Tinker serialization, SharedTable config, NetMessage
  4. Establish Design Decisions

    • Document "why" for each major choice
    • Example: "Use Save/Load methods for Tinker compatibility"

Phase 2: Component Design

  1. List Required Files

    • Header + Implementation pairs
    • Configuration files
    • Maximum 6 files
  2. Define Component Responsibilities

    • What each file does
    • How components interact
  3. Design Data Flow

    • Input → Processing → Output
    • Serialization path
    • Database interaction
  4. Specify Interface Contracts

    • Function signatures
    • Input/output types
    • Error handling approach

Phase 3: Documentation Production

Structure:

# [ModuleName] MVP Design

## 1. Core Architecture
[Architecture diagram showing components and relationships]

## 2. File Inventory
| File | Path | Responsibility |

## 3. Key Design Decisions
[Document "why" for each major decision]

## 4. Implementation Checklist
[Phase-by-phase checklist]

## 5. Integration Points
[How it connects to existing systems]

## 6. Testing Strategy
[How to verify it works]

Design Decisions Template

For each major decision, document:

### Decision: [Name]

**Choice**: [What was decided]

**Alternatives Considered**:
- Option A: [Description] → Rejected because [reason]
- Option B: [Description] → Rejected because [reason]

**Rationale**:
- [Why this choice]
- [Benefits]
- [Trade-offs]

**Impact**:
- [How it affects other components]
- [Future considerations]

Best Practices

✅ Do

  • Focus on architecture and design
  • Document "why" not "how"
  • Keep scope minimal (5-6 files)
  • Align with existing patterns
  • Use clear, consistent naming

❌ Don't

  • Include actual code in documentation
  • Over-engineer for edge cases
  • Ignore existing conventions
  • Skip design rationale
  • Expand scope mid-design

Example Output Structure

# PlayerMissionSystem MVP Design

## 1. Core Architecture

[MissionInstance] → [PlayerMissionSystem] → [DatabaseMethod] ↓ [MissionConfigData]


## 2. File Inventory

| File | Path | Responsibility |
|------|------|----------------|
| MissionDefines.h | WorldServer/ | Enums and utilities |
| MissionInstance.h | WorldServer/ | Data structure with Save/Load |
| PlayerMissionSystem.h/cpp | WorldServer/ | Core system implementation |

## 3. Key Design Decisions

### Decision: Use Tinker Save/Load

**Choice**: MissionInstance uses Tinker Save/Load methods

**Alternatives**:
- RTS_PACK → Rejected: bitwise copy too restrictive
- Manual serialization → Rejected: error-prone

**Rationale**:
- Type-safe, extensible
- Consistent with project direction
- Easy to add fields later

## 4. Implementation Checklist

### Phase 1: Data Structures
- [ ] MissionInstance with Save/Load
- [ ] MissionConfigData table structure

### Phase 2: Core System
- [ ] PlayerMissionSystem class
- [ ] Participate, AddProgress, AcceptReward methods

### Phase 3: Integration
- [ ] DatabaseMethod additions
- [ ] Player.h integration

## 5. Integration Points

- Uses: Tinker serialization, SharedTable, NetMessage
- Extends: PlayerSubsystem pattern
- Database: player_mission table

## 6. Testing Strategy

- Unit: MissionInstance Save/Load roundtrip
- Integration: Login → Load → Update → Verify

Integration with Other Skills

  • code-analysis: Understand existing patterns before designing
  • code-generator: Generate implementation from design docs
  • knowledge-base-cache: Store design patterns for reuse

Version History

  • v1.0 (2026-02-10) - Initial release
    • Code-as-documentation principles
    • 3-phase workflow
    • Design decision template

Source

git clone https://github.com/Dqz00116/skill-lib/blob/main/mvp-design/SKILL.mdView on GitHub

Overview

This skill guides building minimal, production-ready prototypes with a clear architecture and self-documenting code. It emphasizes documenting the architectural decisions and rationale—rather than implementation details—while keeping scope tight to 5-6 files and about 500 lines of code. The result is maintainable MVPs that align with existing project conventions and infrastructure.

How This Skill Works

It follows a three-phase workflow: Architecture Definition, Component Design, and Documentation Production. In Phase 1 you identify the Core Data Structure, Primary Operations, and dependencies; in Phase 2 you specify file responsibilities and data flow; in Phase 3 you produce a structured MVP design document focusing on rationale and interfaces rather than implementation details.

When to Use It

  • Design a new module or subsystem from scratch
  • Create a minimal viable prototype (MVP) for rapid iteration
  • Establish coding patterns and architectural decisions
  • Plan implementation before writing actual code
  • Design replacement systems alongside existing ones

Quick Start

  1. Step 1: Define Core Data Structure and Primary Operations (Phase 1)
  2. Step 2: Map dependencies, file inventory, and data flow (Phase 2)
  3. Step 3: Produce the MVP Design Document focusing on 'why' and interface contracts (Phase 3)

Best Practices

  • Focus on architecture and design
  • Document why, not how
  • Keep scope minimal (5-6 files) and ~500 LOC
  • Align with existing project patterns
  • Use clear, consistent naming

Example Use Cases

  • Prototype a new authentication module with architecture-first docs and no embedded code
  • Plan a data ingestion MVP and capture data flow and interfaces
  • Replace a legacy reporting subsystem with a small MVP and documented decisions
  • Define an MVP blueprint that reuses the project's serialization and config patterns
  • Draft an MVP for a cross-project API surface with explicit interface contracts

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers