# Repo B Local Bridge Orchestrator

> Run credit-first local Agent Bridge orchestration in <PRIVATE_REPO_B> with strict read-only validation, bounded indexing, and fail-closed guidance hints. Excludes MCP Comfy diagnostics. Use when this capability is needed.

- Skill: `tomevault-io/repo-b-local-bridge-orchestrator` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/repo-b-local-bridge-orchestrator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/repo-b-local-bridge-orchestrator/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/repo-b-local-bridge-orchestrator

---


# REPO_B Local Bridge Orchestrator

Use this skill to run a manual local-first Agent Bridge workflow in `<PRIVATE_REPO_B>` and emit validated guidance hints without cloud fallback.

## Scope Boundary

- In scope: `/api/agent/*` readiness/tasks, bounded file indexing, `analyze_files` validation, and guidance hint output.
- Out of scope: `/api/mcp/*` operations and `shim.comfy.*` diagnostics.
- For MCP/Comfy operations, use `$repo-b-mcp-comfy-bridge`.

## Workflow

1. Confirm policy-safe environment (`read_only`, fail-closed).
2. Probe bridge readiness (`/health`, `/api/agent/capabilities`).
3. Build or refresh bounded metadata index on demand.
4. Query candidate files for the selected scope.
5. Submit read-only `analyze_files` task (`allow_write=false`, `dry_run=true`).
6. Validate bridge response with strict schema/evidence/confidence gates.
7. Emit normalized `guidance_hints` JSON and stop on failures.

## Drop-In Hook Files

Copy these files into `<PRIVATE_REPO_B>` before first run:

- `assets/repo_b/tools/local_bridge_orchestrator.py` -> `tools/local_bridge_orchestrator.py`
- `assets/repo_b/tools/local_bridge_validate.py` -> `tools/local_bridge_validate.py`
- `assets/repo_b/tools/local_bridge_orchestrator.example.env` -> `tools/local_bridge_orchestrator.example.env`
- `assets/repo_b/tests/tools/test_local_bridge_orchestrator.py` -> `tests/tools/test_local_bridge_orchestrator.py`
- `assets/repo_b/tests/tools/test_local_bridge_validate.py` -> `tests/tools/test_local_bridge_validate.py`

## Required Environment (PowerShell)

```powershell
$env:REPO_B_LOCAL_ORCH_ENABLED = "1"
$env:REPO_B_LOCAL_ORCH_CONFIDENCE_MIN = "0.85"
$env:REPO_B_LOCAL_ORCH_EVIDENCE_MIN = "2"
$env:REPO_B_LOCAL_ORCH_FAIL_CLOSED = "1"
$env:REPO_B_LOCAL_ORCH_MAX_HINTS = "12"
$env:REPO_B_CONTINUE_BRIDGE_ENABLED = "1"
$env:REPO_B_CONTINUE_MODE = "read_only"
$env:REPO_B_CONTINUE_ALLOWED_ROOTS = "G:\GitHub\<PRIVATE_REPO_B>"
```

## Run Command

Run from `<PRIVATE_REPO_B>` root:

```bash
python tools/local_bridge_orchestrator.py \
  --task ticket-123 \
  --prompt-file .codex/local_prompts/ticket-123.txt \
  --scope connector \
  --json-out .codex/local_bridge/ticket-123.json
```

## Usage Guardrails

Use your real usage history before scale-up:

```bash
python3 "$CODEX_HOME/skills/usage-watcher/scripts/usage_guard.py" analyze \
  --input /path/to/usage.csv \
  --window-days 30 \
  --format table
```

```bash
python3 "$CODEX_HOME/skills/usage-watcher/scripts/usage_guard.py" plan \
  --monthly-budget <credits> \
  --reserve-percent 20 \
  --work-days-per-week 5 \
  --sessions-per-day 3 \
  --burst-multiplier 1.5 \
  --format table
```

Authority reminder:

- Treat `http://127.0.0.1:9000/v1` and `http://127.0.0.1:2337/v1` as authoritative model lanes.
- Treat `http://127.0.0.1:1234/v1` only as a non-authoritative operator surface.

## References

- `references/orchestrator-workflow.md`
- `references/validation-contract.md`
- `references/mx3-phase2-roadmap.md`

## Loopback

If this lane is unresolved, blocked, or ambiguous:

1. Capture current evidence and failure context.
2. Route back through `$skill-hub` for chain recalculation.
3. Resume only after the updated chain returns a deterministic next step.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/grtninja) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

