Skip to content

docs(core): retire legacy plans and refresh harness and TUI docs - #3812

Closed
kovtcharov wants to merge 14 commits into
amd:mainfrom
kovtcharov:codex/core-tui-documentation
Closed

kovtcharov wants to merge 14 commits into
amd:mainfrom
kovtcharov:codex/core-tui-documentation

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

GAIA's docs mixed the working harness and TUI with obsolete roadmaps, completed plans, legacy agents, and conflicting API examples. This removes 112 legacy files, centers navigation on today's flagship/harness/TUI, and replaces speculative references with source-checked behavior and runnable custom-agent examples.

Closes #3810.

  • Guide users from terminal setup and Local/Fireworks AI/AMD LLM Gateway selection to tasks, approvals, cancellation, and troubleshooting.
  • Remove the obsolete Lemonade server CLI from current guides, repair database/watcher/file-tool examples, and guard against reintroducing the removed commands.
  • Provide a complete Python custom-agent tutorial, executable tests, MCP server example, and accurate Chat SDK, memory, mixin, and code-index contracts.
  • Cover recent project-map, skill discovery/learning, transcription, image-generation, multi-repository indexing, and verification-footer behavior. Trim remaining code-index roadmap/benchmark claims and replace the RAG pseudo-spec with current requirements and limitations.
  • Preserve retired URLs with redirects; check navigation for duplicates, missing pages, and valid destinations. Runtime edits are limited to TUI help/remediation strings.
🔍 Technical details

Merged main through 7290953e and reviewed the latest feature history against the retained guides. SDK behavior changes stay outside this PR: #3859 tracks prior-turn error leakage; #3871–#3873 track reproduced RAG ingestion, partial-summary, and citation gaps. Existing #3316/#3315/#3506/#3636 cover other documented limitations. #201 now scopes version-aware documentation distribution via MCP, plugin/skill, and offline exports.

Independent code review found no remaining actionable inaccuracies in the final follow-up. Human review remains required before merge.

Test plan:

  • 272 focused Python tests: documentation examples/navigation, TUI MCP/stdio, verification scope, code-index mixin, and Lemonade cloud models.
  • Copied tutorial scripts execute against the current local SDK; published pytest example passes. Model replies are mocked while real registration and dispatch run; the published TodoAgent executes against real temporary SQLite.
  • Documented MCP server tested over real Streamable HTTP with MCP 2.2: initialize, list tools, call word-count tool, reject invalid arguments.
  • 681 internal links valid; 256 Python blocks pass syntax checks; documentation versions consistent.
  • Mintlify broken-link/MDX validation and browser rendering of every changed MDX page; visual inspection of navigation, tutorials, provider flow, and tables.
  • TUI build/mock-agent build, full go test ./... -count=1 and go vet ./...; source launcher and CLI help/argument parsing checked.
  • Changed-test Black/isort and git diff --check pass.

Live paid-provider inference, model downloads, embedding-quality evaluation, and published OS installers were not exercised. The Windows SD integration job on c276d1a4 failed during environment setup because the runner could not resolve astral.sh, before tests ran; other CI is reported by the checks below. Workflow actionlint's four ShellCheck diagnostics were also present on the original base.

The repeat review of the final sweep found no further actionable documentation findings in the reviewed scope. All 36 pages edited in that sweep render in Mintlify. On b5fc3c0, the Python 3.12 CI job stopped before checkout because GitHub could not resolve codecov/codecov-action@v7; the tag resolves in a direct API check. This was not a test failure.

@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes rag RAG system changes tests Test changes cpp tui Go terminal UI (gaia-tui) labels Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Request changes

This retires ~109 stale planning/tutorial docs and rewrites the harness, tools, and TUI references around what the code actually does. I spot-checked roughly a dozen factual claims in the rewritten pages against src/gaia and tui/ — defaults, decorator options, lifecycle states, env vars, flags, make targets — and every one was correct. The gaia tui → gaia-tui correction is a genuine bug fix: the Python CLI has no tui subcommand.

Three things to fix before merge, all small:

The new navigation lists three pages twice. The flagship agent guide, the AI-providers guide, and the agent-harness reference were added to "Getting Started" but not removed from where they already lived, so each now appears in two places in the same sidebar. The base branch had no duplicates — this is new. The link checker CI runs can't see it.

Thirty-three previously published pages now 404 with no redirect. The PR adds ten redirects, so the intent is clearly there — these are the gaps: the whole roadmap page, every plan page except skill-format, every playbook page, and the component-status spec. One of them, the custom-installer playbook, is still printed as a link by a file GAIA ships to users. Anyone with a bookmark or a search result for these lands on a 404.

The terminal command rename is only half applied. Two guides still tell users to run gaia tui, including the AI-providers guide this PR promotes to top-level "Getting Started" and links to from both the quickstart and the new TUI page. The Python CLI's own help text and the TUI control MCP server's error messages also still print gaia tui (and one prints the wrong binary name entirely), so a user who hits that error gets a command that doesn't exist.

One thing worth a second look rather than a fix: swapping the docs CI check from mintlify validate to mintlify broken-links narrows what CI catches. The PR's own edit to the release skill still describes a past release that failed on an unparseable MDX file — which is the kind of thing validate catches and a link checker doesn't.

Real-world evidence

N/A — no evidence bundle was produced for this run, and the change is docs, CI config, and one test. The PR's own test plan lists the link checker, doc-code checker, Mintlify broken-links, the Go build and tests, and 165 Python tests; I independently confirmed every internal link in the changed docs resolves and that no relative link points at a deleted page. The verdict above rests on static review plus those checks.

🔍 Technical details

🟡 Three pages duplicated in the navigation tree (docs/docs.json)

guides/gaia, guides/ai-providers, and sdk/core/agent-system were added to the new Getting Started group but left in their original groups:

Page Also still listed under
guides/gaia Python Framework / User Guides / Core Agents
guides/ai-providers Python Framework / User Guides / Core Agents
sdk/core/agent-system Python Framework / SDK Reference / Core Concepts

