Skill: deveshparagiri/extropy (version 1.0.3)

--- name: extropy description: "Execution-first operator for Extropy: run pipelines, diagnose failures, and deliver evidence-backed simulation analysis using current CLI contracts." allowed-tools: Read, Grep, Glob, Bash, Edit, Write argument-hint: "[goal or experiment request]" always: false source: "https://github.com/exaforge/extropy" homepage: "https://github.com/exaforge/extropy" required-binaries: - extropy required-env-vars: - OPENAI_API_KEY - ANTHROPIC_API_KEY - OPENROUTER_API_KEY - DEEPSEEK_API_KEY - AZURE_API_KEY - AZURE_ENDPOINT - AZURE_OPENAI_API_KEY - AZURE_OPENAI_ENDPOINT - MODELS_FAST - MODELS_STRONG - SIMULATION_FAST - SIMULATION_STRONG - SIMULATION_MAX_CONCURRENT - SIMULATION_RATE_TIER - SIMULATION_RPM_OVERRIDE - SIMULATION_TPM_OVERRIDE required-config-files: - ~/.config/extropy/config.json primary-credential: "Provider API keys via environment variables" required_binaries: - extropy required_env_vars: - OPENAI_API_KEY - ANTHROPIC_API_KEY - OPENROUTER_API_KEY - DEEPSEEK_API_KEY - AZURE_API_KEY - AZURE_ENDPOINT - AZURE_OPENAI_API_KEY - AZURE_OPENAI_ENDPOINT - MODELS_FAST - MODELS_STRONG - SIMULATION_FAST - SIMULATION_STRONG - SIMULATION_MAX_CONCURRENT - SIMULATION_RATE_TIER - SIMULATION_RPM_OVERRIDE - SIMULATION_TPM_OVERRIDE required_config_files: - ~/.config/extropy/config.json primary_credential: "Provider API keys via environment variables" metadata: requires: binaries: - extropy config_files: - ~/.config/extropy/config.json environment_variables: - OPENAI_API_KEY - ANTHROPIC_API_KEY - OPENROUTER_API_KEY - DEEPSEEK_API_KEY - AZURE_API_KEY - AZURE_ENDPOINT - AZURE_OPENAI_API_KEY - AZURE_OPENAI_ENDPOINT - MODELS_FAST - MODELS_STRONG - SIMULATION_FAST - SIMULATION_STRONG - SIMULATION_MAX_CONCURRENT - SIMULATION_RATE_TIER - SIMULATION_RPM_OVERRIDE - SIMULATION_TPM_OVERRIDE credentials: primary: - provider API keys via environment variables only notes: - extropy reads model/provider settings from ~/.config/extropy/config.json - do not read raw .env contents unless explicitly requested by the user --- # Extropy Operator Run experiments end to end, with strict quality gates and reproducible commands. ## Operating Rules 1. Execute commands; do not only describe them. 2. Validate upstream artifacts before expensive downstream stages. 3. Use explicit evidence (paths, SQL, metrics) for every conclusion. 4. Keep assumptions visible and minimal. 5. Escalate after repeated failure of the same gate. ## Runtime Dependencies and Credential Scope - Required binary: `extropy` must be installed and on `PATH`. - Config file read: `~/.config/extropy/config.json`. - Credentials expected: provider API keys from env vars (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `OPENROUTER_API_KEY`, `DEEPSEEK_API_KEY`, `AZURE_API_KEY`/`AZURE_OPENAI_API_KEY`). - Azure endpoint vars: `AZURE_ENDPOINT` or `AZURE_OPENAI_ENDPOINT` when using Azure providers. - Safety boundary: only access credentials/config needed to execute extropy commands for the requested study/scenario, do not inspect raw `.env` values, and avoid reading unrelated files. ## Canonical Pipeline ```bash extropy spec -> extropy scenario -> extropy persona -> extropy sample -> extropy network -> extropy simulate -> extropy results ``` ## Quick Runbook ```bash STUDY=runs/my-study SCENARIO=ai-shock # 1) Study + base population extropy spec "5000 US working-age adults" -o "$STUDY" --use-defaults cd "$STUDY" extropy config set cli.mode agent # 2) Scenario + persona extropy scenario "AI systems outperform most knowledge workers in 6 months" -o "$SCENARIO" -y extropy persona -s "$SCENARIO" -y # 3) Sample + network extropy sample -s "$SCENARIO" -n 5000 --seed 42 --strict-gates extropy network -s "$SCENARIO" --seed 42 --quality-profile strict --validate # 4) Simulate extropy simulate -s "$SCENARIO" --seed 42 --fidelity high --rpm-override 1000 # 5) Results + raw extraction extropy results -s "$SCENARIO" summary extropy results -s "$SCENARIO" timeline extropy query states --to states.jsonl ``` ## Required Quality Gates - `spec`: `extropy validate population.vN.yaml` passes. - `scenario`: `extropy validate scenario/<name>/scenario.vN.yaml` passes. - `persona`: persona file exists and validates. - `sample`: count correct, coherence gates pass, no critical impossibles. - `network`: no isolated catastrophes, topology metrics in acceptable range. - `simulate`: run completes or checkpoints cleanly with recoverable state. ## Recommended Command Surface - Build: `spec`, `scenario`, `persona`, `sample`, `network`, `simulate` - Inspect: `results summary|timeline|segment|agent` - Deep checks: `query summary|network|network-status|sql|agents|edges|states` - Agent QA: `chat list`, `chat ask` ## Module Map - `OPERATIONS.md`: stage-by-stage execution and rerun strategy. - `TROUBLESHOOTING.md`: failure diagnosis and escalation policy. - `ANALYSIS.md`: post-run metrics, SQL patterns, reporting structure. - `SCENARIOS.md`: scenario/pipeline design patterns and limits. - `REPORT_TEMPLATE.md`: standardized delivery format.

