Skip to content

docs: fix documentation inaccuracies flagged by Codex in PR #115 - #117

Merged
study8677 merged 2 commits into
mainfrom
cursor/fix-doc-inaccuracies-0903
Aug 27, 2026
Merged

docs: fix documentation inaccuracies flagged by Codex in PR #115#117
study8677 merged 2 commits into
mainfrom
cursor/fix-doc-inaccuracies-0903

Conversation

@study8677

@study8677 study8677 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all seven documentation inaccuracies that Codex flagged during review of PR #115 (now on main). These are docs-only changes verified against current engine code.

Checklist of Fixes

✅ 1. Generic host runner requires RB_HOST_COMMAND

Issue: RB_HOST_RUNNER=generic without RB_HOST_COMMAND raises HostRunnerError (verified in engine/repobrain_engine/hub/host_runner.py line 316-318). Docs presented generic as drop-in alternative to codex.

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — Configuration section
  • docs/zh/SWARM_PROTOCOL.md — Configuration section
  • docs/es/SWARM_PROTOCOL.md — Configuration section

Change: Added concrete trae-cli example with RB_HOST_COMMAND template and RB_HOST_OUTPUT_MODE=file as documented in README.


✅ 2. Ask fallback order incorrect

Issue: Docs described structured facts, agent.md, and legacy swarm as three sequential peer tiers. Actual code (verified in ask_pipeline.py):

  • If RB_HOST_RUNNER set: _ask_with_host_runner only (no Router/ModuleAgent/GitAgent)
  • Else: _ask_with_structured_facts tries _ask_with_agent_md then _ask_with_legacy_facts internally, then falls back to _ask_with_legacy_swarm if None returned

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — Fallback Strategy section
  • docs/zh/SWARM_PROTOCOL.md — Fallback Strategy section
  • docs/es/SWARM_PROTOCOL.md — Fallback Strategy section

Change: Rewrote fallback section to match actual code flow with two-tier structure: host-runner bypass + API-based nested fallback.


✅ 3. RB_LOG_LEVEL does not exist

Issue: Neither engine nor CLI reads RB_LOG_LEVEL. Grepped entire codebase — no such env var exists.

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — Example 3: Debugging Usage
  • docs/zh/SWARM_PROTOCOL.md — Example 3: Debugging Usage
  • docs/es/SWARM_PROTOCOL.md — Example 3: Debugging Usage

Change: Removed fake RB_LOG_LEVEL=DEBUG examples. Replaced with real debugging approach: checking refresh status with rb report and using built-in streamed progress.


✅ 4. .repobrain/config.json ignore patterns do not exist

Issue: No reader/schema for that file exists. Scan exclusions are hard-coded in hub/scanner.py via SKIP_DIRS constant.

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — Performance Tips section
  • docs/zh/SWARM_PROTOCOL.md — Performance Tips section
  • docs/es/SWARM_PROTOCOL.md — Performance Tips section

Change: Removed advice to create .repobrain/config.json for exclusions. Mentioned that skip dirs are built-in and referenced the constant location.


✅ 5. Phase 9 status conflict

Issue: Top table says Phase 9 complete, but later "Phase 9: Enterprise Core (In Progress)" section lists orchestrated flows, distributed fleet, etc. as current work instead of future ideas.

Fixed in:

  • docs/en/ROADMAP.md — Phase 9 section header and subsection labels
  • docs/zh/ROADMAP.md — Status table (changed "进行中" to "完成")

Change:

  • English: Renamed section to "Phase 9: Enterprise Core (Completed with Future Extensions)" and relabeled subsections as "Future Extension" instead of "Phase 9A/9B/9C"
  • Chinese: Fixed table cell from "进行中" (In Progress) to "完成" (Complete) to match section heading ✅

Note: Spanish docs/es/ROADMAP.md was already correct (table shows "Completa") — no changes needed.


✅ 6. Qualify Ask Swarm in host-runner mode

