Skip to main content

Prototype Mode

Build rapid prototype for: $ARGUMENTS

System Prompt

⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. IMMEDIATELY execute - no questions, no explanations first
  2. ALWAYS show full output from script/tool execution
  3. ALWAYS provide summary after execution completes

DO NOT:

  • Say "I don't need to take action" - you ALWAYS execute when invoked
  • Ask for confirmation unless requires_confirmation: true in frontmatter
  • Skip execution even if it seems redundant - run it anyway

The user invoking the command IS the confirmation.


Usage

# Build a quick prototype
/prototype "chat interface with WebSocket"

# Prototype API endpoint
/prototype "REST API for file upload"

# Prototype with specific tech
/prototype "real-time dashboard" --stack react,websocket

# Prototype to validate idea
/prototype "recommendation engine" --minimal

Prototyping Guidelines

Focus Areas

  • Core functionality only - Skip edge cases initially
  • Fast iteration - Optimize for learning, not production
  • Minimal dependencies - Use standard library where possible
  • Clear TODO markers - Document what's missing for production

Acceptable Shortcuts

ALLOWED in prototypes:

  • Simplified error handling (basic try/catch)
  • In-memory data structures (no persistence initially)
  • Print statements for debugging
  • Hardcoded config values
  • TODO comments for production concerns

NEVER SKIP (even in prototypes):

  • Input validation (prevent crashes)
  • Basic error messages (debuggability)
  • Type hints (clarity)
  • Core algorithm correctness
  • Brief documentation

Output Structure

# Prototype: [Feature Name]
# Purpose: [What this proves/tests]
# Production TODO:
# - Add circuit breakers for external calls
# - Replace prints with structured logging
# - Add comprehensive error handling
# - Implement persistence (currently in-memory)
# - Add metrics and observability

from typing import Optional

def prototype_function(input: str) -> Optional[dict]:
"""
Prototype implementation of [feature].

Args:
input: Description

Returns:
Result or None if failed

TODO: Production version needs:
- Retry logic with backoff
- Circuit breaker on external calls
- Structured error types
"""
try:
# Core logic here
result = process(input)
print(f"✓ Processed: {result}") # TODO: Replace with logger
return result
except Exception as e:
print(f"✗ Error: {e}") # TODO: Structured error handling
return None

Integration

  • Auto-load: None (prototype mode is intentionally minimal)
  • Use: Type hints for clarity
  • Use: Input validation to prevent crashes

Iteration Strategy

  1. Iteration 1: Core happy path only
  2. Iteration 2: Add basic error handling
  3. Iteration 3: Add key edge cases
  4. Production: Use /implement to build production version

Best Practices

DO:

  • Mark all TODOs for production
  • Validate inputs to prevent crashes
  • Use type hints
  • Keep it simple and focused
  • Test the happy path
  • Document assumptions

DON'T:

  • Over-engineer the prototype
  • Spend time on perfect error handling
  • Add complex abstractions
  • Optimize prematurely
  • Forget what needs production hardening

Required Tools

ToolPurposeRequired
WriteCreate prototype filesYes
BashRun/test prototypeYes
ReadAnalyze existing patternsOptional

Note: Prototype mode intentionally uses minimal tooling for rapid iteration.

Output Validation

Before marking complete, verify output contains:

  • Core functionality implemented
  • Happy path working
  • TODO comments for production concerns
  • Input validation present (crash prevention)
  • Type hints on functions
  • Brief documentation
  • Clear list of production hardening needs

Action Policy

<default_behavior> This command implements changes by default when user intent is clear. Proceeds with:

  • Code generation/modification
  • File creation/updates
  • Configuration changes
  • Git operations (if applicable)

Provides concise progress updates during execution. </default_behavior>

After execution, verify: - Files created/modified as intended - Code compiles/tests pass (if applicable) - Git changes committed (if applicable) - Next recommended step provided

Success Output

When prototype completes:

✅ COMMAND COMPLETE: /prototype
Feature: <feature>
Files: <N> created
Status: Prototype ready
TODOs: <N> for production

Completion Checklist

Before marking complete:

  • Core functionality works
  • Happy path tested
  • TODOs documented
  • Code runs without crashes
  • Brief docs added

Failure Indicators

This command has FAILED if:

  • ❌ No description provided
  • ❌ Code doesn't run
  • ❌ Happy path fails
  • ❌ No TODOs marked

When NOT to Use

Do NOT use when:

  • Production code needed (use /implement)
  • Full error handling required
  • Performance critical

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Over-engineerWasted timeKeep minimal
Skip TODOsLost contextDocument all shortcuts
No input validationCrashesAlways validate

Principles

This command embodies:

  • #3 Complete Execution - Working prototype
  • #7 Keep It Simple - Minimal viable
  • #6 Clear, Understandable - Clear TODOs

Full Standard: CODITECT-STANDARD-AUTOMATION.md