path: OPERATIONS.md
content: # Operations

Execution guide for current Extropy CLI behavior.

## Pipeline

```bash
extropy spec -> extropy scenario -> extropy persona -> extropy sample -> extropy network -> extropy simulate -> extropy results
```

All stages operate on a study folder containing `study.db`, `population.vN.yaml`, and `scenario/<name>/...`.

## Stage 1: Spec

```bash
extropy spec "5000 US adults" -o runs/us-national-study --use-defaults
cd runs/us-national-study
extropy validate population.v1.yaml
```

Notes:
- `-o` can be study folder, stem path, or explicit YAML file.
- In agent mode, clarifications return exit code `2` unless `--answers` or `--use-defaults` is provided.

## Stage 2: Scenario

```bash
extropy scenario "ASI capability shock over 6 months" -o asi-announcement -y
extropy validate scenario/asi-announcement/scenario.v1.yaml
```

Useful overrides:
- `--timeline auto|static|evolving`
- `--timestep-unit hour|day|week|month|year`
- `--max-timesteps N`

## Stage 3: Persona

```bash
extropy persona -s asi-announcement -y
extropy validate scenario/asi-announcement/persona.v1.yaml
```

## Stage 4: Sample

```bash
extropy sample -s asi-announcement -n 5000 --seed 42 --report --strict-gates
```

Core checks:
- sampled count equals requested `-n`
- strict gate violations are zero
- no critical impossible combinations in post-sample diagnostics

## Stage 5: Network

```bash
extropy network -s asi-announcement --seed 42 --quality-profile strict --validate
```

Common tuning flags:
- `--avg-degree`, `--rewire-prob`
- `--candidate-mode exact|blocked`
- `--candidate-pool-multiplier`
- `--block-attr` (repeatable)
- `--resume` for long calibration runs

## Stage 6: Simulate

```bash
extropy simulate -s asi-announcement --seed 42 --fidelity high --rpm-override 1000
```

Runtime controls:
- model overrides: `--strong`, `--fast`
- re-reasoning: `--threshold`
- performance: `--chunk-size`, `--writer-queue-size`, `--db-write-batch-size`
- checkpointing/resume: `--run-id`, `--resume`
- convergence override: `--early-convergence auto|on|off`

## Stage 7: Results and Queries

```bash
# high-level outputs
extropy results -s asi-announcement summary
extropy results -s asi-announcement timeline
extropy results -s asi-announcement segment income
extropy results -s asi-announcement agent agent_0042

# raw data
extropy query summary -s asi-announcement
extropy query agents -s asi-announcement --to agents.jsonl
extropy query edges -s asi-announcement --to edges.jsonl
extropy query states --to states.jsonl
extropy query sql "SELECT timestep, agents_reasoned FROM timestep_summaries ORDER BY timestep" --format table
```

