Skip to content

docs: repair the index and add subsystem guides - #1008

Open
vernonstinebaker wants to merge 4 commits into
nullclaw:mainfrom
vernonstinebaker:docs/index-and-subsystem-guides
Open

vernonstinebaker wants to merge 4 commits into
nullclaw:mainfrom
vernonstinebaker:docs/index-and-subsystem-guides

Conversation

@vernonstinebaker

Copy link
Copy Markdown
Contributor

Summary

  • The beginner's-guide landing pages shipped with two-letter prefixes on heading and list lines, so the public docs index did not render. Those prefixes are stripped.
  • Adds English and Chinese pages for MCP, subagents, voice, and hardware, and points the indexes at them. The skills page is in the symlink pull request, not here.
  • Moves the stale integration planning notes to docs/archive. Slims CONTRIBUTING.md to the Zig 0.16.0 quick start. The validation matrix and hook steps stay in the development guides. SECURITY.md points at the security docs.
  • The MCP page matches current main: with no tool_filter_groups, every tool is included. It does not describe a lexical narrowing pass.

#776 and #777 are the older docs rewrites. This keeps Zig 0.16.0 and the filter behavior on main. Those pull requests can stay open until their author refreshes them.

Test plan

  • zig build test --summary all passed on push (pre-push hook)
  • docs/README.md, docs/en/README.md, and docs/zh/README.md render headings and lists without the two-letter prefixes
  • New pages link to files that exist in this pull request

Made with Cursor

The beginner's-guide landing pages shipped with two-letter prefixes on heading and list lines, so the public docs index did not render. Strip those prefixes and collapse the blank lines they left behind.
Publish English and Chinese pages for MCP, subagents, skills, voice, and hardware, and point the indexes at them. Move the stale integration planning notes into docs/archive. Slim CONTRIBUTING.md to the Zig 0.16.0 quick start; the validation matrix and hook steps stay in the development guides.

The MCP page describes current main: with no tool_filter_groups, every tool is included. It does not document a lexical narrowing pass.
The skills page is introduced with the symlink fix. This index lists MCP, subagents, voice, and hardware.

@DonPrus DonPrus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed all changed pages in both languages, local link targets, the archived-document references, the contributor-guide destination pages, and the relevant current implementation. Also read #776/#777 and their discussions: this intentionally ports and corrects that work rather than duplicating an already merged solution. The mangled index prefixes are gone, relative links in changed pages resolve, Zig remains 0.16.0, and the branch merges cleanly with current main. The MCP object maps and no-groups behavior now match the parser/agent implementation.

I am leaving this without approval because the new user-facing guides still advertise unavailable behavior:

  1. Hardware commands/tools do not match the shipped surface (docs/en/hardware.md and docs/zh/hardware.md). src/main.zig:runHardware implements scan, but flash and monitor only print “not yet implemented”; monitor does not invoke udevadm. Please label these as placeholders, rather than presenting working copy-paste commands/hotplug monitoring. The actual board-info tool name is hardware_board_info, not hardware_info (src/tools/hardware_info.zig). Also, allTools registers board-info, hardware-memory and I2C when hardware_boards is present, but does not register SPI. It would be great to distinguish available tools from standalone implementations and keep both translations aligned.

  2. The subagent guide conflates background execution with delegation and exposes internal APIs as user commands (docs/en/subagents.md). src/tools/delegate.zig calls completeAgentPrompt synchronously; it does not spawn a SubagentManager task with a background tool loop. The spawn tool's JSON schema only accepts task/label/agent; getTaskStatus, getTaskResult and getRunningCount are internal Zig methods, not operations users can invoke through that tool. Please describe delegate separately and replace the query examples with the supported /subagents commands from handleSubagentsCommand (list/status/info; document the existing kill limitations accurately). The Chinese guide should retain the same distinction when expanded.

A smaller clarification: dynamic MCP groups are exposed through native tool schemas when keywords match; filterToolsForPromptText deliberately includes only built-ins and always groups. The guide currently reads as if dynamic tools are also injected into the text prompt for every backend.

Validation was source/config/workflow comparison, relative-link and leftover-prefix checks, and git diff --check; no application tests were needed for these documentation-only changes. The index repair and archive/contributor cleanup are useful and should be retained while correcting the new guides.

Addresses the accuracy findings on nullclaw#1008. Every claim below was verified
against source rather than adjusted from the review text.

## hardware (en + zh)

- `nullclaw hardware flash` and `nullclaw hardware monitor` are accepted but
  are placeholders. Both live in `runHardware` (`src/main.zig`) and only print a
  message; `monitor` does not invoke `udevadm` or watch for hotplug. The page
  presented both as working copy-paste commands and described real-time hotplug
  monitoring that does not exist. Now listed under an explicit "Not yet
  implemented" section with the current behavior and source location, and the
  intro no longer claims flashing works.
