adversarial-code-review — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited adversarial-code-review (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Systematically harden the Prism BFCL training and evaluation pipeline through iterative adversarial review rounds. Each round uses an external LLM reviewer to find bugs, which are verified against actual code before applying fixes.
The #1 cause of phantom bug reports is the reviewer analyzing stale code. Never send a pre-fix repomix.
# Generate AFTER applying all fixes for the current round
cd /Users/admin/prism
npx -y repomix \
--include "training/generate_bfcl_training_data.py,training/generate_diverse_sft.py,training/bfcl_eval.py,training/benchmark.py,training/bfcl_grpo_align.py,training/config.py,training/continuous_learning.py,training/run_bfcl_pipeline.sh" \
--compress \
-o training/repomix-rNN.txtThe external reviewer hallucinates already-fixed bugs ~60% of the time. Before applying any fix:
view_file the exact lines citedtraining/ DirectoryNot /tmp — files must persist for audit trail.
Update the round number and "Already-Fixed Bugs" section each round:
# Adversarial Code Review — Round NN
## Context
You are a senior ML engineer performing an adversarial code review of a BFCL (Berkeley Function Calling Leaderboard) training and evaluation pipeline. The pipeline trains a model (Prism-Coder, Qwen 2.5 base) for structured tool-calling with Chain-of-Thought reasoning using custom XML-like tags (`<|synalux_think|>`, `<|synalux_answer|>`, `<|tool_call|>`).
## Objective
Find bugs that cause **silent data corruption, score deflation, training distribution drift, or evaluation integrity failures**. Focus on issues that would directly impact BFCL leaderboard rankings.
## Files Under Review
The attached repomix bundle contains:
- `generate_bfcl_training_data.py` — Primary BFCL training data generator (multi-turn, parallel calls, abstention)
- `generate_diverse_sft.py` — Diverse SFT generator (reasoning traps, self-correction, disambiguation)
- `bfcl_eval.py` — Evaluation harness (tool call parsing, strategy 1/2/3, scoring)
- `benchmark.py` — Benchmark runner (model inference, response evaluation, metrics)
- `bfcl_grpo_align.py` — GRPO/DPO alignment (preference pairs, rejected responses)
- `config.py` — Central configuration (system prompts, tool schemas, paths)
- `continuous_learning.py` — Continuous learning from corrections and upvotes
- `run_bfcl_pipeline.sh` — Orchestration script
## Already-Fixed Bugs (DO NOT re-report these)
[Insert cumulative fix list — see below]
## Review Instructions
1. Read every line of the attached codebase carefully.
2. Cross-reference data generation outputs against evaluation parser expectations.
3. Check tag consistency — every XML tag must have proper opening AND closing.
4. Verify regex correctness — handle edge cases (empty blocks, nested tags, multiline).
5. Check data distribution — no over/under-representation of categories.
6. Validate evaluation scoring — handle all response formats correctly.
7. Check for silent failures — try/except swallowing errors, fallbacks masking bugs.
8. Verify multi-turn integrity — valid message role sequences.
## Output Format
For each bug found, provide:
### N. [SEVERITY] Title
- **File:** filename
- **Line numbers:** approximate
- **Severity:** Critical / High / Medium / Low
- **Root cause:** detailed explanation
- **Proposed fix:** code snippet
Only report bugs with **concrete evidence** from the code.config.py<|tool_call|> / </|tool_call|>)generate_bfcl_training_data.pyABSTENTION_RESPONSES now include <|synalux_think|> blocksbfcl_eval.pyparse_all_tool_calls strips <|synalux_think|> blocks before regex extraction_repair_and_extract operates on clean_text (CoT-stripped)bfcl_eval.pyclean_textgenerate_diverse_sft.py</|synalux_answer|>bfcl_eval.py, bfcl_grpo_align.pyparse_all_tool_calls and _repair_and_extract regex handles unclosed think blocks via (?:</\|synalux_think\|>|$) fallback<|synalux_think|> blocks|$ fallbacksgenerate_diverse_sft.pyREASONING_PROMPTS converted from bare strings to (prompt, answer) tuples with real technical answers across 9 categories (CS fundamentals, frameworks, ML, meta-questions, greetings, keyword traps, session FP, context manager FP, LSTM forget gate FP)build_reasoning_completion(prompt, answer) accepts and injects the answer directlygenerate_bfcl_training_data.pyTOOL_SWITCH_INTERRUPTIONS filtered against active tools schema (prevents hallucination poisoning, falls back to verbal refusal)benchmark.pyevaluate_response think_match and pre_clean regexes updated with unclosed tag fallbackgenerate_bfcl_training_data.pyINTERRUPTION_RESPONSES wrapped in mandatory <|synalux_think|> + <|synalux_answer|> XML tags with reasoning blocksbfcl_eval.pyisinstance(actual_args, dict) guard prevents crash on hallucinated array argumentscontinuous_learning.py<|tool_call|> corrections injected natively without <|synalux_answer|> nestinggenerate_bfcl_training_data.pygenerate_grpo_pairs rejected_response now includes <|synalux_think|> block (prevents DPO from penalizing reasoning as shortcut)| File | Role | Key Functions |
|---|---|---|
config.py | Central config | System prompts, tool schemas, paths |
generate_bfcl_training_data.py | Primary data gen | generate_simple_examples, generate_multi_turn_examples, generate_v4_agentic_examples, generate_grpo_pairs |
generate_diverse_sft.py | Diverse SFT | REASONING_PROMPTS, build_reasoning_completion, self-correction, disambiguation |
bfcl_eval.py | Eval harness | parse_all_tool_calls, _repair_and_extract, strategy 1/1b/2/3, AST scoring |
benchmark.py | Benchmark runner | evaluate_response, model inference, metrics |
bfcl_grpo_align.py | GRPO/DPO alignment | Preference pairs, rejected responses |
continuous_learning.py | CL from corrections | Correction formatting, upvote handling |
run_bfcl_pipeline.sh | Orchestration | Pipeline execution script |
After 22 rounds, these are the most common false positives from external reviewers:
Mitigation: Always regenerate repomix AFTER fixes. Always verify claims against actual code before applying.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.