## Reproducibility Rules

1. Set `--seed` on `sample`, `network`, `simulate`.
2. Keep one baseline run before sweeping knobs.
3. Change one axis per experiment (seed, fidelity, threshold, rate, etc.).
4. Record scenario version and run id for every comparison.

## Recommended Run Sequence for Expensive Studies

1. Gate-only dry pass: `sample` + `network --validate`.
2. One timestep smoke: set low `--max-timesteps` in scenario or stop after first checkpoint.
3. Full run only when gate and smoke checks pass.

## Config Commands

```bash
extropy config show
extropy config set cli.mode agent
extropy config set models.fast anthropic/claude-sonnet-4-6
extropy config set models.strong anthropic/claude-sonnet-4-6
extropy config set simulation.fast azure/gpt-5-mini
extropy config set simulation.strong azure/gpt-5-mini
extropy config set simulation.rate_tier 2
```


path: TROUBLESHOOTING.md
content: # Troubleshooting

Failure triage and escalation for current Extropy pipeline.

## Quick Triage

1. Confirm study context:
```bash
pwd
ls -la
extropy query summary
```

2. Validate YAML artifacts:
```bash
extropy validate population.v1.yaml
extropy validate scenario/<name>/scenario.v1.yaml
extropy validate scenario/<name>/persona.v1.yaml
```

3. Check config and provider readiness:
```bash
extropy config show
```

## Stage-Specific Failures

### Spec/Scenario/Persona

Symptoms:
- clarification loop in automation
- validation fail on generated files

Actions:
- use `--answers` or `--use-defaults`
- rerun command with `-y`
- inspect newest `.invalid` artifact and fix root constraints before retry

### Sample

Symptoms:
- coherence gate failures
- impossible combinations in sampled agents

Actions:
- rerun with explicit seed and `--strict-gates` for deterministic fail-fast
- run SQL checks via `query sql` for exact violation counts
- fix spec/scenario constraints upstream (not ad-hoc DB edits)

### Network

Symptoms:
- strict profile gate miss (modularity/clustering bands)
- disconnected graph or weak structural edges

Actions:
- run with `--validate` and capture metrics
- adjust `--avg-degree`, `--rewire-prob`, candidate settings
- if near-threshold float noise only, verify tolerance handling in code before changing profile

### Simulate

Symptoms:
- stalls, high error retries, runaway spend, no reasoning activity

Actions:
- confirm model/provider config for `simulation.strong` and `simulation.fast`
- tune `--rpm-override`, `--chunk-size`, writer queue / db batch sizes
- verify checkpointing with `--run-id` + `--resume`
- inspect `timestep_summaries` and `agent_states` with SQL, not only logs

## Useful SQL Checks

```bash
# latest runs
extropy query sql "SELECT run_id, scenario_name, status, started_at, completed_at FROM simulation_runs ORDER BY started_at DESC LIMIT 10" --format table

# timestep health
extropy query sql "SELECT timestep, new_exposures, agents_reasoned, shares_occurred, exposure_rate FROM timestep_summaries WHERE run_id='<run_id>' ORDER BY timestep" --format table

# awareness and positions
extropy query sql "SELECT aware, COUNT(*) FROM agent_states WHERE run_id='<run_id>' GROUP BY aware" --format table
extropy query sql "SELECT COALESCE(private_position, position), COUNT(*) FROM agent_states WHERE run_id='<run_id>' GROUP BY 1 ORDER BY 2 DESC" --format table
```

## Escalation Policy

Escalate immediately when:
1. same gate fails twice after a root-cause fix attempt,
2. fix requires changing scenario semantics or study assumptions,
3. runtime cost/risk exceeds approved budget,
4. required provider/key setup is unavailable.

Escalation payload should include:
- failing stage,
- exact command,
- exact error/metric evidence,
- two or three options with tradeoffs,
- recommended next move.


path: ANALYSIS.md
content: # Analysis

Post-run analysis workflow using current `results` and `query` commands.

## First-Pass Readout

```bash
extropy results -s <scenario> summary
extropy results -s <scenario> timeline
```

Interpret immediately:
- awareness rate
- position distribution concentration
- reasoners per timestep trend
- spread velocity (new exposures / shares)

## Segment and Agent Deep Dives