Same tab, so the sidebar renders each twice and breadcrumb/next-page resolution is ambiguous. The base docs.json had zero duplicate nav entries. Either drop them from the old groups or leave them there and keep Getting Started as pure cross-links.

🟡 33 removed published pages have no redirect

docs.json gained ten redirects (/spec/agent-base, /sdk/packaging, /guides/custom-agent, /plans/skill-format, …), which is the right pattern — these are the ones that didn't get one:

/roadmap                      /eval                        /spec/component-status
/playbooks/index              /playbooks/chat-agent/part-{1,2,3}-*
/playbooks/custom-installer/index                          /playbooks/hardware-advisor/index
/plans/{adaptive-skills,agent-hub,agent-hub-ui,agent-ui,agent-ui-hub-publish,
        autonomy-engine,code-index-review,connectors,cua,desktop-installer,
        docker-containers,email-agent-packaging,email-calendar-integration,
        email-triage-agent,flagship-installer,image-agent,mcp-docs,
        messaging-integrations-plan,oem-bundling,security-model,setup-wizard,
        skill-synthesis,tool-loader,vision-sdk}

The /playbooks → /quickstart redirect is exact-match and does not cover /playbooks/index or any subpage. Mintlify supports a wildcard source if you'd rather not enumerate:

    {
      "source": "/playbooks/:slug*",
      "destination": "/quickstart"
    },
    {
      "source": "/plans/:slug*",
      "destination": "/index"
    },
    {
      "source": "/roadmap",
      "destination": "/index"
    },
    {
      "source": "/eval",
      "destination": "/reference/eval"
    },
    {
      "source": "/spec/component-status",
      "destination": "/index"
    }

(Order matters — keep the existing specific /plans/skill-format entry ahead of a /plans/:slug* wildcard.)

src/gaia/apps/webui/build/bundled-agents/README.md:12 still emits https://amd-gaia.ai/docs/playbooks/custom-installer, so this one is reachable from shipped output, not just bookmarks.

docs/releases/v0.15.3.mdx:61 points at /docs/playbooks/sd-agent, which was already dead before this PR — pre-existing, noting only so it isn't mistaken for new breakage.

🟡 gaia tui → gaia-tui rename left behind in docs and runtime strings

docs/reference/cli.mdx and docs/guides/mcp/tui.mdx were corrected; these were not:

  • docs/guides/ai-providers.mdx:13 — "Start gaia tui". This page is newly promoted into the top-level Getting Started group by this PR and is linked from docs/quickstart.mdx and docs/reference/tui.mdx:77.
  • docs/guides/memory.mdx:440 — "(gaia tui)".
  • src/gaia/cli.py:2552, :8003, :8023 — gaia mcp tui --help and its startup banner.
  • src/gaia/mcp/servers/tui_mcp.py:12-15, :84, :257, :459 — remediation strings shown on failure. :84 also says ./tui/bin/gaia --control; the built binary is ./tui/bin/gaia-tui.

The src/ ones are out of the PR's file scope, but the PR description lists "TUI command spelling" as one of its three corrections, so they belong in the same sweep or a follow-up issue.

1. Start `gaia-tui`. During setup, press **p** to choose an AI provider. In chat,

(docs/guides/ai-providers.mdx:13)

🟡 mintlify validate → mintlify broken-links narrows the docs CI gate

.github/workflows/docs.yml:49. broken-links checks links; validate checked config and MDX parse. The PR's own edit to .claude/skills/gaia-release/SKILL.md:259-264 still describes v0.22.0 failing on an .mdx that "exists, it just never parsed" and surfacing as a docs.json reference error — a validate behaviour. If validate is gone from the current Mintlify CLI this is the right move and the surrounding prose needs rewriting; if it still exists, run both. Worth confirming which.

The same file's step 3 comment now reads "verified against mintlify broken-links" for the \< / \{ MDX escaping rule — a link checker can't verify escaping, so that substitution makes the note inaccurate regardless of which way the CI question lands.

🟢 Duplicate link target (docs/reference/cli.mdx:2401)

Both halves now point at the same page:

[→ Agent Skills Spec](/spec/agent-skills)

🟢 Registry-kwargs regression guard dropped (tests/unit/test_doc_examples_runnable.py)

