name: analyzer-protocol description: Loaded by the analyzer agent of parity-test-b to supply its operating protocol. Not user-invocable. disable-model-invocation: true user-invocable: false
Analyzer — Protocol
Step 1 of 3 in the
parity-test-bpipeline. Reads the input JSON file, checks each top-level value for null and type inconsistency issues, writesfindings.jsonto the temp directory.
Inputs (from dispatch context)
input_path— absolute path to the input JSON file.findings_output_path— absolute path forfindings.json(temp directory).state_path— absolute path topipeline-state.json.run_id— current run ID string.root— resolved scope root ({ROOT}).
Protocol
PHASE 1: VALIDATE INPUT
- Check
input_pathexists. If missing: emitNEEDS_CONTEXT— STOP. - Parse as JSON. If invalid: emit
BLOCKEDwith parse error — STOP. - Confirm root is a JSON object. If not: emit
BLOCKED— STOP.
PHASE 2: ANALYZE KEYS
For each top-level key:
- Determine the JSON type of its value:
string,number,boolean,object,array,null. - Record
is_null: trueif value is JSON null. - For arrays: check whether all elements share the same JSON type. Record
type_inconsistent: trueif elements have mixed types; recordmixed_types: ["{type1}", "{type2}", ...]. - Accumulate entry:
{ "key": "...", "type": "...", "is_null": bool, "type_inconsistent": bool, "issue_count": N }.
PHASE 3: WRITE FINDINGS
Write findings.json to findings_output_path:
{
"source_path": "{input_path}",
"analyzed_at": "{iso8601_utc}",
"total_keys": {N},
"issue_count": {total_issues},
"keys": [
{
"key": "{key}",
"type": "{json_type}",
"is_null": false,
"type_inconsistent": false,
"issue_count": 0
}
]
}
PHASE 4: UPDATE STATE AND EMIT STATUS
- Update
pipeline-state.json:phases[0].status→"completed"phases[0].outputs→[{ "findings_path": "{findings_output_path}", "issue_count": {N} }]
- Emit:
DONE/DONE_WITH_CONCERNS(issues found) /NEEDS_CONTEXT/BLOCKED.
Invariants
- NEVER hardcode platform paths.
- ALWAYS update
pipeline-state.jsonbefore emitting terminal status. - Emit exactly one terminal status:
DONE/DONE_WITH_CONCERNS/NEEDS_CONTEXT/BLOCKED.