Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/OPERATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
18 changes: 9 additions & 9 deletions server/src/proposals/planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion server/src/proposals/plans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading