skills/5minfutures/planning-framework/SKILL.md
Apply structured thinking before coding. Use when: starting new features, making architectural decisions, refactoring large components, or evaluating implementation approaches. Includes Musk's 5-step algorithm and ICE scoring framework.
npx skillsauth add aiskillstore/marketplace planning-frameworkInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before starting ANY significant coding task:
Question everything:
Portfolio Buddy 2 Example:
Request: "Add sortable columns to metrics table"
Questions:
- Why? Users want to find best/worst performing strategies quickly
- Simpler solution? Just default sort by Sharpe Ratio (most important metric)
- Alternative? Add "Top 3" and "Bottom 3" highlight sections
Decision: Implemented full multi-column sorting via
useSortinghook because:
- Different users care about different metrics (Sharpe vs Sortino vs Max DD)
- Sorting is O(n log n) - negligible for <100 strategies
- Reusable hook can be used in future tables
What can we eliminate?
Rule: If you don't add back 10% of what you deleted, you didn't delete enough.
Portfolio Buddy 2 Example:
Discovery: Recharts library (11.5KB) installed but never imported
Questions:
- Is it used anywhere? NO - search reveals zero imports
- Why was it installed? Probably initial plan, switched to Chart.js
- Can we delete it? YES - nothing depends on it
Action:
npm uninstall recharts(saves 11.5KB in bundle)Result: Cleaner dependency tree, faster installs, smaller bundle
Only after deleting:
Portfolio Buddy 2 Example:
Problem: PortfolioSection.tsx is 591 lines (3x the 200-line limit)
Before Optimization:
function PortfolioSection() { // 50 lines of contract multiplier logic // 40 lines of date filtering logic // 100 lines of Chart.js configuration // 80 lines of statistics calculations // 300+ lines of JSX rendering }After Simplification:
// Extract hooks const portfolio = usePortfolio(files, dateRange) const contracts = useContractMultipliers(strategies) // Extract components <ContractControls {...contracts} /> <EquityChartSection data={portfolio.equity} /> <PortfolioStats metrics={portfolio.metrics} />Result: Main component < 100 lines, logic encapsulated, reusable
Portfolio Buddy 2 Example:
Before: Create React App build time: ~30 seconds
Action: Migrated to Vite
After: Vite build time: ~2 seconds (15x faster)
Impact: Developer can iterate 15x more per hour
Last step only - automate what's proven necessary.
Portfolio Buddy 2 Example:
Don't automate yet: CI/CD pipeline
- Manual Cloudflare deployments work fine for now
- Only deploying 2-3x per month
- Setting up GitHub Actions would take 2-4 hours
- Wait until deployment frequency increases
Should automate: TypeScript checking on commit
- Would catch
anytype violations before merge- Git pre-commit hook:
tsc --noEmit- Saves debugging time later
Evaluate solutions using:
ICE Score = (Impact × Confidence × Ease) / 10
Feature: Add React error boundaries around risky components
Decision: Should implement soon. Quick win, high impact.
Feature: Add Excel export button for metrics table
Decision: Worth implementing. Clear user value, reasonable effort.
Feature: Split 591-line component into smaller pieces
Decision: Important for code health, but not urgent. Do after user-facing features.
Feature: Live market data updates in charts
Decision: Skip for now. Doesn't fit core use case (historical analysis).
Feature: Uninstall unused Recharts library
npm uninstall recharts)Decision: Easy quick win. Do it next time touching package.json.
Feature: Add Sortino Ratio metric (already completed)
Result: Successfully implemented in commits 258ba3a & 9f25040.
| ICE Score Range | Priority | Action | |-----------------|----------|--------| | 40+ | High | Do soon, within 1-2 sprints | | 25-39 | Medium-High | Plan for next 2-3 sprints | | 15-24 | Medium | Backlog, do when capacity available | | 10-14 | Low | Consider if very easy or strategic | | < 10 | Very Low | Probably skip unless requirements change |
Before coding:
After planning:
any)Step 1 - Requirements:
Step 2 - Delete:
Step 3 - Simplify:
calculateMetrics() functionICE Score: 50.4 (High Priority)
Approach:
calculateSortino() to dataUtils.tsTime Estimate: 3-4 hours
Result: Completed successfully, but found calculation bug (commit 9f25040 fixed it).
Implementation Note: Sortino was implemented inline in PortfolioSection.tsx (lines 133-158) rather than in dataUtils.ts. This decision was made because:
Step 1 - Requirements:
Step 2 - Delete:
Step 3 - Simplify:
ContractControls.tsx (contract multiplier UI)EquityChartSection.tsx (Chart.js config)PortfolioStats.tsx (statistics display)ICE Score: 19.2 (Medium Priority)
Approach:
Time Estimate: 4-6 hours (tedious but straightforward)
Risks:
Decision: Medium priority. Do after more urgent user-facing features.
Step 1 - Requirements:
Step 2 - Delete:
Step 3 - Simplify:
ICE Score: 24 (Medium Priority)
Approach:
npm install -D vitestdataUtils.test.tsTime Estimate: 6-8 hours (learning curve + writing tests)
Tests to Write:
calculateSharpe() with known datacalculateSortino() with known datacalculateCorrelation() edge casesparseCSV() error handlingany types for now" (technical debt accumulates)any type violationsWhen you're about to start coding, ask:
Then write your plan as:
Finally:
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.