Repository navigation
Description
📚 Package Specification Audit Report
Date: 2026-11-13
Total Packages: 154 production package directories under pkg/ (excluding testdata)
Packages with Specs: 51 with their own README, plus 103 pkg/linters/* analyzers and 7 pkg/linters/internal/* helpers covered by parent specs (161 documented)
Coverage: 100% under the repository's package-documentation policy
Coverage Summary
| Status | Area | Spec Location | Notes |
|---|---|---|---|
| ✅ | 51 packages with own README | pkg/<name>/README.md |
No missing non-linter package specs |
| ✅ | 103 pkg/linters/<analyzer> |
pkg/linters/README.md |
Named in the Subpackages table and rule catalog |
| ✅ | 7 pkg/linters/internal/* |
pkg/linters/internal/README.md |
Covered by the collective table |
🚨 Missing Specifications
None. Every production package is documented under the policy.
⚠️ Stale Specifications
None. The largest spec-to-source gap is 7 days (pkg/constants, pkg/fileutil), well inside the 30-day freshness threshold.
🔄 Spec-to-Implementation Mismatches (confirmed)
View mismatches (4 phantom APIs and 1 field drift)
Phantom APIs documented but absent from source
pkg/scanfindings/README.mdlines 31–32 documentSortandCountAtLeast. Neither exists as a non-test function.pkg/scanfindings/spec_test.goalready has aSPEC_MISMATCHnote near line 150.pkg/workflow/README.md(~line 503) documentsSanitizeIdentifier. Onlystringutil.SanitizeIdentifierName(pkg/stringutil/sanitize.go) exists.pkg/intent/README.mdline 79 documentsResolveRisk. The only reference in source is a comment inpkg/intent/resolver.goline 44.pkg/intent/spec_test.goline 13 has aSPEC_MISMATCHnote.
Recommendation: Remove the phantom entries from the READMEs, or implement the functions if they are intended.
Field drift
pkg/actionpins/README.mdline 56 saysApplyContainerPinMappingappliesPinContext.Mappings. The code (pkg/actionpins/mappings.golines 83–94) usesctx.ContainerMappings(types.goline 102).Mappings(types.goline 94) applies to action refs.
Recommendation: Change the README to reference ContainerMappings.
🧪 Stale or Unverified SPEC_MISMATCH Markers
View marker review (2 items)
pkg/semverutil/spec_test.go(~line 271): The marker is confirmed.pkg/semverutil/README.mdline 109 says invalid input is returned unchanged, butNormalizeGitDescribeSemver(semverutil.goline 135) callsEnsureVPrefixfirst, sonot-a-versionbecomesvnot-a-version. Either the README or the code needs to change.pkg/console/spec_test.go(line 89): The marker is stale. The README (line 177) saysomitemptyomits zero values, andrender.go(lines 108–128) does omit them. The marker should be removed.
📊 Undocumented Exported Symbols (heuristic)
View undocumented-symbol counts (337 total)
Counted by whole-word matching exported func and type names against each README. These are approximate.
| Package | Undocumented exports |
|---|---|
pkg/cli |
99 |
pkg/workflow |
68 |
pkg/connectors |
48 |
pkg/workqueue |
35 |
pkg/workflow/actions |
20 |
pkg/workflow/lint |
19 |
pkg/workflow/taint |
14 |
pkg/workflow/aw |
11 |
pkg/workflow/actionslanguageservice |
11 |
pkg/parser |
4 |
pkg/console |
2 |
pkg/workflow/codemod |
2 |
pkg/workflow/gradershell |
2 |
pkg/fileutil |
1 |
pkg/scanfindings |
1 |
📋 Quality Assessment
| Status | Packages |
|---|---|
pkg/scanfindings, pkg/intent, pkg/actionpins, pkg/semverutil (confirmed mismatches) |
|
pkg/cli, pkg/workflow, pkg/connectors, pkg/workqueue (large undocumented export sets) |
|
| ✅ Good | Remaining packages |
Action Items
- Remove or implement phantom APIs:
scanfindings.Sort,scanfindings.CountAtLeast,workflow.SanitizeIdentifier,intent.ResolveRisk - Correct
actionpinsREADME to referenceContainerMappingsinstead ofMappings - Resolve the
semverutilinvalid-input contract (README vsNormalizeGitDescribeSemverbehavior) - Remove the stale
consoleSPEC_MISMATCH marker (pkg/console/spec_test.go:89) - Document the undocumented exported symbols in
pkg/cli,pkg/workflow,pkg/connectors,pkg/workqueue - When opening a fix PR for this issue, include
Closes #<this issue number>(orFixes/Resolves) in the PR description.
Test execution was blocked in this sandbox by TLS errors fetching modules from the Go proxy, so this audit is static. Re-run the spec tests in CI to confirm the marker results.
📚 Specification review by Package Specification Librarian · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.5K · ◷
- expires on Nov 16, 2026, 5:29 AM UTC-08:00
Activity