docs: reproducible first canonical M4 economic run for new readers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- developer-experience, documentation
Research direction
Read README.md, package.json, src/index.ts, src/simulation/index.ts, and src/diagnostics/m4Preview.ts; begin by tracing createM4PreviewWorld() and generateM4Preview() and the existing contract in src/diagnostics/m4Preview.test.ts. Add a documented command that runs the canonical TypeScript scenario and prints its deterministic result, then guard the output contract in a test. Done means the README gives one reproducible command, seed, tick count, units, representative verified output, and an accurate description of Pages as a static viewer.
Written by the indexing model from the issue text.
Description
Goal
Give a technically curious visitor a verified, reproducible first economic run of the existing canonical TypeScript engine (currently publicly released through M4), not just npm test or a static Pages preview. This is a narrowly scoped onboarding/organic adoption improvement, not a new simulation milestone.
Evidence (read-only, 2026-11-05; master bb16a71bfa07ca818ca60ed61ce0210bbb3df0cf)
- README explains economics and shows
npm ci; npm run typecheck; npm test; npm run build, but no command that runs one scenario and prints an intelligible economic result. - package.json still describes the package as “Scaffolding only until REQ-MIGRATION-003”; src/index.ts only exports
toolchainStatus(), while the economic API is available viasrc/simulation/index.ts. - A concrete, existing non-vacuous entry point is
createM4PreviewWorld()+generateM4Preview(world)in src/diagnostics/m4Preview.ts. The repository already tests the canonical generator and checks the exported artifact byte-for-byte in m4Preview.test.ts. - The M4 fixture uses a deterministic seed 42, 60 ticks and samples every 5 ticks, and exposes output, paid wages, household purchases, capital formed, and per-tick employment/needs coverage; this is a plausible example surface, not an independently executed demo in this report.
- Existing #792 covers licensing/contribution paths (closed); #863 covers static Pages UX; #745 is final M12 release docs and gated on M11. None provides a verified run a canonical scenario now tutorial. Searched issue titles for quickstart, first-run, runnable example and README.
Scope
- Add one small checked-in example (or a documented existing canonical command) that a newcomer can run on Node >=22 after
npm cito execute a real deterministic scenario and print a compact, human-readable result with units and an explicit seed/tick count. - Prefer reuse of
createM4PreviewWorld/generateM4Previewor another already validated canonical runner. No parallel economic implementation, no fabricated synthetic outputs. - Add an exact README “Run your first simulation” block with expected representative results recorded from a real clean-clone run, or deterministic assertions if numeric values vary by version. Say explicitly that Pages is a static saved-run viewer and this CLI/example executes the TypeScript engine.
- Correct the visibly stale
package.jsondescription andsrc/index.tsscaffolding commentary only if their intended audience/API responsibilities are confirmed; retainprivate: true. Document supported imports rather than silently changing package exports. - Keep existing M11 observatory / M12 cleanup scope independent.
Non-goals
No economic rule, scenario seed, physical-stock or money-creation logic changes; no production browser observatory, packaging/npm publish, GitHub Pages deployment, licensing or workflow-policy changes; do not hand-edit machine-owned spec mirrors. No claim that the current Pages deployment was browser-tested by this finding.
Acceptance criteria
- A new reader can copy one documented command after setup to get actual canonical TypeScript simulation output (not only a test pass or playback of committed JSON).
- Scenario/seed/ticks/units and output provenance are explicit; two independent identical runs return the same deterministic result.
- Test guards the command and its documented output contract, using canonical source; errors explain missing prerequisites.
- README, package metadata and public statement about the static Pages viewer remain internally consistent.
- Separate judge/CI verifies documentation and example on the actual proposed head under
AGENTS.mdgates.
Verification
Run on a fresh clone with Node >=22: npm ci, the new documented quickstart command twice and compare outputs, npm run typecheck, npm test, npm run build; include exact commands and output in the PR. Not run by Starry: her connected source read succeeded but this environment cannot fetch a fresh dependency tree/repository clone.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 0
- Avg merge
- 6h 26m
- Merged PRs (30d)
- 168
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drevendev/trade_simulation
-
qa status:needs-triage
Difficulty 5/5 Over a week Newbie friendliness 8/100
drevendev/trade_simulation#926 ·
Maintainers usually reply within 1 day
-
area:visualization priority:high status:in-progress type:feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
drevendev/trade_simulation#863 · 1 comment ·
Maintainers usually reply within 1 day
-
area:tooling priority:normal status:in-progress type:bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
drevendev/trade_simulation#829 · 1 comment ·
Maintainers usually reply within 1 day
-
M4 physical stock authority: exact tick overlay, owner-bucket mapping and migration performanceOpenarea:simulation-core priority:normal status:blocked type:feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
drevendev/trade_simulation#800 ·
Maintainers usually reply within 1 day
-
area:market priority:high status:blocked type:feature
Difficulty 5/5 Over a week Newbie friendliness 24/100
drevendev/trade_simulation#799 ·
Maintainers usually reply within 1 day
All issues in drevendev/trade_simulation
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
earendil-works/pi-claude-code#36 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Resources: New work of jabodetabekPossibly taken @rmt-svc claimed this today. Openresources
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
railmapgen/rmp-gallery#4167 ·
Maintainers usually reply within 2 days
-
documentation p1
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
microsoft/monaco-editor#5577 ·
Maintainers usually reply within 1 day