Imported from purton-tech/rust-on-nails (
AGENTS.md). Install upstream withnpx skills add purton-tech/rust-on-nails. Copyright stays with the author.
Rust on Nails Agents Guide
This repository mixes several deliverables that move at different speeds. To keep things tidy, we split the work into three "agents" that each own one slice of the Rust on Nails experience. Use this guide to decide where changes belong and how to validate them before opening a PR.
Documentation Agent (crates/static-website)
- Purpose: Publish the public site that explains how to build Rust on Nails applications. The site is deployed to Cloudflare Pages.
- Primary tasks: Add or update docs in
content/and assets inassets/. When adding tutorials, prefer runnable snippets that match the default project template. - Working locally: Run
just wtsfor Tailwind andjust wsfor the Rust/Dioxus generator. Browsehttp://localhost:8080to preview the rendered pages underdist/. - Before shipping:
DO_NOT_RUN_SERVER=1 cargo run --bin static-websiteto ensure the generator succeeds, then run the Cloudflare preview workflow if build or deployment config changed.
Dev Environment Agent (nails-devcontainer)
- Purpose: Maintain the reusable development environment used by community members and contributors.
- Primary tasks: Keep
devcontainer-template.jsonand wrapper scripts in sync with the CLI and website. Document required tooling inREADME.md. - Working locally: Use
devcontainer up(VS Code) ordevcontainer build --workspace-folder .to verify changes. Ensure the container exposes port 8080 for the docs server and ships the CLI binaries or aliases referenced in the guides. - Before shipping: Bump version tags when you change the base image or toolchain. Run at least one full
cargo testinside the container to make sure the toolchain works.
Platform Agent (crates/stack-cli)
- Purpose: Provide the internal deployment/PaaS layer that installs operators into Kubernetes clusters for Rust on Nails applications.
- Primary tasks: Extend the
stack-clibinary, manage Helm-like manifests underconfig/, and maintain integrations with Envoy and Keycloak. - Working locally:
cargo run --bin stack-cli -- -hto inspect commands. Usecargo run --bin stack-cli -- operatorto run the controller loop, and theinit/installsubcommands to configure a cluster. The dev container already maps your kubeconfig—fall back totmp/kubeconfigif needed. - Before shipping:
cargo fmt,cargo clippy -- -D warnings, andcargo test. When changing cluster assets, test against a local K3s install (curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='server --write-kubeconfig-mode="644"' sh -). Document any new flags inREADME.md.
Cross-Cutting Expectations
- Follow
CONTRIBUTING.mdfor code review and branching conventions. - If a change touches more than one agent area, coordinate early so reviewers from each area can weigh in.
- Prefer ASCII in docs and comments unless you have a compelling reason otherwise.
- Surface follow-up work with TODO comments (
// TODO(username):) or GitHub issues so the right agent can pick them up.