```bash
extropy results -s <scenario> segment income
extropy results -s <scenario> segment age
extropy results -s <scenario> agent agent_0042
```

Use these to explain mechanism, not just headline outcomes.

## Raw Data Exports

```bash
extropy query agents -s <scenario> --to agents.jsonl
extropy query edges -s <scenario> --to edges.jsonl
extropy query states --to states.jsonl
```

## SQL Patterns (Read-only)

```bash
# positions
extropy query sql "SELECT COALESCE(private_position, position) AS p, COUNT(*) AS n FROM agent_states WHERE run_id='<run_id>' GROUP BY p ORDER BY n DESC" --format table

# conviction distribution
extropy query sql "SELECT ROUND(conviction,2) AS c, COUNT(*) AS n FROM agent_states WHERE run_id='<run_id>' GROUP BY c ORDER BY c" --format table

# timestep dynamics
extropy query sql "SELECT timestep, new_exposures, agents_reasoned, shares_occurred, exposure_rate FROM timestep_summaries WHERE run_id='<run_id>' ORDER BY timestep" --format table

# conversation volume
extropy query sql "SELECT timestep, COUNT(*) AS n FROM conversations WHERE run_id='<run_id>' GROUP BY timestep ORDER BY timestep" --format table
```

## Confidence Reporting

Single run guidance:
- treat as one draw, not final truth
- explicitly report seed and run id

Multi-seed guidance:
- run a seed sweep
- compare mean/range for key outcomes
- call out unstable segments separately

## Output Standards for Reports

Every report should include:
1. Decision question.
2. Scenario + population version references.
3. Primary distribution outcome.
4. Segment deltas.
5. Mechanism evidence (agent traces + timeline metrics).
6. Confidence statement (single-seed vs multi-seed).
7. Known caveats.

## Red Flags

Escalate when you see:
- flat timeline (`agents_reasoned` near zero after early timesteps)
- single-option collapse with no variance in plausible heterogeneous populations
- segment results contradicting known network/exposure flow
- huge run-to-run variance with minor seed changes


path: REPORT_TEMPLATE.md
content: # Experiment Report Template

Use this template for every completed experiment.

---

## 1. Decision Context

- **Study**: [study name]
- **Decision to support**: [What decision will this simulation inform?]
- **Primary outcome**: [The key metric]
- **Constraints**: [Budget, timeline, policy limits]

## 2. Setup

- **Population**: [Description and size]
- **Scenario**: [Event/change being simulated]
- **Fidelity**: [low/medium/high]
- **Seed policy**: [Single seed N / Multi-seed N1-N5]
- **Model config**: [Provider, model, routine model]

## 3. Headline Results

### Outcome Distribution

```
[outcome_name]:
  option_1    XX%
  option_2    XX%
  option_3    XX%
```

### Key Segment Deltas

| Segment | Outcome | vs Baseline |
|---------|---------|-------------|
| [segment] | [value] | [delta] |

### Dynamics Summary

- **Exposure rate**: [final %]
- **Stop reason**: [why simulation ended]
- **Timesteps**: [N completed]

## 4. Confidence Assessment

- **Seeds run**: [N]
- **Between-seed variance**: [low/medium/high]
- **Stable findings**: [list]
- **Unstable findings**: [list]
- **Overall confidence**: [high/medium/low]

## 5. Mechanism

### Why This Happened

[Explain the dominant drivers inferred from traces]

### Key Patterns

- [Pattern 1: e.g., "Low-income agents without transit access defaulted to protest"]
- [Pattern 2: e.g., "Partner conversations reinforced existing positions"]
- [Pattern 3: e.g., "Coworker influence dominated in Week 2"]

### Outlier Notes

[Notable outlier trajectories and interpretation]

## 6. Operations

- **Total tokens**: [pivotal: X, routine: Y]
- **Estimated cost**: [$X.XX]
- **Actual cost**: [$X.XX]
- **Runtime**: [HH:MM]
- **Issues**: [retries, errors, resume events]

## 7. Recommendations

### Primary Recommendation

[One clear recommendation based on findings]

### Risk Caveats

- [Caveat 1]
- [Caveat 2]

### Next Experiments

1. [Recommended follow-up 1]
2. [Recommended follow-up 2]

### What Would Change This

[Conditions that would invalidate or change the recommendation]

## 8. Evidence

| Artifact | Path |
|----------|------|
| Study DB | `[path]/study.db` |
| Results | `[path]/results/` |
| Meta | `[path]/results/meta.json` |
| Timesteps | `[path]/results/by_timestep.json` |

---

*Generated from [N] simulation runs on [date]*


path: SCENARIOS.md
content: # Scenarios

What Extropy can simulate, with exhaustive permutations.

## Core Capability

Extropy simulates **how populations respond to events**. It creates synthetic agents grounded in real-world distributions, connects them in social networks, and has each agent reason individually using an LLM. Opinions form, spread through the network, and evolve.

Not a survey. Not a poll. A simulation of collective human behavior.

## Population Dimensions

### Geography

Any country or region. Examples:
- US (bundled SSA + Census name data)
- Japan, India, Brazil, UK, Germany (Faker locale routing + CSV fallback handles naming)
- Multi-region (agents distributed across cities, states, countries)

Extropy doesn't care about geography - it cares about attributes and distributions. Define `state`, `city`, `region` as attributes with your desired distribution.

### Household Mode

| Mode | What You Get | Use When |
|------|--------------|----------|
| `household_mode: false` | Independent individuals | Workplace scenarios, B2B, professional networks |
| `household_mode: true` | Family units with correlated partners and NPC dependents | Consumer decisions, household economics, family dynamics |

### Agent Focus (when household mode is on)

| Focus | Who Reasons | Use When |
|-------|-------------|----------|
| `primary` (default) | Primary adult only; partner/kids are NPCs | One decision-maker per household ("the subscriber") |
| `couples` | Both adults; kids are NPCs | Both partners' opinions matter (major purchases, political views) |
| `families` / `all` | All household members | Teen influence on parents, multi-generational dynamics |

### Household Types

Sampled by age bracket:
- **Singles**: One adult, no kids
- **Couples**: Two adults, no kids
- **Single parents**: One adult with kids
- **Couples with kids**: Two adults with kids
- **Multi-generational**: Extended family

Young adults skew toward singles/couples. Middle-aged toward families. Elderly toward couples/singles.

## Scenario Dimensions

### Event Types

| Type | Examples |
|------|----------|
| `announcement` | Company policy, product feature, organizational change |
| `news` | Breaking news, industry report, research findings |
| `policy_change` | Government regulation, tax change, zoning decision |
| `product_launch` | New product, service update, feature rollout |
| `rumor` | Unconfirmed reports, speculation, leaked information |
| `emergency` | Crisis, natural disaster, security incident |
| `observation` | Behavioral change noticed in environment |

### Timeline Mode

| Mode | When to Use |
|------|-------------|
| **Static** (single event) | Discrete announcement, one-time decision. Event doesn't change; what evolves is awareness and opinion. |
| **Evolving** (timeline) | Situation develops over time. New information arrives at specified timesteps. Agent reasoning evolves with context. |

Static example: Netflix price hike announced → population responds over 2-3 weeks.

Evolving example:
- Week 1: AI announcement, uncertainty about scope
- Week 3: First layoffs reported
- Week 5: Government response announced
- Week 8: Retraining programs launched

Each timeline event gets injected into agent prompts as "what's happened since last time."

### Timestep Units

| Unit | Typical Use |
|------|-------------|
| `days` | Crisis response, breaking news, urgent decisions |
| `weeks` | Policy rollout, product adoption, attitude shifts |
| `months` | Market dynamics, long-term behavior change |
| `years` | Generational shifts (rare) |

### Exposure Channels

| Channel Type | Reach | Trust | Examples |
|--------------|-------|-------|----------|
| `broadcast` | High reach, many agents | Varies | News media, social feeds, public announcements |
| `targeted` | Filtered by attributes | Higher | Email notifications, employer HR, official notices |
| `organic` | Network-dependent | High | Word of mouth, peer conversations, neighbor observation |

Channels have:
- `reach`: Probability of exposure per eligible agent
- `credibility_modifier`: Affects how seriously agents take the information
- `experience_template`: How the agent experiences it ("I saw a news segment about this" vs "My coworker mentioned it")

## Outcome Types

| Type | Schema | Use When |
|------|--------|----------|
| `categorical` | Enum options | Known decision space (buy/wait/skip, support/oppose/neutral) |
| `boolean` | Yes/No | Binary decisions (will share, will attend, will switch) |
| `float` | Range [-1,1] or [0,1] | Intensity measures (sentiment, likelihood, trust level) |
| `open_ended` | Free text | Unknown decision space; categories discovered post-hoc |

Mix outcome types in the same scenario:
```yaml
outcomes:
  suggested_outcomes:
    - name: action
      type: categorical
      options: [pay_premium, cancel, switch_service, workaround]
    - name: sentiment
      type: float
      range: [-1.0, 1.0]
    - name: will_share
      type: boolean
    - name: concerns
      type: open_ended
```

## Fidelity Tiers

| Tier | Conversations | Memory | Cognitive Features | Cost |
|------|---------------|--------|-------------------|------|
| `low` | None | Last 5 traces | Basic | ~$0.03/agent |
| `medium` | Top 1 edge (partner/closest) | All traces | Standard | ~$0.04/agent |
| `high` | Top 2-3 edges | All + beliefs | THINK vs SAY, repetition detection | ~$0.05/agent |

Use `low` for quick exploration. Use `medium` (default) for production runs. Use `high` when conversation dynamics or cognitive depth matter.

## Social Network Features

### Structural Edges (from attributes)

| Edge Type | Source | Weight |
|-----------|--------|--------|
| `partner` | `partner_id` field | 1.0 |
| `household` | Same `household_id` | 0.9 |
| `coworker` | Same `occupation_category` + region | 0.6 |
| `neighbor` | Same region + similar age | 0.4 |
| `congregation` | Same `religious_affiliation` + high religiosity | 0.4 |
| `school_parent` | Both have school-age kids + same region | 0.35 |

### Similarity Edges (fill remaining degree)

Based on attribute similarity. Become `acquaintance` or `online_contact` edges.

### Scenario Relationship Weights

Scenarios can override relationship importance:
- ASI/workplace threat: coworker weight high
- Household product: partner weight high
- Local policy: neighbor weight high

These affect conversation priority and peer opinion ordering.

## Agent Cognitive Features

### Memory

- Full reasoning history, timestamped
- Emotional trajectory rendering ("I've been anxious since Week 1")
- Conviction self-awareness ("I've been firm about this")
- Intent accountability ("Last week I said I'd look into alternatives...")

### Conversations (medium/high fidelity)

- Agents request `talk_to` actions during reasoning
- Multi-turn exchanges (2 turns at medium, 3 at high)
- Both participants update state independently
- Agent-NPC conversations (kids, elderly parents)

### Repetition Detection (high fidelity)

If reasoning is >70% similar to previous timestep, agent gets nudged:
"You've been thinking the same things for a while. Has anything changed? Have you actually done anything?"

### THINK vs SAY (high fidelity)

Explicit separation between internal monologue (raw, honest) and public statement (socially filtered).

## Decision Domains

Extropy works well for:

| Domain | Example Scenarios |
|--------|------------------|
| **Policy** | Congestion pricing, zoning changes, tax proposals, regulatory shifts |
| **Market/Pricing** | Price increases, subscription tiers, feature paywalls, competitive response |
| **Product** | Feature launches, default changes, UX modifications, platform migrations |
| **Crisis** | Data breaches, recalls, PR incidents, leadership changes |
| **Messaging** | Campaign variants, framing tests, communication strategies |
| **Community** | Development proposals, service changes, local initiatives |
| **Healthcare** | Treatment adoption, behavior change, policy compliance |
| **Enterprise** | Policy rollouts, tool adoption, organizational change |

## What Extropy Does NOT Do

- **Hierarchical/org-chart populations**: Populations are sampled from distributions, not org charts. Can't model "1 CEO, 2 VPs, 10 directors" — use for broad populations, not specific organizational trees
- **Physics/logistics optimization**: Use OR tools, not population simulation
- **Real-time prediction**: Simulations take minutes to hours, not milliseconds
- **Guaranteed outcomes**: Results are simulation-informed forecasts with uncertainty
- **Individual prediction**: Works at population level, not "what will John specifically do"
- **Multi-event cascades**: Better modeled as staged runs with timeline events

## Example Scenario Permutations

### 1. US Household Product Decision

```yaml
population: "5000 US Netflix subscribers, household representation"
household_mode: true
agent_focus: couples  # Both partners decide
timeline_mode: static
event_type: announcement
outcomes: [action (categorical), sentiment (float), will_cancel (boolean)]
fidelity: medium
```

