Skip to content

Commit 807f2a8

Browse files
docs: consolidate pipeline references and remove stale guides
1 parent 63fe868 commit 807f2a8

11 files changed

Lines changed: 174 additions & 3887 deletions

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Extropy creates synthetic populations grounded in real-world distributions, conn
3131
```bash
3232
pip install extropy-run
3333
export OPENAI_API_KEY=sk-...
34+
# or: ANTHROPIC_API_KEY=... / AZURE_OPENAI_API_KEY=...
3435
```
3536

3637
Requires Python 3.11+. [uv](https://github.com/astral-sh/uv) recommended.
@@ -61,7 +62,7 @@ extropy results segment income
6162
## How It Works
6263

6364
1. **Population** — LLM discovers attributes, researches real-world distributions, samples agents
64-
2. **Network**Connects agents by similarity; edge types affect information flow
65+
2. **Network**Builds structural + similarity edges; edge types affect information flow
6566
3. **Two-pass reasoning** — Agent role-plays reaction, then classifier extracts outcomes
6667
4. **Propagation** — Opinions spread through network; agents update after hearing from peers
6768

@@ -79,9 +80,9 @@ extropy results segment income
7980
| Similarity edges | Acquaintances and online contacts from attribute similarity |
8081
| Small-world | Calibrated clustering coefficient and path lengths |
8182
| **Simulation** | |
82-
| Two-pass reasoning | Role-play first, classify second — eliminates central tendency bias |
83+
| Two-pass reasoning | Role-play first, classify second — reduces schema anchoring in outcome extraction |
8384
| Conversations | Agents talk to each other; both update state independently |
84-
| Memory | Full reasoning history with emotional trajectory |
85+
| Memory | Persistent memory traces with fidelity-based prompt trimming |
8586
| Conviction | Affects sharing probability and flip resistance |
8687
| THINK vs SAY | Internal monologue separate from public statement |
8788
| Timeline events | New information injected at specified timesteps |

docs/architecture.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ extropy spec → extropy scenario → extropy persona → extropy sample → ext
1010

1111
All commands operate within a **study folder** — a directory containing `study.db` and scenario subdirectories. Data is keyed by `scenario_id` rather than `population_id`.
1212

13+
## Reference Study Blueprints
14+
15+
These are the canonical study patterns consolidated from prior showcase and study docs.
16+
17+
| Study Type | Population | Scenario Mode | Horizon | Typical Scale |
18+
|------------|------------|---------------|---------|---------------|
19+
| ASI announcement + societal transition | National population | Evolving | Monthly, 6 steps | 5,000 agents |
20+
| Geopolitical shock (for example Iran strikes) | National population | Evolving | Weekly, 12 steps | 5,000 agents |
21+
| Asset/market mania shock (for example BTC extreme rally) | National population | Evolving | Weekly, 8-12 steps | 5,000 agents |
22+
| Election projection (house control / state race) | National or state electorate | Static or lightly evolving | Decision-focused | 1,000-5,000 agents |
23+
24+
## Operational Quality Gates
25+
26+
Before moving forward to the next stage, the architecture assumes these checks:
27+
28+
1. `spec` gate: distribution realism and dependency coherence.
29+
2. `scenario` gate: timeline/outcome consistency and no contradictory rules.
30+
3. `persona` gate: natural language quality and no contradictory rendering.
31+
4. `sample` gate: no impossible household or demographic combinations.
32+
5. `network` gate: topology pass with realistic structural edge mix.
33+
6. `simulate` gate: expected timestep dynamics, checkpoint integrity, and tracked outputs.
34+
1335
---
1436

1537
## Phase 1: Population Creation (`extropy/population/`)
@@ -353,8 +375,8 @@ Resolution order: programmatic > env vars > config file > defaults
353375
|-------|---------|-------------|
354376
| `fast` | `= models.fast` | Fast model for Pass 2 |
355377
| `strong` | `= models.strong` | Strong model for Pass 1 |
356-
| `max_concurrent` | 50 | Max concurrent LLM calls |
357-
| `rate_tier` | 1 | Provider rate limit tier |
378+
| `max_concurrent` | `null` (auto from RPM) | Max concurrent LLM calls |
379+
| `rate_tier` | `null` | Provider rate limit tier |
358380

359381
### Providers
360382

docs/capabilities.md

Lines changed: 112 additions & 276 deletions
Large diffs are not rendered by default.

docs/commands.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Complete reference for all Extropy CLI commands, flags, and options.
88

99
```
1010
extropy spec ──> extropy scenario ──> extropy persona ──> extropy sample ──> extropy network ──> extropy simulate ──> extropy results
11-
12-
extropy estimate
1311
```
1412

1513
All commands operate within a **study folder** — a directory containing `study.db` and scenario subdirectories. Commands auto-detect the study folder from the current working directory.
@@ -35,13 +33,10 @@ All commands support these global options:
3533

3634
| Flag | Description |
3735
|------|-------------|
38-
| `--json` | Output machine-readable JSON instead of human-friendly text |
3936
| `--version` | Show version and exit |
4037
| `--cost` | Show cost summary after command completes |
4138
| `--study PATH` | Study folder path (auto-detected from cwd if not specified) |
4239

43-
**Note:** These are root-level Typer options. Place them before the subcommand, e.g. `extropy --json spec "Austin commuters" -o study`.
44-
4540
---
4641

4742
## extropy spec
@@ -630,28 +625,6 @@ Only `SELECT`, `WITH`, and `EXPLAIN` queries are allowed.
630625

631626
---
632627

633-
## extropy estimate
634-
635-
Predict simulation cost without making API calls.
636-
637-
```bash
638-
extropy estimate -s ai-adoption
639-
extropy estimate -s ai-adoption --strong openai/gpt-5
640-
extropy estimate -s ai-adoption --strong openai/gpt-5 --fast openai/gpt-5-mini -v
641-
```
642-
643-
### Options
644-
645-
| Flag | Short | Type | Default | Description |
646-
|------|-------|------|---------|-------------|
647-
| `--scenario` | `-s` | string | auto | Scenario name |
648-
| `--strong` | | string | config | Strong model for Pass 1 |
649-
| `--fast` | | string | config | Fast model for Pass 2 |
650-
| `--threshold` | `-t` | int | 3 | Multi-touch threshold |
651-
| `--verbose` | `-v` | flag | false | Show per-timestep breakdown |
652-
653-
---
654-
655628
## extropy validate
656629

657630
Validate a population or scenario spec.
@@ -818,9 +791,6 @@ extropy persona -s congestion-tax -y
818791
extropy sample -s congestion-tax -n 500 --seed 42
819792
extropy network -s congestion-tax --seed 42
820793

821-
# Estimate cost before running
822-
extropy estimate -s congestion-tax
823-
824794
# Run simulation
825795
extropy simulate -s congestion-tax --seed 42
826796

@@ -847,3 +817,37 @@ extropy config set simulation.strong anthropic/claude-sonnet-4-6
847817
extropy config set cli.mode agent # for AI harnesses
848818
extropy config set cli.mode human # for terminal users (default)
849819
```
820+
821+
---
822+
823+
## Reference Study Recipes
824+
825+
### ASI (Evolving, Monthly, 6 timesteps)
826+
827+
```bash
828+
extropy scenario "ASI announcement with escalating social/economic impacts over 6 months" \
829+
--timeline evolving \
830+
--timestep-unit month \
831+
--max-timesteps 6 \
832+
-o asi-announcement -y
833+
834+
extropy persona -s asi-announcement -y
835+
extropy sample -s asi-announcement -n 5000 --seed 42
836+
extropy network -s asi-announcement --seed 42
837+
extropy simulate -s asi-announcement --seed 42 --fidelity high --early-convergence off
838+
```
839+
840+
### Iran Strikes (Evolving, Weekly, 12 timesteps)
841+
842+
```bash
843+
extropy scenario "US strikes on Iran with 12-week escalation and partial de-escalation timeline" \
844+
--timeline evolving \
845+
--timestep-unit week \
846+
--max-timesteps 12 \
847+
-o iran-strikes -y
848+
849+
extropy persona -s iran-strikes -y
850+
extropy sample -s iran-strikes -n 5000 --seed 42
851+
extropy network -s iran-strikes --seed 42
852+
extropy simulate -s iran-strikes --seed 42 --fidelity high --early-convergence off
853+
```

docs/pipeline/network.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ Need:
423423
### `chat` and agent-level introspection
424424
Indirectly depend on simulation dynamics that are shaped by network structure.
425425

426-
### `estimate`
427-
Does not directly depend on network internals, but simulation runtime quality/cost behavior is affected by network density and connectedness.
428-
429426
---
430427

431428
## Working Invariants Draft (Network-Oriented)

docs/pipeline/scenario.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,6 @@ Needs:
560560
- optional extraction instructions,
561561
- identity dimensions.
562562

563-
### `estimate`
564-
Needs:
565-
- scenario simulation/time parameters + spread/exposure assumptions.
566-
567563
### `results`, `query`, `chat`
568564
Depend on scenario-defined outcome schema and timeline semantics for interpretation and querying consistency.
569565

0 commit comments

Comments
 (0)