@openephemeris/mcp-server 3.13.6 → 3.13.8

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.
Files changed (37) hide show
  1. package/README.md +2 -2
  2. package/dist/backend/client.js +27 -9
  3. package/dist/index.js +33 -32
  4. package/dist/prompts.d.ts +26 -0
  5. package/dist/prompts.js +942 -0
  6. package/dist/tools/apps/bi-wheel-app.js +286 -32
  7. package/dist/tools/apps/bodygraph-app.js +361 -12
  8. package/dist/tools/apps/chart-wheel-app.js +64 -30
  9. package/dist/tools/apps/location-tools.d.ts +1 -0
  10. package/dist/tools/apps/location-tools.js +52 -0
  11. package/dist/tools/index.js +1 -0
  12. package/dist/tools/specialized/acg.js +2 -0
  13. package/dist/tools/specialized/bazi.js +1 -0
  14. package/dist/tools/specialized/bi_wheel.js +1 -0
  15. package/dist/tools/specialized/chart_wheel.js +1 -0
  16. package/dist/tools/specialized/comparative.js +4 -0
  17. package/dist/tools/specialized/eclipse.js +1 -0
  18. package/dist/tools/specialized/electional.js +4 -0
  19. package/dist/tools/specialized/ephemeris_core.js +2 -0
  20. package/dist/tools/specialized/ephemeris_extended.js +8 -0
  21. package/dist/tools/specialized/hd_bodygraph.js +1 -0
  22. package/dist/tools/specialized/hd_cycles.js +2 -0
  23. package/dist/tools/specialized/hd_group.js +2 -0
  24. package/dist/tools/specialized/human_design.js +1 -0
  25. package/dist/tools/specialized/moon.js +2 -0
  26. package/dist/tools/specialized/natal.js +1 -0
  27. package/dist/tools/specialized/progressed.js +1 -0
  28. package/dist/tools/specialized/relocation.js +1 -0
  29. package/dist/tools/specialized/returns.js +3 -0
  30. package/dist/tools/specialized/synastry.js +1 -0
  31. package/dist/tools/specialized/transits.js +1 -0
  32. package/dist/tools/specialized/vedic.js +1 -0
  33. package/dist/tools/specialized/venus_star_points.js +6 -0
  34. package/dist/ui/bi-wheel.html +7124 -60
  35. package/dist/ui/bodygraph.html +7057 -508
  36. package/dist/ui/chart-wheel.html +7355 -565
  37. package/package.json +1 -1
