planning-guidelines
БесплатноБез исполняемых скриптовНе проверенCore planning principles for Portfolio Buddy 2 development. Use when: planning any feature implementation, modification, or refactoring. Ensures code…
Об этом скилле
Planning Guidelines for Portfolio Buddy 2
Core Principles
When planning and implementing features for Portfolio Buddy 2, always follow these fundamental principles:
- Preserve Existing Code - Default to extending rather than replacing
- Optimize for Mobile & Desktop - Every feature must work well on both
- Ask Clarifying Questions - Gather complete context before execution
- Integrate Seamlessly - New code should feel native to the existing codebase
Code Preservation Strategy
Default Behavior: Always Preserve
Rule: Preserve existing code unless explicitly instructed to refactor or rewrite.
When implementing new features or fixes:
- ✅ Extend existing components
- ✅ Add new functions alongside existing ones
- ✅ Preserve existing patterns and conventions
- ✅ Maintain backward compatibility
- ❌ Don't refactor working code "just because"
- ❌ Don't introduce new patterns without justification
Exception: Massively Better Options
You MAY propose improvements to existing code ONLY when ALL conditions are met:
- Very Low Risk - Change is isolated, well-understood, easily reversible
- Massive Upside - Significant benefit (correctness, performance, maintainability)
- No Unnecessary Complexity - Solution is simpler or equal complexity
- Clear Justification - Can explain why exception applies
When exception applies, you MUST:
- Explain the problem with current implementation
- Show the proposed improvement
- Demonstrate why it meets all three criteria
- Get user approval before implementing
Real Example: Annual Growth Rate Fix
Situation: During implementation of Trading Days update, discovered Annual Growth Rate calculation was mathematically incorrect.
Current (incorrect) code:
const tradingPeriodDays = uniqueTradingDates.size || 1; // 150 days
const annualGrowthRate = (totalPnl / startingCapital / tradingPeriodDays) * 365 * 100;
// Result: Inflated by mixing trading days (denominator) with calendar day annualization (365)
Why exception applied:
Very Low Risk ✅
- Isolated calculation (one line)
- Easy to understand (calendar days vs trading days)
- Easily reversible if wrong
Massive Upside ✅
- Fixes incorrect financial metric (accuracy critical)
- Returns were inflated by ~2.4x
- Aligns with financial industry standards
No Unnecessary Complexity ✅
- Added 9 lines (calendar day calculation)
- Clearer, more correct logic
- No new dependencies
Result: User approved fix immediately because exception criteria were clearly met.
Mobile & Desktop Optimization
Every feature must be optimized for both mobile and desktop experiences.
Quick Reference Checklist
✅ Use Responsive Tailwind Classes
- Base styles for mobile (no prefix)
sm:for small screens (640px+)md:for medium screens (768px+)lg:for large screens (1024px+)
✅ Touch Targets
- Minimum 44x44 pixels for all interactive elements
- Use
touch-manipulationCSS class for better touch response
✅ Test Both Viewports
- Verify layout works on mobile and desktop before completion
- Check that text is readable on small screens
- Ensure buttons/inputs are appropriately sized
Existing Patterns to Follow
Portfolio Buddy 2 already has excellent responsive patterns. Reference these:
Example 1: Responsive Text Sizing
className="text-xs sm:text-sm" // Smaller on mobile
className="text-base sm:text-lg" // Larger on desktop
Example 2: Responsive Spacing
className="gap-1 sm:gap-2" // Tighter gaps on mobile
className="px-2 sm:px-4 py-2 sm:py-3" // Smaller padding on mobile
Example 3: Responsive Layout
className="flex flex-col sm:flex-row" // Stack on mobile, row on desktop
Example 4: Responsive Visibility
<span className="hidden sm:inline">Total Margin</span> // Hide text on mobile, show on desktop
See: src/components/PortfolioSection.tsx for comprehensive examples of responsive patterns throughout the application.
Clarifying Questions Framework
When to Ask Questions
Ask clarifying questions BEFORE executing when:
- Requirements are ambiguous
- Multiple valid approaches exist
- Decision affects architecture or user experience
- User's request could be interpreted multiple ways
- You need context about business logic or domain knowledge
Question Format Template
Use this structure for ALL clarifying questions:
## Clarifying Question: [Topic]
[Brief context about why you need to ask]
**Option A: [Approach Name]** ✅ (Recommended)
- [Detail about approach]
- [Key characteristics]
- **Pros:** [Benefits]
- **Cons:** [Trade-offs]
- **Why experts prefer this:** [Technical reasoning from domain expert perspective]
**Option B: [Alternative Approach]**
- [Detail about approach]
- [Key characteristics]
- **Pros:** [Ben
Установить planning-guidelines в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл planning-guidelines?
Core planning principles for Portfolio Buddy 2 development. Use when: planning any feature implementation, modification, or refactoring. Ensures code preservation, mobile/desktop optimization, and thorough requirement gathering.
Как установить скилл planning-guidelines?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл planning-guidelines запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic