magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
2 min read

interpreter-script

A deny rule by default: it refuses an ad-hoc script in python, node, perl or ruby, where Buzz is the workspace's scripting language, and names what to run instead.

What it catches

An ad-hoc script in python, node, perl or ruby, where Buzz is the workspace's scripting language.

Why

Buzz is the one scripting language here: magus buzz -e '<buzz>' runs a program with fs, json and proc built in, the magus-buzz-lang skill carries its syntax, and the guard reads what the program does. A python or perl one-liner arrives as one string the guard cannot follow, and its commonest shape, a substitute-and-write, cannot tell your identifier from a dependency's of the same name. It denies python, python3 and python3.x given -c, a - operand, no program at all (a heredoc or piped stdin), or a .py file, and a .py file run directly; node given -e, -p, --eval, --print, - or no program; perl with any flag cluster carrying e, E or i, or reading its program from stdin; ruby given -e or -i, or reading stdin. Untouched: --version, -V and --help, python -m, node file.js, perl file.pl, bash and sh, magus run and magus buzz. A script file is judged by its program too: a node, perl or ruby file that substitutes and writes back a path in the workspace, and a write that leaves one, get this verdict; a program whose every named path lies outside the workspace is untouched. A Buzz program is held to the line it would be typed as: every proc\exec and proc\shell a magus buzz -e body, stdin heredoc or magus buzz <script> file starts, spelled from literals, is judged as that command, so proc\exec("go", args: ["test", "./..."]) meets raw-tool the way go test ./... does. That is the guard reading a hooked agent call, not a limit on Buzz: the proc module and the interpreter run anything, and a script run outside the harness is never judged.

Default and override

By default this rule takes the decision deny. A workspace sets it by name, in its root magusfile, to deny, advise or off:

magus\guard.builtins({"interpreter-script": "advise"})

A loosening takes effect once it is committed; a tightening applies at once.

Seeing it

A verdict names its rule in brackets, which is how you got here:

deny [interpreter-script]: ...

A workspace that sets this rule to advise sees advise [interpreter-script]: ... instead.

magus describe rule interpreter-script prints the same entry at a terminal, and magus describe rules lists every rule this workspace enforces.

See also

guardrulesinterpreter-scriptdeny
Last updated (61fd39a7)
Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. Workspace in full.

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. Magusfile in full.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). Op in full.

Spell

A language/runtime adapter (e.g. go, md) that maps generic targets onto a toolchain's real commands. Spell in full.

Module

A magus stdlib namespace a magusfile imports for host capabilities: filesystem, exec, vcs, and more. Module in full.

Buzz

The language magusfiles are written in (the .buzz engine). Buzz in full.

CI

An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm. CI in full.

Agent

A model working through an agent host such as Claude Code, Codex, Cursor or OpenCode. magus treats an agent as one more caller of its CLI, MCP tools and console, held to the same checks as a person. Agent in full.

Tool

An action a model can call through its host: a name, a description, a typed input and a result. magus serves its tools over MCP, each a read of the workspace model or a run of the CLI it already has. Tool in full.

Harness

The deterministic scaffolding around the work on a change, for a person or an agent: compiler errors, formatters, linters, checks, gates, leases and hooks, placed at points a person chose. Around an agent's loop, magus supplies one and keeps it outside. Harness in full.

Skill

A packaged set of instructions an agent host loads when a task matches its description: a directory holding a SKILL.md. magus ships its magus-* skills in the binary and writes them with magus agent install. Skill in full.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate. Run in full.

Conventions

Placeholders

Angle brackets mark a value you replace with your own; never type the brackets:

magus run <target>
magus completion <shell>    # e.g. bash, zsh, fish

<target>, <path>, <shell>, <name> and the like are stand-ins, not literal text.