magus-buzz-review
暂无简介
- License 许可
- GPL-3.0
- 所属仓库
- egladman/magus
- 最近更新
- 2026-11-14
- Stars
- ★ 3
- Forks
- 0
03 SKILL.md 正文
{{if .Full}}# Reviewing Buzz code{{else}}# Reviewing Buzz{{end}}
{{if .Full}}{{skill "buzz-lang"}} teaches how to WRITE Buzz. This skill REVIEWS it (a magusfile, a spell,
or a standalone .buzz script) through three lenses run in parallel,
the same fan-out-and-merge shape go-review-ultra uses for Go.
It covers the LANGUAGE: is the code idiomatic, is it correct, does it run where the
author thinks it runs. Magusfile/target/spell CONTRACTS (caching, ctx.needs, wards,
op kinds, charms, command vs service) belong to {{skill "buzz-lang"}} and it already covers them; restating them here would only
drift out of sync with it.{{else}}{{skill "buzz-lang"}} teaches WRITING Buzz. This skill REVIEWS it (magusfile, spell, or standalone .buzz script) through three lenses run in parallel.
Covers LANGUAGE: idiomatic? correct? runs where author thinks?
Magusfile/target/spell CONTRACTS (caching, ctx.needs, wards, op kinds, charms, command vs service): {{skill "buzz-lang"}}.{{end}}
Authority labels
{{if .Full}}Every finding in every lens carries one of three labels. "This is wrong" means a different thing in Buzz depending on the authority behind it, and a reader cannot act on an unlabeled finding, only argue about it. {{else}}Every finding in every lens carries one of three labels; "wrong" means different things depending on authority.{{end}}
UPSTREAM: true of Buzz itself, wherever it runs. {{if .Full}}-GOPHERBUZZ: true only of gopherbuzz, the implementation magus embeds; upstream Buzz may lack the construct or resolve it differently.{{else}}-GOPHERBUZZ: true only of gopherbuzz, implementation magus embeds; upstream Buzz may lack construct or resolve it differently.{{end}} {{if .Full}}-PORTABILITY: runs fine here under gopherbuzz, but does not parse or behave the same against upstream Buzz.{{else}}-PORTABILITY: runs fine here under gopherbuzz, but does not parse or behave same against upstream Buzz.{{end}}
{{if .Full}}Label every finding from the correctness and conformance lenses. Never invent a fourth category, and never leave one unlabeled because the answer felt obvious.{{else}}Label every finding from correctness and conformance lenses. Never invent fourth category; never leave one unlabeled because answer felt obvious.{{end}}
{{if .Full}}## Establish the mode before applying anything{{else}}## Establish mode before applying anything{{end}}
{{if .Full}}
This is the single most important step in the whole skill: getting it wrong
produces confident, fluent false positives, because the "violation" did
compile and run. Buzz parses in one of two modes, and most of what the correctness and
conformance lenses check applies to only one:
{{end}}
{{if .Full}}- Strict (upstream parity), {{cmd "buzz"}} <file>'s default:
- rejects top-level control flow outside a function
(
if/while/for/foreach/do-until/try/throw/return/break/continue/ a bare block); - requires every call argument after the first to be labeled (
name: value) unless it is a bare identifier.{{else}}Wrong mode -> confident false positives. Buzz parses in one of two modes; most correctness and conformance checks apply to only one: - Strict (upstream parity),
{{cmd "buzz"}} <file>'s default:- rejects top-level control flow outside function (
if/while/for/foreach/do-until/try/throw/return/break/continue/ bare block); - requires every call argument after first labeled (
name: value) unless bare identifier.{{end}} {{if .Full}}- Embedded (relaxed): neither restriction applies.{{cmd "buzz"}} --embeddedopts a script in. A magusfile and a spell are embedded UNCONDITIONALLY, with no opt-out; every code path that loads one passes the embedded option before the author's own code runs, so there is no author-visible switch to get wrong.{{else}}- Embedded (relaxed): neither restriction applies.{{cmd "buzz"}} --embeddedopts script in. Magusfile and spell embedded UNCONDITIONALLY, no opt-out.{{end}}
- rejects top-level control flow outside function (
{{if .Full}}So a magusfile or a spell file is always embedded. A top-level if, a top-level
foreach, an unlabeled second argument: all fine and idiomatic there. Applying
strict mode to a magusfile is not a strict reading; it is a wrong one.{{else}}-> magusfile or spell file always embedded: top-level if, top-level foreach, unlabeled second argument all fine and idiomatic there.
Strict mode applied to magusfile: not strict reading; wrong one.{{end}}{{if .Full}}
Judge a standalone script by how it is invoked, not by guessing from its shape:{{end}}
{{if .Full}}- Run by a bare {{cmd "buzz"}} <file> (no --embedded): strict mode applies, and a
top-level if is a genuine defect.{{else}}Standalone script: judge by invocation:
- Bare
{{cmd "buzz"}} <file>(no--embedded): strict applies; top-levelifis genuine defect.{{end}} {{if .Full}}- Strict mode does not apply when it runs by{{cmd "buzz"}} --embedded <file>, from inside another Buzz program (magus\cmd("buzz", ...)), or its header comment names the mode.{{else}}- Strict does not apply when run by{{cmd "buzz"}} --embedded <file>, from inside another Buzz program (magus\cmd("buzz", ...)), or header comment names mode.{{end}} {{if .Full}}- Unclear: check the CI workflow or wrapper that calls it before flagging a strict-mode violation. A script that happens to have no top-level control flow and no unlabeled second argument is ALSO valid embedded Buzz, so its contents alone never prove which mode the author wrote it for; only the invocation does.{{else}}- Unclear: check CI workflow or wrapper calling it before flagging strict-mode violation; contents alone never prove mode.{{end}}
{{if .Full}}Once you know the mode, PROVE the file parses under it; do not read for it. magus buzz --check <file> checks strict, --check --embedded the other. It runs nothing,
takes several paths, and reports every diagnostic instead of stopping at the
first, so a strict-mode finding either reproduces as a
diagnostic naming the line or was never there. A file whose job is a side effect
cannot be checked any other way, since running it exercises one path and says
nothing about the rest.{{else}}Once mode known, PROVE file parses under it; do not read for it.
{{cmd "buzz"}} --check <file> checks strict, --check --embedded other. Runs nothing, takes several paths, reports every diagnostic, not stopping at first.{{end}}
{{if .Full}}A conformance-suite fixture exists to exercise one upstream-vs-gopherbuzz difference
(generics, match, a bare as cast, ::<T>, ...). Using that construct is the
fixture doing its job, not a defect.{{else}}Conformance-suite fixture exists to exercise one upstream-vs-gopherbuzz difference (generics, match, bare as cast, ::<T>, ...); using that construct is fixture doing its job, not defect.{{end}}
Lens: idiom and style
{{if .Full}}
What reads as Buzz house style versus what merely parses.
{{end}}
{{if .Full}}- Namespace access on an imported module is a backslash, not a dot. Write
fs\readFile(...), not fs.readFile(...). Authority: PORTABILITY (see the
conformance lens for the parse-level reason), and readability. path\join(a, b)
and record.join(a, b) parse to visually identical postfix chains; only the token
tells "call into an imported module" from "call a method on this value". A stray
dot reads as a value method call to anyone who has not memorized which names are
modules.
FALSE-POSITIVE GUARD: a local variable, field, or ctx member that happens
to share a module's bare name (path, env, os are common ones) uses a
dot correctly. path.endsWith(".buzz") where path is a local str is
ordinary member access, not a namespace-access mistake, even though path
is also an importable module name. Only flag the dot when the receiver is
the actual imported module identifier itself.{{else}}- Namespace access on imported module: backslash, not dot. fs\readFile(...), not fs.readFile(...). Authority: PORTABILITY (conformance lens has parse-level reason), plus readability: stray dot reads as method call on value. Flag only when receiver is imported module itself, not local sharing its name (path, env, os).{{end}}
{{if .Full}}- A flat import (import "x" as _) is a finding. The _ alias binds no name and
merges every export of x into the importing scope.
- A call site then reads
escapeAttr(s), and nothing in the file says where it came from. The reader greps each candidate module, per call site. - The module boundary becomes unenforceable. A new export in a flat-imported module can silently shadow or collide with a name in every importer.
- Prefer a named import with namespaced calls (
import "lib/text" as text;, thentext\escapeAttr(s)). Where an unprefixed name is genuinely wanted, the selective formimport escapeAttr, slugify from "lib/text";states exactly what enters the scope. Note the flat and selective forms are BOTH excluded from unused-import tracking (BZZ3001): a flat import has no bound name to mark unused, so anas _that has stopped being needed is never reported. Weigh the finding by blast radius, not by count: a leaf module flat-importing one helper is a nit, while a tree where every file flat-imports every other is a single structural finding, not one per line.{{else}}- Flat import (import "x" as _) is finding:_alias binds no name, merges every export ofxinto importing scope. - Call site then reads
escapeAttr(s); nothing in file says origin; reader greps each candidate module, per call site. - Module boundary unenforceable: new export in flat-imported module can silently shadow or collide with name in every importer.
- Prefer named import with namespaced calls (
import "lib/text" as text;, thentext\escapeAttr(s)). Where unprefixed name genuinely wanted, selective formimport escapeAttr, slugify from "lib/text";states exactly what enters scope.{{end}} {{if .Full}}-export fun test(...)is not a naming smell.testis a contextual soft keyword, not a reserved one, so magus's canonical test-target name stays usable. Authority: GOPHERBUZZ: the one deliberate place gopherbuzz's reserved-word list is a superset of upstream's. Do not flag it or suggest renaming it.{{else}}-export fun test(...)is not naming smell:testis contextual soft keyword, not reserved -> magus's canonical test-target name stays usable. Authority: GOPHERBUZZ: only deliberate place gopherbuzz reserved-word list is superset of upstream's. Do not flag or suggest renaming.{{end}} {{if .Full}}- A name-shaped parse error may be a reserved word, not a deeper bug. gopherbuzz rejects a reserved word as the name of a variable, parameter, function, or enum case. The words:out,from,match,pat,fib,rg,obj,ud,zdef,typeof,type,protocol,static,extern,double,any,Function,int,str,bool,void. - Authority: GOPHERBUZZ. It is gopherbuzz's own enforced list, kept for strict parity with upstream's reservations, and not guaranteed identical to upstream's.
- They stay fine in non-binding position (a map key, a member name, a type name).
Only binding a NAME to one fails.{{else}}- Name-shaped parse error may be reserved word, not deeper bug. gopherbuzz rejects reserved word as name of variable, parameter, function, or enum case. Words:
out,from,match,pat,fib,rg,obj,ud,zdef,typeof,type,protocol,static,extern,double,any,Function,int,str,bool,void. - Authority: GOPHERBUZZ: gopherbuzz's own enforced list, kept for strict parity with upstream reservations; not guaranteed identical to upstream's.
- Fine in non-binding position (map key, member name, type name); only binding NAME to one fails.{{end}}
{{if .Full}}- Object literal vs map literal is a common slip from JSON-familiar authors.
Point{ x = 1 }(object literal,=) and{"key": value}(map literal,:) look alike and are not interchangeable. Flag a literal that mixes the two forms, or uses:where an object literal was clearly meant. Authority: UPSTREAM.{{else}}- Object literal vs map literal: common slip from JSON-familiar authors.Point{ x = 1 }(object literal,=) and{"key": value}(map literal,:) look alike, not interchangeable. Flag literal mixing two forms, or:where object literal clearly meant. Authority: UPSTREAM.{{end}} {{if .Full}}- A magusfile carrying logic that wants a test is a finding. A magusfile is declarative configuration; a test of it tests your configuration, not your logic. The fix moves that logic into a spell or a sibling module; see {{skill "buzz-lang"}}'s "Test what you write".{{else}}- Magusfile carrying logic that wants test: finding. Fix: move logic into spell or sibling module; see {{skill "buzz-lang"}} "Test what you write".{{end}}
Lens: skeptic and correctness
{{if .Full}}
Bugs and silent failures, not style. Read every function assuming it has one.
{{end}}
{{if .Full}}- A magus\Context.needs-adjacent branch on a diagnostic code that names no real
code. The idiom for handling a magus failure in Buzz: catch, then branch on
e["code"], not e["message"].
- A transposed code (
"MSG3003"for"{{mgs "MGS3003"}}") or a stale one silently never matches. Thecatchblock still reads as live error handling while being dead code. A code cited only in a comment rots the same way, slower. - Authority: GOPHERBUZZ/MAGUS, not upstream.
MGSxxxxandBZZxxxxare magus's and gopherbuzz's own diagnostic codes, not a Buzz language concept. CHECK: any string matchingMGS[0-9]{4}orBZZ[0-9]{4}in a.buzzfile, in code or in a comment, against the documented set:docs/reference/codes/(organized by family: auth, charms, knowledge, magusfile, outputref, race, sandbox, services; one page perMGSxxxxcode) for magus's own codes, andlibs/gopherbuzz/docs/codes/(flat, one page perBZZxxxxcode) for gopherbuzz's. A code that names no file in either tree is the finding. A code cited as DATA, a fixture or table row that names a real code as an example, rather than comparing against a caught error, is not a defect just because it is not itself a comparison; check whether the code exists, not whether the surrounding line is a comparison. Do not turn this into "type diagnostic codes as an enum":Arg.Enumscopes itself to a parameter whose values are a closed set, this set is not closed (it grows every release across two independently-versioned namespaces), the real read site is a map key off a caught error rather than a function parameter, and an enum case an older magus release lacks fails to LOAD; worse than a string that silently never matches. A closed set like a sign algorithm name is whatArg.Enumis for; a diagnostic code is not that shape.{{else}}-magus\Context.needs-adjacent branch on diagnostic code naming no real code. Idiom for handling magus failure in Buzz: catch, then branch one["code"], note["message"]. - Transposed code (
"MSG3003"for"MGS3003") or stale one silently never matches;catchblock still reads as live error handling while dead code. Code cited only in comment rots same way, slower. - Authority: GOPHERBUZZ/MAGUS, not upstream.
MGSxxxx,BZZxxxx: magus's and gopherbuzz's own diagnostic codes, not Buzz language concept. - Check each
MGS[0-9]{4}orBZZ[0-9]{4}againstdocs/reference/codes/andlibs/gopherbuzz/docs/codes/; code with no page in either tree is finding. Do not propose typing codes as enum: set is open.{{end}} {{if .Full}}- A force-unwrap (!) on a value the type says can be null. Buzz's nil deref:maybeUser!.namepanics at runtime the momentmaybeUseris null. Prefer?./??unless the caller proved non-null a line above. Authority: UPSTREAM.{{else}}- Force-unwrap (!) on value type says can be null: Buzz's nil deref;maybeUser!.namepanics at runtime the momentmaybeUseris null. Prefer?./??unless caller proved non-null line above. Authority: UPSTREAM.{{end}} {{if .Full}}- Acatchthat discardsewithout inspectingcodeormessage, where the failure can mean more than one thing. Swallowing every error the same way is how a gate stops being a gate: the failure go-review-skeptic flags for a Godefaultcase that silently no-ops. Authority: UPSTREAM.{{else}}-catchdiscardingewithout inspectingcodeormessage, where failure can mean more than one thing: swallowing every error same way is how gate stops being gate. Authority: UPSTREAM.{{end}} {{if .Full}}- A compound assignment (x op= v) whose target has a side effect, e.g.f().count += 1. Authority: GOPHERBUZZ. Upstream evaluates the target ONCE; gopherbuzz evaluates it TWICE, so any side effect inf()happens twice (a mutation, a log line, a counter). This is a real bug under gopherbuzz, not only a portability note. Flag it whenever the target is not a bare variable.{{else}}- Compound assignment (x op= v) whose target has side effect, likef().count += 1. Authority: GOPHERBUZZ. Upstream evaluates target ONCE; gopherbuzz TWICE -> any side effect inf()happens twice. Real bug under gopherbuzz, not only portability note. Flag whenever target is not bare variable.{{end}} {{if .Full}}- Amatchtreated as exhaustive, or anobj{...}/protocol annotation treated as enforced. Authority: GOPHERBUZZ. gopherbuzz's checker enforces neither match exhaustiveness, protocol conformance, norobj{...}shape annotations. Check by hand that amatchcovers every case its type admits, as go-review-skeptic checks a Go type switch for a missingdefault. A clean compile proves nothing here.{{else}}-matchtreated as exhaustive, orobj{...}/protocol annotation treated as enforced. Authority: GOPHERBUZZ. gopherbuzz checker enforces neither match exhaustiveness, protocol conformance, norobj{...}shape annotations. Check by hand thatmatchcovers every case its type admits; clean compile proves nothing here.{{end}} {{if .Full}}- "It compiled" as proof the code is valid upstream Buzz, or "it failed" as proof it is not. Authority: GOPHERBUZZ. gopherbuzz implements a SUBSET of upstream, so passing today does not mean upstream would accept it. Several of upstream's own compile-error fixtures compile clean under gopherbuzz. A clean compile is evidence, not verification, in either direction.{{else}}- "It compiled" as proof code is valid upstream Buzz, or "it failed" as proof it is not. Authority: GOPHERBUZZ. gopherbuzz implements SUBSET of upstream -> passing today does not mean upstream accepts. Clean compile: evidence, not verification, either direction.{{end}}
Lens: upstream conformance
{{if .Full}}
Named divergences between gopherbuzz and upstream Buzz. Each is a real,
observed behavior difference, not a hypothetical; use them to judge whether
code an author believes is "just Buzz" survives contact with
upstream, and to stop a gopherbuzz-only behavior from being taught as if it
were the language.
{{end}}
{{if .Full}}- Namespace access: \ is the only form upstream recognizes for an imported
module. Authority: PORTABILITY. Upstream's parser gives backslash a dedicated
production for resolving a name against an import; the bare dot is only the
general postfix member operator on VALUES. gopherbuzz accepts both for a module
reference, a superset, not a mirror. fs\readFile(...) parses in both;
fs.readFile(...) parses only here.{{else}}- Namespace access: \ only form upstream recognizes for imported module. Authority: PORTABILITY. gopherbuzz accepts both for module reference: superset, not mirror. fs\readFile(...) parses in both; fs.readFile(...) only here.{{end}}
{{if .Full}}- A string is indexed by BYTES; utf8Len() is the rune count. Authority:
UPSTREAM. len(), sub(), indexOf(), byte() and foreach all work in bytes,
matching upstream's builtins; utf8Len() is the only codepoint-counting member.
An accented e is two bytes in UTF-8, so len() counts it as 2.
This is worth knowing because gopherbuzz USED to index runes, and
code written against that reads plausibly either way. A loop slicing with
sub() and bounding with len() was consistent under both models, so it does
not announce the change; what moves is any index arithmetic that assumed one
character was one position. Reach for utf8Len() only when the question is
genuinely "how many characters", which is rarer than it looks; a byte count
is what a digest, an encoding, or a wire format wants.{{else}}- String indexed by BYTES; utf8Len() is rune count. Authority: UPSTREAM. len(), sub(), indexOf(), byte(), foreach all work in bytes, matching upstream builtins; utf8Len() only codepoint-counting member. Accented e: two bytes in UTF-8 -> len() counts 2.{{end}}
{{if .Full}}- A bare as cast coerces in gopherbuzz; upstream checks it statically.
Authority: GOPHERBUZZ. 3.9 as int silently truncates to 3 here; upstream
rejects a cast that cannot hold. as? is the real type test in both; prefer it
when the intent is "test", not "coerce and hope".{{else}}- Bare as cast coerces in gopherbuzz; upstream checks statically. Authority: GOPHERBUZZ. 3.9 as int silently truncates to 3 here; upstream rejects cast that cannot hold. as?: real type test in both; prefer when intent is "test", not "coerce and hope".{{end}}
{{if .Full}}- Compound assignment double-evaluates its target in gopherbuzz; upstream
evaluates it once. Authority: GOPHERBUZZ. The correctness lens flags it as a bug
when the target has a side effect; here it explains why upstream does not
misbehave the same way.{{else}}- Compound assignment double-evaluates target in gopherbuzz; upstream once. Authority: GOPHERBUZZ. Correctness lens flags it as bug when target has side effect.{{end}}
{{if .Full}}- A declared !> error set enforces PRESENCE but not TYPE. Authority:
GOPHERBUZZ. Upstream treats !> ErrType as a real error set. gopherbuzz checks only
that a raising call is propagated or caught, never what it raises.
- Calling a
!> strfunction from one declaring no raise is BZZ1006, "call may raise but is neither declared with !> nor caught". It is a real and common gate: it is what a script invoked by{{cmd "buzz"}}trips on when it calls something likefs\listDirwithout declaring!>. - A function declaring
!> intmay throw astrand nothing objects, so the named type is documentation while the arrow itself is checked. - So never treat a missing
!>as proof a call cannot raise, and never trust the NAMED type. Both were measured against gopherbuzz; this bullet previously said the whole annotation was "parsed and thrown away, nothing enforces it", which sent reviewers straight past every BZZ1006-class defect.{{else}}- Declared!>error set enforces PRESENCE but not TYPE. Authority: GOPHERBUZZ. Upstream treats!> ErrTypeas real error set; gopherbuzz checks only that raising call is propagated or caught, never what it raises. - Calling
!> strfunction from one declaring no raise: BZZ1006, "call may raise but is neither declared with !> nor caught"; real, common gate. - Function declaring
!> intmay throwstr; nothing objects. - -> never treat missing
!>as proof call cannot raise; never trust NAMED type. Both measured against gopherbuzz.{{end}} {{if .Full}}- An anonymous object field shadows a same-named builtin method. Authority: GOPHERBUZZ.rec.mapreads the FIELDmapif the object was built with one, not the builtin.map(). A field named after a common builtin (map,len, ...) deserves a second look.{{else}}- Anonymous object field shadows same-named builtin method. Authority: GOPHERBUZZ.rec.mapreads FIELDmapif object built with one, not builtin.map(). Field named after common builtin (map,len, ...) deserves second look.{{end}} {{if .Full}}- A malformed{...}in a backtick-interpolated string is a parse error upstream; gopherbuzz leaves it as literal text. Authority: GOPHERBUZZ. A placeholder typo fails loudly upstream and silently here (it renders the literal braces). Review a backtick string's interpolations as carefully as code.{{else}}- Malformed{...}in backtick-interpolated string: parse error upstream; gopherbuzz leaves literal text. Authority: GOPHERBUZZ. Placeholder typo fails loudly upstream, silently here (renders literal braces). Review backtick string interpolations as carefully as code.{{end}} {{if .Full}}- Generics are erased at runtime in gopherbuzz; upstream reifies them. Authority: GOPHERBUZZ. A::<T>type argument is parsed and ignored: it serves the static checker, not the VM. Code that branches on a generic type argument at runtime cannot work here.{{else}}- Generics erased at runtime in gopherbuzz; upstream reifies. Authority: GOPHERBUZZ.::<T>type argument parsed, ignored: serves static checker, not VM. Code branching on generic type argument at runtime cannot work here.{{end}} {{if .Full}}-pat.replacereplaces only the first match;pat.replaceAllreplaces every match. Authority: UPSTREAM, mirrored faithfully. Do not flag it or propose "fixing".replace: that would be the divergence.{{else}}-pat.replacereplaces only first match;pat.replaceAllevery match. Authority: UPSTREAM, mirrored faithfully. Do not flag or propose "fixing".replace: that would be divergence.{{end}} {{if .Full}}-str.replacereplaces every occurrence, matching upstream. Authority: UPSTREAM. An earlier gopherbuzz replaced only the first occurrence; that bug is fixed. Never teach or flag the old first-only behavior as current.{{else}}-str.replacereplaces every occurrence, matching upstream. Authority: UPSTREAM. Never teach or flag old first-only behavior as current.{{end}} {{if .Full}}-test "..." {}is genuine upstream syntax, present in upstream's own test suite. Authority: UPSTREAM. Contrastteststaying bindable as a name (the idiom lens), which IS gopherbuzz-only.{{else}}-test "..." {}is genuine upstream syntax, in upstream's own test suite. Authority: UPSTREAM. Contrastteststaying bindable as name (idiom lens): gopherbuzz-only.{{end}} {{if .Full}}-assert,suite,testing, andassertcorehave no upstream counterpart. Authority: PORTABILITY. They are gopherbuzz's own test modules, not a reimplementation of an upstream module. Code leaning on their exact API has no upstream equivalent, by design.{{else}}-assert,suite,testing,assertcore: no upstream counterpart. Authority: PORTABILITY. gopherbuzz's own test modules, not reimplementation of upstream module.{{end}}{{if .Full}}
If you are reviewing gopherbuzz's own implementation
The above applies to reviewing a workspace's magusfile or spells; skip this if that is all you are doing. If the change under review touches gopherbuzz itself, do not quote a conformance score from a code comment; a comment has carried a wrong number before, and a second stale number lived in the test file at the same time. The one authoritative count is the line count of the checked-in upstream-behavior allowlist the conformance test enforces in both directions: it fails if a passing file regresses, and it also fails if a newly-passing file is not added to the list, so the list can only be as stale as the last test run. {{end}}
{{if .Full}}## Running the three lenses{{else}}## Running three lenses{{end}}
{{if .Full}}Spawn three Agent tool calls in a single message (parallel), subagent_type: general-purpose. A subagent cannot invoke the Skill tool, so it needs the section
text, not the skill's name.
{{else}}Spawn three Agent tool calls in single message (parallel), subagent_type: general-purpose.
Subagent cannot invoke Skill tool -> needs section text, not skill name.{{end}}
Prompt template per subagent:
Read the "Lens: <idiom and style|skeptic and correctness|upstream conformance>"
section of the installed {{skill "buzz-review"}} skill (.claude/skills/{{skill "buzz-review"}}/SKILL.md,
or wherever this workspace installed it) and apply it to <target file/dir>.
Establish the mode first (magusfile/spell = always embedded; a standalone
script = check how it is invoked) before applying any strict-mode restriction.
Return findings only: file:line, the authority label, what's wrong, severity.
No code. Do not re-explore beyond <target>.
{{if .Full}}For a whole workspace, name the entry points to walk (magusfile.buzz,
spells/**/spell.buzz); never leave scope open-ended; an unscoped subagent re-derives the workspace layout three
times instead of once.{{else}}Whole workspace: name entry points to walk (magusfile.buzz, spells/**/spell.buzz); never leave scope open-ended.{{end}}
{{if .Full}}## Merging the findings{{else}}## Merging findings{{end}}
{{if .Full}}- Group by lens. Keep the three sections separate: collapsing them loses which
authority backed which finding.{{else}}- Group by lens: three sections separate; collapsing loses which authority backed which finding.{{end}}
{{if .Full}}- Dedupe by file:line within a section only. One line flagged by two lenses for
different reasons stays two findings: two lenses agreeing. The common case is idiom's readability and conformance's portability on the same
namespace-access mistake.{{else}}- Dedupe by file:line within section only. One line flagged by two lenses for different reasons stays two findings: two lenses agreeing.{{end}}
{{if .Full}}- Combined severity table at the end, drawn from all three sections. A
correctness finding with a real side effect (compound-assignment
double-evaluation, a swallowed error that matters) outranks an idiom note.{{else}}- Combined severity table at end, from all three sections. Correctness finding with real side effect (compound-assignment double-evaluation, swallowed error that matters) outranks idiom note.{{end}}
{{if .Full}}- Top 1-3 to action first, opinionated, across all three lenses.{{else}}- Top 1-3 to action first, opinionated, across all three lenses.{{end}}
{{if .Full}}## What this skill does not do{{else}}## Not this skill{{end}}
{{if .Full}}- Magusfile/target/spell contracts (caching, ctx.needs, wards, charms, what makes
an op a service). Use {{skill "buzz-lang"}}.{{else}}- Magusfile/target/spell contracts (caching, ctx.needs, wards, charms, what makes op service): {{skill "buzz-lang"}}.{{end}}
{{if .Full}}- Write code or apply fixes. The output is a merged findings report.{{else}}- Writing code or applying fixes; output is merged findings report.{{end}}
{{if .Full}}- Teach Buzz syntax from scratch. Point a reader to {{skill "buzz-lang"}} when a finding
needs "how do I write it correctly", not "here is what's wrong".{{else}}- Teaching Buzz syntax from scratch. Point reader to {{skill "buzz-lang"}} when finding needs "how do I write it correctly", not "here is what's wrong".{{end}}