Issue: When RB_HOST_RUNNER is set, ask is a single local CLI call (_ask_with_host_runner in ask_pipeline.py line 212). It does not build Router/ModuleAgents/GitAgent or do handoffs.

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — New "Host-Runner Mode (No Multi-Agent Routing)" subsection
  • docs/zh/SWARM_PROTOCOL.md — New "Host-Runner Mode (No Multi-Agent Routing)" subsection
  • docs/es/SWARM_PROTOCOL.md — New "Host-Runner Mode (No Multi-Agent Routing)" subsection

Change: Added explicit subsection documenting that host-runner mode uses single-turn local answer, not full Router-Worker collaboration.


✅ 7. ModuleAgents do not load structured facts.json

Issue: build_ask_swarm()_read_module_knowledge() reads agents/*.md, grouped markdown, or legacy modules/*.md (verified in code). Structured *.facts.json claims are consumed by structured/legacy-facts ask path, NOT injected into ModuleAgents.

Fixed in:

  • docs/en/SWARM_PROTOCOL.md — ModuleAgent description
  • docs/zh/SWARM_PROTOCOL.md — ModuleAgent description
  • docs/es/SWARM_PROTOCOL.md — ModuleAgent description

Change: Corrected description to say ModuleAgents read agents/*.md knowledge, not structured facts.json. Clarified that structured facts are used by separate ask path.


Verification

All fixes verified with grep searches:

grep -r "RB_LOG_LEVEL" docs/                     # ✅ No results
grep -r "\.repobrain/config\.json" docs/         # ✅ No results  
grep -r "engine/engine/" docs/                   # ✅ No results (already fixed before merge)
grep -rE "three.tier|three-tier|三层" docs/      # ✅ No results

Files Changed

  • docs/en/ROADMAP.md — 1 issue fixed
  • docs/zh/ROADMAP.md — 1 issue fixed (table status consistency)
  • docs/en/SWARM_PROTOCOL.md — 6 issues fixed
  • docs/zh/SWARM_PROTOCOL.md — 6 issues fixed
  • docs/es/SWARM_PROTOCOL.md — 6 issues fixed
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 27, 2026 08:28
Fix all seven documentation inaccuracies across en/zh/es docs:

1. Generic host runner: Add required RB_HOST_COMMAND example
   - Show concrete trae-cli template instead of claiming generic is drop-in
   - SWARM_PROTOCOL.md: Configuration section

2. Ask fallback order: Correct pipeline flow description
   - Document actual code behavior: host-runner bypasses swarm entirely
   - Structured facts path tries agent.md then legacy-facts internally
   - SWARM_PROTOCOL.md: Fallback Strategy section

3. Remove non-existent RB_LOG_LEVEL env var
   - No such env var exists in engine or CLI
   - SWARM_PROTOCOL.md: Example 3 debugging section

4. Remove .repobrain/config.json ignore pattern advice
   - No reader/schema exists for this file
   - Scan exclusions are hard-coded in hub/scanner.py
   - SWARM_PROTOCOL.md: Performance Tips section

5. Fix Phase 9 status conflict in ROADMAP.md
   - Mark Phase 9 as completed with productization achievements
   - Relabel future ideas (sandbox, DAG, fleet, observability) as extensions
   - ROADMAP.md: Phase 9 section (en only; zh/es already correct)

6. Qualify Ask Swarm behavior in host-runner mode
   - Document single local CLI call, no Router/ModuleAgent/GitAgent
   - SWARM_PROTOCOL.md: New Host-Runner Mode subsection

7. Correct ModuleAgent knowledge sources
   - ModuleAgents read agents/*.md, not structured facts.json
   - Structured facts consumed by separate ask path
   - SWARM_PROTOCOL.md: ModuleAgent description

All changes verified via grep for residual mentions.

Co-authored-by: JingWen Fan <study8677@users.noreply.github.com>
Table showed '进行中' (In Progress) while section heading shows ✅.
Changed to '完成' (Complete) for internal consistency.

Spanish version already correct (Completa).

Co-authored-by: JingWen Fan <study8677@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 954cc5a8af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/en/SWARM_PROTOCOL.md
### Host-Runner Mode (No Multi-Agent Routing)

When `RB_HOST_RUNNER` is set (`codex` or `generic`), Ask uses `_ask_with_host_runner` exclusively:
- **Single local CLI invocation** with project context and question

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the retrieval-only host-runner exception

When RB_ASK_RETRIEVAL_FIRST=2 and retrieval finds evidence, _ask_with_host_runner returns that evidence before calling run_host_runner, so this path performs zero local CLI invocations and does not return an answer from the host CLI. Qualify the single-invocation claim to avoid misdescribing this supported configuration.

Useful? React with 👍 / 👎.

Comment thread docs/en/SWARM_PROTOCOL.md
Comment on lines +160 to +162
1. **`_ask_with_structured_facts`** (when `.repobrain/map.md` and `agents/*.md` exist):
- First tries `_ask_with_agent_md` — Routes via map.md to agent.md knowledge
- Falls back to `_ask_with_legacy_facts` within the same call — Uses legacy `*.facts.json` if available

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the legacy-facts-only structured path

For an older knowledge base containing module_registry.json, status.json, and modules/*.facts.json but no map.md/agents directory, _structured_artifacts_available still selects _ask_with_structured_facts, which proceeds directly to _ask_with_legacy_facts. Saying the structured path runs only when map.md and agents/*.md exist incorrectly implies these supported legacy installations skip directly to the swarm; describe both entry conditions.

Useful? React with 👍 / 👎.

Comment thread docs/en/SWARM_PROTOCOL.md
Comment on lines +249 to +250
# Check refresh status
rb report

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace rb report with a real status check

In this debugging example, rb report cannot check refresh status: rb report --help describes it as “Log a report to .repobrain/memory/reports.md” and marks the {message} argument required, so the command shown exits with a missing-argument error. The same newly added command appears in the Spanish and Chinese examples; replace all three with an actual knowledge-health/status inspection command.

Useful? React with 👍 / 👎.

Comment thread docs/en/ROADMAP.md
Comment on lines +111 to +113
The core phase is complete. Below are **future extension ideas** (not currently in-progress) that would build on this foundation:

### Future Extension: Sandbox Environment 🔒

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not classify the implemented sandbox as future work

The blanket statement that the following sections are future ideas “not currently in-progress” now includes the Sandbox Environment, but this repository already ships get_sandbox(), a local implementation, an opt-in MicrosandboxSandbox, tests, and a dedicated docs/en/SANDBOX.md usage guide. Distinguish the implemented sandbox support from genuinely future backends such as E2B instead of telling readers that the entire capability is only an extension idea.

Useful? React with 👍 / 👎.

Comment thread docs/en/SWARM_PROTOCOL.md
Comment on lines +246 to +247
# Ask with verbose output (streamed progress)
rb-ask "Where is the database connection?"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show how to enable streamed output

With the default STREAM_ENABLED=false, the plain rb-ask command shown here uses Runner.run rather than Runner.run_streamed, so it does not provide the promised streamed progress. Either set STREAM_ENABLED=true in the example or describe the always-emitted stage messages without calling them streamed output; the same misleading comment was added to all three translations.

Useful? React with 👍 / 👎.

Comment thread docs/en/SWARM_PROTOCOL.md

When no API key is configured (`RB_HOST_RUNNER` set to `codex` or `generic`), Refresh uses a single-turn, tool-free Convention Agent (`build_single_turn_convention_agent()`) that collapses the three-stage chain into one generation.

**Important:** Host-runner mode for refresh is single-turn only. It does not use the full three-agent handoff chain.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify that each refresh stage is single-turn

A full host-runner rb-refresh is not itself single-turn: after the one-call convention agent, the pipeline invokes a separate host completion for every module group and another for the map agent. Only each individual host-backed agent call is single-turn and tool-free, so phrase this qualification per agent or per stage to avoid implying that refresh performs one model turn or one CLI invocation.

Useful? React with 👍 / 👎.

@study8677
study8677 merged commit aefb94d into main Aug 27, 2026
9 checks passed
@study8677
study8677 deleted the cursor/fix-doc-inaccuracies-0903 branch August 27, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants