AI Workflows
Before any workflow: read token-policy.md, then task-router.md.
Add service:
- Read
docs/guides/add-service.md. - Inspect similar service manifest under
services/*/RUSTOS.package.toml. - Add crate under
services/<name>. - Add workspace member.
- Add manifest with
kind = "service",execution_domain = "user". - Run
cargo xtask check. - Update docs only if manifest/runtime behavior changes.
Add app:
- Read
docs/guides/add-app.md. - Inspect
apps/wayclick/RUSTOS.package.tomlorapps/shell/RUSTOS.package.toml. - Choose Rust/C/Windows app path.
- Add manifest and desktop entry.
- Run
cargo xtask check. - Update docs only if launch policy or app workflow changes.
Add bridge driver:
- Read
docs/guides/add-driver.md. - Inspect
drivers/bridges/display/bootfb/RUSTOS.package.toml. - Add source under
drivers/bridges/<class>/<name>. - Add manifest with
kind = "bridge-driver". - Add
[autoload]only if policy-loaded. - Run
cargo xtask build-driver-modules. - If autoload policy changes, inspect generated driver registry after stage.
Modify kernel API:
- Read
docs/ai/task-router.md,docs/ai/contracts.md, and relevantkernel/*/src/api.rs. - Preserve
api.rsas the cross-crate boundary. - Update
docs/api/kernel.mdonly for public API surface or boot/order changes. - Run focused
cargo checkwhere possible; otherwisecargo xtask check.
Modify logging:
- Read
docs/logging.mdanddocs/ai/contracts.md. - Update
config/rustos.toml[logging]. - If adding category, update
libs/rustos-observability/src/lib.rs,tools/build_log_cfg.rs, human logging docs, and AI contracts. - Rebuild affected crates; prefer
cargo xtask buildfor kernel logging.
Update docs:
- Human docs: bilingual, English first, language anchors.
- AI docs: English only, dense, no repeated bilingual prose.
- Update
docs/SUMMARY.mdfor new human or AI pages. - If behavior contracts changed, update
docs/ai/contracts.mdor the focused AI map. - Run mdBook/link sanity checks.
Debug QEMU boot:
- Ensure
cargo xtask buildcompleted. - Run
cargo xtask run --debugcon stdiofor immediate logs. - Use
cargo xtask debugfor GDB attach. - Inspect
logs/debugcon.log,logs/qemu_interrupt.logif interrupt trace enabled. - If display issue, run
cargo xtask probe-display.
Debug GRUB display boot:
- Check
tools/xtask/src/build.rsembedded GRUB config before changing QEMU flags. - Keep GRUB video setup conservative:
load_video,gfxmode=auto,gfxpayload=keep. - Check
kernel/nucleus-core/src/multiboot2_entry.Sfor the Multiboot2 framebuffer request tag. - Confirm the kernel log prints a nonzero
boot framebuffer addr. - Confirm
platform:bootfbcan match fromstorage::boot_volume::boot_framebuffer_info(), not from an already-installed GUI backend. - Confirm
display-primaryfallback decisions use active display state, not just a loaded module record. - For QEMU virtio-gpu, confirm
virtio-gpu native: display registeredappears aftervirtio register driver.
Reduce context mid-task:
- Summarize findings into the current response before opening more files.
- Prefer one subsystem at a time.
- Close questions by pointing at source path + line/symbol, not by pasting long code.