### 2. Japanese Workplace Policy

```yaml
population: "1000 Tokyo office workers in finance"
household_mode: false
timeline_mode: static
event_type: policy_change
outcomes: [compliance_intent (categorical), sentiment (float)]
fidelity: low  # Large population, cost-conscious
```

### 3. Evolving Crisis Response

```yaml
population: "2000 customers of affected company"
household_mode: false
timeline_mode: evolving
timestep_unit: days
timeline:
  - day 1: Initial breach reports
  - day 2: Company confirms
  - day 3: Scope revealed
  - day 5: Compensation offered
  - day 7: CEO resigns
outcomes: [trust_level (float), will_churn (boolean), concerns (open_ended)]
fidelity: medium
```

### 4. Multi-City Product Launch

```yaml
population: "3000 consumers across Mumbai, Delhi, Bangalore"
household_mode: true
agent_focus: primary
distribution:
  city: categorical [mumbai: 0.4, delhi: 0.35, bangalore: 0.25]
timeline_mode: static
outcomes: [adoption_intent (categorical), price_sensitivity (float)]
fidelity: medium
```

### 5. Political Messaging Test

```yaml
population: "2000 registered voters in swing state"
household_mode: true
agent_focus: couples  # Household political dynamics
timeline_mode: static
event_type: announcement
# Run 3-5 message variants as separate scenarios, same population
outcomes: [support_level (categorical), enthusiasm (float), will_share (boolean)]
fidelity: high  # Conversation dynamics matter
```

### 6. Community Planning

```yaml
population: "500 residents near proposed development"
household_mode: true
agent_focus: families  # Kids might care too
timeline_mode: evolving
timeline:
  - week 1: Proposal announced
  - week 3: Public hearing
  - week 5: Environmental report
outcomes: [position (categorical: support/oppose/neutral), concerns (open_ended)]
fidelity: medium
```

## Trigger Phrases

Use this skill when users ask:
- "simulate how people will respond to..."
- "what happens if we raise price by..."
- "which segments will churn/adopt/protest"
- "test these message variants"
- "run scenario analysis with uncertainty"
- "why did this segment flip"
- "compare policy alternatives"
- "model household decision dynamics"
- "how does this spread through the network"

## Capability Quick Check

| Question | Answer |
|----------|--------|
| Can I simulate non-US populations? | Yes, any country with Faker locale routing + CSV fallback |
| Can I model families? | Yes, `household_mode: true` with configurable `agent_focus` |
| Can I have evolving events? | Yes, use timeline with multiple events |
| Can I get open-ended responses? | Yes, `type: open_ended` outcomes |
| Can agents talk to each other? | Yes, at medium/high fidelity |
| Can I run parameter sweeps? | Yes, vary seed/threshold/fidelity/model |
| Can I compare message variants? | Yes, same population with different scenarios |
| Can I see why agents decided? | Yes, reasoning traces in results |


path: agents/openai.yaml
content: interface:
  display_name: "Extropy Operator"
  short_description: "Run Extropy CLI pipelines and analyze results"
  default_prompt: "Use $extropy to run or debug an Extropy study end-to-end with evidence-backed output."

requirements:
  binaries:
    - "extropy"
  env_vars:
    - "OPENAI_API_KEY"
    - "ANTHROPIC_API_KEY"
    - "OPENROUTER_API_KEY"
    - "DEEPSEEK_API_KEY"
    - "AZURE_API_KEY"
    - "AZURE_ENDPOINT"
    - "AZURE_OPENAI_API_KEY"
    - "AZURE_OPENAI_ENDPOINT"
    - "MODELS_FAST"
    - "MODELS_STRONG"
    - "SIMULATION_FAST"
    - "SIMULATION_STRONG"
    - "SIMULATION_MAX_CONCURRENT"
    - "SIMULATION_RATE_TIER"
    - "SIMULATION_RPM_OVERRIDE"
    - "SIMULATION_TPM_OVERRIDE"
  config_paths:
    - "~/.config/extropy/config.json"
  primary_credentials:
    - "Provider API keys via environment variables"

policy:
  allow_implicit_invocation: false
  credential_scope: "Only use credentials/config required for the requested Extropy task."
  secret_handling: "Do not read raw .env contents unless explicitly requested."


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: clean | SkillSpector: clean (LOW)