Use this skill to run a four-panel adversarial advisory review on any pull request that touches the OpenAPM specification artifact (docs/src/content/docs/specs/openapm-*.md), its inline / sidecar JSON Schemas (docs/src/content/docs/specs/schemas/*.schema.json), or the conformance fixture seed (tests/fixtures/spec-conformance/**). The panel fans out to four spec-ecosystem reviewers (swagger-openapi-editor, oci-distribution-editor, pkgmgr-registry-contract-editor, w3c-tag-architect), each running in its own agent thread, and a spec-editor synthesizer that produces a fold-now / defer-v0.1.1 / defer-v0.2 / reject list plus a ship decision keyed off a 1..10 shocked_meter scale. The orchestrator is the sole writer to the PR: ONE consolidated comment, no verdict labels, no merge gating. The panel is advisory -- it surfaces findings, prioritizes folds, and renders a ship recommendation that the maintainer weighs.
74
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
This skill institutionalizes the two-round adversarial spec review
that produced OpenAPM v0.1 by hand. The panel is FAN-OUT +
SYNTHESIZER. Each panelist runs in its own agent thread (via the
task tool) and returns JSON matching
assets/panelist-return-schema.json. The orchestrator schema-validates
each return, hands all returns to the spec-editor-synthesizer
(also a task thread, returns JSON matching
assets/synthesizer-return-schema.json), runs the linter checklist
in assets/linter-checklist.md, then renders ONE comment from
assets/comment-template.md.
This skill is ADVISORY by design. It does not compute a binary verdict, it does not apply verdict labels, and it does not gate merge. The panel surfaces findings; the maintainer ships.
This skill activates ONLY when the PR diff touches at least one of:
docs/src/content/docs/specs/openapm-*.md (the normative spec
artifact, current and future versions)docs/src/content/docs/specs/schemas/*.schema.json (sidecar JSON
Schemas, if/when the inline Appendix-A schemas are extracted to
files)tests/fixtures/spec-conformance/** (the conformance fixture seed)Edits to any OTHER documentation page MUST NOT trigger this skill.
The maintainer's general docs-sync skill covers those.
APPROVE /
REJECT, no spec-approved / spec-rejected label, no
deterministic verdict computation. The synthesizer returns a
ship_decision (fold_and_ship / needs_revision /
next_brief); this is prose for the human reviewer, never
auto-applied as a label or status check.ship_decision: fold_and_ship REQUIRES
shocked_meter_avg >= 7.0. Below 7.0 the synthesizer MUST emit
needs_revision (single drafter pass on the existing artifact)
or next_brief (another round of panel review with a new brief).
The floor is advisory wording in the comment, not a status check.new_blocking_findings[].length > 0, the synthesizer MUST emit
ship_decision: next_brief regardless of the shocked_meter_avg.
A blocking finding from one panel is not outweighed by three
panels rating the artifact 9/10.add-comment call and one remove-labels call.
The remove-labels call sweeps spec-review (trigger
idempotency). NO add-labels call -- there are no verdict labels.
Panelist subagents and the synthesizer subagent return JSON only
and MUST NOT call any gh write command, post comments, apply
labels, or touch PR state.assets/comment-template.md after all subagents
return and the linter checklist runs..github/instructions/encoding.instructions.md
(if present) and additionally enforces it on the spec artifact via
linter check 1.| Agent | Role | Always active? |
|---|---|---|
| Swagger / OpenAPI Editor | Interface-contract discipline (schemas, $ref hygiene, oneOf discriminators, conformance enumeration) | Yes |
| OCI Distribution Editor | Registry-HTTP rigor (hash envelopes, mirror tolerance, fail-closed extraction, supply-chain threat model) | Yes |
| Package-Manager Registry-Contract Editor | Dependency-resolution rigor (semver dialect pinning, lockfile determinism, transitive conflict policy, reserved-slot defensive MUSTs) | Yes |
| W3C TAG Architect | Web-platform integration / architecture (extensibility, layering, fingerprinting, machine-readable contract surface) | Yes |
| Spec Editor Synthesizer | Same hand that drafted; aggregates panel returns, computes shocked_meter_avg, clusters convergent themes, produces fold-now / defer / reject lists and ship_decision | Yes |
The roster is invariant for the v0.1 lineage. Changing it requires bumping the skill version.
apm-spec-guardian SKILL (orchestrator thread)
|
+------ Wave 0: scope decision (orchestrator-internal) ------+
| classify diff: |
| - editorial-only (tiny patch, single section, no schema |
| change, no fixture add) -> skip Wave 3, run Wave 5 |
| linter only, render lightweight comment |
| - editorial-patch (default for PR-trigger) |
| -> skip Wave 1+2, start at Wave 3 |
| - new-version (operator opt-in via PR body marker |
| `apm-spec-guardian: new-version`) |
| -> run Wave 1 + 2 + 3 + 4 + 5 |
+------------------------------------------------------------+
|
IF new-version mode: run Wave 1 + Wave 2 first
|
Wave 1 (optional, new-version only): task -> spec-editor-synthesizer
acting as ASSESSOR -- reads issue context + corpus +
produces SPEC_BRIEF_v0 (session-state artifact)
Wave 2 (optional, new-version only): task -> spec-editor-synthesizer
acting as DRAFTER -- produces SPEC_DRAFT_v0 from SPEC_BRIEF_v0
|
Wave 3: FAN-OUT via task tool (4 panelists in parallel)
+------+------+--------+------+
v v v v
swagger oci pkgmgr tag
(each returns JSON per assets/panelist-return-schema.json)
|
v <-- S4 schema-validate per return
v <-- on malformed: re-spawn that panelist
v (max 2 attempts; then placeholder)
v
Wave 4: task -> spec-editor-synthesizer
- aggregates findings across 4 panels
- computes shocked_meter_avg
- resolves dissent
- clusters into convergent themes
- emits fold_now[] + defer_v0_1_1[] + defer_v0_2[] + reject[]
- emits ship_decision honoring ship-meter floor + blocker veto
- returns assets/synthesizer-return-schema.json
|
v <-- S4 schema-validate
v
Wave 5: LINTER (mechanical, from assets/linter-checklist.md)
- 11 checks; each MUST pass
- failures append to ship_prose as advisory notes
- linter does NOT change ship_decision; it informs the
human reviewer
|
Wave 6: orchestrator (sole writer)
| |
v v
add-comment remove-labels
(max:1) [spec-review]
(trigger idempotency reset)The orchestrator classifies the diff before spawning any panelist. Decision rules, in order:
apm-spec-guardian: new-version, OR the diff creates a new
docs/src/content/docs/specs/openapm-*.md file (not an edit to
an existing one), classify as new-version. Run Waves 1 -> 2 ->
3 -> 4 -> 5 -> 6.properties keys changed,<a id="req- was added or removed,
classify as editorial-only. SKIP Wave 3 + Wave 4. Run Wave 5
linter on the modified artifact. Render the lightweight
editorial-only branch of assets/comment-template.md (just the
linter result + a one-line "no substantive spec change
detected").Document the decision in the comment header (one line: "Scope: ; diff = +X/-Y lines across N files").
Spawn the following four tasks in PARALLEL via the task tool, one
task per persona:
spec-swagger-editorspec-oci-editorspec-pkgmgr-editorspec-tag-architectEach task prompt MUST:
../../agents/spec-<slug>.agent.md) so the subagent loads its
own scope, lens, and pedigree.assets/panelist-return-schema.json and require the
subagent to emit JSON matching that schema as its FINAL message.new_blocking_findings ONLY for issues that would break a
conformant implementation, leak a security guarantee, or invalidate
a published normative claim. Use new_recommended_findings for
substantive improvements. Use new_nit_findings for one-line
editorial polish. The panel is advisory; nothing you return blocks
merge; pick the severity that honestly matches your signal
strength."round (1 on first pass, 2+ on subsequent rounds in
new-version mode).gh write commands, NO posting
comments, NO label changes, NO touching PR state. JSON return only.Pass all four validated panelist JSON returns to a task invocation
that loads ../../agents/spec-editor-synthesizer.agent.md. The prompt
MUST:
convergence_table, convergent_themes (themes flagged
by 2+ panels), fold_now[] (surgical single-section fixes only),
defer_v0_1_1[] (small patches deferrable to next patch
release), defer_v0_2[] (architectural work requiring a reserved
slot in a future major), reject[] (findings the synthesizer
declines, with rationale), ship_decision, ship_prose,
linter_handoff_notes.sum(panelist.new_blocking_findings) > 0 across all panels,
ship_decision MUST be next_brief.shocked_meter_avg < 7.0, ship_decision MUST be
needs_revision.ship_decision MAY be fold_and_ship.reject[] with rationale.assets/synthesizer-return-schema.json and require JSON
return.ship_decision is prose for the
human reviewer, not a gate. NO gh write commands.Validate the synthesizer return against
assets/synthesizer-return-schema.json. On failure, re-spawn once
with the violation cited.
Run assets/linter-checklist.md against the in-scope artifact set
(spec markdown + schemas + fixtures). The checklist has 11 mechanical
checks; each is a one-liner producing exit code 0 (or empty grep
output where noted). Record pass / fail per check.
Linter outcomes are ADVISORY: a failed check does NOT change the
synthesizer's ship_decision. It DOES surface in the comment as a
"Linter notes" section so the maintainer can decide whether to fold
the fix into the same PR. If ship_decision == fold_and_ship AND
any linter check failed, the comment surfaces the conflict
prominently ("Synthesizer recommends ship; linter found N issues
worth folding first").
Load assets/comment-template.md, fill the placeholders from the
synthesizer + panelist JSON + linter results, and emit it as exactly
ONE comment.
Filling rules:
fold_now[]
verbatim, ordered as returned.<details> blocks if either has more than 3 items.<details> at the bottom.Then sweep the spec-review label via safe-outputs.remove-labels
(idempotent on missing labels). NO add-labels call.
assets/comment-template.md.remove-labels call sweeping [spec-review].add-labels call.gh pr comment, NEVER call gh pr edit --add-label.
They return JSON. The orchestrator is the sole writer.ship_decision: next_brief with a ship_prose note that the
loop budget is exhausted and the maintainer should ESCALATE
(manually decide between drafting a fix or closing the PR).The orchestrator increments and tracks the round counter; subagents receive it as input but MUST NOT trust panel-side memory.
new_blocking_finding and a shocked_meter of 9 means "the spec is
mostly excellent but this one thing would break a conformant
implementation". That blocker still vetoes fold_and_ship. Do not
let the synthesizer average it away.summary field) but MUST NOT appear in the synthesizer's
fold_now[].patch_instruction or in the rendered comment body
outside <details> collapsed sections. The synthesizer auto-rejects
panelist proposals that would add banned tokens to the artifact.gh toolset.
The "subagents must not write" rule is enforced by the prompt
contract in each .agent.md plus the safe-outputs.add-comment.max: 1 fail-soft.apm-review-panel is the general OSS multi-persona review for any
non-trivial PR in the repo. apm-spec-guardian is its narrow,
spec-only sibling: a different persona roster, a different ship
decision schema (shocked_meter instead of stance enum), and a
mandatory linter step. The architectural shape (FAN-OUT +
SYNTHESIZER + single-writer interlock + advisory regime) is
deliberately the same so a contributor reading one can read the
other. Do not merge them; the persona pedigrees and the artifact
type (spec vs code) are different enough that one-size-fits-all
prompts would dilute both.
634f7b6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.