aiskillstore/planning-framework
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.
This is a copy. The original lives at comeonoliver/planning-framework.
npx skills add https://github.com/aiskillstore/marketplace --skill planning-framework
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 useSorting hook 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:
> `typescript
> 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:
> `typescript
> // 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 any type 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:
Take aiskillstore/planning-framework from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.