agent-reproduce-align

Compares HTTP and terminal traces between reference agents and Qwen Code to verify behavioral parity.

27.5k|3.0k|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/QwenLM/qwen-code --skill agent-reproduce-align
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-reproduce-align
Source: https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/agent-reproduce-align
Command: npx skills add https://github.com/QwenLM/qwen-code --skill agent-reproduce-align

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

After implementing a feature in Qwen Code that mirrors Codex or Claude Code, you need evidence that the behavior actually matches the reference agent. This Skill runs both agents under the same scenario, captures HTTP and terminal traces, and compares request bodies, tool schemas, and outputs so parity gaps are found systematically instead of by guesswork.

Core Features & Use Cases

  • Paired Trace Capture: Runs the reference agent and Qwen Code in separate capture directories with the same scenario, including before/after snapshots of reference-agent local state.
  • Trace Normalization and Diffing: Normalizes mitm JSONL traces into stable JSON (dropping timestamps, IDs, and auth headers) and diffs request bodies, message roles, tool schemas, and required fields.
  • Prioritized Triage Loop: Ranks differences by severity (missing tools and wrong schemas first, wording last) and drives a patch-rerun-compare iteration loop until must-match fields align.
  • Use Case: You implemented a slash command in Qwen Code modeled on Claude Code. Run both agents through the same prompt, normalize the traces, and confirm the tool schemas and request structure match before shipping.

Quick Start

Ask the agent to run the agent-reproduce-align workflow comparing Qwen Code against codex for the feature you just implemented, using the paired capture script and trace comparison.

Frequently Asked Questions about agent-reproduce-align

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Qwen Code matches Codex or Claude Code behavior?

Run both agents under the same scenario using the paired capture script, then normalize the mitm JSONL traces with normalize_trace.py and diff them with compare_traces.py. The diff highlights missing tools, schema mismatches, and request differences.

How do I compare HTTP traces between two AI coding agents?

Capture each agent's traffic as mitm JSONL, normalize it into stable JSON that drops timestamps and auth headers, then run the comparison script. It reports differences in methods, URL paths, body values, message roles, and tool schemas.

Which reference agents does this alignment workflow support?

The workflow supports codex and claude-code, selected via the REPRO_REFERENCE_AGENT environment variable. The paired runner also captures the reference agent's local state before and after the run when this variable is set.

What trace differences should be fixed first during alignment?

Fix missing requests, absent tool schemas, wrong required fields, and wrong argument names first, as these are high-signal failures. Timestamps, token counts, provider IDs, and harmless wording differences are low priority and usually ignored.

When should I stop iterating on trace alignment?

Stop when Qwen Code passes the user-visible scenario and remaining trace differences are documented as intentional. Byte-for-byte equality is not the goal; only the observable contract that matters for the feature must match.