docs: add docs guide command with embedded agent runbooks - #46
Open
leet-c1 wants to merge 3 commits into
Open
Conversation
Ships c1i docs guide [name], a no-auth subcommand that prints embedded, task-oriented runbooks derived from the real command surface: register-mcp- server, assign-toolset-everyone, and a placeholder test-mcp-gateway (c1i has no gateway-invocation command yet). Run with no argument to list available guide names; an unknown name errors with exit code 2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address adversarial review of #46: `apps list` has no --query flag (only page-size/page-token/limit), so register-mcp-server's step 1 cited a command that would fail with "unknown flag". Replaced it with the actual `apps list` (pick an id) / `apps create` flow. Also replaces the test-mcp-gateway placeholder with the real end-to-end verify flow now that `mcp gateway list-tools` / `mcp gateway call` are landing in a sibling PR: register -> approve -> list-tools -> call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new c1i docs guide [name] subcommand under the no-auth docs command group to print embedded, task-oriented runbooks that are shipped inside the binary (no network calls), along with unit tests and documentation updates.
Changes:
- Introduces
docs guidecommand with an embedded guide registry (list available guide names when no arg is provided; print guide content when a name is provided). - Adds unit tests covering guide registry behavior and
RunEoutput/error handling. - Updates README and CHANGELOG to document the new command.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents c1i docs guide usage and clarifies it’s embedded/static content. |
| cmd/docs.go | Adds docs guide to the docs command help text. |
| cmd/docs_guide.go | Implements the new docs guide command and embeds guide content. |
| cmd/docs_guide_test.go | Adds unit tests for guide listing/lookup and error typing/exit code behavior. |
| CHANGELOG.md | Adds an Unreleased entry announcing docs guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ist) Copilot review: the test-mcp-gateway guide referenced mcp gateway list-tools / call / --gateway-url, which don't exist in this PR's tree (they land in a separate PR). Reviewed in isolation that's a dangling reference. Rewrite the guide as a pre-flight checklist that uses only commands present here (mcp servers get/test-connection, mcp tools list/get/approve, mcp toolsets get-by-entitlement, grants list) and describe direct gateway invocation as shipping separately. Update the CHANGELOG line to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
c1i docs guide [name]— a no-auth subcommand (like the otherdocssubcommands) that prints embedded, task-oriented runbooks. No argument lists available guide names; an unknown name errors with exit code 2 (usageError).cmd/*.go, not invented):register-mcp-server— create/reuse an app, browse the HOSTED catalog or probe an EXTERNAL server, register, and approve discovered tools.assign-toolset-everyone— create a toolset, bind approved tools, resolve its entitlement, and grant it to every user via the access-request flow (c1i has no single "grant to everyone" endpoint, so this loops per-user).test-mcp-gateway— a placeholder/pointer: c1i has no command that invokes a tool through the MCP gateway yet, so this lists the pre-flight checks c1i can do and notes what's missing.docs search/docs page.## [Unreleased]→### Added, and a short README mention.Test plan
go build ./...go vet ./...go test ./...gofmt -l .(clean)golangci-lint run --timeout=3m ./...→0 issuesgo run . docs guidelists all three guide namesgo run . docs guide register-mcp-server/assign-toolset-everyone/test-mcp-gatewayprint the expected runbookgo run . docs guide bogus-name→ usage error, exit code 2RunEfor known name / no-arg listing / unknown name (asserts*usageErrorandexitCode == exitUsage)🤖 Generated with Claude Code