Swift DocC
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Audit given Swift type(s)/file(s) — and the DocC catalog(s) of the target(s) they live in — for complete,
well-formed /// documentation, generate whatever is missing grounded in the actual code and current changes,
then run the project’s own DocC tooling to confirm the result builds. Unlike a doc build alone, which never warns
on missing documentation by default, this skill audits completeness via swift package dump-symbol-graph before
trusting the build’s silence. It only adds/completes documentation comments and catalog landing pages — it never
changes behavior, signatures, or non-comment code, and test declarations are exempt from the requirement.
Purpose
iru-swift-docc closes Swift documentation gaps without assuming a fixed house style: it discovers the project’s
actual documentation bar (a contributor guide, a .swiftlint.yml missing_docs opt-in rule, a .spi.yml
documentation_targets list, or observed practice) and phrasing conventions, audits every type, initializer,
property, method, subscript, and enum case in scope, ensures each touched target has a <Target>.docc/<Target>.md
catalog landing page, fills in what’s missing, and proves the result actually builds via swift package
generate-documentation or xcodebuild docbuild — rather than generating generic, possibly non-conforming
comments or trusting a doc build that silently accepts gaps. It is the Swift-stack equivalent of
iru-java-javadoc, iru-typescript-tsdoc, and iru-android-dokka.
Plugin
Shipped by the iru-swift plugin of the ai-catalog marketplace (install with /plugin install iru-swift@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Comma-separated Swift type names or file paths to audit. A simple type name is located via |
None — defaults to every main-source |
Outputs
-
Edits (via the Edit tool) to the in-scope Swift files, adding or completing
///DocC comments — no logic, signatures, formatting outside the added comments, or member ordering is changed. -
A new or completed
Sources/<Target>/<Target>.docc/<Target>.mdcatalog landing page for every touched target whose catalog was missing, had no# `<Target>`heading, or had an empty## Topicssection. -
A completeness audit via
swift package dump-symbol-graph(parsingdocCommentpresence per symbol) and, optionally, a corroborating--experimental-documentation-coveragecross-check. -
A confirmed, warning-free structural doc build (
swift package generate-documentation --target <Target> --warnings-as-errors, orxcodebuild docbuildfor an app/Xcode project). -
A plain-text report: per type, members already documented vs. gaps found and filled (named); per target, whether its catalog landing page was already complete, extended, or newly created; the symbol-graph audit numbers (total symbols checked vs. undocumented, per target); the final build result; any test-code argument excluded; any out-of-scope pre-existing doc-build warning surfaced as a separate follow-up note.
Execution flow
Dependencies
Invokes
None — iru-swift-docc is a leaf skill; it only runs swift package/xcodebuild commands, reads/edits Swift
source and DocC catalog pages, and reports, it does not call any other skill in this catalog.
Invoked by
-
Swift Code One Task Group — Step 3.2, once per task group, via the
iru-gate-runneragent, to update DocC documentation for every type the group touched and confirm the documentation build passes.
Related agents
-
iru-gate-runner—iru-swift-code-one-task-group(see Swift Code One Task Group) always invokes this skill from inside airu-gate-runnersub-agent it spawns, not inline.
Source
SKILL.md on GitHub — the file this page was generated from.