Prompt for coding agents
Contributors increasingly let a coding agent write the first
version. The prompt below is the standard input: it compresses the
contribution standard into a paste-ready block. The same content
ships as PROMPT.md
at the repo root, and AGENT.md carries the equivalent rules for
agents that read the repository automatically.
Paste the block below into any coding agent (ZCode, Claude Code,
Codex…) before asking it to build or change a Corvo extension. It
is the contract the review checklist enforces. AGENT.md at the repo
root carries the same rules for agents that read it automatically.
You are contributing an extension (a command crate) to Corvo, a
native launcher written in Rust. Work inside the repository
corvo. Follow these rules exactly; they are the review standard.
Architecture
- An extension is one crate under
commands/<your-id>/where<your-id>is the command id, kebab-case. Start fromtemplates/extension/— copy it, rename the package tocorvo-<your-id>, and changeCommand::id,KEYWORDS, and the demo data. - Register the command with
corvo_core::register_command!once in the crate. Then touch exactly two lines outside the crate: one[workspace] membersentry and one[dependencies]entry in the rootCargo.toml. Never editsrc/main.rs. - Dependencies:
corvo-core(the Command trait and types),corvo-ext(the kit:list,actions,cache,prefs,routing,feedback), andcorvo-platformonly if the command does OS work. Never depend oncorvo-ui. - No
#[cfg(target_os = ...)]inside the command crate. OS work goes throughcorvo-platformfree functions; if a new OS capability is needed, implement it incorvo-platform’smacos.rs,windows.rs, andlinux.rsin the same change (OS parity is mandatory — degrade honestly withCommandError::Unsupportedor a hint row when a platform cannot do it).
Behavior
search(query)runs per keystroke and must never block: no network, processes, AppleScript, CDP, or file-tree walks. Slow data lives behind acorvo_ext::cache::TtlCachestatic, warmed by afetch_*function the UI runs throughsmol::unblock;searchreadscache().get(ttl)and may answer empty.- Use the kit, not hand-rolled plumbing:
list::{ListItem, open_entry, empty_state, fuzzy_open}for rows and sections;actions::{copy, open_url, open_path, reveal_path, custom, destructive}for menus;routing::{first_word, key, page_query}for dispatch;feedback::toastfor inline confirmation. Keep sections contiguous (sort by section, then score). - Result ids are namespaced:
{id}:open(page opener),{id}:{action}[:{data}](actions),{id}:empty(hint rows).executestrips the{id}:prefix withrouting::keyand returnsCommandError::NotFoundfor anything else. Nounwrap/expect/panic outside tests. 7b. Rich pages are declarative: implementmanifest()(title, description, icon, declared commands with typed arguments) andpage(query)returning aPageView— composed Blocks with aRefresh::Everycadence for live state,corvo_ext::pageshelpers for Detail/Grid/Form. Page buttons and form submits route back throughexecute("{id}:page:{action}"). Never touchcorvo-uito render anything; readbook/src/views.mdandbook/src/modules/pages.mdfirst.commands/countdownis the reference implementation. - Slow work in
executeruns insidesmol::unblock; subprocesses run throughcorvo_platform::run_process_with_timeoutwith an explicit budget. - Preferences live in
corvo_ext::prefs(one TOML file per extension, serde + defaults). No telemetry, no analytics, no secrets in files or logs, no bundled opaque binaries.
Quality gate (all must pass before you finish)
cargo test -p corvo-<your-id>
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
The crate has unit tests for at least: one search match, one search non-match, execute routing, and a malformed id. If a human must verify something on real hardware (permissions, installed apps), say so explicitly in the final summary instead of claiming success.
Deliverables
- The crate, with
README.mdwhen setup is needed (tokens, services, permissions) and aCHANGELOG.mdentry:## [Added X] - YYYY-MM-DD. EXTENSIONS_PLAN.mdupdated if the change moves the plan.- Conventional commit messages (
feat(extensions): ...). - Documentation lives in
book/src/(published via GitHub Pages): readconcepts.md, the module chapters undermodules/, andcontributing.mdbefore writing code if anything above is unclear.
Tips for agent-authored extensions
- Review the diff like any PR — the agent has no taste, the checklist does. The contribution standard applies unchanged.
- Ask the agent for the manual-verification list: CI cannot grant Accessibility permission or launch Spotify. A summary that claims everything “works” without naming what was actually run is a red flag.
- Small, focused prompts beat mega-prompts: one extension, or one improvement to one extension, per session.