Analyze Inbox Ecosystem
Check if Gmail is connected. If not, guide the user through OAuth setup before proceeding.
Read Raw Inbox Data. Using the taxonomy guide, classify each significant sender into a species type. Count specimens per species and note examples.
Compute ecosystem health (0-100): Biodiversity (0-25), Balance (0-25), Sustainability (0-25), Conservation Status (0-25). Determine status: Thriving/Stable/Stressed/Critical.
Write the analysis to Ecosystem Analysis as JSON with species counts, health metrics, dominant species, extinct species, and conservation actions.
Generate Attenborough narration using the style guide. Write to Ecosystem Portrait Draft with the narration, census, and health breakdown.
Present the narration dramatically. Ask which biome for their portrait: Savanna (African), Ocean (reef), or Forest (woodland).
To run this task you must have the following required information:
> Gmail must be connected. Optionally specify time range (default: last 30 days) and max emails to analyze (default: 200).
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. Check if Gmail is connected. If not, guide the user through OAuth setup before proceeding.
2. [Gather Arguments: Fetch Gmail Messages] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `query`: is:inbox newer_than:30d
- `maxResults` (default: "50"): 200 or user-specified max
- `outputPath` (default: "session/emails.json"): session/ecosystem-raw.json
3. [Run Code: Fetch Gmail Messages]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/gmail.inbox.fetch/preview,
"args": [
"query",
"maxResults",
"outputPath"
]
},
"packages": null
}
```
4. [Gather Arguments: Compute Gmail Stats] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `inputPath` (default: "session/emails.json"): session/ecosystem-raw.json
- `metrics` (default: "senders,volume"): senders,volume,domains,hours
5. [Run Code: Compute Gmail Stats]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/gmail.inbox.stats/preview,
"args": [
"inputPath",
"metrics"
]
},
"packages": null
}
```
6. [Read Raw Inbox Data]: Read the file at `session/ecosystem-raw.json` and analyze its contents (Load fetched email data for classification)
7. [Read Inbox Ecosystem Species Taxonomy]: Read the documentation in: `skills/sauna/[skill_id]/references/email.ecosystem.taxonomy.md` (Species classification guide)
8. Read `session/ecosystem-raw.json`. Using the taxonomy guide, classify each significant sender into a species type. Count specimens per species and note examples.
9. Compute ecosystem health (0-100): Biodiversity (0-25), Balance (0-25), Sustainability (0-25), Conservation Status (0-25). Determine status: Thriving/Stable/Stressed/Critical.
10. Write the analysis to `session/ecosystem-analysis.json` as JSON with species counts, health metrics, dominant species, extinct species, and conservation actions.
11. [Read Attenborough Narration Style Guide]: Read the documentation in: `skills/sauna/[skill_id]/references/email.ecosystem.narration.md` (Attenborough voice style guide)
12. Generate Attenborough narration using the style guide. Write to `session/ecosystem-portrait.md` with the narration, census, and health breakdown.
13. [Read Ecosystem Analysis]: Read the file at `session/ecosystem-analysis.json` and analyze its contents (Reference the analysis just written)
14. [Read Ecosystem Portrait Draft]: Read the file at `session/ecosystem-portrait.md` and analyze its contents (Reference the portrait narrative just written)
15. Present the narration dramatically. Ask which biome for their portrait: Savanna (African), Ocean (reef), or Forest (woodland).