Go Godoc
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Make sure a set of Go packages carry complete, well-formed doc comments as defined by go.dev/doc/comment, filling in
whatever is missing, then prove the result through revive’s doc rules, godot and go doc. It only adds or completes
comments (and a doc.go file holding a package comment when none exists) — it never changes behavior, signatures,
imports or any non-comment code.
Purpose
iru-go-godoc detects the Go module (and go.work workspace) and the installed golangci-lint version, then discovers
the project’s real documentation bar: the .golangci.yml revive, godot, dupword and misspell settings, whether a
comments exclusion preset hides revive’s doc findings, and the observed comment style. It audits every package
comment (Package <name> …, or <Bin> … for package main) and every exported function, method, type, constant,
variable, interface method and non-obvious struct field, generating comments grounded in the actual implementation —
returns, matchable sentinel or typed errors, side effects, concurrency safety — and keeping existing Deprecated:
paragraphs.
Verification uses a dedicated throwaway golangci-lint v2 config enabling only revive’s exported and
package-comments rules plus godot, so a project config that excludes the comments preset cannot mask gaps. It
also runs gofmt -l, go build, go vet, and go doc -all per package to prove every comment renders and to catch
unresolved [Name] doc links. When golangci-lint is missing or only v1, it falls back to a go doc plus grep audit.
Test files, testdata/, vendor/ and generated files are never edited.
Plugin
Shipped by the iru-go plugin of the ai-catalog marketplace (install with /plugin install iru-go@ai-catalog; see Plugins).
Invocation
/iru-go-godoc <packages-files-or-identifiers>
/iru-go-godoc
Comma-separated package patterns (./internal/cli/…), files (internal/greet/greet.go) or identifiers
(internal/greet.Greeting, github.com/acme/tool/internal/output.Envelope) are accepted.
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
One or more Go package patterns, files or identifiers, comma-separated. |
Non-test |
Outputs
-
Edited
.gofiles with added or completed doc comments, plus a newdoc.goholding only the package comment (and the sibling license header) when a multi-file package had none. -
A per-package report: symbols already documented, gaps found and filled (kind and what was added).
-
The verification result per check — revive
exported/package-comments,godot,gofmt -l,go build/go vet,go docrendering and unresolved doc links — and which checks could not run (fallback audit when golangci-lint is missing). -
Follow-ups: stutter renames, a project
commentsexclusion preset that hides these findings, and pre-existing out-of-scope failures. Raw tool output is never pasted.
Execution flow
Dependencies
Invokes
None — iru-go-godoc is a leaf skill; it edits doc comments and runs golangci-lint, gofmt, go build, go vet and
go doc directly. It follows `iru-update-docs’s scope approach by convention but calls no skill.
Invoked by
-
Go Code One Task Group — doc comments for touched packages, via the
iru-gate-runneragent.
Also referenced (not invoked) by Go Code Quality (it names this skill as the fixer for
revive:package-comments and godot findings) and Setup Go CLI (as one of the gate skills the
scaffold is detected and called by).
Related agents
-
Gate Runner — callers run this skill inside an
iru-gate-runnersub-agent; the skill does not spawn agents itself.
Source
SKILL.md on GitHub — the file this page was generated from.