- Agent tool name is `hardware_board_info`, not `hardware_info`
  (`src/tools/hardware_info.zig` sets `tool_name`; the filename is the source of
  the confusion).
- `spi` was listed as an available agent tool. `allTools` registers
  `hardware_board_info`, `hardware_memory`, and `i2c` when `hardware_boards` is
  set (`src/tools/root.zig`); `src/tools/spi.zig` is importable but never
  registered, so it is documented as a library capability, not a shipped tool.

## subagents (en + zh)

- The guide claimed `delegate` "spawns subagents internally". It does not:
  `src/tools/delegate.zig` calls `completeAgentPrompt` synchronously in the
  calling thread, creates no `SubagentManager` task, and issues no task ID.
  Documented as a separate synchronous path.
- The Query section presented `getTaskStatus`, `getTaskResult`, and
  `getRunningCount` as callable "via the spawn tool or agent commands". They are
  internal methods on `SubagentManager` (`src/subagent.zig`) and are not
  invokable from a prompt, tool call, or slash command. Replaced with the
  supported `/subagents` surface (list/status/info/kill/help) and the `spawn`
  schema, which accepts only `task`, `label`, and `agent`.
- The Chinese page is abbreviated and did not carry the false claims, but also
  lacked the distinction, so it gains the same `delegate` and query sections.

## mcp (en + zh)

- `always` and `dynamic` groups were described as behaving the same way at
  different turn times. They are applied at two different stages: keyword
  matching for `dynamic` happens in `filterToolSpecsForTurn` (the native
  tool-schema path), while `filterToolsForPromptText` admits only built-ins and
  `always`-group tools. `dynamic` tools are never written into the prompt text.
  Added a table showing the split, plus the consequence that `dynamic` silently
  does nothing on providers without native tool schemas.

Docs only. No code reference introduced here is unverified.
@vernonstinebaker

Copy link
Copy Markdown
Contributor Author

Both blocking findings are addressed in 976d7467, and I verified each claim against source rather than just adjusting the prose. English and Chinese pages are updated together.

1. Hardware commands vs. shipped surface

  • flash and monitor are accepted but are placeholders. Both are in runHardware (src/main.zig), which only prints — Flash not yet implemented. (:1644) and Monitor not yet implemented. (:1646). monitor does not invoke udevadm and does not watch for hotplug events, so the "real time … add, remove, and change with VID/PID" description described behavior that does not exist. Both now sit under an explicit Not yet implemented section with their current behavior and source location, and the intro no longer claims flashing works.
  • Tool name corrected to hardware_board_info (src/tools/hardware_info.zig sets tool_name; the filename is what makes hardware_info look right).
  • spi was listed as an available agent tool. allTools registers hardware_board_info, hardware_memory, and i2c when hardware_boards is set (src/tools/root.zig); src/tools/spi.zig is importable but never registered. It is now documented as a library capability rather than a shipped tool.
  • Added the distinction you flagged: the bare hardware CLI subcommand and the peripheral drivers are standalone and not gated on agent tool registration.

2. Subagents: delegation vs. background execution

  • delegate does not spawn a background subagent. src/tools/delegate.zig calls completeAgentPrompt synchronously in the calling thread — no SubagentManager task, no concurrency, no task ID. Now described as its own synchronous path rather than as background delegation.
  • The query examples are replaced with the supported surface: /subagents, list, status, info <id>, kill <id|all>, help. getTaskStatus, getTaskResult, and getRunningCount are now called out explicitly as internal SubagentManager methods that cannot be invoked from a prompt, tool call, or slash command. The spawn schema is documented as {task, label, agent} — it is the only subagent-related tool and cannot query or cancel.
  • kill is noted as the general task-termination command, not subagent-specific, and unable to revive a completed task.
  • The Chinese page is abbreviated and did not carry the false claims, but it also lacked the distinction, so it gains the same delegate and query sections.

3. MCP dynamic groups (the smaller clarification)

Your read was right, and the split is sharper than the guide implied. Keyword matching for dynamic lives in filterToolSpecsForTurn (the native tool-schema path). filterToolsForPromptText admits only built-ins and always-group tools — dynamic tools are never written into the prompt text. Added a table showing both paths, plus the practical consequence: on a provider without native tool schemas, dynamic groups silently do nothing.

Unchanged

  • The index repair, archive moves, and CONTRIBUTING.md slimming are untouched.
  • The Zig 0.16.0 pin and the tool_filter_groups behavior description are as before.
  • Still deferred to the skills PR: the skills page.
  • Verified that the limits table in the subagents page matches source (max_iterations = 15, max_concurrent = 4 in src/subagent.zig) — it was already accurate.

Docs only, no code touched. All anchors added resolve to headings on the same page. Ready for re-review.

This branch has not been deployed

No deployments
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