Adversarial systems, concurrency, memory-model, and architecture code review protocol.
SkillScore76Maintained
Automatic
◆Coding pack
Last verified 9/19/2026
What it changes
Passed 17 of 22 test cases with the skill, and 5 of 22 without it.
Without skill24%
With skill76%
Checks it passed that the model alone missed
Categorizes doc-comment mismatches under api-contract.
Categorizes non-contending test cases under test-coverage.
Categorizes tautological test findings under test-coverage.
and 12 more in the full report
13 fixed6 passed either way6 still failing0 broke
Pass-rate lift
+52 pp
Tokens
+64%
Agent turns
0%
Response time
+7%
Model gemini-3.6-flashMeasured 9/19/2026v119 of 25 cases passed with skill · 22 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 13
Prompt
A reviewer wants to structure the summary section of a Filament code review using markdown section headers `### Blocker`, `### Intent`, `### False Positives`, and `### Cleanup`. Is this structure valid under standard protocol constraints?
What was checked, without and with the skill
Checked
Without skill
With skill
Rejects markdown section headers for the review summary section.
Missed
Passed
Requires summary list items formatted with bold headers like - **The Blocker**:
Missed
Passed
case-19 · gemini-3.6-flash · 9/19/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md117 linessingle file
Systems & Concurrency Code Review Protocol
This skill defines the mandatory protocol for conducting rigorous, adversarial code reviews on Filament source code. Standard single-pass reviews focusing on style or superficial idioms are strictly prohibited. Reviews must prioritize correctness, concurrency invariants, memory models, lifecycle safety, API contracts, arithmetic boundaries, and test integrity.
1. Core Review Philosophy
Adversarial Stance: Assume the code contains subtle race conditions, memory ordering errors, and unhandled edge cases until proven otherwise.
Zero Superficial Feedback: Do not waste review bandwidth on formatting, whitespace, or obvious variable naming unless it actively impairs correctness or violates CODE_STYLE.md.
Cross-Function & State-Machine Tracing: Never review functions in isolation. Concurrency bugs (e.g., lost wakeups, ABA races) live at the intersection of multiple functions (e.g., put(), wakeOne(), waitForWork(), loop()). Trace full execution state machines across caller/callee boundaries.
False-Positive Elimination: Before reporting a finding, attempt to disprove it by searching for compensating synchronization, refcount credits, or structural invariants elsewhere in the file or call chain.
2. Mandatory Analytical Lenses (The 6 Pillars)
Every review must systematically evaluate the change through these six analytical lenses:
Inspect every std::atomic operation and its std::memory_order (relaxed, acquire, release, acq_rel, seq_cst).
Verify barrier directions: memory_order_release prevents prior memory writes from sinking below the release store, but does not prevent subsequent non-atomic writes from floating above it. memory_order_acquire prevents subsequent reads from floating above the acquire load, but does not protect prior reads.
Lost Wakeups & Condition Variable Invariants:
Check if condition variable signals (notify_one() / wakeOne()) or waiting loops (wait()) are gated by unlocked relaxed loads (e.g., relaxed check of waiter counts).
Verify that the happens-before relationship between producer publication and consumer sleep is never bypassed.
ABA, Slot-Reuse & Torn Reads:
In wait-free, lock-free, or seqlock data structures, trace multi-step read-then-validate patterns.
Ensure that slot identity (e.g., thread ID, generation counter) is re-validated after copying payload data, not just the slot state, to prevent returning payload data read during an erase/re-emplace.
Data Races in Lock-Free / Wait-Free APIs:
Verify that plain (non-atomic) fields are never read concurrently with plain writes in other threads without a formal synchronization barrier.
Deadlock & Lock Invariants:
Verify lock acquisition order. Ensure code uses utils::Mutex / utils::Condition with LockGuard const as mandated by skills/cpp_static_thread_safety.
Check all numeric assignments and casts between types of differing bit widths (e.g., uint32_t $\to$ uint16_t, size_t $\to$ uint32_t).
Determine what happens when values equal or exceed the narrower type's capacity (e.g., exact multiples of 65,536 truncating to 0 and inducing infinite loops).
Boundary Conditions:
Evaluate behavior at count == 0, count == 1, $2^{16}$, $2^{32}$, INT_MAX, and overflow/underflow points.
Clean and build Filament targets for development, debugging, and production. Use this skill whenever you need to clean the workspace or compile desktop targets.