.claude/skills/run-bridge/SKILL.md
Run Bridge — Autonomous Excellence Loop
npx skillsauth add 0xhoneyjar/loa-finn run-bridgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Run Bridge skill orchestrates an iterative improvement loop:
/run sprint-planEach iteration leaves a GitHub trail (PR comments, vision links) and captures speculative insights in the Vision Registry. On completion, Grounded Truth is regenerated and RTFM validation runs as a final gate.
Check danger level (high) — requires explicit opt-in:
run_bridge.enabled: true in .loa.config.yaml| Argument | Flag | Default |
|----------|------|---------|
| depth | --depth N | 3 (max 5) |
| per_sprint | --per-sprint | false |
| resume | --resume | false |
| from | --from PHASE | — |
Invoke bridge-orchestrator.sh with translated flags:
.claude/scripts/bridge-orchestrator.sh \
--depth "$depth" \
${per_sprint:+--per-sprint} \
${resume:+--resume} \
${from:+--from "$from"}
The orchestrator manages the state machine:
PREFLIGHT → JACK_IN → ITERATING ↔ ITERATING → FINALIZING → JACKED_OUT
↓ ↓
HALTED HALTED
For each iteration, the orchestrator emits SIGNAL lines that this skill interprets and acts on:
| Signal | Action |
|--------|--------|
| GENERATE_SPRINT_FROM_FINDINGS | Create sprint plan from parsed findings |
| RUN_SPRINT_PLAN | Execute /run sprint-plan |
| RUN_PER_SPRINT | Execute per-sprint mode |
| PIPELINE_SELF_REVIEW | Detect .claude/ changes → run Red Team against pipeline SDDs (gated by run_bridge.pipeline_self_review.enabled) |
| RED_TEAM_CODE | Run red-team-code-vs-design.sh against SDD sections for implemented code (gated by red_team.code_vs_design.enabled) |
| BRIDGEBUILDER_REVIEW | Invoke Bridgebuilder on changes |
| VISION_CAPTURE | Check findings for VISION/SPECULATION severity → invoke bridge-vision-capture.sh (gated by vision_registry.bridge_auto_capture) |
| GITHUB_TRAIL | Run bridge-github-trail.sh |
| FLATLINE_CHECK | Evaluate flatline condition |
| LORE_DISCOVERY | Run lore-discover.sh → call vision_check_lore_elevation() for visions with refs > 0 (v1.42.0) |
Before the Bridgebuilder review, the pipeline can review changes to itself:
run_bridge.pipeline_self_review.enabled: true in configpipeline-self-review.sh --base-branch main --output-dir <output>
git diff --name-only main...HEAD -- .claude/scripts/ .claude/skills/ .claude/data/ .claude/protocols/.claude/data/pipeline-sdd-map.jsonred-team-code-vs-design.sh against each resolved SDD[Pipeline Self-Review] prefixThis addresses the "pipeline bugs have multiplicative impact" insight — the review infrastructure should examine itself with the same rigor it examines application code.
The Red Team code-vs-design gate (red-team-code-vs-design.sh) runs before the
Bridgebuilder review, after code has been implemented. This placement is deliberate:
RUN_SPRINT_PLAN → PIPELINE_SELF_REVIEW → RED_TEAM_CODE → BRIDGEBUILDER_REVIEW → FLATLINE_CHECK
Why before Bridgebuilder, not after:
Why after implementation, not before:
/red-team skill (design-phase, attacks-only)red-team-code-vs-design.sh (compliance check)Relationship to reviewer/auditor in /run:
/run cycle: implement → /review-sprint → /audit-sprint (per-sprint quality gates)/run gates check sprint-level quality, bridge gates
check iteration-level architectural driftConfiguration:
# .loa.config.yaml
red_team:
enabled: true
code_vs_design:
enabled: true # Enable Red Team code-vs-design in bridge iterations
After BRIDGEBUILDER_REVIEW completes and findings are parsed:
VISION_CAPTURE (conditional):
vision_registry.bridge_auto_capture: true in .loa.config.yamlbridge-vision-capture.sh with findings JSON pathgrimoires/loa/visions/entries/grimoires/loa/visions/index.mdLORE_DISCOVERY (always after VISION_CAPTURE):
lore-discover.sh to extract patterns from bridge reviewsvision-lib.sh and calls vision_check_lore_elevation() for each vision with refs > 0vision_generate_lore_entry() and vision_append_lore_entry()Data flow: bridge finding JSON → vision entry → index update → lore elevation check
When the BRIDGEBUILDER_REVIEW signal fires, execute this 10-step workflow:
Persona Integrity Check: Read persona path from config
(yq '.run_bridge.bridgebuilder.persona_path' .loa.config.yaml, default: .claude/data/bridgebuilder-persona.md).
Compare sha256sum <persona_path> against the base-branch version
(git show origin/main:<persona_path> | sha256sum).
If hashes differ, log WARNING and fall back to the base-branch version.
If base-branch version doesn't exist (first deployment), proceed with local copy.
Persona Content Validation: Verify all 5 required sections exist and are non-empty:
# Bridgebuilder## Identity## Voice## Review Output Format## Content Policy
If any section is missing or empty, log WARNING and disable persona enrichment for
this iteration (fall back to unadorned review).Lore Load: Query lore index for relevant entries from both discovered patterns AND elevated visions (closing the autopoietic loop):
categories=$(yq '.run_bridge.lore.categories[]' .loa.config.yaml 2>/dev/null)
# Load from both patterns.yaml (discovered patterns) and visions.yaml (elevated visions)
Load short fields inline in the review prompt. Use context for teaching moments.
The visions.yaml source ensures that insights which accumulated enough references
through the vision registry feed back into future bridge reviews.
Embody Persona: Include the persona file content in the review prompt as the agent's identity and voice instructions. The persona defines HOW to review, not WHAT to review.
Dual-Stream Review: The review agent produces two streams:
<!-- bridge-findings-start/end --> markers.
Includes enriched fields (faang_parallel, metaphor, teachable_moment, connection)
and PRAISE findings when warranted.Save Full Review: Write complete review (both streams) to
.run/bridge-reviews/{bridge_id}-iter{N}-full.md with 0600 permissions.
Size Enforcement (SDD 3.5.1):
Content Redaction (SDD 3.5.2, Flatline SKP-006): Apply redact_security_content()
with gitleaks-inspired patterns (AWS AKIA, GitHub ghp_/gho_/ghs_/ghr_, JWT eyJ,
generic secrets). Allowlist protects sha256 hashes in markers and base64 diagram URLs.
Post-Redaction Safety Check (Flatline SKP-006): Scan redacted output for known
secret prefixes (ghp_, gho_, AKIA, eyJ). If any remain, block posting
and log error with line reference. The full review is still available in .run/.
Parse + Post: Parse findings via bridge-findings-parser.sh (JSON path with
legacy fallback), then post via bridge-github-trail.sh comment.
After loop termination (flatline or max depth):
ground-truth-gen.sh --mode checksumsReport final metrics from .run/bridge-state.json:
run_bridge:
enabled: true
defaults:
depth: 3
per_sprint: false
flatline_threshold: 0.05
consecutive_flatline: 2
timeouts:
per_iteration_hours: 4
total_hours: 24
github_trail:
post_comments: true
update_pr_body: true
ground_truth:
enabled: true
vision_registry:
enabled: true
auto_capture: true
rtfm:
enabled: true
max_fix_iterations: 1
lore:
enabled: true
categories:
- mibera
- neuromancer
| Error | Cause | Resolution |
|-------|-------|------------|
| "run_bridge.enabled is not true" | Config not set | Set run_bridge.enabled: true |
| "Cannot run bridge on protected branch" | On main/master | Switch to feature branch |
| "Sprint plan not found" | Missing sprint.md | Run /sprint-plan first |
| "Per-iteration timeout exceeded" | Single iteration too slow | Reduce sprint scope |
| "Total timeout exceeded" | Overall time limit hit | Resume with /run-bridge --resume |
/run sprint-plan within bridge iterationstesting
# valid-skill Test skill with valid license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of valid licenses.
testing
# grace-skill Test skill in license grace period for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of licenses in grace period.
testing
# expired-skill Test skill with expired license for unit testing. ## Purpose Used in test_constructs_loader.bats to verify correct handling of expired licenses.
testing
# skill-b Test skill B from test-pack for unit testing. ## Purpose Used in test_pack_support.bats to verify pack validation and skill loading.