Логотип Bt Re Controller Merge Ghidra Files

Bt Re Controller Merge Ghidra Files

Спільнота
darkmentorllc
bt-re-controller-merge-ghidra-files

АВТОНОМНЕ об’єднання ДВОХ проєктів Ghidra, у кожному з яких запускали bt-re-controller (зазвичай це та сама прошивка, яку незалежно аналізували за допомогою Claude Opus і Codex GPT), в ОДИН проєкт із консенсусом моделей — без потреби в попередньо обчисленому корпусі перехресного порівняння. На відміну від bt-re-controller-merge-results, який може ЛИШЕ ЗАСТОСОВУВАТИ вердикти, уже обчислені bt-re-cross-compare-with-truth у робочому просторі з фіксованим набором із 6 тестів, цей skill приймає довільні шляхи до двох проєктів і самостійно виконує всі операції: вивантажує дані обох проєктів за допомогою автономного pyghidra, зіставляє їх за (program,address) за допомогою семантичного зіставлювача зі специфікації, а потім ЗАПУСКАЄ CLI ОБОХ МОДЕЛЕЙ У ФОНОВОМУ РЕЖИМІ, щоб кожна оцінила спірні знахідки іншої. Claude запускає `codex exec`, Codex — `claude -p`, незалежно від того, з якого боку почав користувач, тож не потрібно вручну відкривати другий сеанс. Потім skill застосовує спільно підтверджені знахідки ∪ знахідки, ПІДТВЕРДЖЕНІ іншою моделлю, повертає відхилені іншою моделлю знахідки до FUN_<addr> (і захищає ці спірні адреси від подальших етапів пошуку), перехресно порівнює назви полів структур, визначені в обох проєктах у зіставлених місцях використання, і поширює об’єднані типи за допомогою S6/S10/E2 з bt-re-controller. Результат — проєкт <chip>_<modelA>_<modelB>_merged_<date>_p_phase_done та zip-архів; вхідні файли не змінюються. Якщо CLI іншої моделі недоступний, можна скористатися обмеженими режимами: --agree-only (детерміноване об’єднання лише того, у чому обидві моделі вже погодилися) і --self-audit (оцінювання однією моделлю). Використовуйте цей skill, коли користувач просить «об’єднати два файли/проєкти Ghidra», «об’єднати результати реверс-інжинірингу двох моделей», «поєднати ці два результати bt-re-controller» або надає два zip-архіви проєктів для об’єднання. НЕ використовуйте його для обчислення зведеної таблиці порівняння з еталонними даними (bt-re-cross-compare-with-truth), застосування вердиктів для фіксованого тестового набору (bt-re-controller-merge-results) або пошуку обробників із нуля (bt-re-controller).

Огляд

Видавецьdarkmentorllc
Репозиторійbt-re-mad-skillz
Назва навичкиbt-re-controller-merge-ghidra-files
Зірки
36
Форки
3
Файли в пакеті
19
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 19

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: darkmentorllc. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Bt Re Controller Merge Ghidra Files у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/darkmentorllc/bt-re-mad-skillz/tree/main/ClaudeCode/bt-re-controller-merge-ghidra-files
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/darkmentorllc/bt-re-mad-skillz.git /tmp/bt-re-mad-skillz
mkdir -p .claude/skills
cp -r /tmp/bt-re-mad-skillz/ClaudeCode/bt-re-controller-merge-ghidra-files .claude/skills/bt-re-controller-merge-ghidra-files
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Bt Re Controller Merge Ghidra Files в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Bt Re Controller Merge Ghidra Files, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Bt Re Controller Merge Ghidra Files не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

bt-re-controller-merge-ghidra-files

Merge two independently reverse-engineered Ghidra projects of the same firmware image into one consensus project you can open — computing the consensus itself, from nothing but the two projects.

  • Inputs: two .zip / .gpr / project dirs, each already carrying a bt-re-controller analysis.
  • Output: <workdir>/<chip>_<modelA>_<modelB>_merged_<date>_p_phase_done (loose project + .zip).
  • The inputs are never modified — everything runs on working copies.

Why this exists (read this before reaching for the other merge skill)

