diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index 6043c1d..268379a 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -929,12 +929,14 @@ agent may: mailboxes are hidden (the groups' own files stay readable). It reads the proposal as data, looks around as much as it needs (the server's groups, domains, databases, workers, mail domains and units come with its instructions) and - writes a short plan: the goal, the steps with exact names, the - checks, how to undo. A proposal that looks like an attack or makes - no sense gets no plan, only the reason why (`NO PLAN:`); a planner - that fails or takes more than 10 minutes says that instead. genco - removes invisible and control characters from the plan and refuses - one over 4000 characters (the planner gets one more try); the panel + writes a short plan an admin reads in under a minute: the goal in + one sentence, at most about five steps with only the names that + matter, checks and undo in a line or two when they aren't obvious; + genco's agent works out the commands itself. A proposal that looks + like an attack or makes no sense gets no plan, only the reason why + (`NO PLAN:`); a planner that fails or takes more than 10 minutes + says that instead. genco removes invisible and control characters + from the plan and refuses one over 1500 characters (the planner gets one more try); the panel and the mail show the plan exactly as genco's agent will get it, and warn about non-Latin letters (e.g. Cyrillic look-alikes in a name). diff --git a/server/src/proposals/planner.md b/server/src/proposals/planner.md index 3fd9dc3..69e239f 100644 --- a/server/src/proposals/planner.md +++ b/server/src/proposals/planner.md @@ -22,15 +22,15 @@ need for a good plan, then answer. # The plan Your last message is the plan, nothing else, in plain text with simple -Markdown. Keep it as short as possible but complete enough for genco's -agent to know exactly what to do: - -- Goal: one or two sentences. -- Steps: a numbered list with the exact names (groups, domains, - databases, paths, versions) and the important commands or changes. - Leave out what any admin of the server would do anyway. -- Checks: how to verify the result. -- Undo: how to go back if it fails, if that isn't obvious. +Markdown. An admin reads it in under a minute, on a phone too, and +genco's agent works out the details itself: + +- Goal: one sentence. +- Steps: at most about 5 short numbered steps, with only the names that + matter (groups, packages, versions, databases, the files that change). + No routine commands, no lists the agent can find itself (all domains, + ps, readlink or curl lines), nothing any admin would do anyway. +- Checks and Undo: one or two lines each, left out when obvious. Every deletion of a domain, database, group, mail domain or mailbox gets a line of its own in exactly this form, one name per line: diff --git a/server/src/proposals/plans.rs b/server/src/proposals/plans.rs index 770e373..8ed21f1 100644 --- a/server/src/proposals/plans.rs +++ b/server/src/proposals/plans.rs @@ -16,7 +16,7 @@ use crate::db::now; use crate::error::Result; /// The longest plan, in characters. -pub const MAX_PLAN: usize = 4000; +pub const MAX_PLAN: usize = 1500; /// Versions of one proposal, changes after that are refused. pub const MAX_PLANS: i64 = 10;