Instruction file imported from wallacet/Cyberland (
.cursor/rules/cyberland-readme-sync.mdc). Copyright stays with the author.
Cyberland — README sync requirement
README.md is the canonical contributor-facing map of how the repo works today. Keep it aligned with code in the same change set whenever you touch architecture, workflows, or onboarding paths.
Present-state documentation (required)
- Describe only the current layout, APIs, and workflows. Do not document obsolete, deprecated, or superseded designs, folder layouts, or scheduler/render flows unless the repo still ships them as supported paths.
- Do not frame explanations as reactions to past work (avoid “after X migration”, “no longer separate phases”, “previously”, “used to”, “old vs new” unless you are documenting a dated breaking release note—which this README is not).
- Prefer what exists now and where it lives (
GameApplication,ModLoader,SystemScheduler,VulkanRenderer, workflows under.github/workflows/, etc.). - When removing or replacing a feature, delete or rewrite README sections that referred to it; do not leave “historical” paragraphs.
Trigger conditions
Apply this rule when any of these are true:
- You changed files under
src/Cyberland.Engine/. - You changed files under
src/Cyberland.Host/. - You changed architecture boundaries, load flow, mod pipeline, staging/publish behavior, or CI/testing expectations.
- You changed architecture-oriented rules under
.cursor/rules/that affect contributor guidance. - You edited
README.md(re-read affected claims against source).
README update expectations
- Update only sections affected by the change (architecture, testing, build/publish, layout, troubleshooting, or references).
- Keep descriptions concrete and consistent with current code and workflow files (verify branch names in
.github/workflows/, target names inCyberland.Host.csproj, callback order inGameApplication). - Keep examples and commands runnable from repo root on PowerShell unless a section explicitly says otherwise.
- Preserve beginner readability: explain what the system does, where it lives, and how it fits the mod model.
Verification checklist (before handoff on README edits)
- Frame loop — Match
GameApplication:OnRender→SystemScheduler.RunFramethenVulkanRenderer.DrawFrame; the windowUpdatehandler is intentionally empty. Do not attribute mod-only behavior (e.g. exit key handling) to the host unlessGameApplicationactually implements it. - CI — Default branch and path filters match
.github/workflows/*.yml(e.g.mastervsmain, glob paths). - Mods — Staging target names (
StageBaseMod,StageDemoMod, …) andMods/layout matchCyberland.Host.csproj. - Further reading — File paths for partials/helpers exist (or update the list).
High-level architecture section (## High-level architecture)
Whenever you add or edit README.md, if the change touches the High-level architecture heading, the mermaid fenced block, or the numbered list immediately below it, treat that as a required review:
- Fenced diagram — Exactly one
```mermaidopening fence and one closing```on their own lines; no smart quotes or stray characters inside the fence. - Mermaid syntax — Prefer quoted labels (
id["Label with spaces"]) for node text. Avoid raw/in labels when it causes parse failures; use and, commas, or<br/>if needed. Use distinct node ids (avoid ambiguous one-word ids likeWorldif the renderer mis-parses). Keep subgraph / end balanced; avoid deep indentation inside the block if preview tools choke. - Meaning — The diagram and the numbered steps must stay aligned with
GameApplication,ModLoader/IMod,ModLoadContext,SystemScheduler.RunFrame,World, andGameHostServicesas described in.cursor/rules/cyberland-mod-host-architecture.mdc. - Sanity check — Re-open the rendered
README.md(GitHub preview or IDE Markdown preview) and confirm the diagram renders and the section is not merged into neighboring headings.
Required final step: validate and fix
Before handoff, validate the README edits and fix any issues found:
- Re-read the changed
README.mdsections and confirm they match current engine/host behavior and architecture. - Verify paths, project names, and command lines are accurate and still valid.
- Check for contradictions with
.cursor/rules/cyberland-mod-host-architecture.mdcand other architecture guidance. - Fix stale statements, broken references, unclear wording, or formatting issues in the same change set.
- If High-level architecture was modified, complete the checklist in High-level architecture section above before handoff.
- Only hand off once the README is internally consistent with the code and rules you changed.