Imported from Perfect-Pixel-Games/last-beacon (
AGENTS.md). Install upstream withnpx skills add Perfect-Pixel-Games/last-beacon. Copyright stays with the author.
Last Beacon Pi Project Guide
This repository contains the Last Beacon game and uses the Foundation Engine as the engine/ Git submodule.
Last Beacon work happens in the root repository. Foundation Engine work may happen too, but only inside the engine/ submodule checkout and with the same Gitflow discipline used by the root repository.
Model policy
- Use
gpt-5.5for planning. - Use
gpt-5.4for implementation. - Use
gpt-5.5for review. - Never use Anthropic models.
Repository layout
README.mdis the project vision and setup source of truth.game/contains the Last Beacon Cargo package, game source, game manifest, and game-owned assets.game/assets/contains Last Beacon assets.engine/is the Foundation Engine Git submodule, checkout, junction, or symlink used by the game-facing scripts.scripts/contains Last Beacon build, run, package, and validation wrappers..pi/skills/contains the project workflow skills that must be followed when their task descriptions apply.
Foundation-owned source, reusable engine systems, engine assets, and engine validation belong under engine/. Do not duplicate or patch Foundation Engine code in the root repository outside the submodule.
Required Pi project resources
This repository expects Pi project resources to be available after cloning and trusting the project.
Project-local skills
The following skills are mandatory when their matching task descriptions apply:
.pi/skills/feature-plan-docs/SKILL.md.pi/skills/feature-review-handoff/SKILL.md.pi/skills/feature-tracker-update/SKILL.md.pi/skills/foundation-architecture/SKILL.md.pi/skills/gitflow-workflow/SKILL.md.pi/skills/rust-coding-standards/SKILL.md.pi/skills/rust-workspace-dev/SKILL.md
If a cloned checkout is missing one of these files, stop and report that the repository is incomplete.
Expected non-project Pi extensions
The project expects these Pi extensions/packages when their tools or skills are needed:
@tintinweb/pi-subagents:srcpi-hermes-memory:srcpi-web-access
If an extension-provided tool, command, or resource is unavailable when needed, stop and tell the user to install or reload the required Pi extensions/packages rather than silently substituting another workflow.
The librarian skill may be provided by the global pi-web-access installation. Use it when the task asks for evidence-backed open-source library research with GitHub permalinks. If it is missing, report that limitation instead of pretending it was used.
Standard Rust workflow
When the user asks for Rust workspace, crate, module, test, build, lint, dependency, or validation work:
- Read
.pi/skills/rust-workspace-dev/SKILL.mdfirst. - Read
.pi/skills/rust-coding-standards/SKILL.mdbefore writing, refactoring, generating, or reviewing Rust code. - Inspect the relevant manifest before proposing architecture or editing code:
game/Cargo.tomlfor Last Beacon game work.engine/Cargo.tomlfor Foundation Engine work.
- Inspect relevant source, asset, config, script, and test files before editing.
- Prefer idiomatic Rust, minimal dependencies, and the project's self-documenting code standards.
- Use game-facing validation from the root repository for Last Beacon work:
scripts/validate.cmd- focused
cargocommands with--manifest-path game/Cargo.tomlwhen appropriate.
- Use Foundation Engine validation from inside the submodule for engine work:
engine/scripts/format-project.cmdengine/scripts/lint-project.cmdengine/scripts/test-project.cmdengine/scripts/compile-project.cmdengine/scripts/doc-project.cmdengine/scripts/validate-project.cmdwhen a full engine validation is needed.
Foundation Engine submodule rule
Foundation Engine changes are allowed, but they must be made inside engine/.
Rules:
- Treat
engine/as an independent Git repository. - Before editing engine files, inspect
engine/README.md,engine/AGENTS.md, and relevant engine docs/source. - Use
git -C engine ...for submodule Git status, branch, commit, and push operations. - Do not edit Foundation-owned files from the root repository path if they are not inside
engine/. - When engine changes are committed in the submodule, update and commit the root repository's
enginesubmodule pointer as part of the Last Beacon feature work. - If
FOUNDATION_ENGINE_PATHis set to an alternate checkout, inspect that checkout before use, but do not modify it unless the user explicitly asks to work in that checkout and its Git state is safe.
Foundation architecture workflow
When the user asks about Foundation runtime systems, Foundation engine launch behavior, Foundation editor tooling, game settings, scene-stack behavior, reusable game components, BSN scenes, Last Beacon integration with Foundation crates, or TemplateGame integration:
- Read
.pi/skills/foundation-architecture/SKILL.mdfirst. - Keep reusable Foundation Engine code inside
engine/. - Keep Last Beacon source, game manifests, game assets, and game-specific plugin glue inside
game/. - Do not vendor Foundation Engine crates into the root repository.
- Do not add game-specific behavior to generic Foundation Engine crates unless the plan clearly identifies it as reusable engine functionality.
- Do not add Jackdaw dependencies unless the user explicitly approves a major architecture change; the current Foundation direction is Bevy-only.
Git workflow
When the user asks about Git workflow, branch strategy, pull requests, commits, pushes, or submodule history:
- Read
.pi/skills/gitflow-workflow/SKILL.mdfirst. - Treat that skill as the source of truth for both the root repository and the
engine/submodule. - Root repository work must happen on
feature/*orhotfix/*branches from the correct base. - Engine submodule work must also happen on
feature/*orhotfix/*branches insideengine/, from the engine repository's correct base. - Never work on engine code while
engine/is onmainordev; switch or create a validfeature/*orhotfix/*branch first. - Do not commit directly to
mainordevin either repository. - Do not merge directly into
mainordevin either repository; all integration must go through pull requests for both game and engine. - Push commits to
originwhen available so pull requests can be opened; recordN/A (local-only repository)when no origin exists. - Maintain the exact Foundation Engine commit hash that the game is bound to whenever the root
enginesubmodule pointer changes.
Feature planning workflow
When the user asks to plan a new feature:
- Read
.pi/skills/feature-plan-docs/SKILL.mdfirst. - Use
gpt-5.5for planning. Never use Anthropic models. - Do not start implementation until both planning documents exist under
docs/plans/<new-feature>/and the user has approved proceeding. - Ensure the root feature is associated with a dedicated
feature/*branch from rootdev, following.pi/skills/gitflow-workflow/SKILL.md. - If the feature includes Foundation Engine changes, also plan a dedicated engine submodule
feature/*branch from enginedevand record it separately. - Record root branch, engine branch when applicable, and submodule pointer expectations in both plan and tracker.
- Planning must stop after the plan and tracker are created or updated. Ask the user to review and confirm whether to proceed.
- Treat natural approval phrasing such as
continue,carry on,go ahead,implement,proceed, or equivalent affirmative review feedback as approval to begin implementation. - Treat negative or revision-seeking feedback such as
no,not yet,needs more work,revise this, or equivalent responses as planning iteration requests rather than implementation approval.
Feature implementation workflow
When the user asks to begin, continue, or update feature implementation:
- If approved planning documents do not exist yet, stop and follow
.pi/skills/feature-plan-docs/SKILL.mdfirst. - If approved planning documents exist, read
.pi/skills/feature-tracker-update/SKILL.mdfirst, then read.pi/skills/feature-plan-docs/SKILL.md,.pi/skills/rust-workspace-dev/SKILL.md,.pi/skills/rust-coding-standards/SKILL.md, and.pi/skills/gitflow-workflow/SKILL.mdas required context. - Use
gpt-5.4for implementation. Never use Anthropic models. - Before implementation edits, read the relevant
plan.mdandtracker.md. - Confirm the root branch matches the planned
feature/*orhotfix/*branch and verify its base when possible. - If engine work is planned, confirm the
engine/submodule branch matches the planned enginefeature/*orhotfix/*branch and verify its base when possible. - Update the tracker before edits to record that implementation is starting or resuming.
- Keep the tracker updated with progress, validation state, issues found, postponements, model handoff state, root commit/push state, engine commit/push state, and submodule pointer state.
- Commit each completed task and phase, including tracker updates. For engine changes, commit inside
engine/first, record the exact engine commit hash that the game is bound to, then commit the root submodule pointer update. - Push each commit checkpoint to
originwhen available so pull requests can be opened. Do not merge branches directly; integration goes through pull requests.
Final review workflow
When the user asks for a final sanity review of implemented feature work:
- Read
.pi/skills/feature-review-handoff/SKILL.mdfirst. - Read
.pi/skills/rust-coding-standards/SKILL.mdbefore reviewing Rust code. - Use
gpt-5.5for review. Never use Anthropic models. - Review both root and engine submodule changes when the feature touched both repositories.
- Any review findings must be written to the tracker and presented to the user.
- The user must choose whether to accept the implementation as-is, defer findings, or send findings back for
gpt-5.4fixes.
Enforcement rules
- For any feature planning request, the
feature-plan-docsskill is mandatory. - For any feature implementation request, the
feature-plan-docsandfeature-tracker-updateskills are mandatory. - For any optional final review request, the
feature-review-handoffandfeature-tracker-updateskills are mandatory. - For any Foundation Engine or Foundation integration request, the
foundation-architectureskill is mandatory. - For any branch, commit, pull request, push, or submodule pointer update, the
gitflow-workflowskill is mandatory. - If planning documents do not exist yet for feature implementation, stop and create them before implementation.
Important notes
- Treat
README.mdas the source of truth for Last Beacon vision, setup, and high-level layout. - Treat
game/Cargo.tomlas the source of truth for the Last Beacon game crate. - Treat
engine/Cargo.tomlas the source of truth for Foundation Engine workspace structure. - Use
scripts/build.cmd,scripts/run.cmd,scripts/package.cmd, andscripts/validate.cmdfor game-facing workflows. - Root plans and trackers live under
docs/plans/<feature>/. - Engine plans and trackers, if created by engine-local work, live under
engine/docs/plans/<feature>/unless the root feature plan intentionally tracks both repositories from root. - Put generated root outputs under
artifacts/and logs underlogs/if persistent generated files are needed. - Do not edit machine-local environment files unless the user explicitly asks.