A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
docs: add repo-level agent guidance, writing guide and Copilot skills
Jeremy Hooveree5f93c81b62
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.mdnew file mode 100644index 000000000..610639a8f--- /dev/null+++ b/.github/copilot-instructions.md@@ -0,0 +1,71 @@+# GitHub Copilot instructions for Statecraft: Israel++## Purpose++This repository is a historical strategy game with a strict content policy. Copilot should help produce useful, accurate work without drifting into unsupported historical claims, generic AI language, or game design that ignores the project’s source-backed model.++## Non-negotiable rules++- Never invent a quote, date, minister, office, or fact.+- Every historical fact in `content/` must be sourced and checked before it is treated as valid.+- Do not add unsupported claims to event text, ministry descriptions, or narrative copy.+- Preserve the project’s Israeli framing as set in `docs/CONTENT_POLICY.md`, section 1. Do not reopen it, and do not soften facts to avoid it.+- Treat war, terror, atrocity, and the Holocaust as sensitive subjects with careful wording and clear sourcing.+- Stay aligned with the repo’s rules in `CONTRIBUTING.md`, `docs/CONTENT_POLICY.md`, and `docs/WRITING_EVENTS.md`.++## Writing expectations++- Prefer direct, grounded historical writing over dramatic filler.+- Use clear, concrete language. A good event card explains what happened, why it mattered, and what decision the player faces.+- Avoid generic AI phrasing and padded exposition.+- Keep the writing readable in a game UI: concise, legible, and easy to scan.+- If a player-facing sentence is not backed by sources, it should be treated as a draft requirement, not a finished line.++## Event content guidance++When editing or drafting event YAML in `content/events/`:++- use office placeholders like `{prime_minister}` rather than fixed names+- keep the text tied to a real historical window and not a vague, timeless summary+- include proper `sources:` entries with URLs and `checked:` dates+- respect event and option field rules from `docs/WRITING_EVENTS.md`+- avoid soft historical wording that blurs political responsibility or causes++## Tone++Write in a tone that is:++- direct+- sober+- concrete+- politically literate+- historically grounded++Avoid:++- slogan-like language+- exaggerated melodrama+- moral grandstanding+- vague “This was a pivotal moment in history” filler+- AI clichés like “it is important to note that” or “in today’s rapidly evolving landscape”++## Workflow++1. Read the relevant historical files before editing.+2. Check whether the event or content already exists in a similar form.+3. Find the source and confirm the claim.+4. Draft the content in the repo’s established style.+5. Validate with `dotnet test sim/Statecraft.sln` and `uv run scripts/oss/check_repo.py`.+6. Keep the scope tight and the change focused.+7. Never run `git commit` or `git push` unless the user asks for it in that message.++## Before finalizing a content change++Ask:++- Is every factual claim backed by a cited source?+- Is the wording clear enough for a game event card?+- Does it fit the period, office, and decision context?+- Does it avoid invented quotes, unsupported policy claims, or rhetorical drift?++If the answer is not clearly yes, keep researching.diff --git a/.github/instructions/statecraft-historical-writing.instructions.md b/.github/instructions/statecraft-historical-writing.instructions.mdnew file mode 100644index 000000000..a1e09f59a--- /dev/null+++ b/.github/instructions/statecraft-historical-writing.instructions.md@@ -0,0 +1,56 @@+---+applyTo: "content/**/*.yaml,docs/CONTENT_POLICY.md,docs/WRITING_*.md,README.md,README.he.md"+---++# Statecraft historical writing instructions++These instructions apply whenever Copilot helps draft or revise historical and game-writing content in this repository.++## Core obligations++- Every factual statement must be source-backed.+- No invented speech, direct quotes, or paraphrase that exceeds the source.+- Use the repo’s Israeli framing deliberately and clearly.+- Do not turn atrocities or war into reward-flavored game text.+- Prefer calm, concrete writing that explains decisions and consequences.++## Voice and tone++- direct, grounded, and historically precise+- calm under pressure+- clear about stakes and trade-offs+- specific about institutions, dates, and political actors+- concise enough for UI card text, but rich enough to show historical context++## Writing patterns to prefer++- “The cabinet debated...”+- “The truce held for four weeks...”+- “The ministry faced a shortage...”+- “The government chose to...”++## Writing patterns to avoid++- “the world watched in horror”+- “this historic turning point changed everything”+- “it was a pivotal moment in the destiny of the nation”+- invented speeches or private internal monologues+- generic optimism or moralizing language++## Content quality checklist++Before finalizing text, check:++- Is the claim supported by a source?+- Does it match the actual time window and office holder?+- Does it use correct date formatting and office placeholders?+- Is the wording clear to a player with no prior background?+- Does it avoid cliché or inflated framing?+- Has it been checked against the project policy and event schema?++## Useful reference files++- `docs/CONTENT_POLICY.md`+- `docs/WRITING_EVENTS.md`+- `docs/WRITING_GUIDE.md`+- `content/events/first_truce.yaml`diff --git a/.github/skills/statecraft-historical-content/SKILL.md b/.github/skills/statecraft-historical-content/SKILL.mdnew file mode 100644index 000000000..b4fd69bf3--- /dev/null+++ b/.github/skills/statecraft-historical-content/SKILL.md@@ -0,0 +1,69 @@+---+name: statecraft-historical-content+description: 'Research, draft, and review historical events and political writing for Statecraft: Israel. Use for source-checking claims, event drafting, content gaps, and 1948-1956 narrative work.'+argument-hint: 'event topic / date range / source question / historical gap'+user-invocable: true+disable-model-invocation: false+---++# Statecraft Historical Content++## When to use++- drafting or revising event text in `content/events/`+- finding historical gaps in the 1948–1956 timeline+- checking whether a claim is source-backed and suitable for the repo+- editing player-facing writing for historical clarity and tone++## Core repo rules++Before drafting, read these first:++- [README.md](../../README.md)+- [CONTRIBUTING.md](../../CONTRIBUTING.md)+- [docs/CONTENT_POLICY.md](../../docs/CONTENT_POLICY.md)+- [docs/WRITING_EVENTS.md](../../docs/WRITING_EVENTS.md)+- [docs/WRITING_GUIDE.md](../../docs/WRITING_GUIDE.md)++## Mandatory workflow++1. Identify the event, date range, or gap.+2. Check the existing content in `content/events/` and the relevant people/offices structure.+3. Verify the factual claim with a source before drafting.+4. Draft only in the repo’s historical framing and event schema.+5. Keep the text grounded, specific, and readable in a game UI.+6. Leave `status: draft` on anything an AI drafted. Only a person who has checked every claim against its source sets `fact-checked`.+7. Validate with `dotnet test sim/Statecraft.sln` when editing repo content.++## Historical writing standards++- No invented quotes or verbatim speeches without direct source support.+- Use office placeholders such as `{prime_minister}` rather than hard-coded names.+- Prefer concrete government, military, or social context over generic historical mood-setting.+- Keep war and atrocity language precise and sensitive.+- Favor the political and logistical realities of state-building over dramatic filler.++## Research checklist++- Is the claim connected to a real date and a real institutional decision?+- Is the wording supported by a cited source or a source packet?+- Does it fit the historical period and office holder?+- Does it avoid unsupported generalization or invented drama?+- Does it align with the project’s Israeli framing and source policy?++## Skill bundle contents++This skill package is intentionally structured like a real agent skill bundle, not a single markdown note.++- `scripts/` contains quick helper commands for checking source coverage and event completeness+- `templates/` contains YAML and checklist scaffolds for drafts+- `examples/` contains small examples of useful historical gaps and workflow patterns+- `references/` contains the supporting checklists and repo reference docs++## References++- [Historical writing guide](./references/historical-writing-checklist.md)+- [Content policy](../../docs/CONTENT_POLICY.md)+- [Event schema](../../docs/WRITING_EVENTS.md)+- [Event draft template](./templates/event-draft.yaml)+- [Source coverage script](./scripts/check_source_coverage.py)diff --git a/.github/skills/statecraft-historical-content/examples/event-gap-example.md b/.github/skills/statecraft-historical-content/examples/event-gap-example.mdnew file mode 100644index 000000000..56cd28453--- /dev/null+++ b/.github/skills/statecraft-historical-content/examples/event-gap-example.md@@ -0,0 +1,21 @@+# Example historical gap to investigate++Use this pattern when a timeline moment is underrepresented.++## Candidate theme++- ma’abarot absorption pressures after independence++## What to check++- existing event coverage in `content/events/`+- cabinet-level response patterns+- source-backed records for housing, migration, and security pressure+- whether the event belongs in a soft or hard window++## Good output++- a new event file in `content/events/`+- a source-backed `title`, `text`, and option logic+- a `status: draft` entry until a person has checked every claim against its source, then `fact-checked`+- a clear relation to the broader state-building storydiff --git a/.github/skills/statecraft-historical-content/references/historical-writing-checklist.md b/.github/skills/statecraft-historical-content/references/historical-writing-checklist.mdnew file mode 100644index 000000000..12f2584ec--- /dev/null+++ b/.github/skills/statecraft-historical-content/references/historical-writing-checklist.md@@ -0,0 +1,32 @@+# Historical writing checklist++## Source discipline++- Every fact in `content/` needs a real source and a checked date.+- Do not write from memory or from inferred political mood without source support.+- Paraphrase carefully; do not create phrases that sound like direct quotation.++## Tone checklist++- direct+- specific+- grounded in the period+- not exaggerated+- not melodramatic+- readable for a game event card++## Event drafting checklist++- Use office placeholders where appropriate.+- Make the decision legible to the player.+- Name the problem before the choice.+- Explain the historical stakes in plain terms.+- Keep the wording tight and fact-based.++## Quick red flags++- invented speech+- generic AI filler+- unsupported certainty+- emotional inflation that erases context+- vague claims without a date or institutiondiff --git a/.github/skills/statecraft-historical-content/scripts/check_source_coverage.py b/.github/skills/statecraft-historical-content/scripts/check_source_coverage.pynew file mode 100644index 000000000..fb5d93a53--- /dev/null+++ b/.github/skills/statecraft-historical-content/scripts/check_source_coverage.py@@ -0,0 +1,67 @@+#!/usr/bin/env python3+"""List event files that look incomplete for source-backed content work.++This is a lightweight helper for the skill bundle. It is intentionally small and+project-specific: it looks for event YAML files with no usable `sources:` or a+`status:` still at `draft`.+"""++from __future__ import annotations++import sys+from pathlib import Path++try:+ import yaml+except Exception as exc: # pragma: no cover+ print(f"PyYAML is required to run this script: {exc}")+ raise SystemExit(1)++ROOT = Path(__file__).resolve().parents[4]+EVENTS = ROOT / "content" / "events"+++def main() -> int:+ if not EVENTS.exists():+ print(f"Events directory not found: {EVENTS}")+ return 1++ problems: list[str] = []+ for path in sorted(EVENTS.glob("*.yaml")):+ with path.open("r", encoding="utf-8") as fh:+ try:+ data = yaml.safe_load(fh) or {}+ except Exception as exc: # pragma: no cover+ problems.append(f"{path.name}: YAML parse error ({exc})")+ continue++ if not isinstance(data, dict):+ problems.append(f"{path.name}: not a mapping")+ continue++ missing = []+ sources = data.get("sources")+ if not isinstance(sources, list) or not sources:+ missing.append("sources")+ else:+ for src in sources:+ url = str(src.get("url", "")) if isinstance(src, dict) else ""+ if not url.startswith("https://") or not src.get("checked"):+ missing.append("a source with an https url and a checked date")+ break+ if data.get("status", "draft") == "draft":+ missing.append("a status above draft")+ if missing:+ problems.append(f"{path.name}: needs {', '.join(missing)}")++ if problems:+ for item in problems:+ print(item)+ return 1++ print(f"All {len(list(EVENTS.glob('*.yaml')))} event files have sources and a reviewed status.")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/.github/skills/statecraft-historical-content/templates/event-draft.yaml b/.github/skills/statecraft-historical-content/templates/event-draft.yamlnew file mode 100644index 000000000..3c7f3206f--- /dev/null+++ b/.github/skills/statecraft-historical-content/templates/event-draft.yaml@@ -0,0 +1,28 @@+id: event_id+# Explain why this date is the relevant window.+from: 1948-06-01+# Optional end date if this event is time-boxed.+# to: 1948-06-15++title: The event title+text: 'The situation is underway. {prime_minister} must decide how to respond.'+anchor: soft+# office: prime_minister+# conditions:+# - { indicator: morale, min: 0.2, max: 0.7 }+options:+ - id: option_a+ text: Accept the immediate course+ recommended: true+ effects:+ - { target: morale, delta: 0.02 }+ - id: option_b+ text: Reject the course and wait for a different response+ effects:+ - { target: intl_standing, delta: -0.03 }++sources:+ # Replace with the real page you opened, and the day you opened it.+ - { url: "https://example.org/source", checked: 2026-10-11 }+# Leave as draft. A person sets fact-checked after checking every claim against its source.+status: draftdiff --git a/.github/skills/statecraft-writing-voice/SKILL.md b/.github/skills/statecraft-writing-voice/SKILL.mdnew file mode 100644index 000000000..c44769e6c--- /dev/null+++ b/.github/skills/statecraft-writing-voice/SKILL.md@@ -0,0 +1,71 @@+---+name: statecraft-writing-voice+description: 'Improve and review Statecraft: Israel prose for tone, clarity, and historical credibility. Use when drafting event text, checking voice, or making copy more grounded and game-readable.'+argument-hint: 'event text / tone review / rewrite / voice pass'+user-invocable: true+disable-model-invocation: false+---++# Statecraft Writing Voice++## When to use++- revising event card text+- tightening political or historical narration+- checking phrasing for clarity and tone+- making copy more grounded and less generic++## Voice goals++Write with these qualities:++- direct+- specific+- sober+- concrete+- readable under time pressure++## Tone standards++Prefer:++- plain historical language+- clarity over flourish+- consequence over abstraction+- strong institutions and dates+- calm, tense, credible prose++Avoid:++- inflated heroism+- generic AI filler+- invented quotes+- vague emotional summaries+- rhetorical over-claiming++## Revision checklist++Before accepting a draft, ask:++- Does it sound like a decision card, not a TED Talk or a film trailer?+- Is the phrasing clear in a UI context?+- Does it explain the stakes without padding?+- Does it fit the repo’s historical framing?+- Is it source-safe and not drifting into unsupported drama?++## Skill bundle contents++This skill package is intentionally structured as a reusable agent workflow with supporting assets.++- `scripts/` contains lightweight checks for generic AI phrasing and weak copy patterns+- `templates/` contains a quick tone pass checklist for event rewrites+- `references/` holds the supporting writing guidance and style material++## References++- [Writing guide](../../docs/WRITING_GUIDE.md)+- [Content policy](../../docs/CONTENT_POLICY.md)+- [Event writing rules](../../docs/WRITING_EVENTS.md)+- [Tone rules](./references/tone-rules.md)+- [Tone pass template](./templates/tone-pass-checklist.md)+- [Phrase scan script](./scripts/scan_for_generic_ai_phrases.py)diff --git a/.github/skills/statecraft-writing-voice/references/tone-rules.md b/.github/skills/statecraft-writing-voice/references/tone-rules.mdnew file mode 100644index 000000000..cd9d83ecb--- /dev/null+++ b/.github/skills/statecraft-writing-voice/references/tone-rules.md@@ -0,0 +1,19 @@+# Tone rules++- calm, not melodramatic+- direct, not abstract+- grounded in institutions, dates, and consequences+- politically informed, not slogan-heavy+- readable in a game event card++## Examples of phrases to prefer++- “The cabinet divided over the truce.”+- “The ministry faced a sharp security shock.”+- “The government weighed survival against public pressure.”++## Examples to avoid++- “This historic turning point changed the destiny of the nation.”+- “The world watched in horror as...”+- generic AI filler with no concrete action or eventdiff --git a/.github/skills/statecraft-writing-voice/scripts/scan_for_generic_ai_phrases.py b/.github/skills/statecraft-writing-voice/scripts/scan_for_generic_ai_phrases.pynew file mode 100644index 000000000..92b3faab9--- /dev/null+++ b/.github/skills/statecraft-writing-voice/scripts/scan_for_generic_ai_phrases.py@@ -0,0 +1,52 @@+#!/usr/bin/env python3+"""Flag a few generic AI phrases often seen in weak historical copy."""++from __future__ import annotations++import re+import sys+from pathlib import Path++BAD_PHRASES = [+ "in today\'s rapidly evolving landscape",+ "it is important to note that",+ "this historic moment",+ "at the end of the day",+ "without a doubt",+ "the world watched",+]+++def main() -> int:+ if len(sys.argv) < 2:+ print("Usage: scan_for_generic_ai_phrases.py <file-or-directory>")+ return 1++ target = Path(sys.argv[1]).resolve()+ if target.is_file():+ files = [target]+ else:+ files = []+ for pattern in ("*.md", "*.yaml"):+ files.extend(target.rglob(pattern))++ hits: list[str] = []+ for path in sorted({p for p in files if p.is_file()}):+ if ".github" in path.parts or ".claude" in path.parts or path.name == "AGENTS.md":+ continue+ text = path.read_text(encoding="utf-8", errors="ignore")+ for phrase in BAD_PHRASES:+ if re.search(re.escape(phrase), text, re.IGNORECASE):+ hits.append(f"{path}: {phrase}")++ if not hits:+ print("No generic AI phrases detected in the selected content files.")+ return 0++ for hit in hits:+ print(hit)+ return 1+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/.github/skills/statecraft-writing-voice/templates/tone-pass-checklist.md b/.github/skills/statecraft-writing-voice/templates/tone-pass-checklist.mdnew file mode 100644index 000000000..f28346acf--- /dev/null+++ b/.github/skills/statecraft-writing-voice/templates/tone-pass-checklist.md@@ -0,0 +1,9 @@+# Tone pass checklist++- direct and grounded+- specific about people, institutions, and dates+- no invented speech+- no generic AI filler+- readable as a game event card+- clear cause and decision+- grounded in the project’s historical framingdiff --git a/AGENTS.md b/AGENTS.mdnew file mode 100644index 000000000..8c0a76c45--- /dev/null+++ b/AGENTS.md@@ -0,0 +1,79 @@+# AGENTS.md++This repository is the Statecraft: Israel project. It is a historical strategy game and a content-heavy civic/history project with strict sourcing and review rules.++## Mission++Help the project stay historically grounded, readable, and technically consistent. Do not treat this as a generic game repo or a casual writing sandbox. The bar is higher because the game presents real people, dates, institutions, war, and political stakes.++## Core rules++- Every historical fact must be sourced. If a fact is not supported by a cited source, do not add it.+- No invented quotes. Paraphrase, and never put words in a real person’s mouth.+- Use the Israeli framing set in `docs/CONTENT_POLICY.md`, section 1. It is a stated design decision and is not reopened in content work.+- Sensitive events must remain tagged and reviewed appropriately. Do not bypass the project’s release and review gates.+- Preserve the project’s deterministic simulation rules. Game mechanics belong in the sim, not in presentation-only code.+- If a change touches `content/`, `sim/`, or `unity/`, align with the repo’s tests, changelog, and review conventions.++## What to read first++Before writing or editing content, review:++- `README.md`+- `CONTRIBUTING.md`+- `docs/CONTENT_POLICY.md`+- `docs/WRITING_EVENTS.md`+- `docs/WRITING_GUIDE.md`++## Content-writing rules++- Use office placeholders like `{prime_minister}` rather than hard-coded names in dynamic event text.+- Keep wording concrete and credible. Prefer clear historical description over melodrama.+- Show dates as `15 May 1948` style, not shorthand or invented formatting.+- Prefer short, grounded event text over rhetorical filler.+- Treat AI-generated prose as a draft, not a source of truth. A human must verify factual claims.++## Tone and style++- Direct, specific, and historically grounded.+- Calm, not sensational.+- Explain consequence and trade-off, not just crisis.+- Write for the player as a decision-maker, not as a spectator of a cinematic script.+- Favor clean factual precision over generic historical voiceover language.++## Typical workflow for a task++1. Understand the exact historical question or gap.+2. Check the relevant files in `content/` and existing event patterns.+3. Gather the source or citation for the fact before drafting.+4. Add or edit the event or narrative text in the repo’s expected format.+5. Run the validation commands below.+6. Keep the PR and change focused.++## Validation commands++- `dotnet test sim/Statecraft.sln` loads all of `content/` and must pass with 0 warnings.+- `uv run scripts/oss/check_repo.py` runs the repository policy checks that CI runs.+- If you change `sim/`, `content/` or `unity/`, add a line under `## [Unreleased]` in `CHANGELOG.md`.++## Git++- Never run `git commit` or `git push` unless the user asks for it in that message.+- Stage and commit only the files the user names or the task clearly covers.++## Red flags++- Unattributed claims or vague historical language+- Fabricated quotes or supposedly verbatim speeches+- Stating a number, date or claim without a source that supports it+- Softening historical pain or atrocity into game flavor text+- Generic AI filler like “in today’s rapidly evolving landscape” or “it is important to note that”++## Files that define quality in this repo++- `docs/CONTENT_POLICY.md`: historical framing and factual standards+- `docs/WRITING_EVENTS.md`: required YAML structure for content+- `docs/WRITING_GUIDE.md`: tone, style and writing expectations+- `CONTRIBUTING.md`: repo workflow and validation standards++Keep the work in scope, sourced, and readable.diff --git a/docs/WRITING_GUIDE.md b/docs/WRITING_GUIDE.mdnew file mode 100644index 000000000..a9e3076d5--- /dev/null+++ b/docs/WRITING_GUIDE.md@@ -0,0 +1,102 @@+# Writing guide for Statecraft: Israel++This guide is the repo’s practical writing standard for event copy, historical cards, and narrative text. It complements the stricter rules in `docs/CONTENT_POLICY.md` and the YAML schema in `docs/WRITING_EVENTS.md`.++## 1. Purpose++The writing should make the player feel the weight of governing Israel in a contested historical moment, without drifting into melodrama, invented speech, or unsupported certainty.++The standard is writing that helps the player understand what happened, what was at stake, and what choice was before them.++## 2. Core voice++The project voice is:++- direct+- grounded+- historically specific+- politically literate+- sober but readable++Use short, concrete sentences when possible. Favor verbs that tell the player what changed, not abstract historical summary.++Good examples:++- “The cabinet divided over the truce terms.”+- “The budget tightened as the ma’abarot swelled.”+- “The government faced a fresh wave of security pressure.”++## 3. Tone guidelines++### Preferred tone++- credible+- tense but precise+- matter-of-fact when discussing state-building+- clear about trade-offs and consequences++### Avoid++- inflated heroics+- generic nationalism without action+- vague political theater+- AI-flavored filler+- moralizing summaries that flatten complexity++## 4. Historical framing++The project deliberately tells the story from the Israeli perspective, as set out in `docs/CONTENT_POLICY.md`, section 1. That choice is settled and is not reopened in event copy. It is not a reason to write with soft certainty or to hide the state’s calculations and constraints. Explain them from the frame the game is built around.++Still, the writing must stay honest:++- name the institutions, not just the mood+- identify the real conflict or pressure+- connect the action to a sourceable fact+- avoid turning suffering into a gameplay abstraction++## 5. Event writing rules++When drafting an event card:++- explain the immediate problem and the decision before the player+- keep the sentence length readable in UI space+- write in plain, historical English+- avoid invented speeches or private thoughts+- use placeholders like `{prime_minister}` for office-based naming+- write dates in the project’s format, such as `15 May 1948`+- show money as `IL 1.2m` or `$1.2m`, and never show internal ids to the player++A strong event card usually does three things:++1. names the problem or situation+2. shows the source of pressure or stakes+3. frames the player’s decision++## 6. Forbidden patterns++Do not write:++- invented direct quotes+- “this unprecedented moment” without evidence+- generic AI filler or explanatory padding+- claims that are not tied to a real source+- emotionally inflated language that obscures the historical fact+- moral language that turns policy into a character judgment++## 7. Source-backed writing standard++If a sentence is not directly supported by a source, it is not ready for the repo.++The real standard is not “interesting” but “supported, readable, and historically grounded.”++## 8. Good historical writing checklist++Before finalizing a draft, ask:++- Does the text reflect the actual period and power structure?+- Is the decision understandable to a player without prior knowledge?+- Does the wording stay within established project framing?+- Does it fit the event’s field data and source list?+- Is it concise and legible in the game UI?+- Does it avoid invented quotes or inflated language?+- Is `status` still `draft` until a person has checked every claim against its source?