@@ -0,0 +1,942 @@
1
+ /**
2
+ * Open Ephemeris MCP — Preloaded Prompt Library
3
+ *
4
+ * Each prompt is a complete agent workflow that:
5
+ * 1. Coaches the agent to collect all required data from the user
6
+ * 2. Handles timezone, coordinate, and house-system nuances correctly
7
+ * 3. Specifies which tools to call and in what order
8
+ * 4. Provides a structured interpretation framework
9
+ */
10
+ export const PROMPTS = [
11
+ // ─────────────────────────────────────────────────────────────────────────
12
+ // 1. Welcome & Orientation
13
+ // ─────────────────────────────────────────────────────────────────────────
14
+ {
15
+ name: "welcome_to_open_ephemeris",
16
+ description: "Orientation guide for the Open Ephemeris MCP. Understand available tools, key concepts, " +
17
+ "and how to pick the right prompt for the task.",
18
+ text: "Welcome to the **Open Ephemeris MCP Server** — an enterprise-grade astrological and astronomical " +
19
+ "computation engine powered by NASA JPL DE440 ephemeris data (1550–2650 CE).\n\n" +
20
+ "## Available Workflows\n" +
21
+ "There are specialized prompts for each of the following. Ask the user which they'd like, " +
22
+ "or jump in directly if they've already told you:\n\n" +
23
+ "| Prompt Name | What It Does |\n" +
24
+ "|-------------|-------------|\n" +
25
+ "| `natal_chart_reading` | Full Western birth chart — houses, aspects, dignities, chart shape |\n" +
26
+ "| `transit_forecast` | 6–12 month predictive timeline with outer planets + progressions |\n" +
27
+ "| `relationship_synastry` | Two-person compatibility — synastry + composite chart |\n" +
28
+ "| `astrocartography_reading` | ACG relocation analysis for one or more cities |\n" +
29
+ "| `human_design_reading` | Full HD chart — Type, Authority, Profile, Centers, Gates |\n" +
30
+ "| `electional_timing` | Find the best astrological date/time for an event |\n" +
31
+ "| `vedic_jyotish_reading` | Vedic/Jyotish sidereal chart, nakshatras, yogas, dashas |\n" +
32
+ "| `bazi_four_pillars` | Chinese Four Pillars — Day Master, Five Elements, Luck Pillars |\n" +
33
+ "| `current_sky_snapshot` | Real-time moon phase, aspects, retrogrades — no birth data needed |\n" +
34
+ "| `solar_return_year_ahead` | Annual Solar Return chart — themes for the coming birthday year |\n" +
35
+ "| `developer_api_integration` | Help a dev integrate the Open Ephemeris API into their app |\n\n" +
36
+ "## Before Calling Any Tool — Three Rules\n" +
37
+ "1. **Coordinates first**: Convert city names to decimal lat/lon before calling tools " +
38
+ "(e.g. Chicago → 41.8781, -87.6298). Positive = North/East; negative = South/West.\n" +
39
+ "2. **Datetime format**: Pass birth times as local ISO 8601 + separate `timezone` IANA name " +
40
+ "(e.g. `America/Chicago`), OR as a UTC-offset datetime `1990-04-15T14:30:00-05:00`. " +
41
+ "Never append `Z` to a local birth time — `Z` means UTC.\n" +
42
+ "3. **Format parameter**: Use `format='llm'` for all chart calls — it returns compact " +
43
+ "token-efficient output without sacrificing any data.\n\n" +
44
+ "Ask the user what they'd like to explore and start immediately — collect data conversationally, " +
45
+ "don't make them fill out a form before you show value.",
46
+ },
47
+ // ─────────────────────────────────────────────────────────────────────────
48
+ // 2. Natal Chart Reading
49
+ // ─────────────────────────────────────────────────────────────────────────
50
+ {
51
+ name: "natal_chart_reading",
52
+ description: "Complete professional natal (birth) chart reading. Guides the agent through data collection " +
53
+ "(birth time, location, timezone, house system) and delivers a structured multi-section interpretation.",
54
+ text: "You are conducting a full professional Western natal chart reading using Open Ephemeris tools.\n\n" +
55
+ "## Step 1 — Collect Birth Data\n" +
56
+ "Ask the user for ALL of the following before calling any tool:\n" +
57
+ "1. **Full name** (or preferred name for the reading)\n" +
58
+ "2. **Date of birth** — day, month, year\n" +
59
+ "3. **Exact birth time** — hour and minute. If unknown, say so upfront: without a birth time, " +
60
+ "the Ascendant, Midheaven, and all house placements will be unavailable.\n" +
61
+ "4. **Birth city and country** — you will convert this to decimal lat/lon\n" +
62
+ "5. **House system preference** — offer these options:\n" +
63
+ " - **Placidus** (default, most common in modern Western astrology)\n" +
64
+ " - **Whole Sign** (Hellenistic/modern practice; entire sign = one house; great for beginners)\n" +
65
+ " - **Koch** (good for high-latitude births, popular in German tradition)\n" +
66
+ " - **Equal** (ASC-based equal 30° divisions)\n" +
67
+ " - **Porphyry** (traditional trisection; works at all latitudes including polar)\n" +
68
+ " Default to Placidus if they're unsure.\n\n" +
69
+ "## Step 2 — Resolve Coordinates and Timezone\n" +
70
+ "- Convert the birth city to decimal latitude/longitude (e.g. Chicago → 41.8781, -87.6298)\n" +
71
+ "- Determine the **IANA timezone** for that location and birth year — historical DST matters\n" +
72
+ "- Format: pass `datetime` as local ISO 8601 (e.g. `1990-04-15T14:30:00`) " +
73
+ "and `timezone` as the IANA name. Do NOT append Z to a local birth time.\n\n" +
74
+ "## Step 3 — Tool Call\n" +
75
+ "Make a single call to `ephemeris_natal_chart` with:\n" +
76
+ "- `datetime`: local ISO 8601 (no Z)\n" +
77
+ "- `timezone`: IANA name (e.g. `America/Chicago`)\n" +
78
+ "- `latitude` / `longitude`: decimal coordinates\n" +
79
+ "- `house_system`: user's choice or `'placidus'`\n" +
80
+ "- `format`: `'llm'`\n" +
81
+ "- `include_visual`: `true` (renders the interactive chart wheel)\n\n" +
82
+ "Deliver the full reading from this single response. Do not call additional tools before presenting the reading.\n\n" +
83
+ "## Step 4 — Structure the Reading\n" +
84
+ "Deliver the interpretation in this sequence:\n\n" +
85
+ "### 1. Chart Overview\n" +
86
+ "- **Sect**: Day (Sun above horizon) or Night chart. Day chart = Saturn and Jupiter more prominent; " +
87
+ "Night chart = Moon and Venus more prominent. This flavors all dignity assessments.\n" +
88
+ "- **Chart Shape**: Splash (scattered), Bucket (one handle planet), Bundle (concentrated arc), " +
89
+ "Bowl (one hemisphere), Locomotive (270° arc), Seesaw (two opposing groups), etc.\n" +
90
+ " What does this say about where this person's energy concentrates?\n" +
91
+ "- **Dominant Element and Mode**: Count planets per element (Fire/Earth/Air/Water) and mode " +
92
+ "(Cardinal/Fixed/Mutable). What does the imbalance reveal?\n\n" +
93
+ "### 2. The Big Three\n" +
94
+ "- **Sun** — sign, house, aspects. Core identity, purpose, ego expression.\n" +
95
+ "- **Moon** — sign, house, aspects. Emotional nature, instincts, what feels like home.\n" +
96
+ "- **Ascendant** — sign, degree. How this person presents themselves; the body and life path.\n\n" +
97
+ "### 3. Chart Ruler\n" +
98
+ "Identify the planetary ruler of the Ascendant sign. Its sign, house, and aspects " +
99
+ "describe how this person navigates life — the chart's 'steering wheel'. Treat this as a top priority.\n\n" +
100
+ "### 4. Planets in Priority Order\n" +
101
+ "Work through each occupied house. Prioritize:\n" +
102
+ "- **Angular planets** (1st, 4th, 7th, 10th) — most powerful\n" +
103
+ "- **Dignified planets** (domicile/exaltation) — reliable, flowing energy\n" +
104
+ "- **Debilitated planets** (detriment/fall) — areas requiring conscious integration\n" +
105
+ "- **Retrograde planets** — internalized, revisited themes\n\n" +
106
+ "### 5. Key Aspects\n" +
107
+ "Highlight the 4–6 tightest or most significant aspects:\n" +
108
+ "- Conjunction (0°): fusion | Opposition (180°): polarity | Square (90°): friction/growth\n" +
109
+ "- Trine (120°): ease | Sextile (60°): opportunity | Quincunx (150°): adjustment\n\n" +
110
+ "### 6. Major Aspect Patterns\n" +
111
+ "Flag any: Stelliums (3+ conjunct), Grand Trines, Grand Crosses, T-Squares, Yods.\n\n" +
112
+ "### 7. North Node Path\n" +
113
+ "Node sign and house = soul's evolutionary direction. South Node = karmic comfort zone.\n\n" +
114
+ "**Tone**: Warm, specific, and empowering. Every statement grounded in actual chart data.\n\n" +
115
+ "## Step 5 — Close with Follow-Up Offers\n" +
116
+ "After delivering the reading, ask which of these deeper layers they'd like to explore:\n" +
117
+ "- **Dignities deep-dive** — call `ephemeris_dignities` to see which planets are in their strongest " +
118
+ "or most stressed positions (domicile, exaltation, detriment, fall)\n" +
119
+ "- **Hermetic Lots** — call `ephemeris_hermetic_lots` for the Lot of Fortune and Lot of Spirit\n" +
120
+ "- **Midpoint analysis** — call `ephemeris_midpoints` for Uranian/cosmobiological analysis\n" +
121
+ "- **Transit forecast** — what's coming up in the next 6–12 months?\n" +
122
+ "- **Synastry** — compare this chart with a partner, family member, or colleague",
123
+ },
124
+ // ─────────────────────────────────────────────────────────────────────────
125
+ // 3. Transit Forecast
126
+ // ─────────────────────────────────────────────────────────────────────────
127
+ {
128
+ name: "transit_forecast",
129
+ description: "6–12 month predictive transit forecast. Layers outer-planet transits, secondary progressions, " +
130
+ "and the solar return into a prioritized timeline. Requires birth data.",
131
+ text: "You are generating a predictive transit forecast using Open Ephemeris tools.\n\n" +
132
+ "## Step 1 — Collect Data\n" +
133
+ "Ask the user for:\n" +
134
+ "1. **Birth data** — date, exact time, and birth city/country\n" +
135
+ "2. **Forecast window** — default to 'next 6 months'; confirm start and end dates\n" +
136
+ "3. **Life areas to focus on** — career, relationships, creativity, finances, health, " +
137
+ "relocation, spirituality. This guides which house transits to emphasize.\n" +
138
+ "4. **Any major events coming up** they already know about — reframes the transits around real context\n\n" +
139
+ "## Step 2 — Resolve Coordinates and Timezone\n" +
140
+ "- Convert birth city → decimal lat/lon + IANA timezone\n" +
141
+ "- Set `start_date` to today and `end_date` to the end of the forecast window\n\n" +
142
+ "## Step 3 — Tool Call Sequence\n" +
143
+ "Two calls minimum, run sequentially:\n\n" +
144
+ "**A) Natal Baseline** — call `ephemeris_natal_chart` with `format='llm'`.\n" +
145
+ "Use this to establish house cusps and natal planet positions. You need house placements " +
146
+ "to interpret which life areas each transit activates.\n\n" +
147
+ "**B) Transit Search** — call `ephemeris_transits` with:\n" +
148
+ "- `natal_datetime`: birth datetime (local, no Z)\n" +
149
+ "- `natal_latitude` / `natal_longitude`: birth coords\n" +
150
+ "- `start_date` / `end_date`: forecast window\n" +
151
+ "- `transiting_planets`: `['jupiter', 'saturn', 'uranus', 'neptune', 'pluto', 'chiron']`\n" +
152
+ " (Keep it to outer planets by default — add `'mars'` only if the user requests an intense short-range forecast)\n" +
153
+ "- `natal_points`: `['sun', 'moon', 'asc', 'mc', 'venus', 'mars', 'saturn', 'north_node']`\n\n" +
154
+ "Deliver the full forecast from these two responses. Do not chain additional tools first.\n\n" +
155
+ "## Step 4 — Structure the Forecast\n\n" +
156
+ "### 📅 Month-by-Month Timeline\n" +
157
+ "Lead with the timeline — it's what they came for. Organize transit hits chronologically:\n" +
158
+ "- **Date** · **Transit**: [Planet] [aspect] [natal point] · **House** activated\n" +
159
+ "- **Impact**: 🔴 Major (outer → angle or luminary) | 🟡 Notable | 🟢 Background\n" +
160
+ "- **Interpretation**: 1–2 sentences grounded in this chart\n\n" +
161
+ "### ⚡ Peak Intensity Windows\n" +
162
+ "Cluster 2–3 periods where multiple transits converge. Name each window's theme " +
163
+ "(e.g. 'Career inflection — Saturn MC + Jupiter trine Sun'). These are the dates to plan around.\n\n" +
164
+ "### 🧭 How to Navigate\n" +
165
+ "For each 🔴 major transit: one concrete, practical action — not just what it means, but what to *do*.\n\n" +
166
+ "**Tone**: Empowering. Transits are invitations, not things that happen *to* you. " +
167
+ "Frame difficult transits as growth opportunities. Avoid astro-dread.\n\n" +
168
+ "## Step 5 — Follow-Up Offers\n" +
169
+ "After delivering the forecast, offer to layer in:\n" +
170
+ "- **Right now**: call `ephemeris_natal_transits` with today's UTC datetime to see what's " +
171
+ "*currently* in exact aspect (snapshot of the live sky on their chart)\n" +
172
+ "- **Secondary progressions**: call `ephemeris_progressed_chart` for the slow inner story " +
173
+ "running beneath the transits (progressed Moon sign/house, progressed New/Full Moon dates)\n" +
174
+ "- **Solar return**: if their birthday falls in the window, call `ephemeris_solar_return` " +
175
+ "for the year's overarching theme and dominant house focus",
176
+ },
177
+ // ─────────────────────────────────────────────────────────────────────────
178
+ // 4. Relationship Synastry
179
+ // ─────────────────────────────────────────────────────────────────────────
180
+ {
181
+ name: "relationship_synastry",
182
+ description: "Two-person compatibility and relationship analysis. Runs synastry cross-aspects, a composite " +
183
+ "chart, and a house overlay reading. Works for romantic, family, business, and friendship contexts.",
184
+ text: "You are conducting a professional relationship compatibility reading using Open Ephemeris tools.\n\n" +
185
+ "## Step 1 — Collect Data for Both People\n" +
186
+ "For **each** person, ask:\n" +
187
+ "1. Name or preferred alias (use these throughout the reading, never 'Person A/B')\n" +
188
+ "2. Date of birth\n" +
189
+ "3. Exact birth time — if unknown for either person, house analysis won't be possible; note this\n" +
190
+ "4. Birth city and country\n\n" +
191
+ "Also ask:\n" +
192
+ "5. **Type of relationship**: romantic, friendship, family, business partners?\n" +
193
+ "6. **Primary question or concern** — what are they most curious/worried about?\n" +
194
+ "7. **House system**: Placidus (default), Whole Sign, Koch, Equal?\n\n" +
195
+ "## Step 2 — Resolve Both Sets of Coordinates\n" +
196
+ "- Convert each birth city → decimal lat/lon + IANA timezone, independently\n" +
197
+ "- Format: local ISO 8601 datetime (no Z) + IANA timezone name separately for each person\n" +
198
+ "- Note if either birth time is unknown — flag this upfront before running tools\n\n" +
199
+ "## Step 3 — Tool Call\n" +
200
+ "Make a single call to `ephemeris_synastry` with:\n" +
201
+ "- `person_a_datetime`, `person_a_latitude`, `person_a_longitude`\n" +
202
+ "- `person_b_datetime`, `person_b_latitude`, `person_b_longitude`\n" +
203
+ "- `house_system`: user's choice or `'placidus'`\n" +
204
+ "- `format`: `'llm'`\n" +
205
+ "- `include_visual`: `true` (renders the interactive bi-wheel chart)\n\n" +
206
+ "Deliver the full reading from this single response.\n\n" +
207
+ "## Step 4 — Structure the Reading\n\n" +
208
+ "### Opening: The Relationship's Signature\n" +
209
+ "2–3 sentences capturing the dominant tone *before* going into details — intensity and passion? " +
210
+ "Ease and companionship? Growth through challenge? Give the headline first.\n\n" +
211
+ "### Elemental and Modal Compatibility\n" +
212
+ "Compare each person's dominant element (Fire/Earth/Air/Water) and mode (Cardinal/Fixed/Mutable). " +
213
+ "Tally total element counts between the two charts. Where is the complementarity? The friction?\n\n" +
214
+ "### Key Cross-Aspects — Synastry\n" +
215
+ "Focus on the 6–8 most significant inter-chart aspects, in priority order:\n" +
216
+ "1. **Luminary connections** (Sun-Moon, Moon-Moon, Sun-Sun) — the heart of compatibility\n" +
217
+ "2. **Venus/Mars dynamics** — attraction, desire, chemistry\n" +
218
+ "3. **Saturn contacts** — commitment, karma, longevity or restriction\n" +
219
+ "4. **North Node contacts** — fated quality\n" +
220
+ "5. **Outer planet contacts** — Uranus = disruption; Neptune = idealization; Pluto = transformation\n\n" +
221
+ "For each: **[Name A's planet] [aspect] [Name B's planet]** → house activated for each → 2–3 sentence interpretation.\n\n" +
222
+ "### Relationship Dynamics — Tailored to Context\n" +
223
+ "Address the relationship type they named:\n" +
224
+ "- **Romantic**: attraction, long-term stability, sexual chemistry, emotional security\n" +
225
+ "- **Business**: shared vision, power dynamics, reliability, risk tolerance\n" +
226
+ "- **Family**: ancestral patterns, emotional safety, old wounds\n" +
227
+ "- **Friendship**: shared values, mutual support, longevity\n\n" +
228
+ "### The Path Forward\n" +
229
+ "3 specific, actionable insights. What does this pairing need to thrive? " +
230
+ "What pattern to consciously watch? What is the relationship's highest potential?\n\n" +
231
+ "**Tone**: Balanced and honest. Hard aspects are opportunities. Never doom a connection " +
232
+ "on a single difficult cross-aspect.\n\n" +
233
+ "## Step 5 — Follow-Up Offers\n" +
234
+ "After the reading, offer:\n" +
235
+ "- **Composite chart** — call `ephemeris_composite` to read the relationship as its own entity " +
236
+ "(Composite Sun sign + house = the relationship's core purpose)\n" +
237
+ "- **House overlays** — call `ephemeris_overlay` to see which of each person's planets fall " +
238
+ "into which life areas of the other's chart\n" +
239
+ "- **Individual natal charts** — call `ephemeris_natal_chart` for either person to ground " +
240
+ "the reading in their individual baseline",
241
+ },
242
+ // ─────────────────────────────────────────────────────────────────────────
243
+ // 5. Astrocartography Reading
244
+ // ─────────────────────────────────────────────────────────────────────────
245
+ {
246
+ name: "astrocartography_reading",
247
+ description: "Astrocartography (ACG) and relocation analysis. Maps planetary power lines globally, evaluates " +
248
+ "target cities using ACG hits, and compares relocated charts. Ideal for relocation decisions, travel, " +
249
+ "or understanding why a city resonates or repels.",
250
+ text: "You are conducting an Astrocartography (ACG) relocation analysis using Open Ephemeris tools.\n\n" +
251
+ "## Step 1 — Collect Data\n" +
252
+ "Ask the user for:\n" +
253
+ "1. **Birth data**: date, exact time, birth city/country\n" +
254
+ "2. **Target locations**: city or cities they're curious about (up to 5)\n" +
255
+ "3. **Purpose**: career, romance, healing/wellness, creativity, family, spiritual growth, " +
256
+ "general quality of life — this shapes which planetary lines matter most\n" +
257
+ "4. **What they already feel** about these cities — sometimes the chart confirms an intuition, " +
258
+ "sometimes it explains why a place felt 'off'\n\n" +
259
+ "## Step 2 — Resolve Coordinates\n" +
260
+ "- Convert birth city → decimal lat/lon + IANA timezone\n" +
261
+ "- Convert each target city → decimal lat/lon\n" +
262
+ "- Format birth datetime as local ISO 8601 (no Z), pass IANA timezone separately\n\n" +
263
+ "## Step 3 — Tool Call Sequence\n" +
264
+ "Two calls minimum. Start lean, offer more after delivery.\n\n" +
265
+ "**A) City-Level Hits** — for EACH target city, call `acg_hits` with:\n" +
266
+ "- `birth_datetime`: local ISO datetime (no Z)\n" +
267
+ "- `birth_latitude` / `birth_longitude`: birth coords\n" +
268
+ "- `query_latitude` / `query_longitude`: target city coords\n" +
269
+ "- `radius_deg`: `3` (default ~300km; increase to `5` for rural/remote regions)\n" +
270
+ "- `include_aspects`: `true` (includes paran crossings, not just primary lines)\n\n" +
271
+ "This gives immediate, city-specific results for exactly what they asked about.\n\n" +
272
+ "**B) Relocate the Chart** — for their single highest-interest city, call `ephemeris_relocation` with:\n" +
273
+ "- `natal_datetime`, `natal_latitude`, `natal_longitude`\n" +
274
+ "- `relocation_latitude`, `relocation_longitude`\n" +
275
+ "- `format`: `'llm'`\n" +
276
+ "This shows how the Ascendant and house layout shifts in that city.\n\n" +
277
+ "Deliver the reading from these responses. Do not call `acg_power_lines` upfront — it's a global " +
278
+ "expensive call and only useful if the user hasn't named specific cities.\n\n" +
279
+ "## Step 4 — Interpret the ACG Lines\n\n" +
280
+ "### The Four Angles\n" +
281
+ "Each ACG line is a **planet** combined with an **angle**:\n" +
282
+ "- **MC (Midheaven)**: public life, career, reputation, authority — what you're *known* for here\n" +
283
+ "- **IC (Nadir)**: home, roots, private life, psychological foundation — how you *feel inside* here\n" +
284
+ "- **ASC (Ascendant)**: appearance, first impressions, physical vitality — how you *show up* here\n" +
285
+ "- **DC (Descendant)**: partnerships, marriage, open enemies, mirrors — who you *attract* here\n\n" +
286
+ "### Planet × Angle Meanings\n" +
287
+ "| Planet | MC — Career/Public | IC — Home/Roots | ASC — Self/Body | DC — Partners |\n" +
288
+ "|--------|-------------------|----------------|-----------------|---------------|\n" +
289
+ "| ☉ Sun | Leadership, recognition | Pride in home, seeking roots | Vitality, radiance | Attracts confident partners |\n" +
290
+ "| ☽ Moon | Emotionally driven work | Deep comfort, nurturing | Public emotional sensitivity | Attracts nurturing partners |\n" +
291
+ "| ☿ Mercury | Writing, communication, business | Mental home, many neighbors | Quick mind, talkative presence | Attracts communicators |\n" +
292
+ "| ♀ Venus | Beauty industry, arts, social success | Beautiful home, ease | Charm, magnetism | Attracts loving partners |\n" +
293
+ "| ♂ Mars | Drive, ambition, conflict risk | Domestic tension, renovation | Competitive, assertive | Attracts energetic partners |\n" +
294
+ "| ♃ Jupiter | Expansion, luck, teaching | Abundance at home | Generous, philosophical | Attracts growth-oriented partners |\n" +
295
+ "| ♄ Saturn | Serious career, mastery, hardship | Isolation, responsibility | Discipline, authority | Attracts older/serious partners |\n" +
296
+ "| ♅ Uranus | Innovation, disruption at work | Unstable home, liberation | Eccentric, electrifying | Attracts unconventional partners |\n" +
297
+ "| ♆ Neptune | Creative/spiritual calling | Dreamy/confusing home life | Mysterious, otherworldly | Attracts sensitive/elusive partners |\n" +
298
+ "| ♇ Pluto | Power, transformation, control | Intense private life | Magnetic, transformative | Attracts intense partners |\n" +
299
+ "| ⚷ Chiron | Healing vocation | Old wounds surface | Vulnerability visible | Attracts wounded-healer partners |\n\n" +
300
+ "## Step 5 — Structure the Report\n\n" +
301
+ "### Global Map Summary\n" +
302
+ "From the power lines data, name 2–3 regions of the world that are clearly beneficial for the user " +
303
+ "based on their purpose. Also name 1 region they might want to avoid.\n\n" +
304
+ "### For Each Target City\n" +
305
+ "**[City Name]** — [brief evocative opening sentence about what this city's energy feels like for them]\n\n" +
306
+ "- **Lines within radius**: list each as `[Planet] [Angle]` with distance from city center\n" +
307
+ "- **Paran crossings**: any line crossings near the city's latitude?\n" +
308
+ "- **Dominant energy**: the overall ACG signature in plain language\n" +
309
+ "- **Best for**: specific named life areas it supports\n" +
310
+ "- **Watch out for**: any challenging lines (Mars IC = domestic conflict; Neptune ASC = loss of identity)\n" +
311
+ "- **Relocated chart shifts**: what does the new Ascendant tell us? Where do key natal planets land?\n\n" +
312
+ "### Comparative Verdict\n" +
313
+ "If multiple cities: rank them by purpose. Be direct. 'For your stated goal of [X], " +
314
+ "[City A] stands out because [specific reason]. [City B] is worth a trial visit for [Y] but " +
315
+ "caution around [Z].'\n\n" +
316
+ "**Tone**: Practical and decisive. People use this for real decisions. Be honest about " +
317
+ "difficult lines — frame them as growth challenges, not red flags.\n\n" +
318
+ "## Follow-Up Offers\n" +
319
+ "After the reading, offer:\n" +
320
+ "- **Global power line map** — call `acg_power_lines` to show ALL planetary lines worldwide, " +
321
+ "useful if they want to explore regions they haven't considered\n" +
322
+ "- **More cities** — repeat `acg_hits` for any additional locations they name",
323
+ },
324
+ // ─────────────────────────────────────────────────────────────────────────
325
+ // 6. Human Design Reading
326
+ // ─────────────────────────────────────────────────────────────────────────
327
+ {
328
+ name: "human_design_reading",
329
+ description: "Full Human Design chart calculation and reading. Covers Type, Strategy, Authority, Profile, " +
330
+ "Incarnation Cross, all 9 Centers, key Gates and Channels. Includes the live bodygraph visual.",
331
+ text: "You are conducting a full Human Design chart reading using Open Ephemeris tools.\n\n" +
332
+ "## Step 1 — Collect Birth Data\n" +
333
+ "Ask the user for:\n" +
334
+ "1. **Full name** (or preferred name)\n" +
335
+ "2. **Date of birth** — day, month, year\n" +
336
+ "3. **Exact birth time** — hour and minute. This is especially critical in Human Design: " +
337
+ "even 10–15 minutes can shift the Type, Authority, or Profile. If truly unknown, " +
338
+ "proceed with solar noon but flag that results may be imprecise.\n" +
339
+ "4. **Birth city and country** — needed for timezone conversion\n\n" +
340
+ "## Step 2 — CRITICAL: Convert to UTC\n" +
341
+ "Human Design requires **UTC datetime**. The tool rejects local times without a UTC offset.\n" +
342
+ "- Determine the IANA timezone for the birth location and year (historical DST applies)\n" +
343
+ "- Convert local birth time → UTC\n" +
344
+ "- Format as ISO 8601 with Z: e.g. `1990-04-15T19:30:00Z`\n\n" +
345
+ "**Why HD needs UTC**: The system calculates two activation moments:\n" +
346
+ "- **Personality (Conscious / Black)**: the birth datetime\n" +
347
+ "- **Design (Unconscious / Red)**: ~88° of Sun arc *before* birth (~88 days prior)\n" +
348
+ "The API computes both from the single UTC birth datetime automatically.\n\n" +
349
+ "## Step 3 — Call the Tools\n\n" +
350
+ "**A) Full Chart** — call `human_design_chart` with:\n" +
351
+ "- `datetime`: UTC with Z suffix\n" +
352
+ "- `latitude`: decimal latitude (optional but improves accuracy for some calculations)\n" +
353
+ "- `longitude`: decimal longitude\n" +
354
+ "- `format`: `'llm'`\n" +
355
+ "- `include_visual`: `true` (renders the interactive bodygraph)\n\n" +
356
+ "**B) Planetary Cycles** (offer as follow-up) — if the user is near a major life cycle, " +
357
+ "mention you can calculate:\n" +
358
+ "- `hd_planetary_return` for Saturn Return (~29y), Chiron Return (~50y), Jupiter Return (~12y)\n" +
359
+ "- `hd_opposition` for Uranus Opposition (~42y, the midlife awakening)\n\n" +
360
+ "## Step 4 — Structure the Reading\n" +
361
+ "Human Design has a specific reading order — do not skip steps:\n\n" +
362
+ "### 1. Type + Strategy + Signature + Not-Self\n" +
363
+ "This is the single most important thing. Cover all four components:\n\n" +
364
+ "| Type | % | Strategy | Signature (aligned) | Not-Self (misaligned) |\n" +
365
+ "|------|---|----------|--------------------|-----------------------|\n" +
366
+ "| Generator | ~35% | Respond | Satisfaction | Frustration |\n" +
367
+ "| Manifesting Generator | ~33% | Respond, then inform | Satisfaction | Frustration + Anger |\n" +
368
+ "| Projector | ~21% | Wait for invitation | Success | Bitterness |\n" +
369
+ "| Manifestor | ~9% | Inform before acting | Peace | Anger |\n" +
370
+ "| Reflector | ~1% | Wait a lunar cycle (28 days) | Surprise + Delight | Disappointment |\n\n" +
371
+ "Explain what their Strategy looks like in *everyday practical situations*. " +
372
+ "How does it apply to their job, relationships, and decisions?\n\n" +
373
+ "### 2. Authority — The Decision-Making Body\n" +
374
+ "This is *how* they make correct decisions. One sentence of theory, then a real example:\n" +
375
+ "- **Sacral** (MG/Generator only): The gut 'uh-huh' or 'unh-unh' response in the moment\n" +
376
+ "- **Emotional/Solar Plexus**: Never decide in the moment — wait for the emotional wave to settle\n" +
377
+ "- **Splenic**: Split-second body signals; almost like a 6th sense; trust it or lose it\n" +
378
+ "- **Ego/Heart**: Honor commitments; if you want it from the heart, the resources will come\n" +
379
+ "- **Self-Projected**: Talk it out — the truth emerges through hearing yourself speak\n" +
380
+ "- **Mental/Environmental (None)**: Talk it through with trusted, impartial people; no inner authority\n" +
381
+ "- **Lunar** (Reflectors only): Track the full 28-day lunar cycle; decisions ripen with time\n\n" +
382
+ "### 3. Profile — The Role You Play\n" +
383
+ "Interpret both lines of their profile number (e.g. 3/5, 2/4, 6/2). " +
384
+ "Each line is a hexagram archetype: 1=Investigator, 2=Hermit, 3=Martyr, 4=Opportunist, " +
385
+ "5=Heretic, 6=Role Model. The first line is conscious; the second is unconscious.\n\n" +
386
+ "### 4. Centers Analysis — Defined vs Open\n" +
387
+ "Go through all 9 Centers. For each:\n" +
388
+ "- **Defined** (colored in the bodygraph): consistent, reliable energy in this area\n" +
389
+ "- **Undefined/Open** (white): receptive, amplifying, inconsistent — wisdom comes from " +
390
+ "not over-identifying with the energy amplified here\n\n" +
391
+ "Centers: **Head** (inspiration/pressure) → **Ajna** (conceptualization) → **Throat** (expression/action) → " +
392
+ "**G/Identity** (direction/love/Self) → **Heart/Ego** (willpower/resources) → **Sacral** (life force/sexuality) → " +
393
+ "**Solar Plexus** (emotions/spirit) → **Root** (adrenaline/pressure) → **Spleen** (immune/intuition/fear)\n\n" +
394
+ "### 5. Key Channels and Gates\n" +
395
+ "Highlight 3–5 defined channels (where two centers are bridged). Each channel is a full circuit:\n" +
396
+ "name it, describe what consistent energy it gives this person.\n" +
397
+ "Then note the 2–3 most prominent conscious gates (personality side = Black), " +
398
+ "especially if they are 'hanging' (not completing a channel) — these are themes the person " +
399
+ "seeks completion for through others.\n\n" +
400
+ "### 6. Incarnation Cross\n" +
401
+ "Name the Cross and describe it as the overarching life theme and purpose. " +
402
+ "The Incarnation Cross is made from the Sun gate (conscious) + Earth gate (conscious) + " +
403
+ "Sun gate (design/unconscious) + Earth gate (unconscious).\n\n" +
404
+ "### 7. Living Your Design — Experiments\n" +
405
+ "Give 3 specific, concrete experiments the user can try in the next 30 days to embody their " +
406
+ "Type, Strategy, and Authority. Make them practical and immediately actionable.\n\n" +
407
+ "**Tone**: Curious and invitational. Human Design is meant to be experimented with, not believed. " +
408
+ "Frame everything as 'something to try' not 'who you are'. " +
409
+ "Offer Saturn/Chiron Return reading if they're near those ages.",
410
+ },
411
+ // ─────────────────────────────────────────────────────────────────────────
412
+ // 7. Electional Timing
413
+ // ─────────────────────────────────────────────────────────────────────────
414
+ {
415
+ name: "electional_timing",
416
+ description: "Find the best astrological timing for a planned event — wedding, launch, signing, surgery, " +
417
+ "moving, travel. Uses electional astrology principles to score windows and avoid bad patterns.",
418
+ text: "You are an electional astrologer helping the user find the optimal date and time for an important event.\n\n" +
419
+ "## Step 1 — Collect Event Details\n" +
420
+ "Ask the user:\n" +
421
+ "1. **What is the event?** Be specific — not 'a meeting' but 'signing a business partnership agreement', " +
422
+ "'scheduling my wedding ceremony', 'launching my e-commerce store', 'booking elective surgery'\n" +
423
+ "2. **Desired date range** — give a minimum 2–3 week window; electional needs flexibility to work\n" +
424
+ "3. **Location** — city where the event will take place (for timezone + seasonal sky context)\n" +
425
+ "4. **Hard constraints** — dates they absolutely cannot use (prior commitments, venue availability)\n" +
426
+ "5. **Any personal chart data?** If yes, run natal chart first and look for dates when the " +
427
+ "moon triggers benefic natal planets.\n\n" +
428
+ "## Step 2 — Check the Planetary Weather First\n" +
429
+ "Before scanning for windows:\n\n" +
430
+ "**A) Station Check** — call `electional_station_tracker` with:\n" +
431
+ "- `start_date`: beginning of the user's window\n" +
432
+ "- `end_date`: end of the user's window\n" +
433
+ "This reveals any planets going retrograde/direct during the window. A station mid-window can " +
434
+ "invalidate entire chunks (e.g. Mercury stationing retrograde = avoid all contract dates after that point).\n\n" +
435
+ "**B) Midpoint Aspects** — call `electional_aspect_search` with a representative date in " +
436
+ "the middle of the window. This gives the baseline aspect landscape for that period.\n\n" +
437
+ "## Step 3 — Electional Principles\n" +
438
+ "Apply these rules when configuring the window search:\n\n" +
439
+ "**Universal rules (all events):**\n" +
440
+ "- Avoid Void of Course Moon — nothing initiated under a VOC Moon 'comes of' the matter\n" +
441
+ "- Waxing Moon for new beginnings, growth, and outward actions\n" +
442
+ "- Waning Moon for endings, release, reducing, and inward focus\n" +
443
+ "- Avoid Mercury Rx for contracts, communications, tech, travel arrangements\n" +
444
+ "- Avoid Venus Rx for weddings, aesthetic procedures, major romantic commitments, expensive purchases\n" +
445
+ "- Avoid Mars Rx for surgeries, confrontations, legal disputes, major physical initiatives\n\n" +
446
+ "**Event-specific guidance:**\n" +
447
+ "| Event | Best Lunar Phase | Strengthen | Avoid |\n" +
448
+ "|-------|-----------------|-----------|-------|\n" +
449
+ "| Wedding / Commitment | Waxing, not Full | Venus, Jupiter strong | Saturn-ASC, Mars-ASC, VOC Moon |\n" +
450
+ "| Business Launch | New Moon (within 48h) | Sun, Jupiter dignified | Saturn dominant, Neptune |\n" +
451
+ "| Contract Signing | Waxing (1Q → Full) | Mercury, Jupiter | Mercury Rx, VOC Moon |\n" +
452
+ "| Elective Surgery | Waning (Last Quarter) | Moon not in body-part sign | Mars afflicted, VOC Moon |\n" +
453
+ "| Home Purchase / Moving | Waxing or Full | Moon, Venus well-placed | Saturn IC, Uranus IC |\n" +
454
+ "| New Job / Career Start | Waxing | Sun/Jupiter in 10th | Saturn MC, Moon VOC |\n" +
455
+ "| Travel / Departure | Any, preferably waxing | Mercury, Jupiter | Mars-ASC, Neptune-ASC |\n" +
456
+ "| Creative Launch | Waxing, Venus hour | Venus, Moon dignified | Saturn, Rx Venus |\n\n" +
457
+ "## Step 4 — Find the Windows\n" +
458
+ "Call `ephemeris_electional` with:\n" +
459
+ "- `start_date` / `end_date`: the user's date range\n" +
460
+ "- `latitude` / `longitude`: event city coords\n" +
461
+ "- `avoid_voc`: `true`\n" +
462
+ "- `lunar_phase`: `'waxing'` (or adjust per event table above)\n" +
463
+ "- `avoid_retrograde`: comma-separated planets (e.g. `'mercury,venus'` for a wedding)\n" +
464
+ "- `max_results`: `5`\n\n" +
465
+ "## Step 5 — Present the Windows\n" +
466
+ "For each returned window:\n" +
467
+ "**[Date and local time range]**\n" +
468
+ "- Score: [X]/100 — [plain language explanation of what that score means]\n" +
469
+ "- Moon: [phase], [sign], [VOC status]\n" +
470
+ "- Strengths: [which planets are well-placed, which beneficial aspects are active]\n" +
471
+ "- Cautions: [anything to be aware of]\n\n" +
472
+ "Close with a clear **★ Top Recommendation** with a one-paragraph explanation of why this " +
473
+ "window is the strongest pick.\n\n" +
474
+ "### If No Good Windows Exist\n" +
475
+ "Be direct: 'There are no high-quality windows in your date range because [specific reason]. " +
476
+ "I'd suggest expanding to [suggested range] where [better conditions] occur.' " +
477
+ "If they have zero flexibility, identify the 'least bad' option and explain the caveats clearly.\n\n" +
478
+ "**Tone**: Decisive and practical. People are making real decisions. Give a clear recommendation " +
479
+ "and explain the why in plain language — no jargon without definition.",
480
+ },
481
+ // ─────────────────────────────────────────────────────────────────────────
482
+ // 8. Vedic / Jyotish Reading
483
+ // ─────────────────────────────────────────────────────────────────────────
484
+ {
485
+ name: "vedic_jyotish_reading",
486
+ description: "Vedic (Jyotish) natal chart reading with sidereal zodiac. Covers Lagna, Moon nakshatra, " +
487
+ "planetary dignity, key yogas, navamsa, and Vimshottari dashas. Supports configurable ayanamsa.",
488
+ text: "You are conducting a Vedic (Jyotish) natal chart reading using Open Ephemeris tools.\n\n" +
489
+ "## Step 1 — Collect Birth Data\n" +
490
+ "Ask the user for:\n" +
491
+ "1. **Full name**\n" +
492
+ "2. **Date of birth** — day, month, year\n" +
493
+ "3. **Exact birth time** — critical in Jyotish; the Lagna (Ascendant) changes approximately every " +
494
+ "2 hours, and the Moon's nakshatra can shift mid-day. Do not proceed without at least an approximate time.\n" +
495
+ "4. **Birth city and country**\n" +
496
+ "5. **Ayanamsa preference** — offer:\n" +
497
+ " - **Lahiri** (default — used by the Indian Government and most Jyotishis)\n" +
498
+ " - **Krishnamurti (KP)** — fine-degree subdivision system\n" +
499
+ " - **Raman** — BV Raman's system\n" +
500
+ " - **Fagan-Bradley** — Western sidereal standard\n" +
501
+ " - **Yukteshwar** — based on Sri Yukteswar's *The Holy Science*\n" +
502
+ " Default to Lahiri if unsure.\n\n" +
503
+ "## Step 2 — Convert to UTC\n" +
504
+ "The `vedic_chart` tool requires a UTC datetime (with Z suffix):\n" +
505
+ "- Determine the IANA timezone for the birth city and year (historical DST applies)\n" +
506
+ "- Convert local birth time → UTC\n" +
507
+ "- Format: `1990-01-15T03:00:00Z`\n\n" +
508
+ "## Step 3 — Call the Tool\n" +
509
+ "Call `vedic_chart` with:\n" +
510
+ "- `datetime`: UTC ISO 8601 with Z\n" +
511
+ "- `latitude`: decimal latitude\n" +
512
+ "- `longitude`: decimal longitude\n" +
513
+ "- `ayanamsa`: user's choice or `'lahiri'`\n\n" +
514
+ "## Step 4 — contextual Frame: Vedic vs Western\n" +
515
+ "Brief the user (if they're Western-trained) on key differences:\n" +
516
+ "- **Sidereal zodiac**: planetary positions are ~23–24° earlier than tropical. Their 'Western Aries' " +
517
+ "Sun is likely **Pisces** or late **Aquarius** in the sidereal chart.\n" +
518
+ "- **Whole Sign Bhavas**: the Lagna's sign = the entire 1st Bhava. No intercepted signs.\n" +
519
+ "- **Nakshatras**: 27 lunar mansions of ~13°20' each — the heart of timing and soul-level analysis\n" +
520
+ "- **The Moon is king**: in Jyotish the Moon holds more weight than the Sun for disposition and timing\n" +
521
+ "- **Guna of chart**: Sattvic (clear, spiritual), Rajasic (active, worldly), or Tamasic (inert)?\n\n" +
522
+ "## Step 5 — Structure the Reading\n\n" +
523
+ "### The Lagna (Ascendant) — First and Always\n" +
524
+ "- Which rashi (sidereal sign) is rising?\n" +
525
+ "- Who is the Lagna lord? In which bhava and rashi does it sit? What is its dignity status?\n" +
526
+ "- Any grahas (planets) occupying the Lagna — they color the personality most strongly\n" +
527
+ "- A strong Lagna lord + strong Lagna = resilient, capable person regardless of other chart factors\n\n" +
528
+ "### The Moon (Chandra) — Emotional Core\n" +
529
+ "- Rashi (sidereal sign) and Bhava\n" +
530
+ "- **Nakshatra**: name (in Sanskrit + English), presiding deity, symbol, quality (Deva/Manushya/Rakshasa)\n" +
531
+ "- **Pada** (quarter, 1–4): the navamsa sub-sign this nakshatra pada maps to\n" +
532
+ "- Paksha: Shukla (waxing, bright — stronger) or Krishna (waning, dark)?\n" +
533
+ "- Moon's aspects (Vedic full-sign aspects): which grahas aspect the Moon?\n\n" +
534
+ "### The Sun (Surya)\n" +
535
+ "- Rashi, Bhava, Nakshatra, dignity, aspects\n" +
536
+ "- Is it combust any planet (within ~6°)? Combust planets lose their power.\n\n" +
537
+ "### Planetary Dignity Survey\n" +
538
+ "For each of the 7 classical grahas (Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn) + Rahu/Ketu:\n" +
539
+ "- Sign placement + dignity status: uchcha (exalted), swa (own sign), mitra (friend), " +
540
+ "sama (neutral), shatru (enemy), neecha (fallen)\n" +
541
+ "- Which bhava?\n" +
542
+ "- Are they retrograde (vakra)? Retrograde planets express their nature more intensely.\n\n" +
543
+ "### Key Yogas\n" +
544
+ "Scan for the most impactful combinations:\n" +
545
+ "- **Raj Yoga**: Kendra lord (1,4,7,10) + Trikona lord (1,5,9) in conjunction or mutual aspect\n" +
546
+ "- **Dhana Yoga**: 2nd + 11th lord combinations → wealth accumulation\n" +
547
+ "- **Neecha Bhanga Raj Yoga**: fallen planet whose debilitation is cancelled → immense strength\n" +
548
+ "- **Gajakesari Yoga**: Jupiter in Kendra from Moon → wisdom and good fortune\n" +
549
+ "- **Parivartana (Mutual Reception)**: two planets in each other's signs → exchanged strength\n" +
550
+ "- **Viparita Raj Yoga**: lords of dusthanas (6, 8, 12) in other dusthanas → triumph through adversity\n\n" +
551
+ "### Navamsa (D9) Highlights\n" +
552
+ "The navamsa reveals the soul's deeper purpose and the quality of relationships:\n" +
553
+ "- Where does the Lagna lord fall in D9? That bhava is additionally activated.\n" +
554
+ "- Where do the luminaries (Sun/Moon) land in D9?\n" +
555
+ "- Vargottama planets (same sign in D1 and D9) are especially strong — note these.\n\n" +
556
+ "### Vimshottari Dasha (Planetary Periods)\n" +
557
+ "If the API returns Dasha data:\n" +
558
+ "- **Current Maha Dasha** (major 6–20 year period) and its lord's chart condition\n" +
559
+ "- **Current Antardasha** (sub-period, ~1–3 years) and its lord's interaction with the major lord\n" +
560
+ "- **Next Maha Dasha change**: when it arrives and what themes to expect\n\n" +
561
+ "**Tone**: Respectful of the tradition's depth. Use Sanskrit terms with English equivalents in parentheses. " +
562
+ "Reference the Vedic philosophical framework (dharma, artha, kama, moksha) where appropriate. " +
563
+ "Jyotish is a practical science — always relate chart factors to real life arenas.",
564
+ },
565
+ // ─────────────────────────────────────────────────────────────────────────
566
+ // 9. BaZi Four Pillars of Destiny
567
+ // ─────────────────────────────────────────────────────────────────────────
568
+ {
569
+ name: "bazi_four_pillars",
570
+ description: "Chinese BaZi (Four Pillars of Destiny) chart reading. Covers the four pillars, Day Master " +
571
+ "identity and strength, Wu Xing elemental balance, Ten Gods, and Luck Pillar timing.",
572
+ text: "You are conducting a BaZi (四柱命理, Sì Zhù Mìnglǐ — Four Pillars of Destiny) reading using Open Ephemeris tools.\n\n" +
573
+ "## Step 1 — Collect Birth Data\n" +
574
+ "Ask the user for:\n" +
575
+ "1. **Date of birth** — day, month, year (Gregorian calendar)\n" +
576
+ "2. **Hour of birth** — BaZi uses 2-hour shí (時) blocks:\n" +
577
+ " | Animal | Block | Animal | Block |\n" +
578
+ " |--------|-------|--------|-------|\n" +
579
+ " | 🐀 Rat | 23:00–01:00 | 🐎 Horse | 11:00–13:00 |\n" +
580
+ " | 🐂 Ox | 01:00–03:00 | 🐑 Sheep | 13:00–15:00 |\n" +
581
+ " | 🐯 Tiger | 03:00–05:00 | 🐒 Monkey | 15:00–17:00 |\n" +
582
+ " | 🐇 Rabbit | 05:00–07:00 | 🐓 Rooster | 17:00–19:00 |\n" +
583
+ " | 🐉 Dragon | 07:00–09:00 | 🐕 Dog | 19:00–21:00 |\n" +
584
+ " | 🐍 Snake | 09:00–11:00 | 🐖 Pig | 21:00–23:00 |\n" +
585
+ " If the hour is unknown, note it — the Hour Pillar will be missing.\n" +
586
+ "3. **Birth city** — BaZi uses LOCAL solar time, not clock time. City is needed to detect " +
587
+ "any significant longitude offset from the timezone meridian.\n\n" +
588
+ "## Step 2 — Local Solar Time\n" +
589
+ "BaZi uses **local mean solar time** (not standard clock time or UTC). For most major cities " +
590
+ "this difference is small, but it can shift the hour animal by one block for cities far " +
591
+ "from their timezone meridian (e.g. western Xinjiang in China UTC+8, western Spain in CET).\n" +
592
+ "Pass individual date/time components — do NOT convert to UTC.\n\n" +
593
+ "## Step 3 — Call the Tool\n" +
594
+ "Call `chinese_bazi` with:\n" +
595
+ "- `year`: birth year\n" +
596
+ "- `month`: birth month (1–12)\n" +
597
+ "- `day`: birth day\n" +
598
+ "- `hour`: birth hour in 24h format (use the midpoint of the shí block, e.g. 12 for Horse)\n" +
599
+ "(Alternatively pass `datetime` as a full ISO 8601 string and the API extracts the components.)\n\n" +
600
+ "## Step 4 — Orient the User\n" +
601
+ "Before the interpretation, tell the user their **Chinese zodiac year animal** " +
602
+ "(based on the Year Heavenly Stem and Earthly Branch) as a quick hook — most users know this.\n\n" +
603
+ "## Step 5 — BaZi Interpretation Framework\n\n" +
604
+ "### The Four Pillars\n" +
605
+ "Each Pillar = one Heavenly Stem (天干 tiāngān) + one Earthly Branch (地支 dìzhī):\n" +
606
+ "| Pillar | Life Domain | Time Period |\n" +
607
+ "|--------|------------|-------------|\n" +
608
+ "| Year (年) | Ancestry, grandparents, early environment, social face | Before ~18 |\n" +
609
+ "| Month (月) | Parents, father, career, upbringing | ~18–40 |\n" +
610
+ "| Day (日) | Self (Day Master = HS), marriage, spouse | ~30–50 |\n" +
611
+ "| Hour (時) | Children, legacy, late years, hidden desires | ~50+ |\n\n" +
612
+ "### The Day Master (日主 Rìzhǔ) — Who You Are\n" +
613
+ "The Day Pillar's Heavenly Stem represents the person. The 10 Day Masters:\n\n" +
614
+ "| DM | Element | Nature |\n" +
615
+ "|----|---------|--------|\n" +
616
+ "| 甲 Jiǎ | Yang Wood | Pioneer, tall tree — upright, growth-oriented, leadership |\n" +
617
+ "| 乙 Yǐ | Yin Wood | Vine, flower — flexible, diplomatic, graceful, adaptive |\n" +
618
+ "| 丙 Bǐng | Yang Fire | Sun — charismatic, warm, generous, expansive |\n" +
619
+ "| 丁 Dīng | Yin Fire | Candle — thoughtful, precise, nurturing, steadfast |\n" +
620
+ "| 戊 Wù | Yang Earth | Mountain — stable, reliable, principled, enduring |\n" +
621
+ "| 己 Jǐ | Yin Earth | Farmland — gentle, productive, methodical, practical |\n" +
622
+ "| 庚 Gēng | Yang Metal | Sword — decisive, courageous, direct, justice-driven |\n" +
623
+ "| 辛 Xīn | Yin Metal | Jewel — refined, perceptive, detail-oriented, sensitive |\n" +
624
+ "| 壬 Rén | Yang Water | Ocean/River — intelligent, adaptable, ambitious |\n" +
625
+ "| 癸 Guǐ | Yin Water | Rain, dew — intuitive, spiritual, empathetic, imaginative |\n\n" +
626
+ "### Day Master Strength\n" +
627
+ "Count elements in the chart to assess whether the DM is Strong (旺 wàng) or Weak (弱 ruò):\n" +
628
+ "- **Strong DM** benefits from elements that control it (官 Guan) or drain it (食神 Shí Shén)\n" +
629
+ "- **Weak DM** benefits from elements that produce it (印 Yìn) or match it (比劫 Bǐ Jié)\n" +
630
+ "Give a plain-English verdict: 'Your [DM] is [strong/weak]. This means your favorable element is " +
631
+ "[element], and you should [lifestyle advice around that element].'\n\n" +
632
+ "### Wu Xing (五行 Wǔ Xíng) — Five Elements Balance\n" +
633
+ "Count each element (Wood/Fire/Earth/Metal/Water) across all 8 characters. " +
634
+ "Which are abundant? Which are missing? The missing/scarce element is often the " +
635
+ "**yōng shén (用神)** — the favorable element to cultivate:\n" +
636
+ "- Wood → work with plants, growth, green colors, springtime\n" +
637
+ "- Fire → south-facing spaces, red/orange, social energy, summers\n" +
638
+ "- Earth → stability, yellow/brown, grounding, center\n" +
639
+ "- Metal → white, west direction, order, precision, autumn\n" +
640
+ "- Water → black/blue, north, stillness, wisdom, winters\n\n" +
641
+ "### Ten Gods (十神 Shí Shén) — The Relationship Map\n" +
642
+ "The Ten Gods describe how each other element relates to the Day Master:\n" +
643
+ "| Ten God | Relationship | Life Domain |\n" +
644
+ "|---------|-------------|-------------|\n" +
645
+ "| 正财 Direct Wealth | Controls DM (same polarity) | Steady income, discipline |\n" +
646
+ "| 偏财 Indirect Wealth | Controls DM (diff polarity) | Variable income, business |\n" +
647
+ "| 正官 Direct Officer | Controls DM (same polarity opposite) | Career, authority, fame |\n" +
648
+ "| 七杀 7 Killings | Controls DM (diff polarity opp.) | Power struggles, courage |\n" +
649
+ "| 正印 Direct Resource | Produces DM (same polarity) | Nurturing, education |\n" +
650
+ "| 偏印 Indirect Resource | Produces DM (diff polarity) | Unconventional learning |\n" +
651
+ "| 食神 Eating God | DM produces (same polarity) | Creativity, talents, pleasure |\n" +
652
+ "| 伤官 Hurting Officer | DM produces (diff polarity) | Self-expression, rebellion |\n" +
653
+ "| 比肩 Companion | Same element, same polarity | Peers, cooperation |\n" +
654
+ "| 劫财 Rob Wealth | Same element, diff polarity | Competition, loss, courage |\n\n" +
655
+ "### Luck Pillars (大运 Dàyùn)\n" +
656
+ "If the API returns Luck Pillar data:\n" +
657
+ "- Each Luck Pillar governs ~10 years of life\n" +
658
+ "- Identify the **current Luck Pillar** and its Stem/Branch\n" +
659
+ "- What Ten God does the Luck Pillar stem represent for this Day Master?\n" +
660
+ "- When does the next Luck Pillar begin and what themes does it introduce?\n\n" +
661
+ "**Tone**: Deeply respectful of the Chinese metaphysical tradition. Use Chinese terms " +
662
+ "with pinyin and brief English equivalents. Avoid reducing to fortune-telling; " +
663
+ "BaZi maps tendencies, timing, and elemental medicine — not fixed fate.",
664
+ },
665
+ // ─────────────────────────────────────────────────────────────────────────
666
+ // 10. Current Sky Snapshot
667
+ // ─────────────────────────────────────────────────────────────────────────
668
+ {
669
+ name: "current_sky_snapshot",
670
+ description: "Real-time planetary weather report — moon phase, active aspects, retrograde planets, " +
671
+ "dignity status, and electional quality right now. No birth data required.",
672
+ text: "You are generating a real-time 'current sky' planetary weather report using Open Ephemeris tools.\n\n" +
673
+ "## Step 1 — Quick Context Check\n" +
674
+ "Before calling tools, ask the user two quick questions:\n" +
675
+ "1. **What's on their mind?** — A specific life area or decision they want the sky's energy " +
676
+ "interpreted in context of (optional but makes the reading 10× more useful)\n" +
677
+ "2. **Their approximate timezone** — so you can present times in their local time\n\n" +
678
+ "Then proceed immediately — do not ask for birth data (this reading requires none).\n\n" +
679
+ "## Step 2 — Call All Tools (parallel where possible)\n\n" +
680
+ "**A) Moon Phase NOW** — call `ephemeris_moon_phase` with no arguments. " +
681
+ "The tool defaults to live UTC now and returns phase name, illumination %, sign, and VOC status.\n\n" +
682
+ "**B) Active Aspects** — call `electional_aspect_search` with `date` = today's date (ISO 8601)\n\n" +
683
+ "**C) Station Tracker** — call `electional_station_tracker` with:\n" +
684
+ "- `start_date` = today\n" +
685
+ "- `end_date` = 30 days from today\n" +
686
+ "This reveals planets going retrograde or direct in the coming month.\n\n" +
687
+ "**D) Electional Score NOW** — call `electional_moment_analysis` with `date` = today\n\n" +
688
+ "**E) Next Lunar Phase** — call `ephemeris_next_lunar_phase` with:\n" +
689
+ "- `phase`: based on current phase from (A). If waxing → use `'full_moon'`; if waning → use `'new_moon'`\n" +
690
+ "- `count`: `3` (to show the next 3 upcoming phases as a forward-look)\n\n" +
691
+ "**F) Dignity Status** — call `ephemeris_dignities` with `datetime` = now (UTC with Z)\n\n" +
692
+ "## Step 3 — Structure the Report\n\n" +
693
+ "### 🌙 The Moon Right Now\n" +
694
+ "Lead with the Moon — it's the fastest-moving body and the pulse of collective energy:\n" +
695
+ "- Phase name, illumination %, sign, and VOC status\n" +
696
+ "- What this phase and sign evokes emotionally and collectively\n" +
697
+ "- Is the Moon in a strong sign (dignity) or stressed sign?\n" +
698
+ "- Next phase date: what kind of culmination or reset is coming?\n\n" +
699
+ "### ⚡ Active Aspect Weather\n" +
700
+ "The 4–6 tightest applying aspects between planets today:\n" +
701
+ "For each: `[Planet] [aspect symbol] [Planet]` | orb | direction (applying/separating) | one-sentence meaning\n\n" +
702
+ "Close with an overall quality assessment: Is today a day for bold action, careful planning, " +
703
+ "creative flow, emotional processing, or rest and reflection?\n\n" +
704
+ "### 🪐 Retrograde Report\n" +
705
+ "- Which planets are currently retrograde and what each means in plain English\n" +
706
+ "- Any stations (retrograde/direct changes) in the next 30 days — give exact dates and what shifts\n\n" +
707
+ "### 💫 Planets in Their Power\n" +
708
+ "From the dignities report:\n" +
709
+ "- **Dignified** (domicile or exaltation): these energies flow freely today — use them\n" +
710
+ "- **Debilitated** (detriment or fall): these areas need more care and intentionality\n\n" +
711
+ "### 🎯 Today's Electional Quality\n" +
712
+ "- Score (0–100) from the moment analysis with plain-English interpretation\n" +
713
+ "- **Best uses**: what activities/decisions this sky supports\n" +
714
+ "- **What to defer**: what to wait on until the sky shifts\n\n" +
715
+ "### 📅 Coming Lunar Rhythm\n" +
716
+ "Brief preview of the next 3 lunar phase changes — dates, signs, and what each one is good for.\n\n" +
717
+ "### 🔮 [User's Question]\n" +
718
+ "If they shared a concern or life area in Step 1: a dedicated paragraph applying today's sky " +
719
+ "specifically to their situation.\n\n" +
720
+ "**Tone**: Bright, grounded, and modern. Like a weather briefing, but for energy and intention. " +
721
+ "Keep it practical — every insight should connect to a real decision or action.",
722
+ },
723
+ // ─────────────────────────────────────────────────────────────────────────
724
+ // 11. Solar Return Year Ahead
725
+ // ─────────────────────────────────────────────────────────────────────────
726
+ {
727
+ name: "solar_return_year_ahead",
728
+ description: "Annual Solar Return chart reading — the chart cast for the moment the Sun returns to its natal " +
729
+ "degree. Sets themes, focus areas, and opportunities for the coming birthday year.",
730
+ text: "You are conducting a Solar Return (SR) reading — the annual birthday chart — using Open Ephemeris tools.\n\n" +
731
+ "## Step 1 — Collect Data\n" +
732
+ "Ask the user for:\n" +
733
+ "1. **Birth data**: date, exact time (with as much precision as possible), birth city\n" +
734
+ "2. **Target year**: which birthday year? (e.g. upcoming birthday vs a past year for research)\n" +
735
+ "3. **Location on their birthday** — this is crucial:\n" +
736
+ " The Solar Return chart is cast for wherever the person *physically is* when the Sun " +
737
+ " hits their natal degree. Being in a different city changes the SR Ascendant and house layout.\n" +
738
+ " If they haven't decided yet, calculate for both their home and any other city they're considering.\n" +
739
+ "4. **House system**: Placidus (default), Whole Sign, Koch, Equal?\n\n" +
740
+ "## Step 2 — Resolve Data\n" +
741
+ "- Convert birth city → decimal lat/lon + IANA timezone\n" +
742
+ "- For `birth_datetime`, include the UTC offset: `1985-06-21T14:00:00-05:00`\n" +
743
+ " (or convert to UTC with Z: `1985-06-21T19:00:00Z`)\n" +
744
+ "- Convert birthday location city → decimal lat/lon (this becomes `return_latitude`/`return_longitude`)\n\n" +
745
+ "## Step 3 — Tool Call\n" +
746
+ "Two calls. Deliver the reading, then offer depth.\n\n" +
747
+ "**A) Natal Baseline** — call `ephemeris_natal_chart` with `format='llm'` and `house_system` as chosen.\n" +
748
+ "You need natal house cusps and planet positions to interpret the SR in context.\n\n" +
749
+ "**B) Solar Return Chart** — call `ephemeris_solar_return` with:\n" +
750
+ "- `birth_datetime`: with UTC offset or Z (e.g. `1985-06-21T19:00:00Z`)\n" +
751
+ "- `birth_latitude` / `birth_longitude`: natal birth city coords\n" +
752
+ "- `return_latitude` / `return_longitude`: where they'll be on their birthday\n" +
753
+ "- `target_datetime`: any date in the target year (e.g. `2026-06-01T00:00:00Z`)\n" +
754
+ "- `include_visual`: `true`\n\n" +
755
+ "Deliver the full reading from these two responses. Do not pre-chain progressions or transit snapshots.\n\n" +
756
+ "## Step 4 — Structure the Reading\n\n" +
757
+ "### Opening: The Year's Headline\n" +
758
+ "Lead with a bold, resonant one-sentence statement of the year's central theme before any analysis. " +
759
+ "Example: 'This is a year of radical visibility and career reinvention, with the past finally " +
760
+ "making room for a more authentic public identity.'\n\n" +
761
+ "### The Solar Return Ascendant — The Year's Vehicle\n" +
762
+ "The SR ASC is the #1 factor. It describes the *mode* in which this year will be lived:\n" +
763
+ "- What sign is the SR ASC? What energy does it bring to the year?\n" +
764
+ "- Where does the SR ASC's ruler fall (sign and house)? That's where year's energy is *directed*.\n" +
765
+ "- Compare to natal ASC: same sign = continuity; different sign = the person is inhabiting a " +
766
+ "different 'costume' this year — a different way of engaging life.\n\n" +
767
+ "### The SR Sun's House — The Year's Focus\n" +
768
+ "THE house of focus for the year. The Sun in SR H10 = career year. SR H7 = relationship year. " +
769
+ "SR H12 = retreat and spiritual consolidation year. Ground this firmly.\n\n" +
770
+ "### The SR Moon — Emotional Theme\n" +
771
+ "- Sign and house: the emotional undertone running through the year\n" +
772
+ "- SR Moon aspects: what shapes the emotional landscape?\n" +
773
+ "- SR Moon in an angular house (1/4/7/10): emotions are front and center, highly active\n\n" +
774
+ "### Angular Planets — The Year's Protagonists\n" +
775
+ "Any planet on an SR angle (within 5°) is forcefully active this year:\n" +
776
+ "- **SR ASC**: colors personality and health\n" +
777
+ "- **SR IC**: major changes in home/family life\n" +
778
+ "- **SR DC**: partnerships and one-to-one relationships are pivotal\n" +
779
+ "- **SR MC**: career, reputation, and public direction is being remade\n\n" +
780
+ "### Key SR Planets\n" +
781
+ "- **Jupiter in SR**: which house gets expanded and blessed? Where is luck flowing?\n" +
782
+ "- **Saturn in SR**: which house demands serious work, limits, or restructuring?\n" +
783
+ "- **Any SR stellium**: a house with 3+ planets = the overwhelmingly dominant life theme\n\n" +
784
+ "### SR in Natal Context\n" +
785
+ "Overlay the SR planets into the natal houses (SR planets in natal house positions):\n" +
786
+ "Which natal life areas are 'lit up' by the Solar Return? This is where natal and SR interweave.\n\n" +
787
+ "### Location Optimization (if applicable)\n" +
788
+ "If they asked about a different SR location: explain clearly — 'If you're in [City X] on your " +
789
+ "birthday, the SR Ascendant shifts from [sign] to [sign], moving [planet] from house [X] to " +
790
+ "house [Y], which changes the year from a theme of [A] to a theme of [B].'\n\n" +
791
+ "### The Year's Power Months\n" +
792
+ "The SR Moon transits each SR house in roughly one month. Identify the 2–3 months when the " +
793
+ "SR Moon activates the most loaded SR houses — these are the year's peak moments.\n\n" +
794
+ "**Tone**: Visionary and forward-focused. Give the user a map for the year. " +
795
+ "Be specific and bold — people remember a good SR reading for the entire year.\n\n" +
796
+ "## Step 5 — Follow-Up Offers\n" +
797
+ "After the reading, offer to add:\n" +
798
+ "- **Secondary progressions** — call `ephemeris_progressed_chart` for the slow backdrop " +
799
+ "(progressed Moon sign/house, upcoming progressed New or Full Moon)\n" +
800
+ "- **Active transit snapshot** — call `ephemeris_natal_transits` with today's date to show " +
801
+ "what's already building in their chart heading into the SR year\n" +
802
+ "- **Second location comparison** — re-run `ephemeris_solar_return` with alternate city coords " +
803
+ "to compare how the SR Ascendant and house emphasis shifts",
804
+ },
805
+ // ─────────────────────────────────────────────────────────────────────────
806
+ // 12. Developer API Integration Guide
807
+ // ─────────────────────────────────────────────────────────────────────────
808
+ {
809
+ name: "developer_api_integration",
810
+ description: "Help a developer integrate the Open Ephemeris API into their application. Covers architecture, " +
811
+ "endpoint selection, authentication, datetime/timezone patterns, caching strategy, credit costs, " +
812
+ "and language-specific code scaffolding.",
813
+ text: "You are a technical integration consultant helping a developer build an application using the " +
814
+ "Open Ephemeris API.\n\n" +
815
+ "## Step 1 — Understand What They're Building\n" +
816
+ "Ask upfront:\n" +
817
+ "1. **What are you building?** (Web app, mobile app, CLI, data pipeline, AI chatbot, internal tool)\n" +
818
+ "2. **What language/framework?** (TypeScript/Node, Python, Go, Swift, Ruby, etc.)\n" +
819
+ "3. **What astrological features do you need?** Let them describe in plain terms — you'll map to endpoints\n" +
820
+ "4. **Scale expectations?** (personal hobby, small SaaS, high-traffic app)\n" +
821
+ "5. **MCP or REST?** MCP (this server) = AI agent integration; REST = production apps and services\n\n" +
822
+ "## Step 2 — API Quick Reference\n\n" +
823
+ "### Authentication\n" +
824
+ "```\n" +
825
+ "Authorization: Bearer YOUR_API_KEY\n" +
826
+ "Content-Type: application/json\n" +
827
+ "```\n" +
828
+ "Base URL: `https://api.openephemeris.com`\n" +
829
+ "Get API keys at: `https://openephemeris.com/dashboard`\n\n" +
830
+ "### Endpoint Directory\n" +
831
+ "| Feature | MCP Tool | REST Endpoint | Credits |\n" +
832
+ "|---------|----------|---------------|---------|\n" +
833
+ "| Natal chart | `ephemeris_natal_chart` | `POST /ephemeris/natal-chart` | 1 |\n" +
834
+ "| Natal batch (up to 100) | `ephemeris_natal_batch` | `POST /ephemeris/natal/batch` | 1/subject |\n" +
835
+ "| Vedic / Jyotish chart | `vedic_chart` | `POST /vedic/chart` | 1 |\n" +
836
+ "| Human Design | `human_design_chart` | `POST /human-design/chart` | 2 |\n" +
837
+ "| BaZi Four Pillars | `chinese_bazi` | `POST /chinese/bazi` | 1 |\n" +
838
+ "| Synastry bi-wheel | `ephemeris_synastry` | `POST /comparative/synastry` | 3 |\n" +
839
+ "| Composite chart | `ephemeris_composite` | `POST /comparative/composite` | 3 |\n" +
840
+ "| Midpoint composite | `ephemeris_composite_midpoint` | `POST /comparative/composite/midpoint` | 3 |\n" +
841
+ "| House overlay | `ephemeris_overlay` | `POST /comparative/overlay` | 3 |\n" +
842
+ "| Natal transits (now) | `ephemeris_natal_transits` | `POST /comparative/natal-transits` | 3 |\n" +
843
+ "| Transit search (range) | `ephemeris_transits` | `POST /predictive/transits/search` | 6 |\n" +
844
+ "| Relocation chart | `ephemeris_relocation` | `POST /ephemeris/relocation` | 1 |\n" +
845
+ "| Solar return | `ephemeris_solar_return` | `POST /predictive/returns/solar` | 5 |\n" +
846
+ "| Lunar return | `ephemeris_lunar_return` | `POST /predictive/returns/lunar` | 5 |\n" +
847
+ "| Progressions | `ephemeris_progressed_chart` | `POST /ephemeris/progressed` | 1 |\n" +
848
+ "| ACG power lines | `acg_power_lines` | `POST /acg/power-lines` | 10 |\n" +
849
+ "| ACG city hits | `acg_hits` | `POST /acg/hits` | 15 |\n" +
850
+ "| Eclipse finder | `ephemeris_next_eclipse` | `GET /eclipse/next-visible` | 1 |\n" +
851
+ "| Moon phase (current) | `ephemeris_moon_phase` | `GET /ephemeris/moon/phase` | 1 |\n" +
852
+ "| Next lunar phase | `ephemeris_next_lunar_phase` | `GET /ephemeris/moon/next-phase` | 1 |\n" +
853
+ "| Electional windows | `ephemeris_electional` | `GET /electional/find-window` | 5 |\n" +
854
+ "| Electional score | `electional_moment_analysis` | `GET /electional/moment` | 1 |\n" +
855
+ "| Dignities | `ephemeris_dignities` | `POST /ephemeris/dignities` | 1 |\n" +
856
+ "| Hermetic lots | `ephemeris_hermetic_lots` | `POST /ephemeris/hermetic-lots` | 1 |\n" +
857
+ "| Midpoints | `ephemeris_midpoints` | `POST /ephemeris/midpoints` | 1 |\n\n" +
858
+ "## Step 3 — Critical Implementation Patterns\n\n" +
859
+ "### ⚠️ Datetime Handling — Most Common Source of Bugs\n" +
860
+ "```\n" +
861
+ "# CORRECT — Local birth time + IANA timezone (Western astrology)\n" +
862
+ "POST /ephemeris/natal-chart\n" +
863
+ "{ \"datetime\": \"1990-04-15T14:30:00\", \"timezone\": \"America/Chicago\" }\n\n" +
864
+ "# ALSO CORRECT — Local time with UTC offset embedded\n" +
865
+ "{ \"datetime\": \"1990-04-15T14:30:00-05:00\" }\n\n" +
866
+ "# CORRECT — UTC required for HD and Vedic\n" +
867
+ "POST /human-design/chart\n" +
868
+ "{ \"datetime\": \"1990-04-15T19:30:00Z\" } // Z = UTC\n\n" +
869
+ "# WRONG — Never append Z to a local time\n" +
870
+ "{ \"datetime\": \"1990-04-15T14:30:00Z\" } // ❌ reads as UTC 2:30pm, not Central 2:30pm\n" +
871
+ "```\n\n" +
872
+ "**Rule of thumb**:\n" +
873
+ "- Natal charts (Western, BaZi, electional): local time + `timezone` IANA name\n" +
874
+ "- Human Design, Vedic: always UTC with Z\n\n" +
875
+ "### Coordinates\n" +
876
+ "- Decimal degrees, at least 4 decimal places\n" +
877
+ "- Positive = North/East; Negative = South/West\n" +
878
+ "- Geocode server-side (don't expose Google Maps keys to clients)\n" +
879
+ "- Store coordinates alongside user profiles — don't re-geocode on every request\n\n" +
880
+ "### Token-Efficient Output for AI Pipelines\n" +
881
+ "Use `format: 'llm'` on all chart calls that support it. Output is ~10× smaller:\n" +
882
+ "```\n" +
883
+ "# format: 'json' (verbose)\n" +
884
+ "{ \"planet\": \"Sun\", \"sign\": \"Aries\", \"degree\": 25.3, \"house\": 10, \"retrograde\": false }\n\n" +
885
+ "# format: 'llm' (compact) — entire chart in ~300 tokens\n" +
886
+ "\"Su 25°Ar30 H10\"\n" +
887
+ "```\n\n" +
888
+ "### Caching Strategy\n" +
889
+ "Natal charts are deterministic. Cache aggressively:\n" +
890
+ "```\n" +
891
+ "Cache key: SHA256(datetime + latitude + longitude + house_system)\n\n" +
892
+ "TTL guide:\n" +
893
+ " Natal charts → ∞ (they never change)\n" +
894
+ " Transit search → 24 hours\n" +
895
+ " Transit now → 1 hour\n" +
896
+ " Moon phase → 1 minute\n" +
897
+ " Electional → 1 hour\n" +
898
+ "```\n\n" +
899
+ "### Credit Optimization\n" +
900
+ "- **Batch natal charts**: use `POST /ephemeris/natal/batch` for multi-user onboarding (1 credit/subject vs N calls)\n" +
901
+ "- **Current transits**: prefer `ephemeris_natal_transits` (3 credits) over " +
902
+ "`ephemeris_transits` (6 credits) when you only need right-now, not a date range\n" +
903
+ "- **ACG**: call `acg_hits` (city-level, 15 credits) only for specific targets; " +
904
+ "use `acg_power_lines` (10 credits) for global maps\n" +
905
+ "- **Format matters**: `format: 'llm'` reduces token usage in your LLM calls significantly\n\n" +
906
+ "## Step 4 — Generate a Code Scaffold\n" +
907
+ "Ask: 'What language would you like the scaffold in? And what is the first feature you want to implement?'\n\n" +
908
+ "Then generate a **complete, working, commented** code example that:\n" +
909
+ "1. Sets up the auth header correctly\n" +
910
+ "2. Defines a typed client function\n" +
911
+ "3. Shows the correct datetime + timezone pattern for their use case\n" +
912
+ "4. Handles the response and errors (rate limit = 429, invalid input = 400, credit exhaustion = 402)\n" +
913
+ "5. Includes basic cache lookup before calling the API\n\n" +
914
+ "## Step 5 — Pre-Launch Checklist\n" +
915
+ "Walk through this before they ship:\n" +
916
+ "- [ ] Are you storing birth times as local time with timezone, not UTC?\n" +
917
+ "- [ ] Is timezone stored alongside coordinates for every user profile?\n" +
918
+ "- [ ] Is geocoding server-side (no API key leaking to clients)?\n" +
919
+ "- [ ] Are natal charts cached? (This alone can cut API costs by 80%+)\n" +
920
+ "- [ ] Is `format='llm'` used everywhere you pipe results into an LLM?\n" +
921
+ "- [ ] Does your UI gracefully handle missing birth time (no ASC/house data shown)?\n" +
922
+ "- [ ] Have you tested with a high-latitude birth (>60°N/S)? Placidus fails — use Koch or Porphyry.\n" +
923
+ "- [ ] Have you tested with a birth time near midnight (date rollover edge case)?\n" +
924
+ "- [ ] Are you handling 429 rate-limit responses with exponential backoff?\n" +
925
+ "- [ ] Have you set up credit usage monitoring and alerts?\n\n" +
926
+ "**Tone**: Direct technical peer. Don't explain things they probably already know. " +
927
+ "Ask about their stack first, then tailor the code examples exactly to their language and use case. " +
928
+ "Offer to go deeper on any specific endpoint or pattern.",
929
+ },
930
+ ];
931
+ /**
932
+ * Returns the list of all prompts (name + description only, for ListPrompts).
933
+ */
934
+ export function listPrompts() {
935
+ return PROMPTS.map(({ name, description }) => ({ name, description }));
936
+ }
937
+ /**
938
+ * Returns the full prompt content for a given prompt name, or null if not found.
939
+ */
940
+ export function getPromptContent(name) {
941
+ return PROMPTS.find((p) => p.name === name) ?? null;
942
+ }