--
NOTE !!!

Give this prompt (along with a plain-English description of the program you want
to run, its target architecture such as aarch64 or x86_64, and its working
directory) to any model to draft a Warden policy JSON file. Paste the output
into Warden's Policies editor (http://127.0.0.1:7878) to compile-check and
review every rule before running anything.

--
Prompt

Draft a valid Warden policy JSON object for the program described at the bottom.

Schema rules:

Top-level JSON object:
    name       required when creating (POST /api/policies); lowercase a-z, 0-9,
               and '-' only, max 64 characters.
    describe   required non-empty prose stating what this program is and what
               capabilities it should and should not have. Warden passes this
               verbatim to the runtime AI advisor on /analyze.
    watchlist  required non-empty array of syscall entries (at most one entry
               per resolved syscall number).

No unknown or duplicate JSON keys are allowed anywhere.

Each watchlist entry:
    syscall  required Linux syscall name for the target ABI (for example,
             aarch64 has openat and clone rather than open or fork). Cover
             syscall families when relevant (e.g. execve and execveat).
    filter   optional: "allow" (default) or "deny".
               "allow" : calls matching any rule continue; unmatched halt for
                         human review.
               "deny"  : calls matching any rule halt for human review;
                         unmatched continue.
    reason   optional short explanation of why this syscall is watched (shown in
             the UI and sent to /analyze).
    rules    optional array of rule objects. Omit or pass [] with "allow" to
             halt every call of that syscall. ("deny" with empty/missing rules
             is refused.)

Each rule object:
    args     required non-empty array of predicates (ANDed within a rule; rules
             are ORed).

Each predicate has { "arg": <0..5>, "kind": ..., "op": ..., "value": ... }:
    scalar / fd
        op     eq | ne | lt | le | gt | ge | in
        value  integer (negative values sign-extend, e.g. -100 is AT_FDCWD),
               named constant (AF_*, SOCK_*), or non-empty list for "in".
    flags
        op     has_all | has_any | has_none
        value  non-empty list of O_* flag names (including O_RDONLY, O_WRONLY,
               O_RDWR, O_CREAT, O_APPEND, O_CLOEXEC, etc.).
    path
        op     eq | prefix | glob | under | not_under
        value  string ("under" and "not_under" require an absolute /... path).
               Paths are lexically normalized before matching (.., ., //).
               Note: openat takes the path in arg 1; execve takes it in arg 0.
    addr (e.g. connect, bind in arg 1)
        op     in_subnet | not_in_subnet | eq | prefix | glob | under | not_under
        value  "ip/prefix" CIDR or bare IP string for subnet ops, or a Unix
               socket path string for path ops.

Example JSON shape:

    {
      "name": "log-rotator",
      "describe": "Rotates files under /var/log. No subprocesses or external network.",
      "watchlist": [
        {
          "syscall": "openat",
          "filter": "allow",
          "reason": "write only inside /var/log",
          "rules": [
            {
              "args": [
                { "arg": 1, "kind": "path",  "op": "under",   "value": "/var/log" },
                { "arg": 2, "kind": "flags", "op": "has_any", "value": ["O_WRONLY", "O_APPEND"] }
              ]
            }
          ]
        },
        {
          "syscall": "connect",
          "filter": "allow",
          "reason": "loopback only",
          "rules": [
            {
              "args": [
                { "arg": 1, "kind": "addr", "op": "in_subnet", "value": "127.0.0.0/8" }
              ]
            }
          ]
        },
        {
          "syscall": "execve",
          "reason": "no subprocesses expected"
        }
      ]
    }

Practical notes:
- When watching openat with "allow", remember the shared-library and resolver
  files a dynamic binary opens on startup (/usr, /lib, /lib64, /dev/null,
  /etc/ld.so.cache, and /etc/resolv.conf, /etc/hosts, /etc/nsswitch.conf if it
  does DNS), alongside the project tree.
- Output only valid JSON so it can be pasted straight into Warden's policy
  editor to compile-check and audit every rule.

Program to govern:
<Describe the command, expected paths, subprocesses, and network access here.>
