Analyzer protocol
Skill gustavo-meilus/superpipelines/.agents/skills/superpipelines/parity-test-f/analyzer-protocol
Loop Engineering for AI coding agents, with real review boundaries. Your AI reviewer cannot edit code. Structurally.
npx -y skills add gustavo-meilus/superpipelines --skill analyzer-protocolAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Loaded by the analyzer agent to supply operating protocol and invariants for pull request diff analysis in the parity-test-f pipeline. Not user-invocable.
SKILL.md
4.7 KB, as published. Nobody here has run it
Analyzer — Operational Protocol
<overview> The analyzer agent reads a pull request diff file, identifies common code issues across three categories (null checks, error handling, naming), and writes a structured findings JSON file to the pipeline temp directory. It is the first step of the parity-test-f Sequential pipeline (Pattern 1) on Tier 1d (Codex CLI). The quality bar is: findings must be machine-readable JSON that the reviewer and reporter can consume without ambiguity. </overview>Protocol
<protocol>1. DISCOVER
- Read inputs from the orchestrator dispatch context:
diff_path: path to the pull request diff file to read.findings_output_path: path wherefindings.jsonmust be written.state_path: path topipeline-state.jsonfor status updates.run_id: current run identifier.root: resolved scope root.
- Verify
diff_pathexists and is a readable file. If not: emitNEEDS_CONTEXTwith message: "Diff file not found at{diff_path}. Provide a valid path and re-run." - Read the file content. If the file is empty: emit
DONE_WITH_CONCERNSwith message: "Diff file at{diff_path}is empty. Findings file written with zero issues."
2. PROCESS
Analyze the diff content to identify issues in the following three categories:
-
Null checks: Identify locations where a return value or variable could be null/undefined but is accessed without a guard. Look for patterns such as:
- Direct property access or method call on a value that may be null (e.g.,
obj.propwithout null guard). - Missing optional chaining or null coalescing where the value originates from a function that may return null.
- Record each finding as:
{"category": "null_check", "severity": "high", "location": "{file}:{line}", "description": "{detail}"}
- Direct property access or method call on a value that may be null (e.g.,
-
Error handling: Identify locations where errors or rejected promises are not handled. Look for patterns such as:
- Promise chains without
.catch(). asyncfunctions withouttry/catcharoundawaitcalls that may throw.- Callbacks that receive an error argument but do not check it.
- Record each finding as:
{"category": "error_handling", "severity": "medium", "location": "{file}:{line}", "description": "{detail}"}
- Promise chains without
-
Naming: Identify identifiers that are non-descriptive, misleading, or violate common conventions. Look for patterns such as:
- Single-letter variable names outside of short loops (e.g.,
d,x,tmp). - Names that conflict with well-known conventions (e.g.,
datafor a function,listfor a scalar). - Boolean variables or functions whose names do not begin with
is,has,can, orshould. - Record each finding as:
{"category": "naming", "severity": "low", "location": "{file}:{line}", "description": "{detail}"}
- Single-letter variable names outside of short loops (e.g.,
If the diff contains no changed lines (+ or - prefix) outside of the diff header: assemble a zero-issue findings object and emit DONE_WITH_CONCERNS with message: "Diff file at {diff_path} contains no changed lines. Findings file written with zero issues."
Assemble the findings object:
{
"diff_path": "{diff_path}",
"issue_count": 0,
"issues": []
}
3. DELIVER
- Write
findings.jsontofindings_output_pathusing the Write tool. - Update
pipeline-state.json:- Set
phases[0].status="completed"(or"completed_with_concerns"if zero issues or empty diff). - Set
phases[0].outputs=[findings_output_path].
- Set
- Emit terminal status:
DONE— findings written successfully; at least one issue identified.DONE_WITH_CONCERNS— findings written but diff was empty or contained no changed lines, or no issues were found (note reason).NEEDS_CONTEXT— diff file not found or not accessible.BLOCKED— findings file could not be written (e.g., path not writable).