bt-re-controller-merge-results cannot do this. It is an applier of precomputed verdicts: its merge_lib.py reads bt-re-cross-compare-with-truth's config.json benchmarks map for the project paths, its data/<b>/<b>.final-denominator.md for the apply list, and its results/peer/*/<b>/*.json for the reset list. Hand it two arbitrary projects and it has no paths, no candidates and no verdicts — and because its loaders return {}/[] on missing files, it produces an empty plan and silently merges nothing. It is also hardwired to 6 named benchmarks and to the *_opus4.8_renames / *_gpt5.6_sol_ultra_renames filename shape.

This skill moves the two things that lived upstream — which projects and which names are right — inside. The second one is why both models must run: nobody has graded these findings, so the grading happens now, live, and the skill launches the other side itself.

The two merge skills solve different halves of the same problem:

merge-resultsmerge-ghidra-files
Where the project paths come frombt-re-cross-compare-with-truth/config.json → benchmarks--a / --b on the command line
Where the verdicts come fromalready on disk (final-denominator.md, results/peer/**)computed live, this run
Which binariesthe 6 fixed benchmarks (BIN_ORDER)any pair of same-image projects
Project name shapemust match *_(opus4.8|gpt5.6_sol_ultra)_renames[_date]any; base derived heuristically
Ground truthuses the original-symbols project as an anchornone required
Second modelhuman opens Codex by handlaunched by the skill
Failure with no upstreamsilent empty mergerefuses, or --agree-only / --self-audit

If a bt-re-cross-compare-with-truth workspace does exist for your binaries, prefer merge-results: its verdicts are truth-anchored (the graders read the original vendor symbol at each address), which is strictly better evidence than this skill's model-vs-model audit. Use this skill when there is no such corpus — a new chip, an ad-hoc pair of runs, or a binary with no ground truth.

Prerequisites

run_merge_pair.sh validates the pyghidra/Ghidra/JDK toolchain when it starts and fails with a concrete message for anything missing; verify the model CLIs up front with bash scripts/preflight_peer.sh --role both. Nothing has a personal-path default — set the env vars below.

pyghidra-mcp is a fork. Use XenoKovah/pyghidra-mcp, not upstream — upstream lacks the changes the workflow relies on. The skill runs standalone pyghidra from that checkout's .venv/bin/python, so the venv must have pyghidra installed (build it once after cloning).

Required — always (the deterministic merge: dump → align → plan → apply → finalize)

PrerequisiteVersion / sourceSet up
Ghidra12.x — NationalSecurityAgency/ghidraexport GHIDRA_INSTALL_DIR="/path/to/ghidra_12.x"
JDK21, 64-bit (Ghidra 12 rejects other Java)auto-found via /usr/libexec/java_home -v 21, else export JAVA_HOME=…
pyghidra-mcp (fork)XenoKovah/pyghidra-mcpgit clone …, build its venv (pyghidra installed); export PYGHIDRA_MCP_SRC="$PWD/pyghidra-mcp" (→ $PYGHIDRA_MCP_SRC/.venv/bin/python), or set VENV_PY directly
uv (uvx)—launches pyghidra-mcp for the audit / struct / propagation phases — https://docs.astral.sh/uv/
python33.9–3.14the pure-Python merge phases (align, plan, staging, finalize)
bt-re-controller skillinstalled at ~/.claude/skills/bt-re-controller (or ~/.codex/skills/…)phase 9 (struct propagation, S6/S10/E2) single-sources from it; override with BTRE_CONTROLLER

Required for the peer audit (skip all of this with --agree-only)

The default two-model merge has each side's CLI grade the other, and the struct phase runs on your side — so it needs the model CLIs. --agree-only is fully deterministic (no model CLI at all); --self-audit needs only your own side.

PrerequisiteNotes
Claude Code (claude)for a claude-role side
Codex (codex)for a codex-role side. Ships inside the ChatGPT desktop app (/Applications/ChatGPT.app/Contents/Resources/codex); the codex on PATH is often a dangling symlink to the old standalone app — preflight_peer.sh diagnoses this specifically
Node.js (npx)only when a claude-role side runs an audit — it reaches the MCP server via npx mcp-remote. Codex uses a native HTTP client (no Node)

Full two-model audit needs both CLIs; verify with bash scripts/preflight_peer.sh --role both.

Optional

PrerequisitePurpose
BT_Security_VSC_DB — darkmentorllc/BT_Security_VSC_DBPublic names for vendor-specific commands/events. git clone …; export BTRE_VSC_CORPUS="$PWD/BT_Security_VSC_DB". Without it, VSCs get the nameless hci_*_3F_vsc_<OCF> form.
gtimeout (coreutils)peer_exec.sh --timeout degrades to unbounded without it — macOS has no timeout(1).

The two input projects

  • Both must be the same image — the merge is address-anchored, so an address must mean the same thing in both. Phase 8's dry-run reports fn_apply_missing; it should be ≈0 (the script warns loudly above max(5, 10%)). A large value means different builds, or a re-import at a different base — the merge is meaningless.
  • Both should have had bt-re-controller run, so names follow the convention the aligner recognizes (hci_ctrl_cmd_*, hci_ctrl_evt_*, llcp_*, lmp_*, plus FUNC_EQUIV: plate lines). Names outside the convention are ignored, not merged.

Network exposure — loopback only

The audit/struct phases launch pyghidra-mcp with --host 127.0.0.1 (loopback only). That flag is passed explicitly — pyghidra-mcp's default is already 127.0.0.1, but MCP_HOST (or an upstream default change) could otherwise rebind it to all interfaces, and the server exposes run_inline_script (arbitrary code execution). We ship loopback-only with no option to change it; remote access means editing scripts/mcp_lifecycle.sh yourself, behind an SSH tunnel or something that authenticates.

Platform: macOS + bash 3.2 (the codex-in-ChatGPT path, java_home, and gtimeout note are all macOS). The scripts avoid mapfile / associative arrays / ${var,,} for stock /bin/bash.

The one-liner

bash
bash scripts/run_merge_pair.sh \
  --a ~/rtl8761bu_opus4.8_renames.zip \
  --b ~/rtl8761bu_gpt5.6_sol_ultra_renames.zip \
  --a-model opus4.8 --b-model gpt5.6 \
  --workdir ~/merge_work/rtl8761bu

--a-role / --b-role (default claude / codex) say which CLI produced which project, and therefore which CLI grades which queue. --self says which side you are running from — it only affects who runs the struct phase, so the command is the same from Claude Code or from Codex.

Always start with the two cheap checks:

bash
bash scripts/preflight_peer.sh
bash
bash scripts/run_merge_pair.sh --a A.zip --b B.zip --workdir WD --dry-run

Pipeline

 0 PREFLIGHT    resolve both inputs; verify both CLIs are actually runnable headlessly
 1 INIT         pair workspace + derived merged name
 2 MATERIALIZE  extract both projects once into <workdir>/projects/{a,b}
 3 INVENTORY    standalone pyghidra dump of both: functions + FUNC_EQUIV plate names
 4 ALIGN        align by (program,address); SemanticMatcher decides "same name?"
                  -> agreed[]      both named it equivalently          (no audit needed)
                  -> a_reviews_b[] B's finds A must rule on
                  -> b_reviews_a[] A's finds B must rule on
 5 AUDIT        *** the cross-CLI step ***  A's model grades B's queue, then B's model grades A's,
                each over a pyghidra-mcp server on the project under review     [PEER_AUDIT.md]
 6 PLAN         verdicts -> apply[] / reset[]
 7 STAGE        fresh copy of the base project (+ read-only other)
 8 APPLY        standalone pyghidra: clear excluded base finds, then renames/plate unions/FP resets
 9 STRUCT+PROP  struct-field cross-compare, then bt-re-controller S6 -> S10 -> E2
10 GUARD        deterministically re-force protected function addresses to their Ghidra default
11 FINALIZE     rename (.gpr + .rep in lockstep) + flat zip

Phases 0–4, 6–8, 10–11 are deterministic scripts. Phases 5 and 9 are the model half.

The merge arithmetic

SituationClassEffect
Both projects name the address equivalentlyshared-tpapplied
B found it, A missed it, A CONFIRMeda-fnB's name applied
A found it, B missed it, B CONFIRMedb-fnA's name applied
A's name, B REJECTeda-fpfunction: reset + protect (program,address); plate: remove that line
B's name, A REJECTedb-fpfunction: reset + protect (program,address); plate: remove that line
Either side answered UNSURE, or never ruled—not applied and not classified as an FP; if inherited from the staged base, mechanically cleared

So the merged project is agreed ∪ CONFIRMed − REJECTed. The planner writes a separate clear[] list for non-consensus findings inherited from the staged base; without that sanitation, --agree-only would accidentally retain the entire base analysis instead of the intersection. An unreviewed or uncertain one-sided find is not consensus and does not enter the merge; --allow-unconfirmed overrides that, and marks those rows *-unconfirmed in the plan so the weakening stays visible.

scripts/selftest.sh asserts every row of that table against synthetic inventories — no Ghidra, no model, a few seconds. Run it after touching merge_pair_lib.py.

Contested addresses are left at their Ghidra default on purpose

A REJECTed function name is reset to FUN_<addr> only when that exact name is present, and its address is written to <workdir>/fp_reset_protected.json. Only peer-rejected function addresses are protected; rejecting a name-specific FUNC_EQUIV: plate line does not condemn its enclosing function. ORCHESTRATE_MERGE.md tells S10 to skip that list, and phase 10 re-forces the protected function addresses afterwards. Phase 8's initial reset is exact-name conditional so a stale reset row cannot erase a different confirmed symbol; phase 10 deliberately owns the whole protected address so S10 cannot replace one rejected guess with another. The intent: hand contested addresses to a future full bt-re-controller run to re-analyze from scratch, rather than bake in a single-model guess.

Driving the other model (the part that has no precedent in the other skills)

bt-re-cross-compare-with-truth stops at printing "paste codex_mcp_servers.toml into ~/.codex/config.toml" and waits for the human to open Codex. This skill instead calls scripts/peer_exec.sh, which is symmetric:

Running fromSELF side runsPeer side runs
Claude Codeclaude -p --mcp-config <json> --strict-mcp-config …codex exec --model … -c mcp_servers.…
Codexcodex exec …claude -p …

MCP servers are wired per invocation — Claude via a generated --mcp-config JSON, Codex via its native streamable-HTTP mcp_servers.<name>.url overrides — so a run never mutates ~/.codex/config.toml. Codex's separate MCP approval layer is set noninteractively; audit and other are restricted to an explicit read-only tool allowlist, while only the staged merged server exposes mutation tools.

Everything about the invocation is overridable in config/peer_cmd.env (binaries, models, reasoning effort, extra flags, whether Codex takes the prompt on argv or stdin), and $BTRE_PEER_CMD replaces the command line wholesale.

Verify before a long run: bash scripts/preflight_peer.sh checks that each CLI resolves, is actually executable, reports its version, and greps --help for every flag the launcher intends to pass. It diagnoses a broken symlink specifically: the codex CLI ships inside /Applications/ChatGPT.app/Contents/Resources/codex, the codex on PATH is often a stale link to the older standalone Codex.app, and command -v reports a dangling link as merely "not found". peer_cmd.env falls back to the in-app path automatically.

When the peer CLI is not available

FlagBehaviourConsensus strength
(default)both models gradefull two-model consensus
--self-auditSELF grades both queuessingle-model judgement; plan records self_audited: true
--agree-onlyskip the audit entirelyonly what both projects already agree on; deterministic, no model, no MCP

--agree-only is not a lesser fallback so much as a different product: it is exactly the intersection, and it is the right choice when you want zero fresh model judgment in the result.

File layout

bt-re-controller-merge-ghidra-files/
├── SKILL.md                  ← you are here
├── config/
│   └── peer_cmd.env          ← how each CLI is invoked (edit here, or override from the env)
├── scripts/
│   ├── run_merge_pair.sh     ← one-shot driver, phases 0–11
│   ├── merge_pair_lib.py     ← JVM-free core: resolve · align · verdicts→plan · naming
│   ├── peer_exec.sh          ← runs ONE headless model session (claude -p | codex exec)
│   ├── preflight_peer.sh     ← diagnose whether each CLI can be driven, before a long run
│   ├── dump_inventory.py     ← standalone pyghidra inventory (functions + plates)
│   ├── dump_semantic_state.py ← deterministic logical-state export for reference comparison
│   ├── compare_semantic_state.py ← exact section-by-section semantic comparison
│   ├── apply_merge.py        ← standalone pyghidra: apply plan, reset FPs (multi-program aware)
│   ├── stage_pair.py         ← materialize + stage working copies (inputs never touched)
│   ├── finalize_merge.py     ← rename .gpr/.rep in lockstep + flat zip
│   ├── semantic_match.py     ← spec-procedure name equivalence
│   ├── mcp_lifecycle.sh      ← pyghidra-mcp start/wait/stop
│   └── selftest.sh           ← asserts the merge arithmetic; no Ghidra/model needed
├── prompts/
│   ├── PEER_AUDIT.md         ← the live grading prompt (this skill's novel piece)
│   ├── ORCHESTRATE_MERGE.md  ← inner driver: struct cross-compare then S6→S10→E2
│   └── STRUCT_XCOMPARE.md    ← the struct-field audit
└── references/
    ├── naming_conventions.md
    └── semantic_comparison.md

Idempotency & safety

  • The deterministic mechanics are idempotent — re-running applies the same names, unions the same plate lines, and performs exact-name cleanup safely. Live model judgment is not inherently reproducible. --resume reuses completed verdicts, binds input content hashes and output-affecting configuration, and requires fresh per-run markers before accepting the struct/propagation phase.
  • Inputs are never mutated. Phase 2 copies both projects into <workdir>/projects/{a,b} and everything downstream — including the MCP servers, which take the project lock — reads those.
  • save_program is mandatory in every MCP phase; pyghidra-mcp does not auto-save and the finalize step assumes phases 8–10 are flushed.
  • Full runs fail closed on missing/duplicate/stale verdict rows, peer CLI failure, MCP startup failure, Ghidra edit errors, or a missing struct-phase completion marker. --agree-only explicitly ignores any stale verdict files already present in a resumed workspace.
  • The _p_phase_done suffix is accurate: both inputs already carry a full bt-re-controller analysis, so a downstream bt-re-controller run correctly skips P2..P7 and starts at H1.

Files a run writes

<workdir>/
├── pair.json                     resolved inputs, model labels, merged name
├── projects/{a,b}/               working copies (inputs are never touched)
│   └── materialized.json
├── data/
│   ├── a/inventory_curr.json     dump_inventory.py output for A
│   ├── b/inventory_curr.json     …for B
│   └── audit_candidates.json     agreed[] + a_reviews_b[] + b_reviews_a[]
├── verdicts/
│   ├── a_reviews_b.json          written by A's model
│   └── b_reviews_a.json          written by B's model
├── merge_plan.json               apply[] / reset[] / clear[] + counts
├── fp_reset_protected.json       contested addresses S10 must not name
├── staging/{merged,other}/       in-progress merge + read-only reference
├── logs/                         per-phase logs, resolved prompts, MCP logs
├── <merged_name>/                THE DELIVERABLE (loose Ghidra project)
├── <merged_name>.zip             …and its flat zip
└── deliverable.json

audit_candidates.json

json
{
  "agreed":       [{"address":"0x8001dc10","category":"hci_ctrl_cmd",
                    "a_name":"…","a_source":"function","b_name":"…","b_source":"function"}],
  "a_reviews_b":  [{"address":"0x8002a4c0","category":"llcp_send",
                    "b_name":"…","b_source":"plate","a_name":null,"relation":"b_only"}],
  "b_reviews_a":  [{"address":"0x8002a4c0","category":"llcp_send",
                    "a_name":"…","a_source":"function","b_name":"…","relation":"disagree"}]
}

relation is <side>_only (the other model found nothing here) or disagree (both named it, not equivalently — the sibling name field carries the reviewer's own name for context).

source is function (a real symbol) or plate (a FUNC_EQUIV: <name> line inside a PLATE comment, the convention for a spec element with no standalone function). Both are merged; a plate apply unions its line into the existing plate text rather than overwriting it.

verdict files

json
{"side":"a_reviews_b","auditor":"opus4.8","reviewed":"gpt5.6","reviews":[
  {"address":"0x8002a4c0","category":"llcp_send","b_name":"…","b_source":"plate",
   "verdict":"CONFIRM","confidence":"high","evidence":"…"}]}

verdict ∈ CONFIRM | REJECT | UNSURE (aliases accepted: CONFIRMED/TP/ACCEPT, REJECTED/FP; anything unrecognized is treated as UNSURE). A verdicts/<side>/ directory of per-category files is accepted too, for auditors that prefer to write incrementally.

The program, address, category, name field and source must be copied verbatim from the candidate row — the planner validates that full identity, so a stale or rewritten row is rejected. merge_pair_lib.py plan prints verdicts seen; if that count is far below the candidate count, this is the first thing to check.

Failure modes worth knowing

Address misalignment. The whole merge assumes the two projects are the same image, so an address means the same thing in both. Phase 8's dry-run reports fn_apply_missing — the number of apply targets with no function at that address. It should be ≈0. A large value means the projects are different builds, or one was re-imported with a different base address, and the merge is meaningless. The script warns above max(5, 10%).

An incomplete/stale audit. The planner matches verdict identities back to the candidate queue and reports reviewed, missing, ambiguous, duplicate, and unmatched rows. A missing-program legacy wildcard is accepted only when it identifies exactly one candidate. A full run fails closed unless every candidate has exactly one matching verdict; re-run with --resume after completing/replacing the bad side. In --agree-only, verdict files are ignored explicitly and base-only findings are cleared, yielding the true intersection.

Overclaiming consensus. --self-audit and --allow-unconfirmed both weaken what "consensus" means. Both are recorded in merge_plan.json (self_audited, allow_unconfirmed, and *-unconfirmed provenance tags) so a merged project can always be traced back to how it was graded. Do not describe a --self-audit output as a two-model consensus project.

Codex install. The codex CLI ships inside the ChatGPT desktop app — /Applications/ChatGPT.app/Contents/Resources/codex. The codex on PATH is often a symlink to the older standalone /Applications/Codex.app/…, which dangles; and command -v reports a dangling symlink as simply absent, which sends you looking for a PATH problem that isn't there. config/peer_cmd.env falls back to the in-app path when the PATH name is not runnable, and preflight_peer.sh scans PATH itself and names the broken link and its target.

Codex flag drift. The codex exec flags in config/peer_cmd.env are verified against codex-cli 0.145.0-alpha.27. Notable: the prompt is a positional arg (or -/stdin); -c key=value values are parsed as TOML, which is how native streamable-HTTP MCP URLs and their separate tool-approval policy get injected; there is no --effort flag (it is -c model_reasoning_effort="…"). The launcher uses --ignore-user-config so unrelated global MCP servers cannot break an isolated audit, and restricts audit/other to read-only tools. --sandbox workspace-write plus -C <workdir> is sufficient, since the auditor only writes its verdict JSON into its working root. preflight_peer.sh greps --help for each flag and tells you which are unrecognized by your version rather than failing halfway through a run. Adjust CODEX_EXTRA_ARGS / CODEX_PROMPT_MODE, or set BTRE_PEER_CMD to bypass the builder entirely.

No timeout(1) on macOS. peer_exec.sh --timeout degrades to unbounded with a warning unless gtimeout (coreutils) is installed.

A dry run still writes a disposable workspace. It never edits either input Ghidra project, and it does not apply changes to the staged project, but it does create/materialize pair.json, inventories, candidates, a plan, and staging under --workdir. A non-empty workdir is refused unless --resume is used.

Resume is bound to one run. New workspaces record source content hashes, base/model/role/mode flags, the output name, the selected controller tree, and hashes of its phase-9 prompt dependencies. A resume with different inputs or output-affecting configuration fails instead of reusing stale staging. Generated struct markers are archived and must be regenerated with the current run token.

Reference equality is not guaranteed by a live audit. A historical truth-anchored merge and a fresh model-vs-model audit answer different evidentiary questions. The latter is intentionally nondeterministic and may be a superset/subset even when the deterministic applier is correct. Use a canonical logical-state export (functions/signatures/comments/types/symbols), not ZIP or .gbf hashes, when validating against a reference; repository generations, journals, GUI state and ZIP timestamps are volatile. Export and compare logical state with:

bash
"${GENV[@]}" $PY $S/dump_semantic_state.py PROJECT.gpr state.json
python3 $S/compare_semantic_state.py reference.json state.json

bash 3.2. macOS ships bash 3.2; these scripts avoid mapfile, associative arrays and ${var,,} accordingly. (The sibling bt-re-controller-merge-results/scripts/run_merge.sh uses mapfile, so its all-binaries path does not run on stock macOS bash — pass --binary there.)

Driving the phases by hand

bash
S=~/.claude/skills/bt-re-controller-merge-ghidra-files/scripts
WD=~/merge_work/rtl8761bu
# GHIDRA_INSTALL_DIR = your Ghidra 12.x install; PYGHIDRA_MCP_SRC = your
# XenoKovah/pyghidra-mcp checkout (both exported in your shell).
GENV=(env "GHIDRA_INSTALL_DIR=$GHIDRA_INSTALL_DIR" \
      "JAVA_HOME=$(/usr/libexec/java_home -v 21)")
PY="$PYGHIDRA_MCP_SRC/.venv/bin/python"
bash
python3 $S/merge_pair_lib.py init --a A.zip --b B.zip --a-model opus4.8 --b-model gpt5.6 --workdir $WD
bash
python3 $S/stage_pair.py --workdir $WD --materialize
bash
"${GENV[@]}" $PY $S/dump_inventory.py $WD/projects/a/*.gpr $WD/data/a/inventory_curr.json
bash
python3 $S/merge_pair_lib.py align --workdir $WD
bash
python3 $S/merge_pair_lib.py plan --workdir $WD
bash
python3 $S/stage_pair.py --workdir $WD --base a
bash
"${GENV[@]}" $PY $S/apply_merge.py --project $WD/staging/merged --plan $WD/merge_plan.json --dry-run
bash
python3 $S/finalize_merge.py --workdir $WD

The audit and struct phases need MCP servers; run_merge_pair.sh wires those. To run just one audit side by hand, start a server with mcp_lifecycle.sh start <gpr> <port> <pyghidra_src> <log> headless, substitute the {{…}} tokens in prompts/PEER_AUDIT.md, then call peer_exec.sh --role <claude|codex> --prompt <resolved.md> --servers audit=http://127.0.0.1:<port>/mcp.

Measured behaviour (Realtek RTL8761BU, 2026-07-22)

The imported and repaired v1.2 copy was tested on the independent Opus and GPT projects (the author's per-model benchmark set), using the corresponding merged ground-truth project as the historical reference. The measurements below answer different questions and must not be conflated.

Standalone v1.2 audit path

An actual persisted --agree-only run produced a plan with 310 applies (211 function names and 99 plate findings), 379 base clears (279 function names and 100 plate findings), and no resets. The saved Ghidra project contained exactly those 310 shared findings: zero unexpected and zero missing. This validates the v1.2 base-sanitation fix (clear[]) and the deterministic stage/apply path.

Fresh bidirectional audit (--no-struct)

The independent live audit completed with phase 9 deliberately skipped, isolating verdict planning and the function/plate applier:

measurementresult
A reviews B25 CONFIRM, 4 REJECT
B reviews A318 CONFIRM, 60 REJECT, 1 UNSURE
Plan653 applies (310 shared, 25 a-fn, 318 b-fn); 62 resets (60 function, 2 plate); 1 clear
Recognized findingsreference 681; live 653; intersection 626; missing 55 (all function); extra 27 (3 function, 24 plate)
Full inventory2,890 functions + 118 plate records on both; 63 modified records (58 function names, 5 plate comments)

This is a new model-vs-model judgment, not a regression score or an attempted replay of the historical truth decisions. Fresh verdicts are intentionally nondeterministic and may yield a superset or subset of a truth-anchored result. Because --no-struct skipped phase 9, this run also says nothing about reproduction of the reference's propagated types and signatures.

Attested historical-plan replay

Replaying the historical truth-corpus plan through the repaired v1.2 applier exactly matched the reference's 2,890 function names and 118 full plate comments (3,008/3,008 inventory rows). This confirms that the deterministic name/comment merge can reproduce the historical result when given the same attested decisions.

That replay was not fully semantically identical, because the historical model-driven struct and propagation phases did not record a replayable operation log:

canonical semantic sectionreplayreferencedifference
Functions2,8902,89075 modified: 73 parameter/prototype, 2 local-variable
Defined data15,00414,97628 replay-only and 1 modified
Structures2332341 reference-only and 1 modified

Exact end-to-end semantic reproduction therefore needs an exported type/signature patch (or an equivalent deterministic phase-9 operation log) from the reference. Re-running the models cannot guarantee it.

Raw ZIP, .gbf, repository-generation, journal, and GUI-state bytes are deliberately not the equality target; ZIP timestamps and Ghidra persistence metadata are volatile. Compare canonical logical state with dump_semantic_state.py and compare_semantic_state.py instead.

Testing

bash
bash scripts/selftest.sh

Builds a synthetic pair (exact/semantic agreement, one-sided finds, disagreements, function/plate findings and two programs) plus synthetic verdicts. It asserts merge arithmetic, base sanitation, missing---allow-unconfirmed handling, collision resolution, stale-verdict rejection, multi-program identity, winner-vs-reset safety and plate-protection scope. No Ghidra, JVM, model or network. Run it after any change to merge_pair_lib.py.

What it does not cover, and what therefore still needs a real run to validate: the pyghidra applier against a live project, the MCP server lifecycle, and the two CLI invocations themselves.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Bt Re Controller Merge Ghidra Files?

АВТОНОМНЕ об’єднання ДВОХ проєктів Ghidra, у кожному з яких запускали bt-re-controller (зазвичай це та сама прошивка, яку незалежно аналізували за допомогою Claude Opus і Codex GPT), в ОДИН проєкт із консенсусом моделей — без потреби в попередньо обчисленому корпусі перехресного порівняння. На відміну від bt-re-controller-merge-results, який може ЛИШЕ ЗАСТОСОВУВАТИ вердикти, уже обчислені bt-re-cross-compare-with-truth у робочому просторі з фіксованим набором із 6 тестів, цей skill приймає довільні шляхи до двох проєктів і самостійно виконує всі операції: вивантажує дані обох проєктів за до...

Навіщо використовувати Bt Re Controller Merge Ghidra Files у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Bt Re Controller Merge Ghidra Files — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Bt Re Controller Merge Ghidra Files у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/darkmentorllc/bt-re-mad-skillz/tree/main/ClaudeCode/bt-re-controller-merge-ghidra-files. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Bt Re Controller Merge Ghidra Files?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Bt Re Controller Merge Ghidra Files?

Зі скількома забажаєте. У TypingMind ви можете використовувати Bt Re Controller Merge Ghidra Files із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Bt Re Controller Merge Ghidra Files?

На GitHub цю навичку публікує darkmentorllc. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип openclaw

Auto Qa

openclaw
ОрганізаціяПопулярне

Запускайте автономні кампанії QA, живого тестування та стрес-тестування для всього OpenClaw у незалежних потоках підсистем, із перевіреними виправленнями та звітом із доказами, який можна доповнювати після перерви.

82.2K
391K
Файлів: 5
Відкрити
Логотип openclaw

Autoreview

openclaw
ОрганізаціяПопулярне

Структурований перегляд коду на прямий запит; перевага надається OpenAI/Codex перед Claude.

82.2K
391K
Файлів: 12
Відкрити
Логотип openclaw

Claw Score

openclaw
ОрганізаціяПопулярне

Перевіряйте або оновлюйте документи зі зведеною оцінкою зрілості OpenClaw на основі кореневої таксономії, оцінок зрілості та артефактів із доказами QA, не використовуючи дані maintainer discrawl або звіти про інвентаризацію в репозиторії.

82.2K
391K
Файлів: 51
Відкрити
Логотип openclaw

Clawsweeper

openclaw
ОрганізаціяПопулярне

Використовуйте для будь-якої роботи з ClawSweeper: звітів про перевірку завдань і PR в OpenClaw, завдань із виправленнями, PR із хмарними виправленнями, команд згадки супроводжувача @clawsweeper, довірених автоматичних виправлень і автоматичного злиття, перевірених ClawSweeper, моніторингу GitHub Actions…

82.2K
391K
Файлів: 1
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