Skip to content

Add package documentation to all public packages#548

Open
PratikDhanave wants to merge 2 commits into
microsoft:mainfrom
PratikDhanave:docs-package-comments
Open

Add package documentation to all public packages#548
PratikDhanave wants to merge 2 commits into
microsoft:mainfrom
PratikDhanave:docs-package-comments

Conversation

@PratikDhanave

@PratikDhanave PratikDhanave commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What

Adds a package-level doc comment (via a doc.go per package) to every public package that lacked one — 24 packages in total, so each opens with an overview on pkg.go.dev instead of a bare symbol list.

Covers the core (agent, message), the providers (openai, anthropic, gemini, copilot, a2a, agui, otel), tools (tool, functool, agenttool), workflow (workflow, checkpoint, inproc, observability, opentelemetry), and the remaining agent/message subpackages (compaction, jsonformat, toolautocall, skills, fsskills, messagefilter, messageworkflow).

Why

Sibling packages (foundryprovider, tool/mcptool, tool/shelltool, workflow/agentworkflow) already had package docs; this brings the rest up to the same bar. After this, no public package is missing a package overview.

Notes

  • Documentation only — no code changes, no API changes; go build, go vet, and gofmt all clean.
  • Each comment is concise, accurate to the code, and uses godoc doc links to primary entry points (e.g. [NewAgent], [Agent.Run]) where helpful.
  • Placed in isolated doc.go files to avoid churn on the primary source files (and conflicts with in-flight PRs).

The agent and message packages — the core of the framework — and the
OpenAI, Anthropic, and Gemini provider packages had no package-level doc
comment, so their pkg.go.dev pages open with no overview (unlike
foundryprovider, mcptool, shelltool, and agentworkflow, which do).

Add a doc.go with a concise package comment to each, using godoc doc
links to the primary entry points. Documentation only; no code changes.
Copilot AI review requested due to automatic review settings July 19, 2026 03:09
@PratikDhanave
PratikDhanave requested a review from a team as a code owner July 19, 2026 03:09

Copilot AI 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.

Pull request overview

This PR adds package-level GoDoc comments (doc.go) to key public packages so their pkg.go.dev pages display a useful overview, bringing them in line with other already-documented packages in the repo.

Changes:

  • Added package documentation for core packages agent and message.
  • Added package documentation for the main provider packages: provider/openaiprovider, provider/anthropicprovider, and provider/geminiprovider.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
agent/doc.go Adds package overview and links to primary agent entry points (Agent.Run*, ResponseStream).
message/doc.go Adds package overview describing the message/content model and JSON marshaling approach.
provider/openaiprovider/doc.go Adds package overview and links to OpenAI agent constructors (NewAgent, NewResponsesAgent, NewChatCompletionsAgent).
provider/anthropicprovider/doc.go Adds package overview and links to NewAgent / AgentConfig.
provider/geminiprovider/doc.go Adds package overview and links to NewAgent / AgentConfig.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Follow-up in this PR covering every remaining public package without a
package doc: agent/compaction, agent/format/jsonformat,
agent/harness/toolautocall, agent/skills(+fsskills), message/messagefilter,
message/messageworkflow, provider/{a2a,agui,copilot,otel}provider, tool
(+agenttool, functool), and workflow (+checkpoint, inproc, observability,
opentelemetry). Every public package now has a package-level overview on
pkg.go.dev. Documentation only.
@PratikDhanave PratikDhanave changed the title Add package documentation for core packages and main providers Add package documentation to all public packages Jul 19, 2026
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