The rewrite removes test_examples_stay_constructible_through_the_agent_registry, which asserted the doc example survives AgentRegistry.create_agent → python_factory kwarg filtering (the #3312 case: a narrowed __init__ that doesn't forward **kwargs TypeErrors the moment a user picks a model in the Agent UI). The new CountAgent declares no __init__, so the bug can't fire today — but the guard is gone for whoever edits the example next. A three-line construction through _accepted_init_params would keep it.

Also: .github/workflows/test_unit.yml drops the comment explaining why faiss-cpu and pypdf are installed while still installing them. Harmless, but the next person to prune that list has lost the reason.

Strengths

  • The rewritten references are verified, not asserted. I independently confirmed against source: _register_tools is the only abstract method and _get_system_prompt defaults to "" (agent.py:1371, :1332); @tool accepts exactly atomic/display_label/timeout and raises TypeError otherwise (tools.py:171); claude_model="claude-sonnet-5", min_context_size=32768 (agent.py:872, :886); the five loop states (agent.py:732-736); GAIA_AGENT_MAX_STEPS/GAIA_AGENT_TOOL_TIMEOUT read at call time; ToolCancelled/tool_cancelled()/raise_if_cancelled(); every gaia-tui flag and make target named in docs/reference/tui.mdx. All correct.
  • The hedging is the valuable part. Lines like "tool selection is not an execution permission boundary", "a snapshot also copies whatever was already registered", and "Python cannot kill the thread: an abandoned tool may still finish" are exactly the invariants a host integrator gets wrong, and they match the code.
  • Ten redirects and the docs/releases/* link rewrites to pinned GitHub blob URLs show the URL-stability problem was thought about; the finding above is a gap in execution, not in intent.

@github-actions github-actions Bot added mcp MCP integration changes cli CLI changes labels Sep 14, 2026
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Addressed the review in f01a9b9:

  • Removed the three duplicate navigation entries.
  • Added explicit redirects for all removed MDX routes and the former installer/hardware-advisor directory URLs, with checks for unique sources and existing destinations.
  • Corrected remaining TUI launch commands in the provider/memory guides and CLI/MCP help, including the source binary path.
  • Consolidated the duplicate skills link, restored registry-kwargs compatibility coverage, and documented why the test workflow retains RAG dependencies.
  • Clarified the release validation instructions. I verified the installed Mintlify CLI with a minimal fixture: valid MDX exits 0; an unclosed component exits 1 with an explicit parser error. broken-links therefore supplies MDX parsing as well as link validation; visual preview remains a separate check.

One correction to the review: /eval was not removed. docs/eval.mdx remains live and unchanged, so it needs no redirect.

Validation: 57 focused tests pass; all 653 internal links and 276 Python documentation blocks validate; Mintlify reports no broken links; documentation versions, Black/isort, CLI help, and whitespace checks pass. The follow-up code review found no unresolved correctness issues. Original full Go and broader Python validation is recorded in the PR description.

@kovtcharov

Copy link
Copy Markdown
Contributor Author

Updated the content-quality pass and checked recent merged features, including Fireworks AI, AMD LLM Gateway, TUI cancellation/tracing/mouse controls, project maps, skill discovery/learning, transcription, images, and verification reporting.

The custom-agent tutorial and tests now exercise actual SDK registration/dispatch. The MCP example also passed a real MCP 2.2 HTTP session. Replaced the RAG pseudo-spec and corrected multi-repository indexing guidance; removed two remaining roadmap sections and a stale sidebar entry.

Validation: 270 focused Python tests pass, all 669 internal links and 261 Python blocks validate, Mintlify renders the changed pages, and full Go tests/vet passed. The final independent review has no outstanding findings. Live cloud inference/model downloads/installers were not exercised. The Windows SD job on c276d1a failed before tests because its runner could not resolve astral.sh.

Scoped separately: #3859 (SDK error lifetime), #3871 (folder ingestion formats), #3872 (incomplete summaries), #3873 (citation page provenance). Updated existing #201 for version-aware documentation distribution to coding agents via MCP/plugin/offline options.

@github-actions github-actions Bot added the agent::email Email agent changes label Sep 15, 2026
@kovtcharov

Copy link
Copy Markdown
Contributor Author

Another review/fix/review cycle is complete. The final pass found no further actionable documentation findings in the reviewed changes.

  • Removed the obsolete Lemonade server CLI from current guides; Python setup uses gaia init, while native C++ instructions use the installed Lemonade application. This overlaps the documentation portion of feat(daemon): start and supervise the local model server #3122, without taking its pending runtime behavior.
  • Repaired database construction, removed incomplete watcher examples and nonexistent file-tool method calls, and corrected imports, registration, logging, and result-field guidance.
  • Added a real SQLite execution test for the published TodoAgent and a regression guard against removed Lemonade CLI commands.

Validation: 272 focused tests pass; 681 links and 256 Python blocks validate; all 36 pages changed in this sweep render in Mintlify. Formatting, version consistency, and whitespace checks pass. The independent reviewer approved after corrections.

The Python 3.12 job on b5fc3c0 failed before checkout while resolving codecov/codecov-action@v7. The tag resolves through GitHub's API now; no Python tests ran in that job. Live model/provider and installer limitations remain as recorded in the PR body.

# Conflicts:
#	CLAUDE.md
#	docs/docs.json
#	docs/plans/autonomy-engine.mdx
#	docs/plans/desktop-installer.mdx
#	docs/playbooks/chat-agent/part-1-getting-started.mdx
#	docs/playbooks/chat-agent/part-3-deployment.mdx
#	docs/sdk/core/agent-system.mdx
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

Large documentation restructuring — deletes ~50 stale docs/plans/ files, replaces lemonade-server serve throughout the C++ docs, fixes the mintlify validate → mintlify broken-links CI step, and updates scattered cross-references to match the new layout. The code changes are small and correct. One gap in CI coverage is worth fixing before merge.


🟡 docs/sdk/core/custom-agents.mdx is not in the CI path trigger, so a broken code example in that file won't auto-trigger tests.

test_doc_examples_runnable.py now has two tests: the existing one executes code from docs/quickstart.mdx (correctly added to the trigger), and a new test_custom_agent_tutorial_runs_and_checks_tools() that executes code from docs/sdk/core/custom-agents.mdx. That second path is missing from both the push and pull_request trigger lists.

🔍 Technical details

tests/unit/test_doc_examples_runnable.py (line 73):

doc_path = REPO_ROOT / "docs" / "sdk" / "core" / "custom-agents.mdx"

.github/workflows/test_unit.yml (lines 26 and 47) — only watches docs/quickstart.mdx. Add the second path:

      - 'docs/quickstart.mdx'
      - 'docs/sdk/core/custom-agents.mdx'

(Same change needed in both the push and pull_request blocks.)

The old trigger watched docs/guides/custom-agent.mdx (the deleted source file). That correctly covered the second test under the old name. The rename dropped coverage for it.


🟢 The docs.yml success echo still reads "Documentation validated successfully" after switching from mintlify validate to mintlify broken-links — a misleading label since the check is now link-only, not a full parse. Low priority but easy to update.

# Conflicts:
#	docs/plans/desktop-installer.mdx
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

A thorough cleanup: ~60 stale docs/plans/, docs/playbooks/, and planning files removed, the retired lemonade-server serve CLI swept from every doc, the Mintlify CLI call corrected (validate → broken-links), and gaia tui → gaia-tui applied consistently across code, docs, and tests. The new test_docs_json_release.py tests (navigation page existence, redirect destination verification, and no-stale-lemonade-CLI) are solid guardrails for this class of cleanup. test_doc_examples_runnable.py is significantly expanded and covers more doc surfaces than the version it replaces.

Two small nits to address at your convenience — neither blocks merge:

🟢 docs/eval.mdx was removed from navigation without a redirect. It's a real content page (the scenario-based eval benchmark reference, distinct from reference/eval and guides/eval) — if Mintlify stops serving orphaned pages, the URL /eval will 404. The new test suite checks that redirect destinations exist but doesn't enforce that removed nav entries get redirects. A {"source": "/eval", "destination": "/reference/eval"} entry in docs.json would close the gap.

🟢 docs/guides/agent-ui.mdx line 163 shows gaia init twice in the same bash block:

gaia init                   # Downloads Lemonade Server + models
gaia init       # Start the LLM server

The second line was the lemonade-server serve replacement. The comment "Start the LLM server" is misleading since gaia init does more than start the server. Consider replacing the second line with something like # gaia init handles both download and start or removing it.

🔍 Technical details

Orphaned docs/eval.mdx:

  • docs/docs.json removed "eval" from the Evaluation Framework pages array but no redirect was added from /eval to /reference/eval.
  • test_redirects_have_unique_sources_and_existing_destinations won't catch this (it validates existing redirect entries, not missing ones).
  • test_retired_entry_points_redirect_to_maintained_docs doesn't include /eval in its parametrize list.

Fix: add to docs.json redirects:

{
  "source": "/eval",
  "destination": "/reference/eval"
}

And optionally add /eval to the parametrized test.

Duplicate gaia init in agent-ui.mdx:

  • docs/guides/agent-ui.mdx:160–163 — the block previously had gaia init (download) then lemonade-server serve (start). The replacement left two gaia init lines with conflicting comments.

The cleanup-preview test was parametrized over a retired plan page, and the
mixin table predates email_tools landing in KNOWN_TOOLS.

Co-Authored-By: Claude Opus 5 <[email protected]>
…ntation

# Conflicts:
#	docs/guides/gaia.mdx
#	docs/reference/dev.mdx
#	docs/sdk/core/agent-system.mdx
The two tests this branch adds read .mdx with the platform default encoding,
so on a Windows checkout (cp1252) they fail with UnicodeDecodeError on any
page containing a curly quote or em dash rather than on a real doc defect.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The red C++ Integration Tests (STX) check is not this PR — it's a broken self-hosted runner, tracked in #4113. Nothing to fix here; re-run the check and it will pass if it lands on a healthy machine.

main itself fails the same way on the same runner pool, and this PR touches no C++ source at all — only cpp/README.md. A run six minutes later on another branch passed on a different runner.

🔍 Technical details

The XSJ-AIMLAB-STXP* machines can't compile a trivial program with their bundled w64devkit; CMake aborts at compiler detection in step 7, Configure and build integration tests, before any repo code is compiled. sjlab-stx-1 is healthy.

when branch runner result
2026-09-17 main XSJ-AIMLAB-STXP fail
2026-09-22 this PR xsj-aimlab-stxp-08 fail
2026-09-22 deps/lemonade-11.9.0 sjlab-stx-1 pass

Deliberately not pushing a workaround — the fix belongs on the runner, not in the tree.

Kalin Ovtcharov and others added 2 commits September 23, 2026 16:37
The test execs code blocks out of seven guides, but the unit-test trigger
watched only `docs/quickstart.mdx` — so a breaking edit to any of the other
six landed without the job that would have caught it ever running.

All seven are listed now, on both the push and pull_request triggers.

Co-Authored-By: Claude Opus 5 <[email protected]>
Both sides had been editing the same flagship docs. Where main's content is
simply newer — the tool table (which gained `capture_skill`) and the
gated-tools paragraph (nine of them now) — it wins, and the branch's relocated
tool-count line is updated to match at 81. Where the two added different
things, both are kept: this branch's skill-grant and stdio-vs-sidecar notes
next to main's mail-as-data and image-reload notes.

`docs/spec/agent-skills.mdx` keeps this branch's slimmed version. Retiring that
906-line tracking-issue and status block for a component header is what the PR
is for, and main added nothing new inside it.

Co-Authored-By: Claude Opus 5 <[email protected]>
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 26, 2026
…s/paths (amd#4326)

Subagent definitions and the GitHub-reply skill told coding sessions to
go find `CodeAgent`, `JiraAgent`, `SDAgent`, `MedicalIntakeAgent`,
`blender_mcp_server.py`, and `tests/test_cli.py` — all deleted — and
`gaia-agent-builder.md` presented its example under a "verified against
the tree" header, the most damaging kind since sessions copy it as a
convention. The GitHub-reply skill's own worked example also told a
reporter GAIA has no Slack integration and pointed at the deleted Jira
agent, even though `gaia slack` ships today.

Every stale reference is swapped for a live one (`GaiaAgent`,
`ChatAgent`, `hub/agents/hello-world`, `gaia.connectors`, `hub/skills`,
`tests/unit/cli/`), and a new filesystem-only unit test walks
backtick-quoted repo paths across `.claude/agents/`, `.claude/skills/`,
`AGENTS.md`, and `CONTRIBUTING.md` and asserts each one exists
(placeholder shapes like `hub/agents/<id>/...` are allowlisted), so this
class of drift can't ship silently again.

Overlaps open issue amd#3535, which tracks the same class of drift across a
broader file set and proposes extending `util/check_doc_links.py` to
walk `.claude/` — the more durable long-term fix. This PR's test is
scoped to the paths amd#4248 named. Also overlaps open PR amd#3812, which
doesn't touch any of the lines fixed here.

## Test plan
- [x] `pytest tests/unit/test_ai_doc_paths_exist.py -q` — 308 passed
(confirmed it fails before the fix: reverting any one edit reintroduces
a failure)
- [x] `black --check` / `isort --check-only` on the new test file
- [x] `python util/check_doc_links.py --internal-only` — 1012/1012 OK

Fixes amd#4248

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 26, 2026
…slack (amd#4327)

`gaia mcp serve`, `gaia eval code`, the `--claude-model` /
`--no-lemonade-check` global flags, and `gaia install --silent` all
exist in the parser with no mention in the CLI reference, and
CLAUDE.md's CLI command list omits `gaia slack` entirely — every flag
the reference *does* document is real, so this was a coverage gap, not
stale text.

Documented all of them in `docs/reference/cli.mdx` (with a caveat on
`gaia report`, which is registered but not dispatched per amd#3488), added
`gaia slack` to CLAUDE.md, and added a CLI-to-docs drift test that walks
every leaf `gaia <subcommand>` from `build_parser()` and checks it's
written into `cli.mdx` in full-path form (`gaia mcp start`, not bare
`start`) — the same form the page already uses, so it stays low-noise.
Twelve pre-existing gaps the same walk found (mostly `gaia connectors`
subcommands) are allowlisted as tracked debt rather than fixed here, to
keep this PR reviewable; the allowlist test fails if one gets documented
without being removed from it, or if the allowlist grows.

Overlaps open PR amd#3812, which only renames `gaia tui` → `gaia-tui` and
fixes `lemonade-server serve` examples on this page — it doesn't touch
any section added here. Also overlaps open issue amd#1085, which filed the
same "CLI drift needs a test" finding in May.

## Test plan
- [x] `pytest tests/unit/cli/test_cli_docs_drift.py -q` — 2 passed
(confirmed each assertion fails independently: an undocumented command
trips one, a stale allowlist entry trips the other)
- [x] `black --check` / `isort --check-only` on the new test file
- [x] `python util/check_doc_links.py --internal-only` — 1013/1013 OK
- [x] Verified every added flag against `src/gaia/cli.py`'s
`build_parser()`

Fixes amd#4250

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov-amd added a commit to kovtcharov/gaia that referenced this pull request Sep 26, 2026
…blocking (amd#4344)

43 test files ran in no CI lane, so they looked green on every PR
whether they worked or not. The checker from amd#4124 could see the gap but
blocked nothing, so the count kept growing. After this PR, every test
file either runs in a lane or is listed with the reason CI can't run it,
and lint fails as soon as a new file is neither.

Stacked on amd#4343 — merge that first. It repairs the files this PR starts
running.

- **23 files that need no Lemonade, live account, or AMD hardware** now
run in a new `offline-integration` job in `test_unit.yml`. The job takes
about 2 minutes of tests, in parallel with the unit job, so the unit
job's 30-minute budget isn't touched. One more email file joins the
email unit lane.
- **18 files are allowlisted with a reason.** Most need a live Lemonade
Server, a real Gmail account, or a self-hosted model runner; two are
hand-run scripts. Two of them
(`tests/mcp/test_mcp_cli_to_agent_workflow.py`,
`test_mcp_sdk_integration.py`) fetch unpinned MCP servers from npm at
test time **and are broken today**. Their entries say so, so a reviewer
can decide whether to repair or delete them.
- **The file-search tests no longer walk the real home directory.** On a
developer Mac, `test_search_finds_file` ran past a 2-minute timeout, and
most search assertions only checked results "if found". They now search
a fake home and assert exact results; `test_files_router.py` takes about
4 s with the real `HOME` set.
- **The check is now blocking** in `util/lint.py --all`, which CI
already runs.

Overlaps: amd#4348 makes the whole of `test_files_router.py` use a fake
home, so it touches the same search tests. Whichever PR lands second
resolves a small conflict. amd#4038 adds its own lint check in the same
spots of `util/lint.py` and `docs/reference/dev.mdx`, so expect a
trivial conflict there. amd#3669, amd#3721, and amd#3812 touch other parts of
`test_unit.yml`.

## Test plan
- [x] Before, on `origin/main`: `python
util/check_test_lane_coverage.py` reports 43 files and exits 1
- [x] After: the checker exits 0 (850 files, 18 allowlisted), and
`python util/lint.py --test-lanes` fails when a new unwired
`tests/test_*.py` is added
- [x] The new job's exact file list passes locally in a clean py3.12
venv matching its install step, with homes isolated and Lemonade
unreachable: 534 passed, 12 skipped
- [x] `test_search_finds_file` hangs past 130 s on this branch before
the fix, with the real `HOME` set. After it, the whole of
`test_files_router.py` passes in 4 s (75 passed, 1 skipped)
- [x] The email lane's full command plus the added file passes: 4971
passed
- [x] `actionlint` is clean on the three edited workflows, and `black`,
`isort`, and `pylint --errors-only` are clean on `util/lint.py`
- [ ] Watch this PR's `Offline Integration Tests` job go green on Linux.
`test_backend_install_command_is_accepted` only runs there (it's skipped
on macOS), so CI is its first real run

Fixes amd#4205

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

I reviewed this properly rather than deferring it as "too large", and the size is not the problem — the premise has been overtaken by 162 commits on main. This needs you, not a conflict resolution.

Ten of the plans this retires as legacy were updated by merged PRs in the last 48 hours, several of them today. tool-loader and skill-synthesis were edited yesterday by #4036 and #4033; security-model by #3394; skill-format by #3390; adaptive-skills by #3937; both weekly-audit plans by #4191. Those PRs treated them as living design docs and updated them alongside the code. Resolving the merge by taking "delete" would silently discard that work, and resolving it by taking "keep" contradicts the PR's thesis. Which way each of the 17 goes is a content call only you can make.

The other thing I cannot decide for you: this deletes the public roadmap page and redirects /roadmap to the docs index. CLAUDE.md on main still calls it the roadmap and links the live site. That is a product decision, not a docs cleanup.

Two things I can confirm are genuinely fine, so they do not need re-litigating:

  • The URL deletions are safe. I checked every amd-gaia.ai link that shipped code emits against your redirect table — registry.py's custom-agent URL, the C++ skill.h skill-format constant, and the Agent Hub worker's two spec URLs all land on a redirect you added. Nothing shipped 404s.
  • The runtime edits are string-only. cli.py and tui_mcp.py only correct gaia tui to gaia-tui, which is a real bug fix — the Python CLI has no tui subcommand.

One finding that is new and worth folding in whenever this moves:

🔍 Technical details

Merge state: 28 conflicts against main at 8e012edad. Merge-base is f136d1c87, 162 commits back. 17 of the conflicts are modify/delete — main changed a file this PR removes:

docs/plans/{adaptive-skills,email-agent-tui-port,gaia-agent-latency,security-model,
            skill-format,skill-synthesis,tool-loader,unified-tui-composability,
            weekly-claude-audit,weekly-doc-walkthrough-audit}
docs/guides/custom-agent.mdx   docs/roadmap.mdx
docs/spec/{agent-base,agent-sdk,tool-decorator}.mdx
docs/playbooks/chat-agent/part-2-advanced-features.mdx
docs/playbooks/hardware-advisor/index.mdx

New finding — five repo READMEs keep relative links into deleted paths. Mintlify redirects cover the docs site, but not relative file links rendered on GitHub, so these break on merge. None are in the PR's file list:

  • hub/README.md:50 → ../docs/plans/agent-hub-ui.mdx
  • hub/agents/README.md:66-67 → ../../docs/guides/custom-agent.mdx, ../../docs/spec/agent-hub-restructure.mdx
  • hub/agents/hello-world/python/README.md:55 → ../../../../docs/guides/custom-agent.mdx
  • hub/agents/email/python/packaging/README.md:6 → docs/plans/email-agent-packaging.mdx
  • installer/README.md:3,50,71,93 → ../docs/plans/desktop-installer.mdx, ../docs/plans/shareable-custom-build.md

You already swept cpp/README.md for exactly this, so it is the same edit five more times.

Also comment-only, harmless but stale after merge: cpp/include/gaia/{json_event_handler,tui_transcript}.h, cpp/src/tui_markdown.cpp, installer/debian/{postinst,prerm,postrm}, installer/nsis/gaia.nsi, installer/macos/entitlements.mac.plist, scripts/audit/discover_walkthrough_docs.py, and three tests/unit/ docstrings. I verified discover_walkthrough_docs.py only mentions its plan in a comment — no functional dependency.

CI: the one red check, Test GAIA CLI on Windows (Full Integration), is not informative at this base age; it wants a re-run after a rebase.

What I need from you: a call on whether docs/plans/ is still a living directory. If it is, this PR should narrow to the genuinely dead pages and drop the ten active ones. If it is not, say so and the rebase becomes mechanical — but that decision has to come before the rebase, because the rebase encodes it 17 times.

kovtcharov-amd pushed a commit to kovtcharov/gaia that referenced this pull request Sep 26, 2026
…imports (amd#4360)

About 6,700 lines of code had no caller. One file couldn't even be
imported, yet CLAUDE.md still listed it as "Shell integration". The dead
code kept stale behaviour looking alive, like `rag/demo.py` printing
`gaia rag` commands that don't exist, and it cost reviewers time. This
PR deletes six of the items from amd#4243. It also adds a test that imports
every module under `src/gaia`, so an unimportable file now fails CI
instead of lingering. The test fails on current `main`: it flags
`shell/prompt.py` and the three uncollected mic scripts.

Left for a maintainer decision:
- `src/gaia/eval/model_comparison.py`: it has no caller, but amd#3741
merged it yesterday as a library building block, with CLI wiring planned
as a follow-up.
- `governance/`, `talk/app.py` (amd#4333) and the webui AgentManager panel
(amd#4330) were excluded.

`docs/plans/cpp-framework-parity.md` still calls the C++ plan resolver
dead code to resolve. I left it alone because amd#3812 deletes that file.

<details>
<summary>🔍 Technical details</summary>

- Deleted: `src/gaia/shell/`, `rag/demo.py`, `rag/app.py` + `rag_main`
export, `audio/tests/*.py`, `eval/longthread_quality.py` + its test and
fixture, `hub/agents/email/node/`, `Agent::resolvePlanParameters` (+
decl, + now-unused `<regex>` include).
- Two `rag_app` tests in `test_rag_index_status.py` went with
`rag/app.py`. The chat/talk/file-monitor index-status tests stay.
- `thread_fold` keeps its own coverage in
`hub/agents/email/python/tests/test_thread_fold*.py`.
- The import test's allowlist is keyed on the *missing package* (`mcp`,
`reportlab`), not the module. An allowlisted module still fails if it
breaks another way, and a second test checks each allowlisted package is
an optional extra in `setup.py`, not a base dependency. Loose `.py`
files outside a package are loaded by path, so broken relative imports
fail too.
- A CI-equivalent venv (`.[api]` + the unit job's test deps) flags only
`mcp` and `reportlab` today, and the sweep takes ~7 s cold. No module
does an unguarded platform-only import at top level, so the Windows
smoke lane should match. That lane is not verified locally.
- No open PR modifies a deleted file. amd#4260 edits the chat agent's
`app.py`, not `src/gaia/rag/app.py`.
</details>

## Test plan

- [x] `pytest tests/unit/test_import_all_modules.py`: fails on
`origin/main` (shell/prompt.py + 3 mic scripts). It also fails with
prompt_toolkit installed (broken relative import) and with an
`__init__.py` added (`gaia.shell.commands` missing). Passes on this
branch in both the full dev venv and a `.[api]`-only venv.
- [x] `pytest tests/unit/test_rag_index_status.py
tests/unit/test_packaging.py tests/unit/test_model_comparison.py
tests/unit/email tests/unit/rag tests/test_rag.py`: 296 passed, 9
skipped
- [x] `pytest tests/unit` (`.[api]` venv): 14422 passed. The 23 failures
(`test_cli_smoke`, `test_uninstall_command`, `test_lemonade_asr`) also
fail on `origin/main` in the same env.
- [x] C++: `cmake -S cpp -G Ninja && cmake --build` builds clean, and
`tests_mock` passes 1002/1002
- [x] black, isort, pylint (CI flags) on the changed Python files
- [ ] Windows and macOS unit smoke lanes pass (CI)

Part of amd#4243

Co-authored-by: Kalin Ovtcharov <[email protected]>
kovtcharov added a commit to kovtcharov/gaia that referenced this pull request Sep 26, 2026
`docs/reference/eval.mdx` spent ~1,400 lines walking through `gaia
generate`, `groundtruth`, `batch-experiment`, `visualize`, and
`create-template` — every one removed from the CLI in v0.18 — before the
eval commands that actually exist. A reader following the page from the
top hits a dead command in the Quick Start, and the deprecation banner
asked them to read past all of it to reach the parts that still work.

The page now leads with the three live commands (`gaia eval sessions`,
`gaia eval agent`, `gaia eval tasks`) and keeps only the sections
describing running code: session replay, the agent eval benchmark
pointer, and the flagship task gate. Deleted content is in git history.

Overlaps open PR amd#3812 ("docs(core): retire legacy plans and refresh
harness and TUI docs"), which only swaps `lemonade-server serve` → `gaia
init` on this page and doesn't touch the legacy sections this PR
removes.

## Test plan
- [x] `python util/check_doc_links.py --internal-only` — 1012/1012 OK
- [x] `pytest tests/unit/test_doc_code_validation.py
tests/unit/test_check_doc_links.py -q` — 58 passed
- [x] Verified live subcommands against `gaia eval` subparsers in
`src/gaia/cli.py` (`agent`, `benchmark`, `sessions`, `code`, `tasks`)

Fixes amd#4247

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
github-merge-queue Bot pushed a commit that referenced this pull request Sep 28, 2026
…4353)

About 300 unit tests never ran in CI. Their files skip as a whole when a
hub wheel (`gaia_agent_chat`, `gaia_agent`, `gaia_agent_email`) or an
optional extra is missing. The unit lane lacks them, but it still names
the files, so the lane check counted them as covered. With this PR, each
file runs in a lane that installs what it needs, and a lane fails when a
file skips as a whole without an allowlist entry saying which lane runs
it.

Stacked on #4344. Merge #4343 and #4344 first.

- **The new guard runs inside each lane**, right after install. It
collects the job's own pytest commands in that lane's environment, so it
sees what the lane actually runs. It reports the skipping file by name.
This matters because a file that imports a skipping helper is otherwise
blamed on the helper's line: `test_chat_inline_web_ssrf.py` was hidden
that way.
- **Two moved files needed repairs to pass together.**
`test_chat_fix_contracts.py` picked up file tools leaked from earlier
tests. `test_chat_system_prompt_budget.py` evicted the chat agent module
at collection, so other files' patches stopped hitting it.
- **Two files stay allowlisted with no lane, for an owner to decide.**
`test_profilespec_characterization.py` has 11 golden rows that drifted,
and its docstring says golden updates need sign-off.
`test_tool_loader_token_budget.py` has 4 token and tool-count pins that
are stale, and even re-pinned, one ratio is over budget.

Overlaps: #4350 is also stacked on #4344 and edits the
offline-integration list and the allowlist, so expect a small conflict
there. #4038, #3721, #3669, #3812 and #3072 touch other parts of
`test_unit.yml` and `test_gaia_agent.yml`.

## Test plan
- [x] Before: `python util/check_module_skips.py --workflow
test_unit.yml --job unit-tests` with no `module_skips` entries reports
80 files skipping wholesale and exits 1
- [x] After: the guard exits 0 for all 7 guarded jobs, each run in a
clean py3.12 venv built from that job's install step
- [x] `python util/check_test_lane_coverage.py` and `python util/lint.py
--test-lanes` pass (31 module-skip entries verified)
- [x] New tests: `pytest tests/unit/test_check_module_skips.py
tests/unit/test_check_test_lane_coverage.py` passes 64. They include a
real `--collect-only` over a temp repo
- [x] Chat-lane files in the chat env: 421 passed. Before the two test
repairs, 2 failed when run together
- [x] Flagship-lane files in the gaia env: 59 passed.
`test_mcp2_server.py` plus the MCP transcript tests in the MCP env: 27
passed
- [x] Email unit lane's full command plus `test_synthetic_mbox.py`: 4980
passed
- [x] The 4 newly unskipped files in the unit job (docx, pptx,
reportlab, slack): 60 passed. Full `tests/unit/` in that env: 14509
passed, 23 failed. The failures are in 3 files (uninstall, CLI smoke,
Lemonade ASR) that also fail when run alone. They come from this Mac's
setup: `GAIA_HOME` isolated and `gaia` not on PATH. This PR changes no
code those files exercise
- [x] `actionlint` is clean on the 6 edited workflows. `black`, `isort`,
and `pylint --errors-only` are clean on the changed Python
- [ ] Watch the MCP lane's Windows leg run `test_mcp2_server.py` and the
guard. They were only run on macOS locally

Fixes #4206

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: Ovtcharov <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: f <f@f>
Co-authored-by: probe <probe@local>
@itomek

itomek commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Closing this — not for its size, but because main has answered the question it was asking, and answered it the other way.

docs/plans/ is a living directory. Since this branch forked, main added 13 new plan docs and edited 23 of the files this retires, all within the last five days. Three open PRs are adding more, including your own #4050. Same for the roadmap page: still linked from CLAUDE.md, edited last week.

The lemonade-server serve sweep underneath the deletions already landed separately, and the Mintlify step passes on main as written.

Two things here are worth keeping, both as their own PRs off current main:

  • The docs.json nav guards. Duplicate pages, nav entries pointing at missing files, redirect destinations that don't resolve — main tests none of it, and all three of yours pass clean against main today. Best thing in this branch, and about 80 lines.
  • The TUI command naming. You're right that something is wrong, but it needs a decision rather than a rename: gaia tui is the documented spelling and has a test pinning it, yet it genuinely fails when the Python wheel owns gaia. Worth its own issue.

Credit where it's due — 61 redirects against main's 9 is thorough.

Nothing is lost by closing. The branch is on your fork, and this reopens in one click if you see it differently.

🔍 Technical details

Staleness. Merge-base f136d1c87, 224 commits behind origin/main (f4924e35a). git merge-tree gives 66 conflicted files: 43 content, 23 modify/delete. The check list is from run 35936727506, created 2026-09-24 against 704da97b1 — and it is not fully green: 64 pass, 1 fail (Test GAIA CLI on Windows (Full Integration)), 10 skipped.

The 112 deletions. 72 docs/plans/, 10 docs/spec/, 6 docs/superpowers/, 6 docs/playbooks/, 5 docs/sdk/, 3 docs/testing/, plus docs/roadmap.mdx.

23 of them edited on main since the fork, latest edit dates:

date files
09-28 spec/{console,agent-sdk,agent-base}.mdx, plans/{skill-format,security-model}.mdx
09-26 spec/{tool-decorator,agent-hub-restructure}.mdx, all 4 playbooks/*, plans/{weekly-claude-audit,weekly-doc-walkthrough-audit,tui-user-journey,tool-loader,skill-synthesis,docker-containers}, guides/custom-agent.mdx
09-25 plans/{gaia-agent-latency,email-agent-tui-port,adaptive-skills}
09-24 roadmap.mdx, plans/unified-tui-composability

docs/plans/ went 73 → 86 across 20 commits, 13 of them new files. Open PRs still adding: #4050 (plans/permission-model.mdx), #4056, #4407. docs/roadmap.mdx is 389 lines, last edited 2026-09-24; CLAUDE.md:764 on main still calls it the roadmap and links the live site.

Lemonade sweep already done. git grep -c 'lemonade-server serve' f136d1c87 -- docs/cpp docs/guides docs/reference docs/quickstart.mdx → 23 files. Same grep on origin/main → 0. Landed via #3617 (e373a19df) and #3122 (f687b816b).

Mintlify step is fine as-is. docs.yml:49 on main still runs mintlify validate; run 36508238088 (09-29) succeeded. The one red docs run on main (36518276635) failed at step 4 Install Mintlify CLI and recorded step 5 Validate docs with Mintlify as skipped — an npm resolution failure, not the validator.

The nav guards — the part worth re-landing. tests/unit/test_docs_json_release.py gains test_navigation_has_no_duplicate_pages, test_navigation_pages_exist, test_redirects_have_unique_sources_and_existing_destinations (+77 lines). Main's copy of that file has only 5 tests, all version-label/release-notes; util/check_doc_links.py validates links inside .mdx files and only reads docs.json as a lookup table, so it never asserts nav entries or redirect destinations resolve. Ran all three verbatim against main's docs.json: all pass (212 nav pages, 9 redirects). Clean re-land.

TUI naming — why it needs a decision, not the rename in this branch. tui/internal/cli/root.go:315 drops a leading tui argument; tui/test/cli_name_test.go::TestLeadingTUIWordStillAccepted pins that spelling for both gaia and gaia-tui binary names; docs/reference/cli.mdx:3122 documents it. All from #2700 (2026-07-30), i.e. already present at this branch's merge-base. hub/agents/gaia/npm/package.json ships "bin": {"gaia": …}, so gaia tui --control is right for npm users. But under the Python wheel gaia tui --control errors with argument action: invalid choice: 'tui', and tui_mcp.py:84 names the source build ./tui/bin/gaia while tui/Makefile:13 builds bin/gaia-tui. Both spellings are live in different install shapes; picking one repo-wide is the actual call.

Navigation. Main's docs.json carries 212 nav pages, this branch 157. 13 pages main still ships would fall out of navigation without being deleted — 11 of them added after the fork: guides/{slack,llm-gateway,document-extraction}, plans/{adaptive-memory,daemon-convergence,embedded-onboarding,gaia-ui-redesign,nightly-benchmarks,slack-tui-integration}, reference/agent-benchmarks, spec/gaia-design-language; plus pre-existing eval and plans/email-triage-skill.

Net content loss. docs/guides/custom-agent.mdx is 542 lines on main. /guides/custom-agent redirects to /sdk/core/agent-system, which this cuts 1102 → 246 lines while main grew it to 1289. The two new pages total 302 lines (sdk/core/custom-agents.mdx 142, reference/tui.mdx 160).

Branch safety. Head is on the fork kovtcharov/gaia, branch codex/core-tui-documentation at 704da97b1 — unprotected and untouched by closing here.

@itomek itomek closed this Sep 29, 2026
tylerbea pushed a commit to tylerbea/gaia that referenced this pull request Oct 30, 2026
## Summary

Fixes broken `amd-gaia.ai` links in the bug-report template, CLAUDE.md
and the eval presentation, and widens the URL test so it checks those
files too.

## Why

FAQ/troubleshoot links in CLAUDE.md and the eval presentation return
404s. The docs site serves /docs/ pages, but URL tests cover only
/src/gaia/.

## Linked issue

Closes amd#4433

## Changes

- Added /docs/ to broken-link checks in the bug-report template,
CLAUDE.md, and eval presentation.
- Expanded URL tests to scan scripts/, installer/, .github/, and
CLAUDE.md, including .ps1, .sh, .yaml/.yml, and .nsi files.
- Allowlisted valid /docs and /#install links.
- Fixed the roadmap link and updated CLAUDE.md to reflect the expanded
test scope.
- No install-ui changes needed; those scripts no longer exist. The
presentation fix in amd#3812 was closed unmerged.

## Test plan

- [x] `pytest tests/unit/test_amd_gaia_urls.py` passes
- [x] Removing `/docs` from the bug-report FAQ link makes the test fail
and name that line (the old test passed with it)
- [x] Every changed link returns 200 on amd-gaia.ai; the old bare paths
return 404

## Evidence

N/A: docs and test-only change; no Agent UI, MCP, CLI or API surface
touched. Link checks: `amd-gaia.ai/reference/faq` → 404,
`amd-gaia.ai/docs/reference/faq` → 200 (same pattern for every changed
link).

## Checklist

- [x] I have linked a GitHub issue above (`Closes #N` / `Fixes #N` /
`Refs #N`).
- [x] I have described **why** this change is being made, not just what
changed.
- [x] I have run linting and tests locally (black, isort and flake8 on
the changed test; `pytest tests/unit/test_amd_gaia_urls.py`).
- [x] I have attached **real-world evidence matched to the surface I
changed** (see Evidence above), or marked each surface N/A.
- [x] I have updated documentation if user-visible behavior changed (see
[CONTRIBUTING.md](../CONTRIBUTING.md)).

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent::email Email agent changes cli CLI changes cpp devops DevOps/infrastructure changes documentation Documentation changes mcp MCP integration changes rag RAG system changes tests Test changes tui Go terminal UI (gaia-tui)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: retire legacy plans and refresh harness and TUI guidance

3 participants