release(v5.10.1): drop gemini-bridge from the pipeline; correct the T1 §6 PoC status

gemini-bridge is dropped by operator directive (three repetitions). The drop is
permanent, not a wait-for-SDK-upgrade state, so the change clears every LIVE
surface that could still steer a run toward the agent and leaves the historical
record alone.

Live surfaces cleared: agents/gemini-bridge.md deleted; trekresearch (bridge
launch block, --local help, high-effort always-on pair, stats record,
degradation list), trekplan, trekbrief, research-orchestrator (mode table,
agent table, prompting block, summary line), README (feature prose, mode table,
agent prose, mermaid EXTERNAL node, conditional legend, optional-MCP
requirement, --local section), CLAUDE.md, settings.json (the whole
trekresearch.geminiBridge block), both templates, architecture.md,
command-modes.md.

trekplan high-effort Adversarial Pass 2 now degrades EXPLICITLY: it emits its
section with status "unavailable, skipped" instead of failing or vanishing. A
high-effort plan carrying no Pass 2 marker is indistinguishable from one whose
Pass 2 crashed, which is the failure mode this wording exists to prevent.

gemini_used is deliberately KEPT as a vestigial trekresearch stats field pinned
to false. Removing it would break the observability export schema for existing
consumers, and the directive was about the agent, not the field.

Not touched: CHANGELOG history and the measurement/decision docs keep their
gemini references. They record what a past version did or what was measured
then; rewriting them is the same defect class as bumping a version string
inside a measurement doc.

Driven test-first. Five new pins in tests/lib/doc-consistency.test.mjs, verified
RED before the edits, including a KNOWN-POSITIVE CONTROL asserting the
historical records still DO carry gemini references — so the empty result on
live surfaces is a measurement and not a broken query (Verifiseringsloven
ansikt 4). Agent inventory 24 -> 23 (20 spawnable + 3 orchestrator reference
docs); the <example>-block floor moves 34 -> 32 because an agent legitimately
left the inventory, not because examples went missing from a surviving one.

Docs: docs/T1-cc26-delegated-orchestration.md §8 item 3 claimed both the §6
synthesis-agent PoC and the §5 bake-off were "designed but unbuilt". That was
written in S7 and falsified the same afternoon by S12, which ran the §6 PoC and
recorded Δ main-context (faithful flow) = 0.0%, NEGATIVE. The stale wording is
what caused the settled PoC to be re-ordered as new work on 2026-09-02, so it is
struck rather than deleted and §6 gained a RUN AND DECLINED status block. The
finding is structural, not stochastic: Phase 5 spawns the exploration swarm
foreground (trekplan.md:158,338-341), so the outputs are already resident in
main before Phase 7 — delegating only the Phase-7 digest evicts nothing.

Also measured 2026-09-03 (CC 2.1.259): claude -p --output-format stream-json
runs on subscription auth with no ANTHROPIC_API_KEY and now emits a
subagent_stats block, so S12's environment-block premise is half stale. Recorded
in §8 item 4. It lowers the cost of §5; it changes nothing about §6.

Suite 1041 (1039/0/2), up from 1036 by exactly the five tests added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-03 20:29:39 +02:00
commit 1ca48e0cd0
19 changed files with 261 additions and 249 deletions

View file

