@nestpilot/mcp-app 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +350 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +214 -0
- package/dist/cli/export-import.d.ts +6 -0
- package/dist/cli/export-import.js +132 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +168 -0
- package/dist/cli/init.d.ts +1 -0
- package/dist/cli/init.js +171 -0
- package/dist/host-configs/cowork.json +11 -0
- package/dist/host-configs/goose.yaml +22 -0
- package/dist/host-configs/openclaw-manifest.json +16 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +128 -0
- package/dist/mcp-app.html +155 -0
- package/dist/nestpilot-client.d.ts +44 -0
- package/dist/nestpilot-client.js +160 -0
- package/dist/planner.html +222 -0
- package/dist/server.d.ts +19 -0
- package/dist/server.js +245 -0
- package/dist/skills/SKILL.md +162 -0
- package/dist/skills/manifest.json +51 -0
- package/dist/skills/tools/activate_plan.md +36 -0
- package/dist/skills/tools/coach.md +59 -0
- package/dist/skills/tools/comprehensive_plan.md +65 -0
- package/dist/skills/tools/create_plan.md +59 -0
- package/dist/skills/tools/create_saved_plan.md +49 -0
- package/dist/skills/tools/delete_plan.md +42 -0
- package/dist/skills/tools/delete_scenario.md +38 -0
- package/dist/skills/tools/generate_proposal.md +63 -0
- package/dist/skills/tools/generate_retirement_report.md +50 -0
- package/dist/skills/tools/get_active_plan.md +44 -0
- package/dist/skills/tools/get_baseline_forecast.md +47 -0
- package/dist/skills/tools/get_plan.md +44 -0
- package/dist/skills/tools/get_plan_components.md +50 -0
- package/dist/skills/tools/get_scenario.md +46 -0
- package/dist/skills/tools/list_plans.md +44 -0
- package/dist/skills/tools/list_scenarios.md +42 -0
- package/dist/skills/tools/medicare-guardian.md +59 -0
- package/dist/skills/tools/nestpilot_run_plan.md +61 -0
- package/dist/skills/tools/optimize_roth_conversion.md +107 -0
- package/dist/skills/tools/optimize_ss_claiming.md +30 -0
- package/dist/skills/tools/rename_plan.md +34 -0
- package/dist/skills/tools/retirement-planner.md +55 -0
- package/dist/skills/tools/run_forecast.md +65 -0
- package/dist/skills/tools/run_saved_forecast.md +52 -0
- package/dist/skills/tools/run_scenario.md +66 -0
- package/dist/skills/tools/save_plan.md +48 -0
- package/dist/skills/tools/save_scenario.md +50 -0
- package/dist/skills/tools/verify_forecast.md +43 -0
- package/dist/src/config.d.ts +20 -0
- package/dist/src/config.js +44 -0
- package/dist/src/contracts/provenance.d.ts +37 -0
- package/dist/src/contracts/provenance.js +71 -0
- package/dist/src/contracts/tool-contract-registry.d.ts +43 -0
- package/dist/src/contracts/tool-contract-registry.js +282 -0
- package/dist/src/local/cloud-compute-client.d.ts +55 -0
- package/dist/src/local/cloud-compute-client.js +135 -0
- package/dist/src/local/encryption.d.ts +24 -0
- package/dist/src/local/encryption.js +105 -0
- package/dist/src/local/keychain.d.ts +41 -0
- package/dist/src/local/keychain.js +236 -0
- package/dist/src/local/local-config.d.ts +34 -0
- package/dist/src/local/local-config.js +61 -0
- package/dist/src/local/local-data-layer.d.ts +20 -0
- package/dist/src/local/local-data-layer.js +15 -0
- package/dist/src/local/local-plan-store.d.ts +66 -0
- package/dist/src/local/local-plan-store.js +195 -0
- package/dist/src/local/pii-scrubber.d.ts +26 -0
- package/dist/src/local/pii-scrubber.js +219 -0
- package/dist/src/policy/policy-engine.d.ts +44 -0
- package/dist/src/policy/policy-engine.js +119 -0
- package/dist/src/rate-limit.d.ts +17 -0
- package/dist/src/rate-limit.js +41 -0
- package/dist/src/security.d.ts +19 -0
- package/dist/src/security.js +118 -0
- package/dist/src/skills/index.d.ts +12 -0
- package/dist/src/skills/index.js +16 -0
- package/dist/src/skills/retirement-pack-v1.d.ts +28 -0
- package/dist/src/skills/retirement-pack-v1.js +295 -0
- package/dist/src/skills/skill-executor.d.ts +65 -0
- package/dist/src/skills/skill-executor.js +174 -0
- package/dist/src/skills/skill-manifest-schema.d.ts +337 -0
- package/dist/src/skills/skill-manifest-schema.js +94 -0
- package/dist/src/skills/skill-registry.d.ts +71 -0
- package/dist/src/skills/skill-registry.js +116 -0
- package/dist/src/telemetry.d.ts +12 -0
- package/dist/src/telemetry.js +59 -0
- package/dist/src/types.d.ts +46 -0
- package/dist/src/types.js +4 -0
- package/dist/tools/agent-tools.d.ts +12 -0
- package/dist/tools/agent-tools.js +141 -0
- package/dist/tools/forecast-management-tools.d.ts +9 -0
- package/dist/tools/forecast-management-tools.js +133 -0
- package/dist/tools/local-plan-tools.d.ts +8 -0
- package/dist/tools/local-plan-tools.js +357 -0
- package/dist/tools/mcp-helpers.d.ts +52 -0
- package/dist/tools/mcp-helpers.js +177 -0
- package/dist/tools/medicare-tools.d.ts +3 -0
- package/dist/tools/medicare-tools.js +162 -0
- package/dist/tools/optimize-roth-tools-test.d.ts +2 -0
- package/dist/tools/optimize-roth-tools-test.js +36 -0
- package/dist/tools/optimize-roth-tools.d.ts +3 -0
- package/dist/tools/optimize-roth-tools.js +818 -0
- package/dist/tools/plan-management-tools.d.ts +3 -0
- package/dist/tools/plan-management-tools.js +196 -0
- package/dist/tools/planning-tools.d.ts +3 -0
- package/dist/tools/planning-tools.js +290 -0
- package/dist/tools/proposal-tools.d.ts +3 -0
- package/dist/tools/proposal-tools.js +428 -0
- package/dist/tools/report-tools.d.ts +3 -0
- package/dist/tools/report-tools.js +245 -0
- package/dist/tools/scenario-management-tools.d.ts +3 -0
- package/dist/tools/scenario-management-tools.js +136 -0
- package/dist/views/verification-packet.html +211 -0
- package/host-configs/cowork.json +11 -0
- package/host-configs/goose.yaml +22 -0
- package/host-configs/openclaw-manifest.json +16 -0
- package/package.json +66 -0
- package/skills/SKILL.md +162 -0
- package/skills/manifest.json +51 -0
- package/skills/tools/activate_plan.md +36 -0
- package/skills/tools/coach.md +59 -0
- package/skills/tools/comprehensive_plan.md +65 -0
- package/skills/tools/create_plan.md +59 -0
- package/skills/tools/create_saved_plan.md +49 -0
- package/skills/tools/delete_plan.md +42 -0
- package/skills/tools/delete_scenario.md +38 -0
- package/skills/tools/generate_proposal.md +63 -0
- package/skills/tools/generate_retirement_report.md +50 -0
- package/skills/tools/get_active_plan.md +44 -0
- package/skills/tools/get_baseline_forecast.md +47 -0
- package/skills/tools/get_plan.md +44 -0
- package/skills/tools/get_plan_components.md +50 -0
- package/skills/tools/get_scenario.md +46 -0
- package/skills/tools/list_plans.md +44 -0
- package/skills/tools/list_scenarios.md +42 -0
- package/skills/tools/medicare-guardian.md +59 -0
- package/skills/tools/nestpilot_run_plan.md +61 -0
- package/skills/tools/optimize_roth_conversion.md +107 -0
- package/skills/tools/optimize_ss_claiming.md +30 -0
- package/skills/tools/rename_plan.md +34 -0
- package/skills/tools/retirement-planner.md +55 -0
- package/skills/tools/run_forecast.md +65 -0
- package/skills/tools/run_saved_forecast.md +52 -0
- package/skills/tools/run_scenario.md +66 -0
- package/skills/tools/save_plan.md +48 -0
- package/skills/tools/save_scenario.md +50 -0
- package/skills/tools/verify_forecast.md +43 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# NestPilot MCP Server — Goose Host Configuration
|
|
2
|
+
#
|
|
3
|
+
# Add this to your Goose profile configuration:
|
|
4
|
+
# ~/.config/goose/profiles.yaml
|
|
5
|
+
#
|
|
6
|
+
# Under the `extensions:` section of your active profile,
|
|
7
|
+
# paste the following block.
|
|
8
|
+
#
|
|
9
|
+
# @feature FEAT-0088
|
|
10
|
+
|
|
11
|
+
extensions:
|
|
12
|
+
nestpilot:
|
|
13
|
+
type: mcp
|
|
14
|
+
transport: stdio
|
|
15
|
+
command: npx
|
|
16
|
+
args: ["nestpilot-mcp-server"]
|
|
17
|
+
env:
|
|
18
|
+
NESTPILOT_MODE: local
|
|
19
|
+
# Optional overrides:
|
|
20
|
+
# NESTPILOT_DATA_DIR: "~/.nestpilot"
|
|
21
|
+
# NESTPILOT_CLOUD_API_URL: "https://api.nestpilot.com"
|
|
22
|
+
# NESTPILOT_API_KEY: "your-api-key"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nestpilot",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Local-first retirement planning — your data stays on your machine",
|
|
5
|
+
"transport": "stdio",
|
|
6
|
+
"command": "npx",
|
|
7
|
+
"args": ["nestpilot-mcp-server"],
|
|
8
|
+
"env": {
|
|
9
|
+
"NESTPILOT_MODE": "local"
|
|
10
|
+
},
|
|
11
|
+
"capabilities": {
|
|
12
|
+
"tools": true,
|
|
13
|
+
"resources": true,
|
|
14
|
+
"apps": true
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nestpilot/mcp-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "NestPilot MCP App — Retirement planning tools and interactive views",
|
|
6
|
+
"bin": {
|
|
7
|
+
"nestpilot-mcp-server": "dist/cli/index.js",
|
|
8
|
+
"nestpilot": "dist/cli/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"host-configs/",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build:medicare": "vite build",
|
|
18
|
+
"build:planner": "vite build --config vite.planner.config.ts",
|
|
19
|
+
"build:verification": "vite build --config vite.verification.config.ts",
|
|
20
|
+
"build": "npm run build:medicare && npm run build:planner && npm run build:verification",
|
|
21
|
+
"build:package": "tsx scripts/build-npm-package.ts",
|
|
22
|
+
"serve": "tsx main.ts",
|
|
23
|
+
"serve:auth": "node ./scripts/start-auth.mjs",
|
|
24
|
+
"serve:auth:stdio": "node ./scripts/start-auth.mjs --stdio",
|
|
25
|
+
"start": "npm run build && npm run serve",
|
|
26
|
+
"test": "vitest run"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@modelcontextprotocol/ext-apps": "^1.0.1",
|
|
30
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
31
|
+
"@opentelemetry/api": "^1.9.0",
|
|
32
|
+
"@opentelemetry/resources": "^1.30.1",
|
|
33
|
+
"@opentelemetry/sdk-trace-base": "^1.30.1",
|
|
34
|
+
"@opentelemetry/sdk-trace-node": "^1.30.1",
|
|
35
|
+
"@opentelemetry/semantic-conventions": "^1.30.0",
|
|
36
|
+
"class-variance-authority": "^0.7.1",
|
|
37
|
+
"clsx": "^2.1.1",
|
|
38
|
+
"commander": "^13.1.0",
|
|
39
|
+
"cors": "^2.8.6",
|
|
40
|
+
"dotenv": "^17.2.3",
|
|
41
|
+
"express": "^5.2.1",
|
|
42
|
+
"lucide-react": "^0.563.0",
|
|
43
|
+
"react": "^18.3.1",
|
|
44
|
+
"react-dom": "^18.3.1",
|
|
45
|
+
"recharts": "^3.7.0",
|
|
46
|
+
"tailwind-merge": "^3.4.0",
|
|
47
|
+
"zod": "^3.24.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/cors": "^2.8.19",
|
|
51
|
+
"@types/express": "^4.17.25",
|
|
52
|
+
"@types/node": "^22.10.5",
|
|
53
|
+
"@types/react": "^18.3.18",
|
|
54
|
+
"@types/react-dom": "^18.3.5",
|
|
55
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
56
|
+
"autoprefixer": "^10.4.24",
|
|
57
|
+
"postcss": "^8.5.6",
|
|
58
|
+
"tailwindcss": "^3.4.19",
|
|
59
|
+
"tailwindcss-animate": "^1.0.7",
|
|
60
|
+
"tsx": "^4.21.0",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"vite": "^6.4.1",
|
|
63
|
+
"vite-plugin-singlefile": "^2.3.0",
|
|
64
|
+
"vitest": "^3.0.0"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/skills/SKILL.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nestpilot-retirement
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: "Retirement planning, forecasting, scenario analysis, Medicare enrollment, and AI coaching"
|
|
5
|
+
tools:
|
|
6
|
+
- medicare-guardian
|
|
7
|
+
- create_plan
|
|
8
|
+
- run_forecast
|
|
9
|
+
- verify_forecast
|
|
10
|
+
- run_scenario
|
|
11
|
+
- retirement-planner
|
|
12
|
+
- nestpilot_run_plan
|
|
13
|
+
- coach
|
|
14
|
+
- optimize_roth_conversion
|
|
15
|
+
- optimize_ss_claiming
|
|
16
|
+
- generate_proposal
|
|
17
|
+
references:
|
|
18
|
+
- tools/medicare-guardian.md
|
|
19
|
+
- tools/create_plan.md
|
|
20
|
+
- tools/run_forecast.md
|
|
21
|
+
- tools/verify_forecast.md
|
|
22
|
+
- tools/run_scenario.md
|
|
23
|
+
- tools/retirement-planner.md
|
|
24
|
+
- tools/nestpilot_run_plan.md
|
|
25
|
+
- tools/coach.md
|
|
26
|
+
- tools/optimize_roth_conversion.md
|
|
27
|
+
- tools/optimize_ss_claiming.md
|
|
28
|
+
- tools/generate_proposal.md
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# NestPilot Retirement Planning Skill
|
|
32
|
+
|
|
33
|
+
NestPilot is an independent retirement planning and verification platform for mass affluent
|
|
34
|
+
Americans navigating the saving-to-spending transition. It is NOT a product seller — it is a
|
|
35
|
+
client-side verification and planning engine with no conflicts of interest.
|
|
36
|
+
|
|
37
|
+
## Core Principles
|
|
38
|
+
|
|
39
|
+
1. **Show the math.** Always explain calculations, not just results. Users trust verifiable numbers.
|
|
40
|
+
2. **Assumptions are first-class.** Make every assumption explicit. Users should be able to see what
|
|
41
|
+
drives the forecast (return rate, withdrawal rate, life expectancy, inflation).
|
|
42
|
+
3. **Independent verification.** NestPilot verifies plans mathematically — do not recommend specific
|
|
43
|
+
products. Say "the math shows X" not "you should buy Y."
|
|
44
|
+
4. **Decumulation focus.** The critical problem is the saving-to-spending transition: tax-efficient
|
|
45
|
+
withdrawal sequencing, Medicare timing, longevity risk management.
|
|
46
|
+
|
|
47
|
+
## Workflow Overview
|
|
48
|
+
|
|
49
|
+
### Quick Retirement Projection
|
|
50
|
+
|
|
51
|
+
1. Gather user inputs: current age, target retirement age, life expectancy, current balance,
|
|
52
|
+
monthly contribution, expected return rate, withdrawal rate, target annual spending.
|
|
53
|
+
2. Call `create_plan` with the gathered inputs.
|
|
54
|
+
3. Present the result focusing on: projected balance at retirement, estimated monthly income,
|
|
55
|
+
readiness score, sustainability years.
|
|
56
|
+
4. Offer to open the interactive planner (`retirement-planner`) for visual exploration.
|
|
57
|
+
|
|
58
|
+
### Comprehensive Forecast
|
|
59
|
+
|
|
60
|
+
- Use `run_forecast` when the user has detailed financial data: multiple accounts (401k, IRA,
|
|
61
|
+
Roth, taxable), multiple income streams (salary, Social Security, pension), spouse data.
|
|
62
|
+
- The forecast returns year-by-year projections, portfolio runway, legacy value, and success
|
|
63
|
+
probability.
|
|
64
|
+
- Present as a narrative: "Based on your plan, here is how your portfolio is projected to evolve..."
|
|
65
|
+
|
|
66
|
+
### What-If Scenario Analysis
|
|
67
|
+
|
|
68
|
+
- Use `run_scenario` for what-if analysis: "What if I retire 3 years earlier?" "What if markets
|
|
69
|
+
return 5% instead of 7%?" "What if I add an annuity?"
|
|
70
|
+
- Always present the difference vs. the base case: delta metrics for readiness score, legacy value.
|
|
71
|
+
- Frame scenarios as exploration: "If X, then Y" not "you should do X."
|
|
72
|
+
- Supports historical stress tests (2008 crisis, dot-com bust, 1929 crash).
|
|
73
|
+
|
|
74
|
+
### Verifying a Forecast
|
|
75
|
+
|
|
76
|
+
- Use `verify_forecast` when the user wants to double-check their advisor's numbers
|
|
77
|
+
or validate a scenario.
|
|
78
|
+
- The verification packet includes the assumptions, the calculation trace, and the verdict.
|
|
79
|
+
- Present the verdict clearly: "The math checks out" or "The projection is optimistic because..."
|
|
80
|
+
- NEVER suggest the advisor was wrong — present verification as confirmation or a starting
|
|
81
|
+
point for a conversation with the advisor.
|
|
82
|
+
|
|
83
|
+
### Interactive Retirement Planner
|
|
84
|
+
|
|
85
|
+
- Use `retirement-planner` when the user wants a visual, interactive planning experience.
|
|
86
|
+
- Supports three modes: editor (plan input form), forecast (charts), scenario (comparison view).
|
|
87
|
+
- The planner renders as a full interactive UI in the host application.
|
|
88
|
+
- Offer this after running `create_plan` or `run_forecast` for visual exploration.
|
|
89
|
+
|
|
90
|
+
### Medicare Guardian
|
|
91
|
+
|
|
92
|
+
- Use `medicare-guardian` when the user is approaching 65 or asking about Medicare.
|
|
93
|
+
- The tool opens an interactive Medicare enrollment readiness view.
|
|
94
|
+
- Key outputs: enrollment window (IEP/SEP/GEP), penalty risk, IRMAA income surcharge exposure.
|
|
95
|
+
- CRITICAL: Never recommend specific Medicare plans (Part C/D plans). Only clarify enrollment
|
|
96
|
+
timing rules, penalty risks, and income thresholds. This is an educational tool.
|
|
97
|
+
|
|
98
|
+
### AI Coach
|
|
99
|
+
|
|
100
|
+
- Use `coach` for open-ended retirement guidance and personalized advice.
|
|
101
|
+
- Coach is powered by AI and provides explanations, not calculations.
|
|
102
|
+
- Use coach for: "Explain Roth conversions", "Should I delay Social Security?",
|
|
103
|
+
"What is the tax torpedo?"
|
|
104
|
+
- Coach output is advisory — always suggest verifying with `run_forecast` or `verify_forecast`
|
|
105
|
+
for quantitative decisions.
|
|
106
|
+
|
|
107
|
+
### Agent-Powered Retirement Readiness
|
|
108
|
+
|
|
109
|
+
- Use `nestpilot_run_plan` for a complete retirement readiness assessment powered by the agent
|
|
110
|
+
runtime. This combines skill execution, context gathering, and structured analysis.
|
|
111
|
+
- Use when the user provides their retirement situation in natural language and wants a full
|
|
112
|
+
assessment without manually providing structured inputs.
|
|
113
|
+
|
|
114
|
+
### Roth Conversion Optimization
|
|
115
|
+
|
|
116
|
+
- Use `optimize_roth_conversion` when asking about Roth conversions, tax bracket optimization,
|
|
117
|
+
or Traditional-to-Roth IRA strategies.
|
|
118
|
+
- The tool analyzes multi-year conversion windows: bracket headroom, IRMAA thresholds, RMD
|
|
119
|
+
impact, and break-even timing.
|
|
120
|
+
- Present results as: "Based on your tax situation, converting $X over Y years could save
|
|
121
|
+
$Z in lifetime taxes."
|
|
122
|
+
- CRITICAL: This is tax-related analysis. Always include: "Consult a tax professional before
|
|
123
|
+
making conversion decisions." The tool provides math, not tax advice.
|
|
124
|
+
- Flag IRMAA cliff warnings when income approaches Medicare surcharge thresholds.
|
|
125
|
+
|
|
126
|
+
### Social Security Claiming Optimization
|
|
127
|
+
|
|
128
|
+
- Use `optimize_ss_claiming` when the user asks "When should I claim Social Security?" or
|
|
129
|
+
wants to compare claiming ages.
|
|
130
|
+
- The tool simulates claiming at ages 62-70, shows break-even ages, and calculates NPV of
|
|
131
|
+
lifetime benefits.
|
|
132
|
+
- For couples, it analyzes spousal and survivor benefit strategies.
|
|
133
|
+
- Present break-even analysis in plain language: "If you delay from 62 to 67, you break even
|
|
134
|
+
at age 78. If you live past 78, delaying pays off."
|
|
135
|
+
- Coordinate with Roth conversion windows: "The years you delay SS may create low-income
|
|
136
|
+
years ideal for Roth conversions."
|
|
137
|
+
- NEVER predict government policy changes. Note that benefit formulas may change.
|
|
138
|
+
|
|
139
|
+
### Proposal Generation (Advisor)
|
|
140
|
+
|
|
141
|
+
- Use `generate_proposal` when an advisor wants to create a client-ready proposal package.
|
|
142
|
+
- The tool assembles: plan summary PDF, scenario comparisons, optional Roth and SS analyses,
|
|
143
|
+
AI recommendations, and an evidence packet.
|
|
144
|
+
- Always confirm with the advisor before releasing to the client (`autoRelease` defaults to false).
|
|
145
|
+
- Present the draft for review first: "Here's your proposal draft. Shall I release it to the client?"
|
|
146
|
+
|
|
147
|
+
## Response Formatting
|
|
148
|
+
|
|
149
|
+
- Lead with the user's outcome in plain language ("You are on track for retirement at 65").
|
|
150
|
+
- Follow with the key numbers (balance, income, years of coverage).
|
|
151
|
+
- Explain the 1-2 most important assumptions that drive the result.
|
|
152
|
+
- Offer a next step: scenario to explore, planner to open, or forecast to run.
|
|
153
|
+
- Keep responses concise. Users are busy adults making important decisions — respect their time.
|
|
154
|
+
|
|
155
|
+
## Boundaries
|
|
156
|
+
|
|
157
|
+
- Do NOT recommend specific investment products, funds, or advisors.
|
|
158
|
+
- Do NOT provide tax advice (explain tax concepts, but say "consult a tax professional for your
|
|
159
|
+
specific situation").
|
|
160
|
+
- Do NOT make predictions about market returns — use the user's provided return rate assumption.
|
|
161
|
+
- Do NOT recommend specific Medicare Advantage or Medigap plans.
|
|
162
|
+
- Do NOT discuss NestPilot pricing, subscriptions, or business model unless asked directly.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": {
|
|
3
|
+
"name": "nestpilot-retirement",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Retirement planning, forecasting, verification, scenario analysis, Medicare enrollment, AI coaching, interactive planner UI, and agent-powered retirement readiness.",
|
|
6
|
+
"entry_point": "resource://skill/SKILL.md",
|
|
7
|
+
"loading_strategy": "on_demand",
|
|
8
|
+
"priority": "primary",
|
|
9
|
+
"tool_skills": {
|
|
10
|
+
"medicare-guardian": "resource://skill/tools/medicare-guardian.md",
|
|
11
|
+
"create_plan": "resource://skill/tools/create_plan.md",
|
|
12
|
+
"run_forecast": "resource://skill/tools/run_forecast.md",
|
|
13
|
+
"verify_forecast": "resource://skill/tools/verify_forecast.md",
|
|
14
|
+
"run_scenario": "resource://skill/tools/run_scenario.md",
|
|
15
|
+
"retirement-planner": "resource://skill/tools/retirement-planner.md",
|
|
16
|
+
"nestpilot_run_plan": "resource://skill/tools/nestpilot_run_plan.md",
|
|
17
|
+
"coach": "resource://skill/tools/coach.md",
|
|
18
|
+
"optimize_roth_conversion": "resource://skill/tools/optimize_roth_conversion.md",
|
|
19
|
+
"optimize_ss_claiming": "resource://skill/tools/optimize_ss_claiming.md",
|
|
20
|
+
"generate_proposal": "resource://skill/tools/generate_proposal.md",
|
|
21
|
+
"list_plans": "resource://skill/tools/list_plans.md",
|
|
22
|
+
"get_plan": "resource://skill/tools/get_plan.md",
|
|
23
|
+
"get_active_plan": "resource://skill/tools/get_active_plan.md",
|
|
24
|
+
"create_saved_plan": "resource://skill/tools/create_saved_plan.md",
|
|
25
|
+
"save_plan": "resource://skill/tools/save_plan.md",
|
|
26
|
+
"activate_plan": "resource://skill/tools/activate_plan.md",
|
|
27
|
+
"delete_plan": "resource://skill/tools/delete_plan.md",
|
|
28
|
+
"rename_plan": "resource://skill/tools/rename_plan.md",
|
|
29
|
+
"get_plan_components": "resource://skill/tools/get_plan_components.md",
|
|
30
|
+
"run_saved_forecast": "resource://skill/tools/run_saved_forecast.md",
|
|
31
|
+
"get_baseline_forecast": "resource://skill/tools/get_baseline_forecast.md",
|
|
32
|
+
"save_scenario": "resource://skill/tools/save_scenario.md",
|
|
33
|
+
"list_scenarios": "resource://skill/tools/list_scenarios.md",
|
|
34
|
+
"get_scenario": "resource://skill/tools/get_scenario.md",
|
|
35
|
+
"delete_scenario": "resource://skill/tools/delete_scenario.md",
|
|
36
|
+
"comprehensive_plan": "resource://skill/tools/comprehensive_plan.md",
|
|
37
|
+
"generate_retirement_report": "resource://skill/tools/generate_retirement_report.md"
|
|
38
|
+
},
|
|
39
|
+
"composes_with": [
|
|
40
|
+
"data-analysis",
|
|
41
|
+
"document-creator"
|
|
42
|
+
],
|
|
43
|
+
"model_hints": {
|
|
44
|
+
"min_context_window": 8000,
|
|
45
|
+
"supports": [
|
|
46
|
+
"claude-3+",
|
|
47
|
+
"gpt-4+"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Tool Skill: activate_plan
|
|
2
|
+
|
|
3
|
+
Sets a specific saved plan as the user's active (default) plan. The active plan is the one
|
|
4
|
+
returned by `get_active_plan` and used as the implicit context when the user says "my plan."
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
Use `activate_plan` when the user:
|
|
9
|
+
- Says "Make this my main plan" or "Set [plan name] as active"
|
|
10
|
+
- Wants to switch their default plan after comparing options
|
|
11
|
+
- Just created a new plan and wants it to be the primary one
|
|
12
|
+
- Asks "Use this plan going forward"
|
|
13
|
+
|
|
14
|
+
## Required Inputs to Gather
|
|
15
|
+
|
|
16
|
+
- `planId` (string, required) — UUID of the plan to activate
|
|
17
|
+
|
|
18
|
+
If the user refers to a plan by name, resolve the ID via `list_plans` first.
|
|
19
|
+
|
|
20
|
+
## Presenting the Results
|
|
21
|
+
|
|
22
|
+
Structure the response:
|
|
23
|
+
|
|
24
|
+
1. **Confirmation**: "Done — '[name]' is now your active plan."
|
|
25
|
+
|
|
26
|
+
2. **Context**: "Future requests like 'run a forecast' or 'show my plan' will use this
|
|
27
|
+
plan by default unless you specify another."
|
|
28
|
+
|
|
29
|
+
3. **Previous Active** (if known): "Your previous active plan was '[old name]'. It's
|
|
30
|
+
still saved and accessible."
|
|
31
|
+
|
|
32
|
+
## Common Follow-Up Patterns
|
|
33
|
+
|
|
34
|
+
- User wants to see the plan → `get_active_plan`
|
|
35
|
+
- User wants a forecast on it → `run_saved_forecast`
|
|
36
|
+
- User realizes they picked the wrong one → `list_plans` then `activate_plan` again
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Tool Skill: coach
|
|
2
|
+
|
|
3
|
+
Provides AI-powered retirement coaching — conversational guidance, explanations of retirement
|
|
4
|
+
concepts, and personalized next-step suggestions. Coach is advisory; it explains and frames
|
|
5
|
+
decisions but does not replace quantitative tools.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
Use `coach` for:
|
|
10
|
+
- Explaining retirement concepts ("What is a Roth conversion?", "How does the 4% rule work?")
|
|
11
|
+
- Personalized guidance when the user has described their situation and wants advice
|
|
12
|
+
- Synthesizing insights after running forecasts or scenarios ("What does this mean for me?")
|
|
13
|
+
- Behavioral nudges ("I'm worried I'm saving too little — what should I think about?")
|
|
14
|
+
- Open-ended questions that need narrative answers, not calculations
|
|
15
|
+
|
|
16
|
+
## When NOT to Use
|
|
17
|
+
|
|
18
|
+
- Do NOT use coach for calculation requests — use `run_forecast` or `create_plan` instead
|
|
19
|
+
- Do NOT use coach for Medicare enrollment timing — use `medicare_guardian` instead
|
|
20
|
+
- Do NOT use coach for "verify my advisor's numbers" — use `verify_forecast` instead
|
|
21
|
+
|
|
22
|
+
## Sending a Good Coaching Request
|
|
23
|
+
|
|
24
|
+
Provide as much context as possible in the `content` field:
|
|
25
|
+
- User's age, retirement timeline, and current savings (if known from prior conversation)
|
|
26
|
+
- Specific question or concern
|
|
27
|
+
- Any plan or scenario results from prior tool calls (to give coach the math context)
|
|
28
|
+
|
|
29
|
+
Example: "User is 58, wants to retire at 63, has $850K saved, asking about Roth conversion
|
|
30
|
+
ladder strategy to reduce RMDs."
|
|
31
|
+
|
|
32
|
+
Pass `planId` if there is a saved plan — coach will use it as context.
|
|
33
|
+
|
|
34
|
+
## Presenting Coach Output
|
|
35
|
+
|
|
36
|
+
Coach output is narrative guidance. Present it as:
|
|
37
|
+
- A direct, empathetic response to the user's question
|
|
38
|
+
- Explanation of the relevant concept in plain language
|
|
39
|
+
- Actionable next step (run a scenario, consult an advisor, make a specific change)
|
|
40
|
+
|
|
41
|
+
Always end coaching responses with a bridge to quantitative verification:
|
|
42
|
+
"To see the numbers, we can run a [forecast / scenario / verification] — want me to set that
|
|
43
|
+
up for you?"
|
|
44
|
+
|
|
45
|
+
## Tone and Boundaries
|
|
46
|
+
|
|
47
|
+
- Be empathetic but not patronizing. Users are intelligent adults making complex decisions.
|
|
48
|
+
- Be honest about uncertainty: "The math depends on your return assumption — here's the range."
|
|
49
|
+
- Do NOT tell users what to do — frame as "here are the options and trade-offs."
|
|
50
|
+
- Do NOT recommend specific financial products, advisors, or tax strategies.
|
|
51
|
+
- For questions beyond NestPilot's scope (estate planning, insurance selection, tax filing),
|
|
52
|
+
recommend consulting a CFP, CPA, or estate attorney.
|
|
53
|
+
|
|
54
|
+
## Error Handling
|
|
55
|
+
|
|
56
|
+
If the backend returns an error, acknowledge the issue and offer to answer the conceptual
|
|
57
|
+
question from general knowledge while the service recovers:
|
|
58
|
+
"I'm having trouble reaching the coaching service right now. Based on what you've described,
|
|
59
|
+
here's what I can share from general retirement planning principles: [response]"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Tool Skill: comprehensive_plan
|
|
2
|
+
|
|
3
|
+
Executes a combined coaching analysis and retirement forecast in a single call. Takes a full
|
|
4
|
+
PlanContract payload, runs the coaching engine for qualitative guidance and the forecast engine
|
|
5
|
+
for quantitative projections, and returns both results together.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
Use `comprehensive_plan` when the user:
|
|
10
|
+
- Wants a complete picture: both actionable advice and hard numbers in one pass
|
|
11
|
+
- Says "Give me the full analysis" or "What should I do and where do I stand?"
|
|
12
|
+
- Is a new user providing all their data at once and wants immediate value
|
|
13
|
+
- Wants coaching recommendations alongside projected outcomes
|
|
14
|
+
- Asks "How can I improve my plan?" (needs both diagnosis and projection)
|
|
15
|
+
|
|
16
|
+
Use `run_forecast` or `run_saved_forecast` instead when the user only needs numbers.
|
|
17
|
+
Use `coach` instead when the user only needs qualitative advice without projections.
|
|
18
|
+
|
|
19
|
+
## Required Inputs to Gather
|
|
20
|
+
|
|
21
|
+
This tool accepts a full PlanContract payload — the same structure used by `run_forecast`:
|
|
22
|
+
|
|
23
|
+
**Required:**
|
|
24
|
+
- `household.primary.currentAge` — integer
|
|
25
|
+
- `household.primary.retireAge` — integer
|
|
26
|
+
- `goals.retirement.targetSpending.amountMonthly` — target monthly spending
|
|
27
|
+
- `accounts` — at least one: `{type, balance, annualContribution?, realReturn?}`
|
|
28
|
+
- `incomeStreams` — at least one: `{type, amountMonthly, startAge?, endAge?}`
|
|
29
|
+
|
|
30
|
+
**Optional but improves coaching quality:**
|
|
31
|
+
- `household.primary.socialSecurity` — claiming age and estimated benefit
|
|
32
|
+
- `household.spouse` — enables household-level coaching
|
|
33
|
+
- `goals.retirement.safeWithdrawalRate` — default 0.04
|
|
34
|
+
- `goals.retirement.withdrawalStrategy` — `"taxable_first"` or `"traditional_first"`
|
|
35
|
+
- `riskProfile` — conservative, moderate, aggressive (influences coaching tone)
|
|
36
|
+
|
|
37
|
+
## Presenting the Results
|
|
38
|
+
|
|
39
|
+
Structure the response in two sections:
|
|
40
|
+
|
|
41
|
+
1. **Coaching Summary**:
|
|
42
|
+
- Top 3 recommendations ranked by impact
|
|
43
|
+
- Each with a plain-language explanation and estimated benefit
|
|
44
|
+
- e.g., "Delay Social Security from 62 to 67 — adds ~$450/mo to your benefit"
|
|
45
|
+
|
|
46
|
+
2. **Forecast Summary**:
|
|
47
|
+
- Readiness score: X/100
|
|
48
|
+
- Portfolio runway: X years
|
|
49
|
+
- Legacy value: $X
|
|
50
|
+
- Success probability: X%
|
|
51
|
+
|
|
52
|
+
3. **Integrated Insight**: Connect the coaching to the numbers:
|
|
53
|
+
"Your readiness score of 72 reflects the gap between your $6,000/mo target and your
|
|
54
|
+
projected $4,800/mo sustainable withdrawal. The top recommendation (delaying SS) would
|
|
55
|
+
close roughly half that gap."
|
|
56
|
+
|
|
57
|
+
4. **Next Steps**: Offer to save as a plan, run a specific scenario from the coaching
|
|
58
|
+
recommendations, or explore the planner visually.
|
|
59
|
+
|
|
60
|
+
## Common Follow-Up Patterns
|
|
61
|
+
|
|
62
|
+
- User wants to save the plan → `create_saved_plan`
|
|
63
|
+
- User wants to explore a recommendation → `run_scenario` with the suggested delta
|
|
64
|
+
- User wants just the coaching detail → `coach`
|
|
65
|
+
- User wants year-by-year breakdown → `run_forecast` or `retirement-planner`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Tool Skill: create_plan
|
|
2
|
+
|
|
3
|
+
Creates a quick retirement plan projection given basic inputs. Returns projected balance at
|
|
4
|
+
retirement, safe withdrawal amount, readiness score, and sustainability years.
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
|
|
8
|
+
Use `create_plan` when the user:
|
|
9
|
+
- Wants a quick retirement projection given basic inputs
|
|
10
|
+
- Asks "Am I on track to retire?" or "How much will I have at retirement?"
|
|
11
|
+
- Provides their age, retirement age, savings balance, and contribution amounts
|
|
12
|
+
- Wants to understand their withdrawal rate feasibility
|
|
13
|
+
- Is doing an initial assessment before a detailed forecast
|
|
14
|
+
|
|
15
|
+
Use `run_forecast` instead when the user has:
|
|
16
|
+
- Multiple accounts (401k, IRA, Roth, taxable)
|
|
17
|
+
- Multiple income streams (salary + Social Security + pension)
|
|
18
|
+
- Spouse data or household-level analysis needs
|
|
19
|
+
- Interest in year-by-year projections
|
|
20
|
+
|
|
21
|
+
## Required Inputs to Gather
|
|
22
|
+
|
|
23
|
+
- `currentAge` — current age (integer)
|
|
24
|
+
- `retireAge` — target retirement age (integer)
|
|
25
|
+
- `lifeExpectancy` — planning horizon / life expectancy (integer)
|
|
26
|
+
- `realReturnRate` — expected real annual return (decimal, e.g., 0.05 for 5%)
|
|
27
|
+
- `withdrawalRate` — planned annual withdrawal rate in retirement (decimal, e.g., 0.04)
|
|
28
|
+
|
|
29
|
+
Helpful optional inputs:
|
|
30
|
+
- `currentBalance` — current total savings in dollars
|
|
31
|
+
- `monthlyContribution` — monthly savings contribution in dollars
|
|
32
|
+
- `targetAnnualSpending` — desired annual spending in retirement
|
|
33
|
+
|
|
34
|
+
## Presenting the Results
|
|
35
|
+
|
|
36
|
+
Structure the response:
|
|
37
|
+
|
|
38
|
+
1. **Headline**: "Based on your inputs, you are [on track / at risk / needs attention] for
|
|
39
|
+
retirement at [age]."
|
|
40
|
+
|
|
41
|
+
2. **Key Numbers**:
|
|
42
|
+
- Projected balance at retirement: $X
|
|
43
|
+
- Safe withdrawal amount (monthly): $X (= projectedBalance × withdrawalRate / 12)
|
|
44
|
+
- Readiness score: X/100
|
|
45
|
+
- Sustainability years: X years (how long the portfolio covers spending)
|
|
46
|
+
|
|
47
|
+
3. **Key Assumptions** (always surface these):
|
|
48
|
+
- Return rate: X% real (after inflation)
|
|
49
|
+
- Withdrawal rate: X%
|
|
50
|
+
- Years until retirement: X
|
|
51
|
+
|
|
52
|
+
4. **Next Step**: Offer to run a scenario or open the interactive planner:
|
|
53
|
+
"Want to see what happens if you [retire earlier / save more / adjust return rate]?"
|
|
54
|
+
|
|
55
|
+
## Common Follow-Up Patterns
|
|
56
|
+
|
|
57
|
+
- User asks "what if I retire earlier?" → use `run_scenario` with retirement age delta
|
|
58
|
+
- User wants visual charts → use `retirement-planner` in `forecast` mode
|
|
59
|
+
- User has more detailed financial data → use `run_forecast`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Tool Skill: create_saved_plan
|
|
2
|
+
|
|
3
|
+
Creates and persists a new retirement plan in the user's account. Unlike `create_plan` (which
|
|
4
|
+
is stateless and returns a quick projection), this tool saves the plan to the database so it
|
|
5
|
+
can be retrieved, forecasted, and iterated on over time.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
Use `create_saved_plan` when the user:
|
|
10
|
+
- Wants to build a new plan and keep it for future sessions
|
|
11
|
+
- Says "Save this as a new plan" or "Create a plan called [name]"
|
|
12
|
+
- Is starting fresh and wants to set up their financial profile
|
|
13
|
+
- Has provided enough data to construct a PlanContract (household, accounts, goals)
|
|
14
|
+
|
|
15
|
+
Use `create_plan` instead for a quick one-off projection that doesn't need to persist.
|
|
16
|
+
|
|
17
|
+
## Required Inputs to Gather
|
|
18
|
+
|
|
19
|
+
- `name` (string) — a label for the plan (e.g., "Conservative 65", "Early Retirement")
|
|
20
|
+
- `household.primary.currentAge` — integer
|
|
21
|
+
- `household.primary.retireAge` — integer
|
|
22
|
+
- `accounts` — at least one: `{type, balance, annualContribution?, realReturn?}`
|
|
23
|
+
- `goals.retirement.targetSpending.amountMonthly` — target monthly spend
|
|
24
|
+
|
|
25
|
+
**Optional but recommended:**
|
|
26
|
+
- `household.primary.lifeExpectancy` — default 95
|
|
27
|
+
- `incomeStreams` — salary, Social Security, pension, etc.
|
|
28
|
+
- `household.spouse` — partner data for household-level planning
|
|
29
|
+
- `setActive` (boolean) — whether to make this the active plan immediately
|
|
30
|
+
|
|
31
|
+
## Presenting the Results
|
|
32
|
+
|
|
33
|
+
Structure the response:
|
|
34
|
+
|
|
35
|
+
1. **Confirmation**: "I've created your plan '[name]' (ID: [planId])."
|
|
36
|
+
|
|
37
|
+
2. **Summary**: Brief recap of household, total balances, and target spending.
|
|
38
|
+
|
|
39
|
+
3. **Active Status**: "This plan [is / is not] set as your active plan."
|
|
40
|
+
|
|
41
|
+
4. **Next Step**: "Want me to run a forecast on this plan, or add more accounts
|
|
42
|
+
and income streams?"
|
|
43
|
+
|
|
44
|
+
## Common Follow-Up Patterns
|
|
45
|
+
|
|
46
|
+
- User wants projections → `run_saved_forecast`
|
|
47
|
+
- User wants to add components → `save_plan` with updated accounts/streams
|
|
48
|
+
- User wants it as default → `activate_plan`
|
|
49
|
+
- User wants a quick comparison → `comprehensive_plan`
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Tool Skill: delete_plan
|
|
2
|
+
|
|
3
|
+
Soft-deletes a saved retirement plan. The plan is marked as deleted and hidden from
|
|
4
|
+
`list_plans` but can potentially be recovered by support. Associated forecasts and
|
|
5
|
+
scenarios are preserved but become inaccessible through normal API calls.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
Use `delete_plan` when the user:
|
|
10
|
+
- Says "Delete my [plan name] plan" or "Remove this plan"
|
|
11
|
+
- Wants to clean up old or duplicate plans
|
|
12
|
+
- Confirms deletion after being prompted
|
|
13
|
+
|
|
14
|
+
**Always confirm before deleting.** Ask: "Are you sure you want to delete '[name]'?
|
|
15
|
+
This will hide the plan and its associated forecasts."
|
|
16
|
+
|
|
17
|
+
## Required Inputs to Gather
|
|
18
|
+
|
|
19
|
+
- `planId` (string, required) — UUID of the plan to delete
|
|
20
|
+
|
|
21
|
+
If the user refers to a plan by name, resolve the ID via `list_plans` first.
|
|
22
|
+
|
|
23
|
+
Never delete the active plan without warning. If the target is the active plan, say:
|
|
24
|
+
"This is currently your active plan. Deleting it means you won't have a default plan.
|
|
25
|
+
Want to proceed, or would you rather activate a different plan first?"
|
|
26
|
+
|
|
27
|
+
## Presenting the Results
|
|
28
|
+
|
|
29
|
+
Structure the response:
|
|
30
|
+
|
|
31
|
+
1. **Confirmation**: "Your plan '[name]' has been deleted."
|
|
32
|
+
|
|
33
|
+
2. **Active Plan Impact**: If the deleted plan was active, note that no plan is
|
|
34
|
+
currently active and offer to activate another.
|
|
35
|
+
|
|
36
|
+
3. **Remaining Plans**: "You have [N] remaining plan(s). Want to see them?"
|
|
37
|
+
|
|
38
|
+
## Common Follow-Up Patterns
|
|
39
|
+
|
|
40
|
+
- User needs a new active plan → `list_plans` then `activate_plan`
|
|
41
|
+
- User wants to create a replacement → `create_saved_plan`
|
|
42
|
+
- User deleted by mistake → advise contacting support for recovery
|