rejected f86fdc8d-ad10-4e2c-8b08-999414ca0cab
The codebase has shipped two substrate-level changes recently — scenarios-as-data with snapshot/hash provenance, and cognition-as-data — and the documentation has not kept up.
Three concrete gaps:
docs/terms.md is partially stale. Its "Adjudication retry semantics" section still describes the retry budget as ADJUDICATION_RETRY_BUDGET = 2 overridable via CHUKWA_ADJUDICATE_RETRY_BUDGET. Neither construct exists anymore — the budget is now world.cognition.adjudication_retry_budget, declared per-scenario. There are no glossary entries for cognition, scenario_snapshot, or scenario_hash, all of which are first-class concepts now.README.md at the repo root. A new contributor or research collaborator who clones the repo lands on a Cargo.toml, a Containerfile, four narrowly-scoped docs, and a src/ directory with 24 files. Nothing tells them what chukwa is, what the conceptual model is, or where to go next.scenarios.rs. A scenario author has to read code to know the shape, the validation rules, the snapshot guarantee, and the token-substitution requirements on cognition templates.The existing docs that do exist — particularly terms.md — are excellent. The gap isn't quality, it's coverage of recent work.
This ticket fixes those three gaps and the small in-code stalenesses that pair with them. Hard discipline: every word written must describe something that exists and has been demonstrated. No speculation, no "future" sections, no features that haven't shipped, no roadmap. Drift detection, scenario lineage, parent_hash, scenario forking — none of these are mentioned anywhere in the new docs because none have shipped.
This is a documentation ticket. Most of it can be done by the handler autonomously. There is no schema cut, no worlds to delete, no production state to coordinate against, no MCP smoke required. The handler can edit markdown, run cargo build, run cargo test --lib, and request review on a feature branch.
Where the caller is in the loop:
git_diff or read_code on the worktree path the handler provides) and either approves or pushes back on specific bits. This is the main loop point — docs are easier to drift than code, especially toward speculation, and a review pass before merge is the cheapest way to keep the discipline tight.docs/ and README.md are repo content, not embedded in the binary. The small in-code stalenesses (lib.rs, worlds.rs module-doc) compile but don't change runtime behavior — the binary is functionally equivalent. The handler may merge to main without rolling the pod; the next functional ticket will carry the rebuild.Block-surfacing rule applies: any block (compile failure, missing context for a doc claim, anything that stops forward motion) gets a comment on this ticket immediately.
docs/terms.md updatesThree modifications, named precisely:
Fix the stale retry-budget paragraph. Under "Adjudication retry semantics → Budget," replace the existing text:
Default:
ADJUDICATION_RETRY_BUDGET = 2, i.e. three total attempts (one initial + two retries). Override at process startup via the environment variableCHUKWA_ADJUDICATE_RETRY_BUDGET.
with text reflecting the current state:
The retry budget is
world.cognition.adjudication_retry_budget, declared per-scenario in the scenario'scognitionblock. The adjudicator gets(1 + retry_budget)attempts total. Both shipped scenarios (ant_on_plate,locked_vending_room) declare a budget of 2.
No environment variable, no compile-time constant — those are gone.
Add three glossary entries. Place them in a new sub-section under "World structure" (or "Scenario structure" if the handler wants to add that grouping):
perceive_system, intend_system, adjudicate_system, adjudicate_user_template (must contain {world}, {agent}, {intent}), adjudicate_corrective_template (must contain {complaint}), adjudication_schema (JSON schema as Value), adjudication_retry_budget. Declared in scenario JSON; frozen into World.cognition at seed time; read by minds::perceive/intend/adjudicate at turn time. There is no default and no test placeholder — every scenario must declare a complete cognition block.WorldMeta at world-creation time. Lets a world describe what it was seeded from regardless of later edits to the source scenario file.scenario_snapshot. The indexing key for "which worlds ran this exact scenario content."Update the existing scenario entry. It currently says "Scenarios are defined in the codebase and enumerated by list_scenarios." Replace with text reflecting that scenarios are now JSON files under /scenarios/, embedded at compile time via include_dir!, each declaring a scenario_slug, description, chronon_seconds, environment, entities, and a complete cognition block. Catalog load panics on malformed input. Pointer to the new docs/scenarios.md for author-facing detail.
README.md at repo root (new file)Brief, calibrated to what's shipped. Suggested sections:
run_turn. The prompts and schema that drive cognition live in scenario data, not in code.docs/terms.md — precise vocabularydocs/scenarios.md — how to author a scenarioscenarios/ — the two shipped scenarios as worked examplesdocs/llm-router.md — LLM transportdocs/oauth.md — authdocs/watcher.md — the live event streamk8s/ — deploy manifeststests/ — behavioral expectationsNo roadmap, no "future plans," no contribution guide, no quickstart for local dev (we don't have a clean local-dev story documented and shouldn't fabricate one). If the README runs longer than ~80 lines, something is wrong.
docs/scenarios.md (new file)The how-to-author-a-scenario doc. Suggested structure:
create_world. Declared as JSON files under scenarios/; embedded into the binary at compile time via include_dir!; loaded once on first access; cached for process lifetime.<slug>.json. The filename stem must pass the slug grammar (see docs/terms.md) and must equal the file's scenario_slug field. Mismatch panics at catalog load.scenario_slug (string, slug grammar), description (string, prose), chronon_seconds (integer, seconds of simulated time per turn), environment (string, prose describing the setting), entities (array of entities — agents have goal + memory, props have state), cognition (object — see below).adjudicate_user_template must contain {world}, {agent}, {intent}; adjudicate_corrective_template must contain {complaint}. Validated at catalog load; missing tokens panic.create_world seeds a world, the full scenario content (including cognition) is serialized into WorldMeta.scenario_snapshot and a sha256 of the canonical form is stored as scenario_hash. Editing a scenario file thereafter does not affect existing worlds; new worlds pick up the edit. The two are independent: same slug, different content over time, with each world remembering exactly what it was seeded from.scenarios/ant_on_plate.json field by field. Use the actual file contents.These are mechanical, not prose. Group them in one commit if convenient.
src/lib.rs — extend the existing pub use scenarios::{...}; line to also export Cognition. Currently a library consumer must write chukwa::scenarios::Cognition; this lets them write chukwa::Cognition consistent with Scenario, ScenarioCatalog.src/lib.rs — refresh the crate-level docstring. Current text says "Phase 2 adds prose worlds, typed agents and props, and a cognitive turn loop." Add a sentence noting that scenarios and cognition are now both data, with provenance via scenario_snapshot + scenario_hash.src/worlds.rs — update the on-disk-layout diagram in the module doc. The meta.json summary line currently reads # scenario, name, created_at, slug — extend it to mention scenario_snapshot and scenario_hash.docs/terms.md no longer mentions ADJUDICATION_RETRY_BUDGET or CHUKWA_ADJUDICATE_RETRY_BUDGET.docs/terms.md contains entries (sections, headers, or definitional paragraphs — handler's call on form) for cognition, scenario_snapshot, scenario_hash.docs/terms.md::scenario entry mentions JSON files, include_dir!, and the cognition block.README.md exists at the repo root.docs/scenarios.md exists.src/lib.rs exports Cognition via the existing scenarios pub use.src/worlds.rs module-doc on-disk diagram lists scenario_snapshot and scenario_hash in the meta.json summary.cargo build clean.cargo test --lib green (no test changes expected; the build needs to compile).This is the main acceptance gate beyond mechanics:
After mechanical acceptance, the handler posts a comment on this ticket naming the feature branch and the worktree path where the drafts live. The caller reads each new and modified file and either approves or pushes back on specific bits. The handler then merges to main. The handler does not merge before caller review.
Optional on this ticket. The docs are repo content. The in-code changes are functionally inert. The handler may merge to main without rolling the pod and let the next functional ticket carry any rebuild. If the handler chooses to deploy anyway, that is fine and they should report it in proposed_resolution.
docs/llm-router.md, docs/oauth.md, docs/watcher.md. They cover different concerns and are fine as-is.k8s/ already exposes.The three deliverables are named. The acceptance bar is named. The discipline (no speculation, no unshipped features) is named. If a question arises during implementation, the handler should leave a comment on this ticket rather than guess.
Picked up. P3 docs chore — three deliverables (terms.md fixes + new README.md + new docs/scenarios.md) plus three small in-code stalenesses (lib.rs export + lib.rs crate docstring + worlds.rs module doc).
One clarifying note before I start: there's an untracked operations-focused README.md at the repo root that hasn't been committed (136 lines, written by/for the human operator, covers post-reboot bring-up, deploy, healthcheck). The ticket spec describes the new README as conceptual ("what chukwa is" + conceptual model + pointers, ~80 lines max, no operations / quickstart / deploy). Rather than overwrite the operations content, I'll rename the existing file to docs/operations.md (fits the pattern of docs/llm-router.md, docs/oauth.md, docs/watcher.md) and write the new conceptual README at the root per spec. The new README's "Where to go next" list will include docs/operations.md so the operations content stays discoverable. Flagging here so the caller can override if they'd prefer the existing README discarded or kept at root.
Plan:
feat/docs-readme-scenarios in a worktree from main b7654ef. Delegate to subagent.Drafts ready for caller review. Branch feat/docs-readme-scenarios at commit 67d09c7, worktree at /tmp/chukwa-docs. Not yet merged.
README.md (new, 41 lines)Repo-root conceptual landing. Three sections:
No roadmap, no contribution guide, no quickstart. Under the 80-line cap.
docs/operations.md (renamed from prior untracked README, 136 lines)The post-reboot bring-up + deploy + healthcheck content from the previous untracked README, preserved verbatim under a discoverable path (matches the pattern of llm-router.md, oauth.md, watcher.md). Linked from the new README's "Where to go next."
docs/scenarios.md (new, 140 lines)The author-facing guide for writing scenario JSON files. Sections:
include_dir!, OnceLock cache).scenario_slug field, slug grammar applies).scenario_slug, description, chronon_seconds, environment, entities, cognition).scenarios/ant_on_plate.json field by field with real values from the file.docs/terms.md (modified, 459 lines)Three named edits per spec, plus one extra stale-reference fix:
world.cognition.adjudication_retry_budget, declared per-scenario; both shipped scenarios declare 2; no env var, no compile-time constant.cognition, scenario_snapshot, scenario_hash (placed in the appropriate structural section).scenario entry rewritten to mention JSON files under /scenarios/, include_dir!, the seven cognition sub-fields, panic-on-malformed-load, and a pointer to docs/scenarios.md.scenarios.rs validates scenario_slug via Slug::new and panics on filename/slug mismatch). Rewrote that paragraph to reflect current behavior. Flagging because it wasn't one of your three named items, but the prose discipline grep would have flunked it.src/lib.rs (modified)pub use scenarios::{Cognition, Scenario, ScenarioCatalog}; (added Cognition to the existing line so library consumers can write chukwa::Cognition).scenario_snapshot + scenario_hash.src/worlds.rs (modified)Module-doc on-disk-layout diagram extended: the meta.json summary line now lists scenario_snapshot and scenario_hash alongside the original fields.
cargo build: clean, no warnings.cargo test --lib: 340 passed; 0 failed.rg -in 'future|planned|will eventually|TODO|we plan to|roadmap|coming soon|some day|someday' README.md docs/scenarios.md docs/terms.md — zero matchesrg -in '\b(drift|lineage|parent_hash|fork)\b' README.md docs/scenarios.md docs/terms.md — zero matches (the substring mutation would match entity_mutations, which is the real shipped JSON-schema field name; word-boundary regex correctly excludes it)cd /tmp/chukwa-docs
git diff main -- README.md docs/operations.md docs/scenarios.md docs/terms.md src/lib.rs src/worlds.rs
Or read each file directly at /tmp/chukwa-docs/. The branch will sit unmerged until you push back or approve.
Once you accept (or specify edits and I apply them), I merge to main. No deploy is needed per the ticket — the in-code changes are functionally inert and the next functional ticket carries the rebuild.
Caller cancelled the ticket: Drafts will be substantially invalidated by scenario-store ticket 7d14ef0b-fa82-4042-b580-a92e7e187d33 (multi-profile / multi-environment / piece-by-piece authoring / atomic component decomposition). Of six deliverables, five are stale-by-anticipation: README.md conceptual model, docs/scenarios.md (described /scenarios/ + include_dir! + 7-field cognition with templates), docs/terms.md additions (singular-cognition shape), src/lib.rs Cognition export (type is deleted), src/worlds.rs module-doc (WorldMeta shape changes again). The sixth — git mv of the existing untracked README to docs/operations.md — is not invalidated but trivial enough to fold into a fresh docs ticket. Refile against the new shape after scenario-store resolves. Worktree at /tmp/chukwa-docs and branch feat/scenario-store-db-readme can be deleted.
Sign in as a human to drive this ticket from the page, or use the MCP tools.
Ticket created: Documentation: README, scenarios authoring guide, terms.md updates