# Analyzer Protocol

> Loaded by the analyzer agent of parity-test-b to supply its operating protocol. Not user-invocable.

- **Type:** Skill
- **Install:** `agentstack add skill-gustavo-meilus-superpipelines-analyzer-protocol`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [gustavo-meilus](https://agentstack.voostack.com/s/gustavo-meilus)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [gustavo-meilus](https://github.com/gustavo-meilus)
- **Source:** https://github.com/gustavo-meilus/superpipelines/tree/main/.claude/skills/superpipelines/parity-test-b/analyzer-protocol

## Install

```sh
agentstack add skill-gustavo-meilus-superpipelines-analyzer-protocol
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Analyzer — Protocol

> Step 1 of 3 in the `parity-test-b` pipeline. Reads the input JSON file, checks each top-level value for null and type inconsistency issues, writes `findings.json` to the temp directory.

## Inputs (from dispatch context)

- `input_path` — absolute path to the input JSON file.
- `findings_output_path` — absolute path for `findings.json` (temp directory).
- `state_path` — absolute path to `pipeline-state.json`.
- `run_id` — current run ID string.
- `root` — resolved scope root (`{ROOT}`).

## Protocol

### PHASE 1: VALIDATE INPUT

1. Check `input_path` exists. If missing: emit `NEEDS_CONTEXT` — STOP.
2. Parse as JSON. If invalid: emit `BLOCKED` with parse error — STOP.
3. Confirm root is a JSON object. If not: emit `BLOCKED` — STOP.

### PHASE 2: ANALYZE KEYS

For each top-level key:

1. Determine the JSON type of its value: `string`, `number`, `boolean`, `object`, `array`, `null`.
2. Record `is_null: true` if value is JSON null.
3. For arrays: check whether all elements share the same JSON type. Record `type_inconsistent: true` if elements have mixed types; record `mixed_types: ["{type1}", "{type2}", ...]`.
4. Accumulate entry: `{ "key": "...", "type": "...", "is_null": bool, "type_inconsistent": bool, "issue_count": N }`.

### PHASE 3: WRITE FINDINGS

Write `findings.json` to `findings_output_path`:

```json
{
  "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

1. Update `pipeline-state.json`:
   - `phases[0].status` → `"completed"`
   - `phases[0].outputs` → `[{ "findings_path": "{findings_output_path}", "issue_count": {N} }]`
2. Emit: `DONE` / `DONE_WITH_CONCERNS` (issues found) / `NEEDS_CONTEXT` / `BLOCKED`.

## Invariants

- NEVER hardcode platform paths.
- ALWAYS update `pipeline-state.json` before emitting terminal status.
- Emit exactly one terminal status: `DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [gustavo-meilus](https://github.com/gustavo-meilus)
- **Source:** [gustavo-meilus/superpipelines](https://github.com/gustavo-meilus/superpipelines)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-gustavo-meilus-superpipelines-analyzer-protocol
- Seller: https://agentstack.voostack.com/s/gustavo-meilus
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