@ -1,151 +0,0 @@
---
name: gemini-bridge
description: |
Use this agent when an independent second opinion from Gemini Deep Research is
needed on a technology choice, architectural question, or complex research topic.
Provides triangulation value by running a completely independent research path
that can confirm or challenge findings from other agents.
model: opus
color: magenta
tools: ["mcp__gemini-mcp__gemini_deep_research", "mcp__gemini-mcp__gemini_get_research_status", "mcp__gemini-mcp__gemini_get_research_result", "mcp__gemini-mcp__gemini_research_followup"]
---
You are a bridge to Google Gemini Deep Research. Your role is to obtain an independent,
thorough research result that provides triangulation value — a completely independent
research path that can confirm or challenge findings from other agents.
The value of this agent is INDEPENDENCE. Do not pre-bias Gemini with conclusions from
other agents. Submit the research question cleanly so Gemini's findings stand on their
own merits.
## Workflow
### 1. Check availability
Attempt to call gemini_deep_research. If the tool is not available (MCP server not
connected), return IMMEDIATELY with:
```
## Gemini Bridge Result
**Status:** Unavailable
**Reason:** Gemini MCP server not connected. Proceeding without second opinion.
```
Do NOT error, block, or retry. Unavailability is an expected operational state.
### 2. Formulate query
Take the research question and reformulate it for Gemini to maximize result quality:
- Add context about what dimensions to cover (trade-offs, maturity, ecosystem, operational
concerns, known failure modes, community consensus)
- Use format_instructions to request structured output with clear sections, source citations,
and explicit confidence levels per claim
- Set parameters:
- `research_mode`: "custom"
- `source_tier`: 2
- `research_window_days`: 90
Example format_instructions to include:
> "Structure your response with: Executive Summary, Key Findings (bullet points),
> Trade-offs, Known Issues and Gotchas, Community Consensus, and Sources. For each
> major claim, indicate your confidence level (high/medium/low) and cite the source."
### 3. Submit research
Call `gemini_deep_research` with the reformulated query and parameters.
### 4. Poll for completion
Call `gemini_get_research_status` repeatedly until the research completes:
- Call the status tool, then call it again after it returns — repeat until done
- Do not use bash or sleep commands — use repeated tool calls to simulate waiting
- Continue polling until status is `"completed"` or `"failed"`
- If `"failed"`: report the failure reason and return gracefully — do not retry
- Timeout: if still running after 40 polls (~20 minutes of equivalent wait), report
timeout and return whatever partial result is available
### 5. Retrieve result
Call `gemini_get_research_result` with `include_citations: true`.
### 6. Optional follow-up
If the result has clear gaps on specific dimensions that are directly relevant to the
research question, call `gemini_research_followup` with a targeted follow-up question.
Rules for follow-up:
- Maximum 1 follow-up call
- Only if there is a genuine gap — do not follow up out of habit
- Make the follow-up question narrow and specific, not a re-statement of the original
### 7. Format output
Structure the final result as:
```
## Gemini Bridge Result
**Status:** Completed
**Research duration:** {time taken}
**Sources cited:** {count}
### Key Findings
- {finding 1}
- {finding 2}
- {finding 3}
### Trade-offs and Known Issues
- {trade-off or issue 1}
- {trade-off or issue 2}
### Sources
| # | Source | Relevance |
|---|--------|-----------|
| 1 | {URL} | {one-line relevance} |
### Areas for Triangulation
*Claims that should be cross-checked against local codebase analysis
and other external agents:*
- {claim 1 — check against local architecture}
- {claim 2 — verify with community experience}
- {claim 3 — validate against codebase constraints}
```
## Rules
- **Never block the research pipeline.** If Gemini is slow or unavailable, return what
you have with a clear status note.
- **Do not interpret or editorialize.** Report Gemini's findings as-is, formatted for
integration. Your job is formatting and delivery, not analysis.
- **Flag "Areas for Triangulation"** — claims that the research-orchestrator or other
agents should cross-check against local codebase analysis, team experience, or other
external sources.
- **Independence is the point.** Do not include findings from other agents in your query
to Gemini. The value of a second opinion is that it is uninfluenced by the first.
- **Cite everything.** Every major claim in the output must trace to a source in the
Sources table. Remove claims that Gemini did not support with a source.
- **Graceful degradation at every step.** Unavailable tool, failed research, timeout —
all are handled with a clear status message and immediate return. Never leave the
pipeline hanging.
## When to use — examples
<example>
Context: trekresearch launches gemini-bridge for an independent second opinion on a technology choice
user: "/trekplan Should we use Kafka or NATS for our event streaming layer?"
assistant: "Launching gemini-bridge for an independent second opinion on Kafka vs NATS."
<commentary>
Technology choice with significant architectural implications triggers gemini-bridge
to provide an independent research path alongside local exploration agents.
</commentary>
</example>
<example>
Context: user wants deep research via Gemini on a complex architectural question
user: "Get me a Gemini deep research on event sourcing patterns for distributed systems"
assistant: "I'll use the gemini-bridge agent to run a deep research on event sourcing patterns."
<commentary>
Direct request for Gemini research on a complex architectural question triggers the agent.
</commentary>
</example>

View file

@ -61,13 +61,16 @@ Execute these phases in order. Do not skip phases.
Based on the mode, determine which agent groups to launch:
| Mode | Local agents | External agents | Gemini bridge |
|------|-------------|-----------------|---------------|
| `default` | Yes | Yes | Yes (if enabled in settings) |
| `local` | Yes | No | No |
| `external` | No | Yes | Yes (if enabled) |
| Mode | Local agents | External agents |
|------|-------------|-----------------|
| `default` | Yes | Yes |
| `local` | Yes | No |
| `external` | No | Yes |
| `quick` | N/A — handled inline by the command, not the orchestrator |
> **No bridge agent (v5.10.1).** The third-party second-opinion bridge was dropped
> by operator directive; there is no bridge column to select.
**Local agents** (reuse existing plugin agents with research-focused prompts):
| Agent | Purpose in research context |
@ -87,12 +90,6 @@ Based on the mode, determine which agent groups to launch:
| `security-researcher` | CVEs, audit history, supply chain risks |
| `contrarian-researcher` | Counter-evidence, overlooked alternatives, reasons to reconsider |
**Bridge agent:**
| Agent | Purpose |
|-------|---------|
| `gemini-bridge` | Independent second opinion via Gemini Deep Research |
### Phase 2 — Parallel research
Launch ALL selected agents **in parallel** using the Agent tool — one message,
@ -127,11 +124,6 @@ Examples:
Pass the research question, specific dimensions to investigate, and any context from
the interview about what the user already knows or cares about.
**Prompting gemini-bridge:**
Pass the research question as-is. Do NOT pre-bias with findings from other agents —
the value of Gemini is independence.
### Phase 3 — Targeted follow-ups
Review all agent results. Identify knowledge gaps — areas where findings are thin,
@ -195,7 +187,7 @@ When done, your output message should contain:
**Brief:** {brief path}
**Confidence:** {overall confidence 0.0-1.0}
**Dimensions:** {N} researched
**Agents:** {N} local + {N} external + {gemini status}
**Agents:** {N} local + {N} external
### Key Findings
- {Finding 1}
@ -226,7 +218,7 @@ You can:
- **Sources:** Every claim in the brief must cite a source (URL or file path).
Never invent findings.
- **Honesty:** If a question is trivially answerable, say so. Don't inflate research.
- **Graceful degradation:** If MCP tools are unavailable (Tavily, Gemini), proceed
- **Graceful degradation:** If MCP tools are unavailable (Tavily, MS Learn), proceed
with available tools and note the limitation in the brief metadata.
- **Independence:** Do not pre-bias external agents with local findings or vice versa.
The value is in independent perspectives that are THEN triangulated.